Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

timelock package

Overview

Package timelock is a simplified port of OpenZeppelin's TimelockController.

Operations are scheduled with a delay (measured in blocks). A scheduled operation becomes executable only once the chain height reaches the operation's ready height. Until then it can be cancelled by anyone (this simplified port omits role-based access control). Once executed or cancelled, an operation is terminal.

Solidity mapping:

  • block.number -> runtime.ChainHeight()
  • msg.sender -> unsafe.PreviousRealm().Address()
  • require(...) -> panic(...)
  • events -> chain.Emit(...)
  • mapping(id => op) -> avl.Tree keyed by zero-padded id

Function

StateOf

func StateOf(op *Operation, height int64) string

StateOf returns the display state of op at the given chain height.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/timelock.StateOf(,)"

Result