@somnia-chain/markets-sdk / index / GovernanceAdmin
Interface: GovernanceAdmin
Defined in: governanceAdmin.ts:33
The protocol-admin governance surface on BinaryMarketsModule — the one seam
an operator can't self-serve (see the module notes above). Built via
client.createGovernanceAdmin(config) with a signer
(GovernanceAdminConfig); the write is module-owner only, the reads
are open chain point reads.
Methods
setAdapterApproved()
setAdapterApproved(
p):Promise<TxResult>
Defined in: governanceAdmin.ts:40
Approve (or revoke) an oracle adapter on the module — the inert→live gate for a factory-minted adapter. MODULE-OWNER ONLY: reverts for any other caller, so a UI shows this only to the protocol admin (see GovernanceAdmin.isModuleOwner).
Parameters
p
Returns
Promise<TxResult>
getModuleOwner()
getModuleOwner():
Promise<`0x${string}`>
Defined in: governanceAdmin.ts:42
The module owner (the protocol admin). Needs config.addresses.binaryModule.
Returns
Promise<`0x${string}`>
isModuleOwner()
isModuleOwner(
addr):Promise<boolean>
Defined in: governanceAdmin.ts:47
Whether addr is the module owner — gate the setAdapterApproved UI on
this. Needs config.addresses.binaryModule.
Parameters
addr
`0x${string}`
Returns
Promise<boolean>