Blockchain-based Governance for Robots
GovernanceEthereum
class retrieves governance rules from the Ethereum blockchain. It interacts with the blockchain via JSON-RPC calls and decodes the governance rules from contract responses.
load_rules_from_blockchain()
getRuleSet()
.getRuleSet()
.POST
request to the blockchain RPC endpoint.str
: Decoded governance rules if successful.None
: If the request fails.decode_eth_response()
Parameter | Type | Description |
---|---|---|
hex_response | str | Raw hex response from blockchain. |
str
: Decoded governance rule set.None
: If decoding fails.Function | Selector | Description |
---|---|---|
getRuleSet() | 0x1db3d5ff | Retrieves the active rule set. |
getLatestRuleSetVersion() | 0x254e2f1e | Retrieves the latest rule set version (currently 2 ). |