The Gas Back feature allows contract deployers on OKTC to proportionally distribute their contract’s handling fees to other users. After the user deploys a contract on OKTC and registers the contract, they can proceed to receive a handling fee distribution rate (Gas Back rate) according to the system, which will act as a handling fee for any user that calls this contract. Users can directly register this contract by sending an EVM transaction.
Contract name | Contract role | Contract address |
---|---|---|
GasBackMSGHelper proxy | Generates a Msg according to the corresponding parameters inputted, acts as the parameters of SystemContract invoke interface | Mainnet: 0x0DD08B74c111D148751f38f02ab0C3408ead7d18 Testnet: 0x9e472f77e2A5C8f09B237273960c776ddE1D98C1 |
SystemContract | Offers a public invoke interface; after the user assembles the data, they can use this interface to initiate a staking transaction | Mainnet: 0xd6bce454316b8ddFb76bB7bb1B57B8942B09Acd5 Testnet: 0x727d14EfC4FB5281A18A6d62BCf486a1cF4d2210 |
GasBackMSGHelper | Code implementation | Mainnet: 0xC38246a34aC8241eB56C84B7356aDC6Dde737f99 Testnet: 0xC9306D5963D7e1f02D04Aa78cd5A34b0D27583b3 |
ProxyAdmin | Responsible for managing the proxy’s admin contract | Mainnet: 0xe9196e65a0b6705777fbe829dfa94ec8b9f2ba48 Testnet: 0xcc904644d73fa4aff34fda7433a8f3154c812769 |
The codes use the OKTC staking method as in the examples below, including multi-language version demos; all developers only need to change their private key, address, and parameters to their own:
Interface | Details | Parameter details | This Msg functions as the corresponding command line of SystemContract’s invoke interface parameters |
---|---|---|---|
genRegisterMsg() | Register the contract, enjoy a share of the contract handling fee | _contract: the contract that needs to be registered _withdrawerAddress: contract handling fee recipient’s address _nonces: nonce that user uses during deploying of contract | exchaincli tx feesplit register |
genUpdateMsg() | Update contract handling fee recipient’s address | _contract: address of the registered contract _withdrawerAddress: Updated contract handling recipient’s address | exchaincli tx feesplit update |
genCancelMsg() | Cancel handling fee distribution | _contract: address of the registered contract | exchaincli tx feesplit cancel |