Contract ABI
Note: "Redeem" is called "burn" here.
{
"name": "dVOI Contract",
"methods": [
{
"name": "register_online",
"args": [
{
"type": "address",
"name": "address"
},
{
"type": "byte[]",
"name": "selection_key"
},
{
"type": "byte[]",
"name": "voting_key"
},
{
"type": "byte[]",
"name": "sp_key"
},
{
"type": "uint64",
"name": "first_round"
},
{
"type": "uint64",
"name": "last_round"
},
{
"type": "uint64",
"name": "key_dilution"
}
],
"returns": {
"type": "void"
},
"desc": "Fee admin method to send keyreg online for an escrow account"
},
{
"name": "register_offline",
"args": [
{
"type": "address",
"name": "address"
}
],
"returns": {
"type": "void"
},
"desc": "Fee admin method to send keyreg offline for an escrow account"
},
{
"name": "queue_update_fee_rate",
"args": [
{
"type": "uint16",
"name": "new_rate"
}
],
"returns": {
"type": "void"
},
"desc": "Fee admin method. Scheudles an update of the fee rate. Changes enforced to +/- 5% delta max"
},
{
"name": "queue_update_mint_lock",
"args": [
{
"type": "uint32",
"name": "new_lock"
}
],
"returns": {
"type": "void"
},
"desc": "Fee admin method. Scheudles an update of the mint lock period"
},
{
"name": "apply_update",
"args": [],
"returns": {
"type": "void"
},
"desc": "Public. Apply a time-delayed updated after the timestamp has elapsed."
},
{
"name": "discard_update",
"args": [],
"returns": {
"type": "void"
},
"desc": "Cancel a scheudled params update"
},
{
"name": "update_fee_admin",
"args": [
{
"type": "address",
"name": "new_admin"
}
],
"returns": {
"type": "void"
},
"desc": "Change the fee admin. Admin or fee admins only"
},
{
"name": "update_arbitrary_bytes",
"args": [
{
"type": "byte[]",
"name": "key"
},
{
"type": "byte[]",
"name": "value"
}
],
"returns": {
"type": "void"
},
"desc": "While updatable only. Update byte storage"
},
{
"name": "update_arbitrary_uint64",
"args": [
{
"type": "byte[]",
"name": "key"
},
{
"type": "uint64",
"name": "value"
}
],
"returns": {
"type": "void"
},
"desc": "While updatable only. Update uint storage"
},
{
"name": "update_updatable_by",
"args": [
{
"type": "byte[]",
"name": "new_updater"
}
],
"returns": {
"type": "void"
},
"desc": "While updatable only. Change or remove admin (updatable_by)"
},
{
"name": "init_storage",
"args": [],
"returns": {
"type": "void"
},
"desc": "Admin method to init storage. this will be needed as I am reusing an existing app"
},
{
"name": "mint_dvoi",
"args": [],
"returns": {
"type": "void"
},
"desc": "Public method. Mint dvoi (with time lock)\nprevious transaction in group must be payment in VOI recalculates fees/rate if the balance had changed before the payment rate must be kept stable during mint/burn dvoi will be allocated to the user in a box for the duration LOCK_PERIOD (1 week in prod)"
},
{
"name": "burn_dvoi",
"args": [],
"returns": {
"type": "void"
},
"desc": "Public method. Swaps dVOI for VOI at the current rate. Previous transaction in group must be payment in dVOI,"
},
{
"name": "nullun",
"args": [],
"returns": {
"type": "void"
},
"desc": "Public empty method for opcode budget increase"
},
{
"name": "withdraw_fees",
"args": [
{
"type": "uint64",
"name": "amount"
}
],
"returns": {
"type": "void"
},
"desc": "fee admin method to withdraw accumulated fees"
},
{
"name": "claim_dvoi",
"args": [],
"returns": {
"type": "void"
},
"desc": "Claim dVOI after the lock period has elapsed.\nSent to the first foreign account ref, so it can be called by anyone. Sends all vested dVOI. Unvested dVOI rewritten to box if needed"
},
{
"name": "undo_mint_dvoi",
"args": [
{
"type": "uint64",
"name": "ts"
}
],
"returns": {
"type": "void"
},
"desc": "Public. Undo dvoi minting & receive back the voi paid. Used when dVOi is not yet vested.\nAccepts timestamp of voi mint. This method can influence the dVOI/VOI rate favorably to dVOI holders (if rewards have dropped since mint)"
},
{
"name": "update_balances",
"args": [],
"returns": {
"type": "void"
},
"desc": "Public method to recalculate balances after rewards are received"
},
{
"name": "update_balances_get_rate",
"args": [],
"returns": {
"type": "uint64"
},
"desc": "Public method to update balance and return rate. For contract-to-contract calls."
}
],
"networks": {}
}