name: CoreGovernance
description: Governance contract
structs: {}
typedefs: {} 
state: {}
funcs:
  # state controller
  rotateStateController:
    params:
      stateControllerAddress=S: Address
  addAllowedStateControllerAddress:
    params:
      stateControllerAddress=S: Address
  removeAllowedStateControllerAddress:
    params:
      stateControllerAddress=S: Address
  # chain owner
  claimChainOwnership: {}
  delegateChainOwnership:
    params:
      chainOwner=o: AgentID
  # fees
  setFeePolicy:
    params:
      feePolicyBytes=g: Bytes
  # chain info
  setChainInfo:
    params:
      maxBlobSize=mb: Uint32? # default maximum size of a blob
      maxEventSize=ms: Uint16? # default maximum size of a single event
      maxEventsPerReq=mr: Uint16? # default maximum number of events per request
  # access nodes
  addCandidateNode:
    params:
      accessNodeInfoForCommittee=i: Bool
      accessNodeInfoPubKey=ip: Bytes
      accessNodeInfoCertificate=ic: Bytes
      accessNodeInfoAccessAPI=ia: String
  revokeAccessNode:
    params:
      accessNodeInfoPubKey=ip: Bytes
      accessNodeInfoCertificate=ic: Bytes
  changeAccessNodes:
    params:
      changeAccessNodesActions=n: map[Bytes]Uint8

views:
  # state controller
  getAllowedStateControllerAddresses:
    results:
      allowedStateControllerAddresses=a: Address[] # native contract, so this is an Array16
  # chain owner
  getChainOwner:
    results:
      chainOwner=o: AgentID
  # fees
  getFeePolicy:
    results:
      feePolicyBytes=g: Bytes
  # chain info
  getChainInfo:
    results:
      chainID=c: ChainID
      chainOwnerID=o: AgentID
      description=d: String
      gasFeePolicyBytes=g: Bytes
      maxBlobSize=mb: Uint32
      maxEventSize=me: Uint16
      maxEventsPerReq=mr: Uint16
  getMaxBlobSize:
    results:
      maxBlobSize=mb: Uint32
  # access nodes
  getChainNodes:
    results:
      accessNodeCandidates=ac: map[Bytes]Bytes
      accessNodes=an: map[Bytes]Bytes
