@somnia-chain/markets-sdk / index / GovernanceAdmin
Interface: GovernanceAdmin
Defined in: packages/sdk/src/governanceAdmin.ts:48
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.
Every write throws ContractRevertError when the chain rejects it — at
simulation, at send, or as a mined receipt with status: "reverted" (the
reason is recovered by replaying the call at that block while the node still
has the state) — and RpcError when the send or the receipt read does not
complete. A reverted write never resolves as if it had been confirmed.
Methods
setAdapterApproved()
setAdapterApproved(
p):Promise<TxResult>
Defined in: packages/sdk/src/governanceAdmin.ts:55
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: packages/sdk/src/governanceAdmin.ts:57
The module owner (the protocol admin). Needs config.addresses.binaryModule.
Returns
Promise<`0x${string}`>
isModuleOwner()
isModuleOwner(
addr):Promise<boolean>
Defined in: packages/sdk/src/governanceAdmin.ts:62
Whether addr is the module owner — gate the setAdapterApproved UI on
this. Needs config.addresses.binaryModule.
Parameters
addr
`0x${string}`
Returns
Promise<boolean>