Jungle 4 (Testnet)

powerbot.gm

컨트랙트

{
  "version": "eosio::abi/1.2",
  "types": [],
  "structs": [
    {
      "name": "action_pattern",
      "base": "",
      "fields": [
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "action",
          "type": "name"
        }
      ]
    },
    {
      "name": "allowances_row",
      "base": "",
      "fields": [
        {
          "name": "beneficiaries",
          "type": "name[]"
        },
        {
          "name": "patterns",
          "type": "action_pattern[]"
        }
      ]
    },
    {
      "name": "assertdebit",
      "base": "",
      "fields": []
    },
    {
      "name": "balances_row",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "beneficiary_entry",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        },
        {
          "name": "cpu_floor_ms",
          "type": "uint32?"
        },
        {
          "name": "net_floor_kb",
          "type": "uint32?"
        },
        {
          "name": "cpu_increment_ms",
          "type": "uint32?"
        },
        {
          "name": "net_increment_kb",
          "type": "uint32?"
        },
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "bounds_row",
      "base": "",
      "fields": [
        {
          "name": "min_cpu_ms",
          "type": "uint32"
        },
        {
          "name": "max_cpu_ms",
          "type": "uint32"
        },
        {
          "name": "min_net_kb",
          "type": "uint32"
        },
        {
          "name": "max_net_kb",
          "type": "uint32"
        },
        {
          "name": "default_cpu_floor_ms",
          "type": "uint32"
        },
        {
          "name": "default_cpu_increment_ms",
          "type": "uint32"
        },
        {
          "name": "default_net_floor_kb",
          "type": "uint32"
        },
        {
          "name": "default_net_increment_kb",
          "type": "uint32"
        }
      ]
    },
    {
      "name": "claim",
      "base": "",
      "fields": [
        {
          "name": "to",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        }
      ]
    },
    {
      "name": "close",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        }
      ]
    },
    {
      "name": "configure",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiary",
          "type": "name"
        },
        {
          "name": "cpu_floor_ms",
          "type": "uint32?"
        },
        {
          "name": "net_floor_kb",
          "type": "uint32?"
        },
        {
          "name": "cpu_increment_ms",
          "type": "uint32?"
        },
        {
          "name": "net_increment_kb",
          "type": "uint32?"
        },
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "coverage_row",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        }
      ]
    },
    {
      "name": "delallow",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        }
      ]
    },
    {
      "name": "delorder",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        }
      ]
    },
    {
      "name": "earnings_row",
      "base": "",
      "fields": [
        {
          "name": "balance",
          "type": "asset"
        }
      ]
    },
    {
      "name": "inflight_row",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiary",
          "type": "name"
        },
        {
          "name": "bound",
          "type": "asset"
        },
        {
          "name": "provider_fee",
          "type": "asset"
        },
        {
          "name": "cpu_ms",
          "type": "uint32"
        },
        {
          "name": "net_kb",
          "type": "uint32"
        },
        {
          "name": "consumed",
          "type": "bool"
        },
        {
          "name": "chain_cost",
          "type": "asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "logresource",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiary",
          "type": "name"
        },
        {
          "name": "chain_cost",
          "type": "asset"
        },
        {
          "name": "provider_fee",
          "type": "asset"
        },
        {
          "name": "cpu_ms",
          "type": "uint32"
        },
        {
          "name": "net_kb",
          "type": "uint32"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "open",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        }
      ]
    },
    {
      "name": "orders_row",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "entries",
          "type": "beneficiary_entry[]"
        }
      ]
    },
    {
      "name": "setallow",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiaries",
          "type": "name[]"
        },
        {
          "name": "patterns",
          "type": "action_pattern[]"
        }
      ]
    },
    {
      "name": "setbounds",
      "base": "",
      "fields": [
        {
          "name": "min_cpu_ms",
          "type": "uint32"
        },
        {
          "name": "max_cpu_ms",
          "type": "uint32"
        },
        {
          "name": "min_net_kb",
          "type": "uint32"
        },
        {
          "name": "max_net_kb",
          "type": "uint32"
        },
        {
          "name": "default_cpu_floor_ms",
          "type": "uint32"
        },
        {
          "name": "default_cpu_increment_ms",
          "type": "uint32"
        },
        {
          "name": "default_net_floor_kb",
          "type": "uint32"
        },
        {
          "name": "default_net_increment_kb",
          "type": "uint32"
        }
      ]
    },
    {
      "name": "setorder",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "entries",
          "type": "beneficiary_entry[]"
        }
      ]
    },
    {
      "name": "state_row",
      "base": "",
      "fields": [
        {
          "name": "total_entitlements",
          "type": "asset"
        }
      ]
    },
    {
      "name": "sweep",
      "base": "",
      "fields": [
        {
          "name": "to",
          "type": "name"
        },
        {
          "name": "token_contract",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        }
      ]
    },
    {
      "name": "topup",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiary",
          "type": "name"
        },
        {
          "name": "cpu_ms",
          "type": "uint32"
        },
        {
          "name": "net_kb",
          "type": "uint32"
        },
        {
          "name": "cpu_frac",
          "type": "int64"
        },
        {
          "name": "net_frac",
          "type": "int64"
        },
        {
          "name": "max_payment",
          "type": "asset"
        },
        {
          "name": "fee",
          "type": "asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "transactfee",
      "base": "",
      "fields": [
        {
          "name": "provider",
          "type": "name"
        },
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "beneficiary",
          "type": "name"
        },
        {
          "name": "fee",
          "type": "asset"
        },
        {
          "name": "memo",
          "type": "string"
        }
      ]
    },
    {
      "name": "withdraw",
      "base": "",
      "fields": [
        {
          "name": "funder",
          "type": "name"
        },
        {
          "name": "quantity",
          "type": "asset"
        }
      ]
    }
  ],
  "actions": [
    {
      "name": "assertdebit",
      "type": "assertdebit",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Confirm the debit happened\nsummary: 'Confirm the chain cost of a top-up was observed and debited'\nicon:\n---\n\npowerbot confirms it observed what the chain charged for a top-up it just made,\nand fails the whole transaction if it did not."
    },
    {
      "name": "claim",
      "type": "claim",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Claim earnings\nsummary: 'Claim {{nowrap quantity}} of earnings to {{nowrap to}}'\nicon:\n---\n\nThe contract account claims {{quantity}} of the earnings powerbot has accrued,\nand powerbot transfers it to {{to}}."
    },
    {
      "name": "close",
      "type": "close",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Close a balance\nsummary: 'Close the powerbot balance of {{nowrap funder}}'\nicon:\n---\n\n{{funder}} closes their powerbot balance and reclaims the RAM of its row. The\nbalance must be empty."
    },
    {
      "name": "configure",
      "type": "configure",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Configure one account\nsummary: 'Change how {{nowrap beneficiary}} is kept usable for {{nowrap funder}}'\nicon:\n---\n\n{{funder}} changes the amounts that keep {{beneficiary}} usable, or pauses it,\nleaving every other account in the standing order untouched. An amount left\nempty falls back to the operator's published default."
    },
    {
      "name": "delallow",
      "type": "delallow",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Erase an allowance\nsummary: 'Erase the allowance of {{nowrap funder}}'\nicon:\n---\n\n{{funder}} erases its allowance and reclaims the RAM of its rows. No account it\nnamed can settle a fee from its balance afterwards."
    },
    {
      "name": "delorder",
      "type": "delorder",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Erase a standing order\nsummary: 'Erase the standing order of {{nowrap funder}}'\nicon:\n---\n\n{{funder}} erases its standing order and reclaims the RAM of\nits row. No account named by it is kept usable afterwards."
    },
    {
      "name": "logresource",
      "type": "logresource",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Disclose a top-up\nsummary: 'Disclose a top-up of {{nowrap beneficiary}} charged to {{nowrap funder}}'\nicon:\n---\n\npowerbot discloses to {{funder}} that it bought {{cpu_ms}} ms of CPU and\n{{net_kb}} kB of NET for {{beneficiary}}, at a chain cost of {{chain_cost}}\nplus an operator fee of {{provider_fee}}."
    },
    {
      "name": "open",
      "type": "open",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Open a balance\nsummary: 'Open a powerbot balance for {{nowrap funder}}'\nicon:\n---\n\n{{funder}} opens their powerbot balance at zero, paying for the row it occupies.\nDoing so again changes nothing."
    },
    {
      "name": "setallow",
      "type": "setallow",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Grant an allowance\nsummary: 'Let the accounts {{nowrap funder}} names settle fees from its balance'\nicon:\n---\n\n{{funder}} names the accounts whose transaction fees its balance may pay, and\noptionally the actions those transactions may carry, paying for the rows they\noccupy. Naming no account covers {{funder}} alone. Doing so again replaces the\nwhole grant. The grant carries no cap and no expiry: the balance is the limit\nand erasing the grant is the only revocation."
    },
    {
      "name": "setbounds",
      "type": "setbounds",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Publish operator bounds\nsummary: 'Publish the limits and defaults the operator will honor'\nicon:\n---\n\nThe contract account publishes the smallest and largest floors and top-up\nincrements it will accept on a standing order, and the values it applies where a standing\norder is silent. Standing orders already written are unaffected."
    },
    {
      "name": "setorder",
      "type": "setorder",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Write a standing order\nsummary: 'Keep the accounts {{nowrap funder}} names usable'\nicon:\n---\n\n{{funder}} names the accounts it wants kept usable and the resource amounts that\ndefine \"usable\", paying for the row they occupy. Doing so again replaces the\nwhole list. Nothing here is denominated in tokens."
    },
    {
      "name": "sweep",
      "type": "sweep",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Sweep surplus\nsummary: 'Sweep {{nowrap quantity}} of {{nowrap token_contract}} to {{nowrap to}}'\nicon:\n---\n\nThe contract account sends {{quantity}}, held by {{token_contract}}, to {{to}}.\nOnly tokens beyond what powerbot owes its funders and its own earnings can move this\nway."
    },
    {
      "name": "topup",
      "type": "topup",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Top up a covered account\nsummary: 'Buy resources for {{nowrap beneficiary}} out of the balance of {{nowrap funder}}'\nicon:\n---\n\npowerbot buys {{cpu_ms}} ms of CPU and {{net_kb}} kB of NET for\n{{beneficiary}}, as the standing order {{funder}} wrote asks for, paying from\npowerbot's pool. {{funder}} is then debited by exactly what the chain charged\nplus the operator's fee of {{fee}}, and never more than {{max_payment}}."
    },
    {
      "name": "transactfee",
      "type": "transactfee",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Settle a transaction fee\nsummary: 'Pay {{nowrap fee}} from the balance of {{nowrap funder}} for a transaction {{nowrap beneficiary}} signed'\nicon:\n---\n\n{{provider}} states that it cosigned this transaction for {{beneficiary}}, and\ntakes {{fee}} from the balance {{funder}} deposited. {{funder}} does not sign:\nits allowance is its standing authorization, and erasing that allowance is how\nit stops. {{beneficiary}} signs, so no fee can be settled against a transaction\nit did not sign. The whole fee becomes powerbot earnings; no tokens move."
    },
    {
      "name": "withdraw",
      "type": "withdraw",
      "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Withdraw\nsummary: 'Withdraw {{nowrap quantity}} to {{nowrap funder}}'\nicon:\n---\n\n{{funder}} withdraws {{quantity}} from their powerbot balance, and powerbot\ntransfers it back to them."
    }
  ],
  "tables": [
    {
      "name": "allowances",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "allowances_row"
    },
    {
      "name": "balances",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "balances_row"
    },
    {
      "name": "bounds",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "bounds_row"
    },
    {
      "name": "coverage",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "coverage_row"
    },
    {
      "name": "earnings",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "earnings_row"
    },
    {
      "name": "inflight",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "inflight_row"
    },
    {
      "name": "orders",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "orders_row"
    },
    {
      "name": "state",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "state_row"
    }
  ],
  "ricardian_clauses": [
    {
      "id": "powerbot",
      "body": "---\nspec_version: \"0.2.0\"\n---\n\nThe powerbot contract holds deposits made by funders and pays for resources on\nbehalf of the beneficiaries those funders name."
    }
  ],
  "error_messages": [],
  "abi_extensions": [],
  "variants": [],
  "action_results": []
}