Vaulta

emanateoneos

Contract

{
  "version": "eosio::abi/1.1",
  "types": [],
  "structs": [
    {
      "name": "account",
      "base": "",
      "fields": [
        {
          "name": "balance",
          "type": "asset"
        },
        {
          "name": "claimed",
          "type": "bool"
        }
      ]
    },
    {
      "name": "account_tier",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "initialBalance",
          "type": "asset"
        },
        {
          "name": "tier_class",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "claim",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "sym",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "clockup",
      "base": "",
      "fields": [
        {
          "name": "tier_class",
          "type": "uint64"
        },
        {
          "name": "initialLockupPeriod",
          "type": "uint64"
        },
        {
          "name": "postLockupPercent",
          "type": "uint64"
        },
        {
          "name": "postLockupPeriod",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "create",
      "base": "",
      "fields": [
        {
          "name": "issuer",
          "type": "name"
        },
        {
          "name": "maximum_supply",
          "type": "asset"
        }
      ]
    },
    {
      "name": "curr_stats",
      "base": "",
      "fields": [
        {
          "name": "supply",
          "type": "asset"
        },
        {
          "name": "max_supply",
          "type": "asset"
        },
        {
          "name": "issuer",
          "type": "name"
        }
      ]
    },
    {
      "name": "datapoints",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "value",
          "type": "uint64"
        },
        {
          "name": "median",
          "type": "uint64"
        },
        {
          "name": "timestamp",
          "type": "time_point"
        }
      ]
    },
    {
      "name": "dlockup",
      "base": "",
      "fields": [
        {
          "name": "tier_class",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "exchange",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        }
      ]
    },
    {
      "name": "global_timer",
      "base": "",
      "fields": [
        {
          "name": "timer",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "grow",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "grow_timer",
      "base": "",
      "fields": [
        {
          "name": "timer",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "growbase",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        },
        {
          "name": "inflate_balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "growtime",
      "base": "",
      "fields": []
    },
    {
      "name": "infgrow",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        }
      ]
    },
    {
      "name": "inflate",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        }
      ]
    },
    {
      "name": "issue",
      "base": "",
      "fields": [
        {
          "name": "to",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "memo",
          "type": "string"
        },
        {
          "name": "tier_class",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "limitbase",
      "base": "",
      "fields": [
        {
          "name": "stake_limit",
          "type": "asset"
        },
        {
          "name": "exchg_limit",
          "type": "asset"
        }
      ]
    },
    {
      "name": "open",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "symbol",
          "type": "symbol"
        },
        {
          "name": "ram_payer",
          "type": "name"
        }
      ]
    },
    {
      "name": "oracle_db",
      "base": "",
      "fields": [
        {
          "name": "p_key",
          "type": "uint64"
        },
        {
          "name": "queryMatch",
          "type": "bool"
        },
        {
          "name": "queryId",
          "type": "string"
        },
        {
          "name": "result",
          "type": "string"
        }
      ]
    },
    {
      "name": "recover",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "sym",
          "type": "symbol"
        }
      ]
    },
    {
      "name": "recover_stats",
      "base": "",
      "fields": [
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "setlimit",
      "base": "",
      "fields": [
        {
          "name": "t_limt",
          "type": "name"
        },
        {
          "name": "value",
          "type": "asset"
        }
      ]
    },
    {
      "name": "stake",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "stakebase",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        },
        {
          "name": "inflate_balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "tier",
      "base": "",
      "fields": [
        {
          "name": "tier_class",
          "type": "uint64"
        },
        {
          "name": "initialLockupPeriod",
          "type": "uint64"
        },
        {
          "name": "initialBlock",
          "type": "uint64"
        },
        {
          "name": "postLockupPercent",
          "type": "uint64"
        },
        {
          "name": "postLockupPeriod",
          "type": "uint64"
        },
        {
          "name": "d_postLockupTime",
          "type": "uint64"
        },
        {
          "name": "d_postLockupPercent",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "transfer",
      "base": "",
      "fields": [
        {
          "name": "from",
          "type": "name"
        },
        {
          "name": "to",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "ulockup",
      "base": "",
      "fields": [
        {
          "name": "tier_class",
          "type": "uint64"
        },
        {
          "name": "initialLockupPeriod",
          "type": "uint64"
        },
        {
          "name": "postLockupPercent",
          "type": "uint64"
        },
        {
          "name": "postLockupPeriod",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "ungrow",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "unstake",
      "base": "",
      "fields": [
        {
          "name": "owner",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "update",
      "base": "",
      "fields": [
        {
          "name": "issuer",
          "type": "name"
        },
        {
          "name": "maximum_supply",
          "type": "asset"
        }
      ]
    },
    {
      "name": "upsertime",
      "base": "",
      "fields": []
    }
  ],
  "actions": [
    {
      "name": "claim",
      "type": "claim",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Claim Existing Token\nsummary: '{{nowrap owner}} to claim their existing token balance record'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of token::claim\n{{owner}} agrees to claim or take ownership of the RAM associated with their {{symbol_to_symbol_code sym}} balance record. RAM will be recovered from the token issuer's account and deducted from the {{owner}}'s account. No other chain state changes will occur and no balance changes under the {{owner}}'s account."
    },
    {
      "name": "clockup",
      "type": "clockup",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Create Tier Class\nsummary: 'Create a new token tier class'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of the token::clockup\n{{$action.account}} agrees to create a new token tier class with the associated tier metadata given by the initial lockup period of {{initialLockupPeriod}}, post lockup percent of {{postLockupPercent}} and the post lockup period of {{postLockupPeriod}}.\n\n---\nspec_version: \"0.1.0\"\ntitle: Update Existing Tier Class\nsummary: 'Update an existing token tier class'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---"
    },
    {
      "name": "create",
      "type": "create",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Create New Token\nsummary: 'Create a new token'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of token::create\n{{$action.account}} agrees to create a new token with symbol {{asset_to_symbol_code maximum_supply}} to be managed by {{issuer}}.\nThis action will not result in any tokens being issued into circulation.\n{{issuer}} will be allowed to issue tokens into circulation, up to a maximum supply of {{maximum_supply}}.\nRAM will be deducted from {{$action.account}}'s resources to create the necessary records."
    },
    {
      "name": "dlockup",
      "type": "dlockup",
      "ricardian_contract": "### Intent of the token::dlockup\n{{$action.account}} agrees to delete an existing token {{tier_class}} tier class and remove the associated record from chain state.\n\n---\nspec_version: \"0.1.0\"\ntitle: Update Global Timer\nsummary: 'Update the global timer with the current time'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@ \n---"
    },
    {
      "name": "exchange",
      "type": "exchange",
      "ricardian_contract": ""
    },
    {
      "name": "grow",
      "type": "grow",
      "ricardian_contract": ""
    },
    {
      "name": "growtime",
      "type": "growtime",
      "ricardian_contract": ""
    },
    {
      "name": "infgrow",
      "type": "infgrow",
      "ricardian_contract": ""
    },
    {
      "name": "inflate",
      "type": "inflate",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Inflate Existing Tokens\nsummary: 'Periodically compound {{nowrap owner}}'s principal staked balance'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of the token::inflate\n{{$action.account}} agrees to periodically compound {{owner}}'s principal staked balance at the given rate of 5%. The compounded interest will automatically be staked in a staking period and {{owner}}'s lowest staked principal balance for the new upcoming period will be updated."
    },
    {
      "name": "issue",
      "type": "issue",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Issue Existing Token into Circulation\nsummary: 'Issue {{nowrap quantity}} into circulation and transfer into {{nowrap to}}'s account with a token tier class {{nowrap tier_class}}'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of token::issue\nThe token issuer agrees to issue {{quantity}} into circulation, and transfer it into {{to}}'s account.\n\n{{#if memo}}There is a memo attached to the transfer stating:\n{{memo}}\n{{/if}}\n\nIf {{to}} does not have a balance for {{asset_to_symbol_code quantity}}, or the token issuer does not have a balance for {{asset_to_symbol_code quantity}}, token issuer will be designated as the RAM payer of the {{asset_to_symbol_code quantity}} token balance for {{to}}. As a result, RAM will be deducted from the token issuer's resources to create the necessary records.\nThis action does not allow the {{quantity}} to exceed the maximum allowed supply of the token.\nThe action associates {{to}} with a token tier class which offers different token lockups or vesting periods under agreement between the contract account owner and {{to}}."
    },
    {
      "name": "open",
      "type": "open",
      "ricardian_contract": ""
    },
    {
      "name": "recover",
      "type": "recover",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Recover Existing Token\nsummary: 'Recover {{nowrap owner}}'s existing unclaimed token balance record'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of token::recover\nThe token issuer agrees to recover {{owner}}'s unclaimed token balance record and recover the RAM consumed from the token issuer under agreement between both parties. \nThe token issuer agrees to not recover the {{owner}}'s unclaimed token balance record until the agreed upon duration imposed on the {{owner}} to claim ownership of their record. The accumulated recovered token balance is recorded on chain state in the recover table."
    },
    {
      "name": "setlimit",
      "type": "setlimit",
      "ricardian_contract": ""
    },
    {
      "name": "stake",
      "type": "stake",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Stake Existing Tokens\nsummary: 'Stake {{nowrap owner}}'s balance of {{nowrap balance}}'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of the token::stake\n{{$action.account}} agrees to stake the {{owner}}'s balance of {{balance}} under a staking period, where the {{owner}} is unable to send {{balance}} tokens. {{owner}} will be subjected to periodic compound interest at the given rate of 5%. In order to modify {{owner}}'s principal amount applied to periodic compound interest, the global timer set in the previous period will be checked against the current time and will only modify the principal amount based on the lowest staked principal balance in a given period."
    },
    {
      "name": "transfer",
      "type": "transfer",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Transfer Existing Token\nsummary: 'Send {{nowrap quantity}} from {{nowrap from}} to {{nowrap to}}'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of the token::transfer\n{{from}} agrees to send {{quantity}} to {{to}}.\n\n{{#if memo}}There is a memo attached to the transfer stating:\n{{memo}}\n{{/if}}\n\nIf {{from}} is not already the RAM payer of their {{asset_to_symbol_code quantity}} token balance, {{from}} will be designated as such. As a result, RAM will be deducted from {{from}}'s resources to refund the original RAM payer.\nIf {{to}} does not have a balance for {{asset_to_symbol_code quantity}}, {{from}} will be designated as the RAM payer of the {{asset_to_symbol_code quantity}} token balance for {{to}}. As a result, RAM will be deducted from {{from}}'s resources to create the necessary records.\n{{from}} will be subject to the account's associated tier class and the vesting conditions imposed on it such as the initial lockup period, post lockup periods and post percentage unlock. {{from}} will also be cross-checked against their existing staked balance to ensure that {{quantity}} sent is not locked or staked."
    },
    {
      "name": "ulockup",
      "type": "ulockup",
      "ricardian_contract": "### Intent of the token::ulockup\n{{$action.account}} agrees to update an existing token {{tier_class}} tier class with the updated tier metadata given by the initial lockup period of {{initialLockupPeriod}}, post lockup percent of {{postLockupPercent}} and the post lockup period of {{postLockupPeriod}}.\n\n---\nspec_version: \"0.1.0\"\ntitle: Delete Tier Class\nsummary: 'Delete an existing token tier class'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---"
    },
    {
      "name": "ungrow",
      "type": "ungrow",
      "ricardian_contract": ""
    },
    {
      "name": "unstake",
      "type": "unstake",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Unstake Existing Tokens\nsummary: 'Unstake {{nowrap owner}}'s balance of {{nowrap balance}}'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of the token::unstake\n{{owner}} agrees to unstake their {{balance}}, thereby removing {{balance}} from {{owner}}'s staked balance and from being subject to any periodic compound interest. If the {{balance}} unstaked is equal to the {{owner}}'s current staked balance, then the associated record is removed and the RAM is refunded back to the contract account owner. If the balance unstaked is not equal to the {{owner}}'s current staked balance, then the {{owner}}'s RAM will be deducted for modification of the associated staked balance and principal balance record."
    },
    {
      "name": "update",
      "type": "update",
      "ricardian_contract": "---\nspec_version: \"0.1.0\"\ntitle: Update Existing Token\nsummary: 'Update an existing token and associated token metadata'\nicon: @ICON_BASE_URL@/@TOKEN_ICON_URI@\n---\n\n### Intent of token::update\n{{$action.account}} agrees to update an existing token with symbol {asset_to_symbol_code maximum_supply} to be managed by the existing or updated {{issuer}}.\nThis action will not result in any tokens being issued into circulation.\nThe existing or updated {{issuer}} will be allowed to issue tokens into circulation, up to a maximum supply of {{maximum_supply}}.\nRAM will be deducted from {{$action.account}}'s resources to modify the necessary records.\nThis action does not allow the {{maximum_supply}} to exceed the existing circulating supply of the token."
    },
    {
      "name": "upsertime",
      "type": "upsertime",
      "ricardian_contract": "### Intent of the token::upsertime\n{{$action.account}} agrees to update the chain state global timer with the current time.\nThis will be required as a time guard for updating the lowest principal staked balance and to keep track of each compound interest period.\n\n### Term\nTERM. This Contract expires at the conclusion of code execution."
    }
  ],
  "tables": [
    {
      "name": "accgrowdb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "growbase"
    },
    {
      "name": "acclimitdb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "limitbase"
    },
    {
      "name": "accounts",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "account"
    },
    {
      "name": "accstakedb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "stakebase"
    },
    {
      "name": "acctiers",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "account_tier"
    },
    {
      "name": "datapoints",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "datapoints"
    },
    {
      "name": "growtimer",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "grow_timer"
    },
    {
      "name": "oracledb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "oracle_db"
    },
    {
      "name": "recoverdb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "recover_stats"
    },
    {
      "name": "stat",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "curr_stats"
    },
    {
      "name": "tiers",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "tier"
    },
    {
      "name": "timerdb",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "global_timer"
    }
  ],
  "ricardian_clauses": [
    {
      "id": "Warranty",
      "body": "The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers."
    },
    {
      "id": "Default",
      "body": "The occurrence of any of the following shall constitute a material default under this Contract:"
    },
    {
      "id": "Remedies",
      "body": "In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated."
    },
    {
      "id": "ForceMajeure",
      "body": "If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control (\"Force Majeure\"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates."
    },
    {
      "id": "DisputeResolution",
      "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction."
    },
    {
      "id": "Agreement",
      "body": "This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties."
    },
    {
      "id": "Severability",
      "body": "If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited."
    },
    {
      "id": "Amendment",
      "body": "This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment."
    },
    {
      "id": "GoverningLaw",
      "body": "This Contract shall be construed in accordance with the Maxims of Equity."
    },
    {
      "id": "Notice",
      "body": "Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type."
    },
    {
      "id": "WaiverOfContractualRight",
      "body": "The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract."
    },
    {
      "id": "ArbitratorsFeesToPrevailingParty",
      "body": "In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs."
    },
    {
      "id": "ConstructionAndInterpretation",
      "body": "The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort."
    },
    {
      "id": "InWitnessWhereof",
      "body": "In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract."
    }
  ],
  "error_messages": [],
  "abi_extensions": [],
  "variants": [],
  "action_results": []
}