diff --git a/docker/Dockerfile.runtime b/docker/Dockerfile.runtime index 316fdcb..f6e65e7 100644 --- a/docker/Dockerfile.runtime +++ b/docker/Dockerfile.runtime @@ -1,4 +1,4 @@ -from python:3.10.0 +from python:3.11 env DEBIAN_FRONTEND=noninteractive diff --git a/docker/leap-skynet-4.0.1/Dockerfile b/docker/leap-skynet-4.0.1/Dockerfile deleted file mode 100644 index 4cd0dec..0000000 --- a/docker/leap-skynet-4.0.1/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ubuntu:22.04 - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y wget - -# install eosio tools -RUN wget https://github.com/AntelopeIO/leap/releases/download/v4.0.1/leap_4.0.1-ubuntu22.04_amd64.deb - -RUN apt-get install -y ./leap_4.0.1-ubuntu22.04_amd64.deb - -RUN mkdir -p /root/nodeos -WORKDIR /root/nodeos -COPY config.ini config.ini -COPY contracts contracts -COPY genesis genesis - -EXPOSE 42000 -EXPOSE 29876 -EXPOSE 39999 - -CMD sleep 9999999999 diff --git a/docker/leap-skynet-4.0.1/config.ini b/docker/leap-skynet-4.0.1/config.ini deleted file mode 100644 index 836e2d8..0000000 --- a/docker/leap-skynet-4.0.1/config.ini +++ /dev/null @@ -1,52 +0,0 @@ -agent-name = Telos Skynet Testnet - -wasm-runtime = eos-vm-jit -eos-vm-oc-compile-threads = 4 -eos-vm-oc-enable = true - -chain-state-db-size-mb = 65536 -enable-account-queries = true - -http-server-address = 0.0.0.0:42000 -access-control-allow-origin = * -contracts-console = true -http-validate-host = false -p2p-listen-endpoint = 0.0.0.0:29876 -p2p-server-address = 0.0.0.0:29876 -verbose-http-errors = true - -state-history-endpoint = 0.0.0.0:39999 -trace-history = true -chain-state-history = true -trace-history-debug-mode = true -state-history-dir = state-history - -sync-fetch-span = 1600 -max-clients = 250 - -signature-provider = EOS5fLreY5Zq5owBhmNJTgQaLqQ4ufzXSTpStQakEyfxNFuUEgNs1=KEY:5JnvSc6pewpHHuUHwvbJopsew6AKwiGnexwDRc2Pj2tbdw6iML9 - -disable-subjective-billing = true -max-transaction-time = 500 -read-only-read-window-time-us = 600000 - -abi-serializer-max-time-ms = 2000000 - -p2p-max-nodes-per-host = 1 - -connection-cleanup-period = 30 -allowed-connection = any -http-max-response-time-ms = 100000 -max-body-size = 10000000 - -enable-stale-production = true - - -plugin = eosio::http_plugin -plugin = eosio::chain_plugin -plugin = eosio::chain_api_plugin -plugin = eosio::net_api_plugin -plugin = eosio::net_plugin -plugin = eosio::producer_plugin -plugin = eosio::producer_api_plugin -plugin = eosio::state_history_plugin diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.abi b/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.abi deleted file mode 100644 index f1eef86..0000000 --- a/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.abi +++ /dev/null @@ -1,360 +0,0 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Thu Apr 14 07:49:43 2022", - "version": "eosio::abi/1.1", - "structs": [ - { - "name": "action", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "name", - "type": "name" - }, - { - "name": "authorization", - "type": "permission_level[]" - }, - { - "name": "data", - "type": "bytes" - } - ] - }, - { - "name": "approval", - "base": "", - "fields": [ - { - "name": "level", - "type": "permission_level" - }, - { - "name": "time", - "type": "time_point" - } - ] - }, - { - "name": "approvals_info", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "requested_approvals", - "type": "approval[]" - }, - { - "name": "provided_approvals", - "type": "approval[]" - } - ] - }, - { - "name": "approve", - "base": "", - "fields": [ - { - "name": "proposer", - "type": "name" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "level", - "type": "permission_level" - }, - { - "name": "proposal_hash", - "type": "checksum256$" - } - ] - }, - { - "name": "cancel", - "base": "", - "fields": [ - { - "name": "proposer", - "type": "name" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "canceler", - "type": "name" - } - ] - }, - { - "name": "exec", - "base": "", - "fields": [ - { - "name": "proposer", - "type": "name" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "executer", - "type": "name" - } - ] - }, - { - "name": "extension", - "base": "", - "fields": [ - { - "name": "type", - "type": "uint16" - }, - { - "name": "data", - "type": "bytes" - } - ] - }, - { - "name": "invalidate", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - } - ] - }, - { - "name": "invalidation", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "last_invalidation_time", - "type": "time_point" - } - ] - }, - { - "name": "old_approvals_info", - "base": "", - "fields": [ - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "requested_approvals", - "type": "permission_level[]" - }, - { - "name": "provided_approvals", - "type": "permission_level[]" - } - ] - }, - { - "name": "permission_level", - "base": "", - "fields": [ - { - "name": "actor", - "type": "name" - }, - { - "name": "permission", - "type": "name" - } - ] - }, - { - "name": "proposal", - "base": "", - "fields": [ - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "packed_transaction", - "type": "bytes" - } - ] - }, - { - "name": "propose", - "base": "", - "fields": [ - { - "name": "proposer", - "type": "name" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "requested", - "type": "permission_level[]" - }, - { - "name": "trx", - "type": "transaction" - } - ] - }, - { - "name": "transaction", - "base": "transaction_header", - "fields": [ - { - "name": "context_free_actions", - "type": "action[]" - }, - { - "name": "actions", - "type": "action[]" - }, - { - "name": "transaction_extensions", - "type": "extension[]" - } - ] - }, - { - "name": "transaction_header", - "base": "", - "fields": [ - { - "name": "expiration", - "type": "time_point_sec" - }, - { - "name": "ref_block_num", - "type": "uint16" - }, - { - "name": "ref_block_prefix", - "type": "uint32" - }, - { - "name": "max_net_usage_words", - "type": "varuint32" - }, - { - "name": "max_cpu_usage_ms", - "type": "uint8" - }, - { - "name": "delay_sec", - "type": "varuint32" - } - ] - }, - { - "name": "unapprove", - "base": "", - "fields": [ - { - "name": "proposer", - "type": "name" - }, - { - "name": "proposal_name", - "type": "name" - }, - { - "name": "level", - "type": "permission_level" - } - ] - } - ], - "types": [], - "actions": [ - { - "name": "approve", - "type": "approve", - "ricardian_contract": "" - }, - { - "name": "cancel", - "type": "cancel", - "ricardian_contract": "" - }, - { - "name": "exec", - "type": "exec", - "ricardian_contract": "" - }, - { - "name": "invalidate", - "type": "invalidate", - "ricardian_contract": "" - }, - { - "name": "propose", - "type": "propose", - "ricardian_contract": "" - }, - { - "name": "unapprove", - "type": "unapprove", - "ricardian_contract": "" - } - ], - "tables": [ - { - "name": "approvals", - "type": "old_approvals_info", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "approvals2", - "type": "approvals_info", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "invals", - "type": "invalidation", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "proposal", - "type": "proposal", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [], - "variants": [], - "abi_extensions": [] -} \ No newline at end of file diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.wasm b/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.wasm deleted file mode 100755 index dda2a34..0000000 Binary files a/docker/leap-skynet-4.0.1/contracts/eosio.msig/eosio.msig.wasm and /dev/null differ diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.abi b/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.abi deleted file mode 100644 index 07f4e62..0000000 --- a/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.abi +++ /dev/null @@ -1,2178 +0,0 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ", - "version": "eosio::abi/1.1", - "types": [], - "structs": [ - { - "name": "abi_hash", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "hash", - "type": "checksum256" - } - ] - }, - { - "name": "activate", - "base": "", - "fields": [ - { - "name": "feature_digest", - "type": "checksum256" - } - ] - }, - { - "name": "authority", - "base": "", - "fields": [ - { - "name": "threshold", - "type": "uint32" - }, - { - "name": "keys", - "type": "key_weight[]" - }, - { - "name": "accounts", - "type": "permission_level_weight[]" - }, - { - "name": "waits", - "type": "wait_weight[]" - } - ] - }, - { - "name": "bid_refund", - "base": "", - "fields": [ - { - "name": "bidder", - "type": "name" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "bidname", - "base": "", - "fields": [ - { - "name": "bidder", - "type": "name" - }, - { - "name": "newname", - "type": "name" - }, - { - "name": "bid", - "type": "asset" - } - ] - }, - { - "name": "bidrefund", - "base": "", - "fields": [ - { - "name": "bidder", - "type": "name" - }, - { - "name": "newname", - "type": "name" - } - ] - }, - { - "name": "block_header", - "base": "", - "fields": [ - { - "name": "timestamp", - "type": "uint32" - }, - { - "name": "producer", - "type": "name" - }, - { - "name": "confirmed", - "type": "uint16" - }, - { - "name": "previous", - "type": "checksum256" - }, - { - "name": "transaction_mroot", - "type": "checksum256" - }, - { - "name": "action_mroot", - "type": "checksum256" - }, - { - "name": "schedule_version", - "type": "uint32" - }, - { - "name": "new_producers", - "type": "producer_schedule?" - } - ] - }, - { - "name": "blockchain_parameters", - "base": "", - "fields": [ - { - "name": "max_block_net_usage", - "type": "uint64" - }, - { - "name": "target_block_net_usage_pct", - "type": "uint32" - }, - { - "name": "max_transaction_net_usage", - "type": "uint32" - }, - { - "name": "base_per_transaction_net_usage", - "type": "uint32" - }, - { - "name": "net_usage_leeway", - "type": "uint32" - }, - { - "name": "context_free_discount_net_usage_num", - "type": "uint32" - }, - { - "name": "context_free_discount_net_usage_den", - "type": "uint32" - }, - { - "name": "max_block_cpu_usage", - "type": "uint32" - }, - { - "name": "target_block_cpu_usage_pct", - "type": "uint32" - }, - { - "name": "max_transaction_cpu_usage", - "type": "uint32" - }, - { - "name": "min_transaction_cpu_usage", - "type": "uint32" - }, - { - "name": "max_transaction_lifetime", - "type": "uint32" - }, - { - "name": "deferred_trx_expiration_window", - "type": "uint32" - }, - { - "name": "max_transaction_delay", - "type": "uint32" - }, - { - "name": "max_inline_action_size", - "type": "uint32" - }, - { - "name": "max_inline_action_depth", - "type": "uint16" - }, - { - "name": "max_authority_depth", - "type": "uint16" - } - ] - }, - { - "name": "buyram", - "base": "", - "fields": [ - { - "name": "payer", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "quant", - "type": "asset" - } - ] - }, - { - "name": "buyrambytes", - "base": "", - "fields": [ - { - "name": "payer", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "bytes", - "type": "uint32" - } - ] - }, - { - "name": "buyrex", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "canceldelay", - "base": "", - "fields": [ - { - "name": "canceling_auth", - "type": "permission_level" - }, - { - "name": "trx_id", - "type": "checksum256" - } - ] - }, - { - "name": "claimrewards", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "closerex", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "cnclrexorder", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "connector", - "base": "", - "fields": [ - { - "name": "balance", - "type": "asset" - }, - { - "name": "weight", - "type": "float64" - } - ] - }, - { - "name": "consolidate", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "defcpuloan", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "loan_num", - "type": "uint64" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "defnetloan", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "loan_num", - "type": "uint64" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "delegatebw", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "stake_net_quantity", - "type": "asset" - }, - { - "name": "stake_cpu_quantity", - "type": "asset" - }, - { - "name": "transfer", - "type": "bool" - } - ] - }, - { - "name": "delegated_bandwidth", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "net_weight", - "type": "asset" - }, - { - "name": "cpu_weight", - "type": "asset" - } - ] - }, - { - "name": "deleteauth", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "permission", - "type": "name" - } - ] - }, - { - "name": "deposit", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "distviarex", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "amount", - "type": "asset" - } - ] - }, - { - "name": "eosio_global_state", - "base": "blockchain_parameters", - "fields": [ - { - "name": "max_ram_size", - "type": "uint64" - }, - { - "name": "total_ram_bytes_reserved", - "type": "uint64" - }, - { - "name": "total_ram_stake", - "type": "int64" - }, - { - "name": "last_producer_schedule_update", - "type": "block_timestamp_type" - }, - { - "name": "last_proposed_schedule_update", - "type": "block_timestamp_type" - }, - { - "name": "last_pervote_bucket_fill", - "type": "time_point" - }, - { - "name": "pervote_bucket", - "type": "int64" - }, - { - "name": "perblock_bucket", - "type": "int64" - }, - { - "name": "total_unpaid_blocks", - "type": "uint32" - }, - { - "name": "total_activated_stake", - "type": "int64" - }, - { - "name": "thresh_activated_stake_time", - "type": "time_point" - }, - { - "name": "last_producer_schedule_size", - "type": "uint16" - }, - { - "name": "total_producer_vote_weight", - "type": "float64" - }, - { - "name": "last_name_close", - "type": "block_timestamp_type" - }, - { - "name": "block_num", - "type": "uint32" - }, - { - "name": "last_claimrewards", - "type": "uint32" - }, - { - "name": "next_payment", - "type": "uint32" - }, - { - "name": "new_ram_per_block", - "type": "uint16" - }, - { - "name": "last_ram_increase", - "type": "block_timestamp_type" - }, - { - "name": "last_block_num", - "type": "block_timestamp_type" - }, - { - "name": "total_producer_votepay_share", - "type": "float64" - }, - { - "name": "revision", - "type": "uint8" - } - ] - }, - { - "name": "exchange_state", - "base": "", - "fields": [ - { - "name": "supply", - "type": "asset" - }, - { - "name": "base", - "type": "connector" - }, - { - "name": "quote", - "type": "connector" - } - ] - }, - { - "name": "fundcpuloan", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "loan_num", - "type": "uint64" - }, - { - "name": "payment", - "type": "asset" - } - ] - }, - { - "name": "fundnetloan", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "loan_num", - "type": "uint64" - }, - { - "name": "payment", - "type": "asset" - } - ] - }, - { - "name": "init", - "base": "", - "fields": [ - { - "name": "version", - "type": "varuint32" - }, - { - "name": "core", - "type": "symbol" - } - ] - }, - { - "name": "key_weight", - "base": "", - "fields": [ - { - "name": "key", - "type": "public_key" - }, - { - "name": "weight", - "type": "uint16" - } - ] - }, - { - "name": "linkauth", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "code", - "type": "name" - }, - { - "name": "type", - "type": "name" - }, - { - "name": "requirement", - "type": "name" - } - ] - }, - { - "name": "mvfrsavings", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "rex", - "type": "asset" - } - ] - }, - { - "name": "mvtosavings", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "rex", - "type": "asset" - } - ] - }, - { - "name": "name_bid", - "base": "", - "fields": [ - { - "name": "newname", - "type": "name" - }, - { - "name": "high_bidder", - "type": "name" - }, - { - "name": "high_bid", - "type": "int64" - }, - { - "name": "last_bid_time", - "type": "time_point" - } - ] - }, - { - "name": "newaccount", - "base": "", - "fields": [ - { - "name": "creator", - "type": "name" - }, - { - "name": "name", - "type": "name" - }, - { - "name": "owner", - "type": "authority" - }, - { - "name": "active", - "type": "authority" - } - ] - }, - { - "name": "onblock", - "base": "", - "fields": [ - { - "name": "header", - "type": "block_header" - } - ] - }, - { - "name": "onerror", - "base": "", - "fields": [ - { - "name": "sender_id", - "type": "uint128" - }, - { - "name": "sent_trx", - "type": "bytes" - } - ] - }, - { - "name": "pair_time_point_sec_int64", - "base": "", - "fields": [ - { - "name": "first", - "type": "time_point_sec" - }, - { - "name": "second", - "type": "int64" - } - ] - }, - { - "name": "payment_info", - "base": "", - "fields": [ - { - "name": "bp", - "type": "name" - }, - { - "name": "pay", - "type": "asset" - } - ] - }, - { - "name": "payrates", - "base": "", - "fields": [ - { - "name": "bpay_rate", - "type": "uint64" - }, - { - "name": "worker_amount", - "type": "uint64" - } - ] - }, - { - "name": "permission_level", - "base": "", - "fields": [ - { - "name": "actor", - "type": "name" - }, - { - "name": "permission", - "type": "name" - } - ] - }, - { - "name": "permission_level_weight", - "base": "", - "fields": [ - { - "name": "permission", - "type": "permission_level" - }, - { - "name": "weight", - "type": "uint16" - } - ] - }, - { - "name": "producer_info", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "total_votes", - "type": "float64" - }, - { - "name": "producer_key", - "type": "public_key" - }, - { - "name": "is_active", - "type": "bool" - }, - { - "name": "unreg_reason", - "type": "string" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "unpaid_blocks", - "type": "uint32" - }, - { - "name": "lifetime_produced_blocks", - "type": "uint32" - }, - { - "name": "missed_blocks_per_rotation", - "type": "uint32" - }, - { - "name": "lifetime_missed_blocks", - "type": "uint32" - }, - { - "name": "last_claim_time", - "type": "time_point" - }, - { - "name": "location", - "type": "uint16" - }, - { - "name": "kick_reason_id", - "type": "uint32" - }, - { - "name": "kick_reason", - "type": "string" - }, - { - "name": "times_kicked", - "type": "uint32" - }, - { - "name": "kick_penalty_hours", - "type": "uint32" - }, - { - "name": "last_time_kicked", - "type": "block_timestamp_type" - } - ] - }, - { - "name": "producer_key", - "base": "", - "fields": [ - { - "name": "producer_name", - "type": "name" - }, - { - "name": "block_signing_key", - "type": "public_key" - } - ] - }, - { - "name": "producer_metric", - "base": "", - "fields": [ - { - "name": "bp_name", - "type": "name" - }, - { - "name": "missed_blocks_per_cycle", - "type": "uint32" - } - ] - }, - { - "name": "producer_schedule", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint32" - }, - { - "name": "producers", - "type": "producer_key[]" - } - ] - }, - { - "name": "refund", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "refund_request", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "request_time", - "type": "time_point_sec" - }, - { - "name": "net_amount", - "type": "asset" - }, - { - "name": "cpu_amount", - "type": "asset" - } - ] - }, - { - "name": "regproducer", - "base": "", - "fields": [ - { - "name": "producer", - "type": "name" - }, - { - "name": "producer_key", - "type": "public_key" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "location", - "type": "uint16" - } - ] - }, - { - "name": "regproxy", - "base": "", - "fields": [ - { - "name": "proxy", - "type": "name" - }, - { - "name": "isproxy", - "type": "bool" - } - ] - }, - { - "name": "rentcpu", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "loan_payment", - "type": "asset" - }, - { - "name": "loan_fund", - "type": "asset" - } - ] - }, - { - "name": "rentnet", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "loan_payment", - "type": "asset" - }, - { - "name": "loan_fund", - "type": "asset" - } - ] - }, - { - "name": "rex_balance", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "vote_stake", - "type": "asset" - }, - { - "name": "rex_balance", - "type": "asset" - }, - { - "name": "matured_rex", - "type": "int64" - }, - { - "name": "rex_maturities", - "type": "pair_time_point_sec_int64[]" - } - ] - }, - { - "name": "rex_fund", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "rex_loan", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "from", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "payment", - "type": "asset" - }, - { - "name": "balance", - "type": "asset" - }, - { - "name": "total_staked", - "type": "asset" - }, - { - "name": "loan_num", - "type": "uint64" - }, - { - "name": "expiration", - "type": "time_point" - } - ] - }, - { - "name": "rex_order", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "rex_requested", - "type": "asset" - }, - { - "name": "proceeds", - "type": "asset" - }, - { - "name": "stake_change", - "type": "asset" - }, - { - "name": "order_time", - "type": "time_point" - }, - { - "name": "is_open", - "type": "bool" - } - ] - }, - { - "name": "rex_pool", - "base": "", - "fields": [ - { - "name": "version", - "type": "uint8" - }, - { - "name": "total_lent", - "type": "asset" - }, - { - "name": "total_unlent", - "type": "asset" - }, - { - "name": "total_rent", - "type": "asset" - }, - { - "name": "total_lendable", - "type": "asset" - }, - { - "name": "total_rex", - "type": "asset" - }, - { - "name": "namebid_proceeds", - "type": "asset" - }, - { - "name": "loan_num", - "type": "uint64" - } - ] - }, - { - "name": "rexexec", - "base": "", - "fields": [ - { - "name": "user", - "type": "name" - }, - { - "name": "max", - "type": "uint16" - } - ] - }, - { - "name": "rmvproducer", - "base": "", - "fields": [ - { - "name": "producer", - "type": "name" - } - ] - }, - { - "name": "rotation_state", - "base": "", - "fields": [ - { - "name": "bp_currently_out", - "type": "name" - }, - { - "name": "sbp_currently_in", - "type": "name" - }, - { - "name": "bp_out_index", - "type": "uint32" - }, - { - "name": "sbp_in_index", - "type": "uint32" - }, - { - "name": "next_rotation_time", - "type": "block_timestamp_type" - }, - { - "name": "last_rotation_time", - "type": "block_timestamp_type" - } - ] - }, - { - "name": "schedule_metrics_state", - "base": "", - "fields": [ - { - "name": "last_onblock_caller", - "type": "name" - }, - { - "name": "block_counter_correction", - "type": "int32" - }, - { - "name": "producers_metric", - "type": "producer_metric[]" - } - ] - }, - { - "name": "sellram", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "bytes", - "type": "int64" - } - ] - }, - { - "name": "sellrex", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "rex", - "type": "asset" - } - ] - }, - { - "name": "setabi", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "abi", - "type": "bytes" - } - ] - }, - { - "name": "setacctcpu", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "cpu_weight", - "type": "int64?" - } - ] - }, - { - "name": "setacctnet", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "net_weight", - "type": "int64?" - } - ] - }, - { - "name": "setacctram", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "ram_bytes", - "type": "int64?" - } - ] - }, - { - "name": "setalimits", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "ram_bytes", - "type": "int64" - }, - { - "name": "net_weight", - "type": "int64" - }, - { - "name": "cpu_weight", - "type": "int64" - } - ] - }, - { - "name": "setcode", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "vmtype", - "type": "uint8" - }, - { - "name": "vmversion", - "type": "uint8" - }, - { - "name": "code", - "type": "bytes" - } - ] - }, - { - "name": "setparams", - "base": "", - "fields": [ - { - "name": "params", - "type": "blockchain_parameters" - } - ] - }, - { - "name": "setpayrates", - "base": "", - "fields": [ - { - "name": "inflation", - "type": "uint64" - }, - { - "name": "worker", - "type": "uint64" - } - ] - }, - { - "name": "setpriv", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "is_priv", - "type": "uint8" - } - ] - }, - { - "name": "setram", - "base": "", - "fields": [ - { - "name": "max_ram_size", - "type": "uint64" - } - ] - }, - { - "name": "setramrate", - "base": "", - "fields": [ - { - "name": "bytes_per_block", - "type": "uint16" - } - ] - }, - { - "name": "setrex", - "base": "", - "fields": [ - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "undelegatebw", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "unstake_net_quantity", - "type": "asset" - }, - { - "name": "unstake_cpu_quantity", - "type": "asset" - } - ] - }, - { - "name": "unlinkauth", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "code", - "type": "name" - }, - { - "name": "type", - "type": "name" - } - ] - }, - { - "name": "unregprod", - "base": "", - "fields": [ - { - "name": "producer", - "type": "name" - } - ] - }, - { - "name": "unregreason", - "base": "", - "fields": [ - { - "name": "producer", - "type": "name" - }, - { - "name": "reason", - "type": "string" - } - ] - }, - { - "name": "unstaketorex", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "receiver", - "type": "name" - }, - { - "name": "from_net", - "type": "asset" - }, - { - "name": "from_cpu", - "type": "asset" - } - ] - }, - { - "name": "updateauth", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "permission", - "type": "name" - }, - { - "name": "parent", - "type": "name" - }, - { - "name": "auth", - "type": "authority" - } - ] - }, - { - "name": "updaterex", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - } - ] - }, - { - "name": "updtrevision", - "base": "", - "fields": [ - { - "name": "revision", - "type": "uint8" - } - ] - }, - { - "name": "user_resources", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "net_weight", - "type": "asset" - }, - { - "name": "cpu_weight", - "type": "asset" - }, - { - "name": "ram_bytes", - "type": "int64" - } - ] - }, - { - "name": "votebpout", - "base": "", - "fields": [ - { - "name": "bp", - "type": "name" - }, - { - "name": "penalty_hours", - "type": "uint32" - } - ] - }, - { - "name": "voteproducer", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "proxy", - "type": "name" - }, - { - "name": "producers", - "type": "name[]" - } - ] - }, - { - "name": "voter_info", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "proxy", - "type": "name" - }, - { - "name": "producers", - "type": "name[]" - }, - { - "name": "staked", - "type": "int64" - }, - { - "name": "last_stake", - "type": "int64" - }, - { - "name": "last_vote_weight", - "type": "float64" - }, - { - "name": "proxied_vote_weight", - "type": "float64" - }, - { - "name": "is_proxy", - "type": "bool" - }, - { - "name": "flags1", - "type": "uint32" - }, - { - "name": "reserved2", - "type": "uint32" - }, - { - "name": "reserved3", - "type": "asset" - } - ] - }, - { - "name": "wait_weight", - "base": "", - "fields": [ - { - "name": "wait_sec", - "type": "uint32" - }, - { - "name": "weight", - "type": "uint16" - } - ] - }, - { - "name": "withdraw", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "amount", - "type": "asset" - } - ] - } - ], - "actions": [ - { - "name": "activate", - "type": "activate", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Activate Protocol Feature\nsummary: 'Activate protocol feature {{nowrap feature_digest}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} activates the protocol feature with a digest of {{feature_digest}}." - }, - { - "name": "bidname", - "type": "bidname", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Bid On a Premium Account Name\nsummary: '{{nowrap bidder}} bids on the premium account name {{nowrap newname}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{bidder}} bids {{bid}} on an auction to own the premium account name {{newname}}.\n\n{{bidder}} transfers {{bid}} to the system to cover the cost of the bid, which will be returned to {{bidder}} only if {{bidder}} is later outbid in the auction for {{newname}} by another account.\n\nIf the auction for {{newname}} closes with {{bidder}} remaining as the highest bidder, {{bidder}} will be authorized to create the account with name {{newname}}.\n\n## Bid refund behavior\n\nIf {{bidder}}’s bid on {{newname}} is later outbid by another account, {{bidder}} will be able to claim back the transferred amount of {{bid}}. The system will attempt to automatically do this on behalf of {{bidder}}, but the automatic refund may occasionally fail which will then require {{bidder}} to manually claim the refund with the bidrefund action.\n\n## Auction close criteria\n\nThe system should automatically close the auction for {{newname}} if it satisfies the condition that over a period of two minutes the following two properties continuously hold:\n\n- no one has bid on {{newname}} within the last 24 hours;\n- and, the value of the latest bid on {{newname}} is greater than the value of the bids on each of the other open auctions.\n\nBe aware that the condition to close the auction described above are sufficient but not necessary. The auction for {{newname}} cannot close unless both of the properties are simultaneously satisfied, but it may be closed without requiring the properties to hold for a period of 2 minutes." - }, - { - "name": "bidrefund", - "type": "bidrefund", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Claim Refund on Name Bid\nsummary: 'Claim refund on {{nowrap newname}} bid'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{bidder}} claims refund on {{newname}} bid after being outbid by someone else." - }, - { - "name": "buyram", - "type": "buyram", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Buy RAM\nsummary: '{{nowrap payer}} buys RAM on behalf of {{nowrap receiver}} by paying {{nowrap quant}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{payer}} buys RAM on behalf of {{receiver}} by paying {{quant}}. This transaction will incur a 0.5% fee out of {{quant}} and the amount of RAM delivered will depend on market rates." - }, - { - "name": "buyrambytes", - "type": "buyrambytes", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Buy RAM\nsummary: '{{nowrap payer}} buys {{nowrap bytes}} bytes of RAM on behalf of {{nowrap receiver}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{payer}} buys approximately {{bytes}} bytes of RAM on behalf of {{receiver}} by paying market rates for RAM. This transaction will incur a 0.5% fee and the cost will depend on market rates." - }, - { - "name": "buyrex", - "type": "buyrex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Buy REX Tokens\nsummary: '{{nowrap from}} buys REX tokens in exchange for {{nowrap amount}} and his vote stake increases by {{nowrap amount}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{amount}} is taken out of {{from}}’s REX fund and used to purchase REX tokens at the current market exchange rate. In order for the action to succeed, {{from}} must have voted for a proxy or at least 21 block producers. {{amount}} is added to {{from}}’s vote stake.\n\nA sell order of the purchased amount can only be initiated after waiting for the maturity period of 4 to 5 days to pass. Even then, depending on the market conditions, the initiated sell order may not be executed immediately." - }, - { - "name": "canceldelay", - "type": "canceldelay", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Cancel Delayed Transaction\nsummary: '{{nowrap canceling_auth.actor}} cancels a delayed transaction'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{canceling_auth.actor}} cancels the delayed transaction with id {{trx_id}}." - }, - { - "name": "claimrewards", - "type": "claimrewards", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Claim Block Producer Rewards\nsummary: '{{nowrap owner}} claims block and vote rewards'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{owner}} claims block and vote rewards from the system." - }, - { - "name": "closerex", - "type": "closerex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Cleanup Unused REX Data\nsummary: 'Delete REX related DB entries and free associated RAM'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nDelete REX related DB entries and free associated RAM for {{owner}}.\n\nTo fully delete all REX related DB entries, {{owner}} must ensure that their REX balance and REX fund amounts are both zero and they have no outstanding loans." - }, - { - "name": "cnclrexorder", - "type": "cnclrexorder", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Cancel Scheduled REX Sell Order\nsummary: '{{nowrap owner}} cancels a scheduled sell order if not yet filled'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{owner}} cancels their open sell order." - }, - { - "name": "consolidate", - "type": "consolidate", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Consolidate REX Maturity Buckets Into One\nsummary: 'Consolidate REX maturity buckets into one'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nConsolidate REX maturity buckets into one bucket that {{owner}} will not be able to sell until 4 to 5 days later." - }, - { - "name": "defcpuloan", - "type": "defcpuloan", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Withdraw from the Fund of a Specific CPU Loan\nsummary: '{{nowrap from}} transfers {{nowrap amount}} from the fund of CPU loan number {{nowrap loan_num}} back to REX fund'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} transfers {{amount}} from the fund of CPU loan number {{loan_num}} back to REX fund." - }, - { - "name": "defnetloan", - "type": "defnetloan", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Withdraw from the Fund of a Specific NET Loan\nsummary: '{{nowrap from}} transfers {{nowrap amount}} from the fund of NET loan number {{nowrap loan_num}} back to REX fund'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} transfers {{amount}} from the fund of NET loan number {{loan_num}} back to REX fund." - }, - { - "name": "delegatebw", - "type": "delegatebw", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Stake Tokens for NET and/or CPU\nsummary: 'Stake tokens for NET and/or CPU and optionally transfer ownership'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{#if transfer}} {{from}} stakes on behalf of {{receiver}} {{stake_net_quantity}} for NET bandwidth and {{stake_cpu_quantity}} for CPU bandwidth.\n\nStaked tokens will also be transferred to {{receiver}}. The sum of these two quantities will be deducted from {{from}}’s liquid balance and add to the vote weight of {{receiver}}.\n{{else}}\n{{from}} stakes to self and delegates to {{receiver}} {{stake_net_quantity}} for NET bandwidth and {{stake_cpu_quantity}} for CPU bandwidth.\n\nThe sum of these two quantities add to the vote weight of {{from}}.\n{{/if}}" - }, - { - "name": "deleteauth", - "type": "deleteauth", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Delete Account Permission\nsummary: 'Delete the {{nowrap permission}} permission of {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nDelete the {{permission}} permission of {{account}}." - }, - { - "name": "deposit", - "type": "deposit", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Deposit Into REX Fund\nsummary: 'Add to {{nowrap owner}}’s REX fund by transferring {{nowrap amount}} from {{nowrap owner}}’s liquid balance'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nTransfer {{amount}} from {{owner}}’s liquid balance to {{owner}}’s REX fund. All proceeds and expenses related to REX are added to or taken out of this fund." - }, - { - "name": "distviarex", - "type": "distviarex", - "ricardian_contract": "" - }, - { - "name": "fundcpuloan", - "type": "fundcpuloan", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Deposit into the Fund of a Specific CPU Loan\nsummary: '{{nowrap from}} funds a CPU loan'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} transfers {{payment}} from REX fund to the fund of CPU loan number {{loan_num}} in order to be used in loan renewal at expiry. {{from}} can withdraw the total balance of the loan fund at any time." - }, - { - "name": "fundnetloan", - "type": "fundnetloan", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Deposit into the Fund of a Specific NET Loan\nsummary: '{{nowrap from}} funds a NET loan'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} transfers {{payment}} from REX fund to the fund of NET loan number {{loan_num}} in order to be used in loan renewal at expiry. {{from}} can withdraw the total balance of the loan fund at any time." - }, - { - "name": "init", - "type": "init", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Initialize System Contract\nsummary: 'Initialize system contract'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\nInitialize system contract. The core token symbol will be set to {{core}}." - }, - { - "name": "linkauth", - "type": "linkauth", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Link Action to Permission\nsummary: '{{nowrap account}} sets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract to {{nowrap requirement}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{account}} sets the minimum required permission for the {{#if type}}{{type}} action of the{{/if}} {{code}} contract to {{requirement}}.\n\n{{#if type}}{{else}}Any links explicitly associated to specific actions of {{code}} will take precedence.{{/if}}" - }, - { - "name": "mvfrsavings", - "type": "mvfrsavings", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unlock REX Tokens\nsummary: '{{nowrap owner}} unlocks REX Tokens'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{owner}} unlocks {{rex}} by moving it out of the REX savings bucket. The unlocked REX tokens cannot be sold until 4 to 5 days later." - }, - { - "name": "mvtosavings", - "type": "mvtosavings", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Lock REX Tokens\nsummary: '{{nowrap owner}} locks REX Tokens'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{owner}} locks {{rex}} by moving it into the REX savings bucket. The locked REX tokens cannot be sold directly and will have to be unlocked explicitly before selling." - }, - { - "name": "newaccount", - "type": "newaccount", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Create New Account\nsummary: '{{nowrap creator}} creates a new account with the name {{nowrap name}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{creator}} creates a new account with the name {{name}} and the following permissions:\n\nowner permission with authority:\n{{to_json owner}}\n\nactive permission with authority:\n{{to_json active}}" - }, - { - "name": "onblock", - "type": "onblock", - "ricardian_contract": "" - }, - { - "name": "onerror", - "type": "onerror", - "ricardian_contract": "" - }, - { - "name": "refund", - "type": "refund", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Claim Unstaked Tokens\nsummary: 'Return previously unstaked tokens to {{nowrap owner}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nReturn previously unstaked tokens to {{owner}} after the unstaking period has elapsed." - }, - { - "name": "regproducer", - "type": "regproducer", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Register as a Block Producer Candidate\nsummary: 'Register {{nowrap producer}} account as a block producer candidate'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nRegister {{producer}} account as a block producer candidate.\n\n{{$clauses.BlockProducerAgreement}}" - }, - { - "name": "regproxy", - "type": "regproxy", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Register/unregister as a Proxy\nsummary: 'Register/unregister {{nowrap proxy}} as a proxy account'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\n{{#if isproxy}}\n{{proxy}} registers as a proxy that can vote on behalf of accounts that appoint it as their proxy.\n{{else}}\n{{proxy}} unregisters as a proxy that can vote on behalf of accounts that appoint it as their proxy.\n{{/if}}" - }, - { - "name": "rentcpu", - "type": "rentcpu", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Rent CPU Bandwidth for 30 Days\nsummary: '{{nowrap from}} pays {{nowrap loan_payment}} to rent CPU bandwidth for {{nowrap receiver}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} pays {{loan_payment}} to rent CPU bandwidth on behalf of {{receiver}} for a period of 30 days.\n\n{{loan_payment}} is taken out of {{from}}’s REX fund. The market price determines the number of tokens to be staked to {{receiver}}’s CPU resources. In addition, {{from}} provides {{loan_fund}}, which is also taken out of {{from}}’s REX fund, to be used for automatic renewal of the loan.\n\nAt expiration, if the loan has less funds than {{loan_payment}}, it is closed and lent tokens that have been staked are taken out of {{receiver}}’s CPU bandwidth. Otherwise, it is renewed at the market price at the time of renewal, that is, the number of staked tokens is recalculated and {{receiver}}’s CPU bandwidth is updated accordingly. {{from}} can fund or defund a loan at any time before expiration. When the loan is closed, {{from}} is refunded any tokens remaining in the loan fund." - }, - { - "name": "rentnet", - "type": "rentnet", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Rent NET Bandwidth for 30 Days\nsummary: '{{nowrap from}} pays {{nowrap loan_payment}} to rent NET bandwidth for {{nowrap receiver}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} pays {{loan_payment}} to rent NET bandwidth on behalf of {{receiver}} for a period of 30 days.\n\n{{loan_payment}} is taken out of {{from}}’s REX fund. The market price determines the number of tokens to be staked to {{receiver}}’s NET resources for 30 days. In addition, {{from}} provides {{loan_fund}}, which is also taken out of {{from}}’s REX fund, to be used for automatic renewal of the loan.\n\nAt expiration, if the loan has less funds than {{loan_payment}}, it is closed and lent tokens that have been staked are taken out of {{receiver}}’s NET bandwidth. Otherwise, it is renewed at the market price at the time of renewal, that is, the number of staked tokens is recalculated and {{receiver}}’s NET bandwidth is updated accordingly. {{from}} can fund or defund a loan at any time before expiration. When the loan is closed, {{from}} is refunded any tokens remaining in the loan fund." - }, - { - "name": "rexexec", - "type": "rexexec", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Perform REX Maintenance\nsummary: 'Process sell orders and expired loans'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nPerforms REX maintenance by processing a maximum of {{max}} REX sell orders and expired loans. Any account can execute this action." - }, - { - "name": "rmvproducer", - "type": "rmvproducer", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Forcibly Unregister a Block Producer Candidate\nsummary: '{{nowrap producer}} is unregistered as a block producer candidate'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} unregisters {{producer}} as a block producer candidate. {{producer}} account will retain its votes and those votes can change based on voter stake changes or votes removed from {{producer}}. However new voters will not be able to vote for {{producer}} while it remains unregistered." - }, - { - "name": "sellram", - "type": "sellram", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Sell RAM From Account\nsummary: 'Sell unused RAM from {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\nSell {{bytes}} bytes of unused RAM from account {{account}} at market price. This transaction will incur a 0.5% fee on the proceeds which depend on market rates." - }, - { - "name": "sellrex", - "type": "sellrex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Sell REX Tokens in Exchange for EOS\nsummary: '{{nowrap from}} sells {{nowrap rex}} tokens'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from}} initiates a sell order to sell {{rex}} tokens at the market exchange rate during the time at which the order is ultimately executed. If {{from}} already has an open sell order in the sell queue, {{rex}} will be added to the amount of the sell order without change the position of the sell order within the queue. Once the sell order is executed, proceeds are added to {{from}}’s REX fund, the value of sold REX tokens is deducted from {{from}}’s vote stake, and votes are updated accordingly.\n\nDepending on the market conditions, it may not be possible to fill the entire sell order immediately. In such a case, the sell order is added to the back of a sell queue. A sell order at the front of the sell queue will automatically be executed when the market conditions allow for the entire order to be filled. Regardless of the market conditions, the system is designed to execute this sell order within 30 days. {{from}} can cancel the order at any time before it is filled using the cnclrexorder action." - }, - { - "name": "setabi", - "type": "setabi", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Deploy Contract ABI\nsummary: 'Deploy contract ABI on account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nDeploy the ABI file associated with the contract on account {{account}}." - }, - { - "name": "setacctcpu", - "type": "setacctcpu", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Explicitly Manage the CPU Quota of Account\nsummary: 'Explicitly manage the CPU bandwidth quota of account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{#if_has_value cpu_weight}}\nExplicitly manage the CPU bandwidth quota of account {{account}} by pinning it to a weight of {{cpu_weight}}.\n\n{{account}} can stake and unstake, however, it will not change their CPU bandwidth quota as long as it remains pinned.\n{{else}}\nUnpin the CPU bandwidth quota of account {{account}}. The CPU bandwidth quota of {{account}} will be driven by the current tokens staked for CPU bandwidth by {{account}}.\n{{/if_has_value}}" - }, - { - "name": "setacctnet", - "type": "setacctnet", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Explicitly Manage the NET Quota of Account\nsummary: 'Explicitly manage the NET bandwidth quota of account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{#if_has_value net_weight}}\nExplicitly manage the network bandwidth quota of account {{account}} by pinning it to a weight of {{net_weight}}.\n\n{{account}} can stake and unstake, however, it will not change their NET bandwidth quota as long as it remains pinned.\n{{else}}\nUnpin the NET bandwidth quota of account {{account}}. The NET bandwidth quota of {{account}} will be driven by the current tokens staked for NET bandwidth by {{account}}.\n{{/if_has_value}}" - }, - { - "name": "setacctram", - "type": "setacctram", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Explicitly Manage the RAM Quota of Account\nsummary: 'Explicitly manage the RAM quota of account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{#if_has_value ram_bytes}}\nExplicitly manage the RAM quota of account {{account}} by pinning it to {{ram_bytes}} bytes.\n\n{{account}} can buy and sell RAM, however, it will not change their RAM quota as long as it remains pinned.\n{{else}}\nUnpin the RAM quota of account {{account}}. The RAM quota of {{account}} will be driven by the current RAM holdings of {{account}}.\n{{/if_has_value}}" - }, - { - "name": "setalimits", - "type": "setalimits", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Adjust Resource Limits of Account\nsummary: 'Adjust resource limits of account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} updates {{account}}’s resource limits to have a RAM quota of {{ram_bytes}} bytes, a NET bandwidth quota of {{net_weight}} and a CPU bandwidth quota of {{cpu_weight}}." - }, - { - "name": "setcode", - "type": "setcode", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Deploy Contract Code\nsummary: 'Deploy contract code on account {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nDeploy compiled contract code to the account {{account}}." - }, - { - "name": "setparams", - "type": "setparams", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Set System Parameters\nsummary: 'Set System Parameters'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} sets system parameters to:\n{{to_json params}}" - }, - { - "name": "setpayrates", - "type": "setpayrates", - "ricardian_contract": "" - }, - { - "name": "setpriv", - "type": "setpriv", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Make an Account Privileged or Unprivileged\nsummary: '{{#if is_priv}}Make {{nowrap account}} privileged{{else}}Remove privileged status of {{nowrap account}}{{/if}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{#if is_priv}}\n{{$action.account}} makes {{account}} privileged.\n{{else}}\n{{$action.account}} removes privileged status of {{account}}.\n{{/if}}" - }, - { - "name": "setram", - "type": "setram", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Configure the Available RAM\nsummary: 'Configure the available RAM'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} configures the available RAM to {{max_ram_size}} bytes." - }, - { - "name": "setramrate", - "type": "setramrate", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Set the Rate of Increase of RAM\nsummary: 'Set the rate of increase of RAM per block'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} sets the rate of increase of RAM to {{bytes_per_block}} bytes/block." - }, - { - "name": "setrex", - "type": "setrex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Adjust REX Pool Virtual Balance\nsummary: 'Adjust REX Pool Virtual Balance'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} adjusts REX loan rate by setting REX pool virtual balance to {{balance}}. No token transfer or issue is executed in this action." - }, - { - "name": "undelegatebw", - "type": "undelegatebw", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unstake Tokens for NET and/or CPU\nsummary: 'Unstake tokens for NET and/or CPU from {{nowrap receiver}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{from}} unstakes from {{receiver}} {{unstake_net_quantity}} for NET bandwidth and {{unstake_cpu_quantity}} for CPU bandwidth.\n\nThe sum of these two quantities will be removed from the vote weight of {{receiver}} and will be made available to {{from}} after an uninterrupted 3 day period without further unstaking by {{from}}. After the uninterrupted 3 day period passes, the system will attempt to automatically return the funds to {{from}}’s regular token balance. However, this automatic refund may occasionally fail which will then require {{from}} to manually claim the funds with the refund action." - }, - { - "name": "unlinkauth", - "type": "unlinkauth", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unlink Action from Permission\nsummary: '{{nowrap account}} unsets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\n{{account}} removes the association between the {{#if type}}{{type}} action of the{{/if}} {{code}} contract and its minimum required permission.\n\n{{#if type}}{{else}}This will not remove any links explicitly associated to specific actions of {{code}}.{{/if}}" - }, - { - "name": "unregprod", - "type": "unregprod", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unregister as a Block Producer Candidate\nsummary: '{{nowrap producer}} unregisters as a block producer candidate'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\n{{producer}} unregisters as a block producer candidate. {{producer}} account will retain its votes and those votes can change based on voter stake changes or votes removed from {{producer}}. However new voters will not be able to vote for {{producer}} while it remains unregistered." - }, - { - "name": "unregreason", - "type": "unregreason", - "ricardian_contract": "" - }, - { - "name": "unstaketorex", - "type": "unstaketorex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Buy REX Tokens Using Staked Tokens\nsummary: '{{nowrap owner}} buys REX tokens in exchange for tokens currently staked to NET and/or CPU'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\n{{from_net}} and {{from_cpu}} are withdrawn from {{receiver}}’s NET and CPU bandwidths respectively. These funds are used to purchase REX tokens at the current market exchange rate. In order for the action to succeed, {{owner}} must have voted for a proxy or at least 21 block producers.\n\nA sell order of the purchased amount can only be initiated after waiting for the maturity period of 4 to 5 days to pass. Even then, depending on the market conditions, the initiated sell order may not be executed immediately." - }, - { - "name": "updateauth", - "type": "updateauth", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Modify Account Permission\nsummary: 'Add or update the {{nowrap permission}} permission of {{nowrap account}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nModify, and create if necessary, the {{permission}} permission of {{account}} to have a parent permission of {{parent}} and the following authority:\n{{to_json auth}}" - }, - { - "name": "updaterex", - "type": "updaterex", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Update REX Owner Vote Weight\nsummary: 'Update vote weight to current value of held REX tokens'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nUpdate vote weight of {{owner}} account to current value of held REX tokens." - }, - { - "name": "updtrevision", - "type": "updtrevision", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Update System Contract Revision Number\nsummary: 'Update system contract revision number'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} advances the system contract revision number to {{revision}}." - }, - { - "name": "votebpout", - "type": "votebpout", - "ricardian_contract": "" - }, - { - "name": "voteproducer", - "type": "voteproducer", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Vote for Block Producers\nsummary: '{{nowrap voter}} votes for {{#if proxy}}the proxy {{nowrap proxy}}{{else}}up to 30 block producer candidates{{/if}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\n{{#if proxy}}\n{{voter}} votes for the proxy {{proxy}}.\nAt the time of voting the full weight of voter’s staked (CPU + NET) tokens will be cast towards each of the producers voted by {{proxy}}.\n{{else}}\n{{voter}} votes for the following block producer candidates:\n\n{{#each producers}}\n + {{this}}\n{{/each}}\n\nAt the time of voting the full weight of voter’s staked (CPU + NET) tokens will be cast towards each of the above producers.\n{{/if}}" - }, - { - "name": "withdraw", - "type": "withdraw", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Withdraw from REX Fund\nsummary: 'Withdraw {{nowrap amount}} from {{nowrap owner}}’s REX fund by transferring to {{owner}}’s liquid balance'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/rex.png#d229837fa62a464b9c71e06060aa86179adf0b3f4e3b8c4f9702f4f4b0c340a8\n---\n\nWithdraws {{amount}} from {{owner}}’s REX fund and transfer them to {{owner}}’s liquid balance." - } - ], - "tables": [ - { - "name": "abihash", - "type": "abi_hash", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "bidrefunds", - "type": "bid_refund", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "cpuloan", - "type": "rex_loan", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "delband", - "type": "delegated_bandwidth", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "global", - "type": "eosio_global_state", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "namebids", - "type": "name_bid", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "netloan", - "type": "rex_loan", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "payments", - "type": "payment_info", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "payrate", - "type": "payrates", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "producers", - "type": "producer_info", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rammarket", - "type": "exchange_state", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "refunds", - "type": "refund_request", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rexbal", - "type": "rex_balance", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rexfund", - "type": "rex_fund", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rexpool", - "type": "rex_pool", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rexqueue", - "type": "rex_order", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "rotations", - "type": "rotation_state", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "schedulemetr", - "type": "schedule_metrics_state", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "userres", - "type": "user_resources", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "voters", - "type": "voter_info", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [ - { - "id": "UserAgreement", - "body": "User agreement for the chain can go here." - }, - { - "id": "BlockProducerAgreement", - "body": "I, {{producer}}, hereby nominate myself for consideration as an elected block producer.\n\nIf {{producer}} is selected to produce blocks by the system contract, I will sign blocks with {{producer_key}} and I hereby attest that I will keep this key secret and secure.\n\nIf {{producer}} is unable to perform obligations under this contract I will resign my position by resubmitting this contract with the null producer key.\n\nI acknowledge that a block is 'objectively valid' if it conforms to the deterministic blockchain rules in force at the time of its creation, and is 'objectively invalid' if it fails to conform to those rules.\n\n{{producer}} hereby agrees to only use {{producer_key}} to sign messages under the following scenarios:\n\n* proposing an objectively valid block at the time appointed by the block scheduling algorithm;\n* pre-confirming a block produced by another producer in the schedule when I find said block objectively valid;\n* and, confirming a block for which {{producer}} has received pre-confirmation messages from more than two-thirds of the active block producers.\n\nI hereby accept liability for any and all provable damages that result from my:\n\n* signing two different block proposals with the same timestamp with {{producer_key}};\n* signing two different block proposals with the same block number with {{producer_key}};\n* signing any block proposal which builds off of an objectively invalid block;\n* signing a pre-confirmation for an objectively invalid block;\n* or, signing a confirmation for a block for which I do not possess pre-confirmation messages from more than two-thirds of the active block producers.\n\nI hereby agree that double-signing for a timestamp or block number in concert with two or more other block producers shall automatically be deemed malicious and cause {{producer}} to be subject to:\n\n* a fine equal to the past year of compensation received,\n* immediate disqualification from being a producer,\n* and/or other damages.\n\nAn exception may be made if {{producer}} can demonstrate that the double-signing occurred due to a bug in the reference software; the burden of proof is on {{producer}}.\n\nI hereby agree not to interfere with the producer election process. I agree to process all producer election transactions that occur in blocks I create, to sign all objectively valid blocks I create that contain election transactions, and to sign all pre-confirmations and confirmations necessary to facilitate transfer of control to the next set of producers as determined by the system contract.\n\nI hereby acknowledge that more than two-thirds of the active block producers may vote to disqualify {{producer}} in the event {{producer}} is unable to produce blocks or is unable to be reached, according to criteria agreed to among block producers.\n\nIf {{producer}} qualifies for and chooses to collect compensation due to votes received, {{producer}} will provide a public endpoint allowing at least 100 peers to maintain synchronization with the blockchain and/or submit transactions to be included. {{producer}} shall maintain at least one validating node with full state and signature checking and shall report any objectively invalid blocks produced by the active block producers. Reporting shall be via a method to be agreed to among block producers, said method and reports to be made public.\n\nThe community agrees to allow {{producer}} to authenticate peers as necessary to prevent abuse and denial of service attacks; however, {{producer}} agrees not to discriminate against non-abusive peers.\n\nI agree to process transactions on a FIFO (first in, first out) best-effort basis and to honestly bill transactions for measured execution time.\n\nI {{producer}} agree not to manipulate the contents of blocks in order to derive profit from: the order in which transactions are included, or the hash of the block that is produced.\n\nI, {{producer}}, hereby agree to disclose and attest under penalty of perjury all ultimate beneficial owners of my business entity who own more than 10% and all direct shareholders.\n\nI, {{producer}}, hereby agree to cooperate with other block producers to carry out our respective and mutual obligations under this agreement, including but not limited to maintaining network stability and a valid blockchain.\n\nI, {{producer}}, agree to maintain a website hosted at {{url}} which contains up-to-date information on all disclosures required by this contract.\n\nI, {{producer}}, agree to set the location value of {{location}} such that {{producer}} is scheduled with minimal latency between my previous and next peer.\n\nI, {{producer}}, agree to maintain time synchronization within 10 ms of global atomic clock time, using a method agreed to among block producers.\n\nI, {{producer}}, agree not to produce blocks before my scheduled time unless I have received all blocks produced by the prior block producer.\n\nI, {{producer}}, agree not to publish blocks with timestamps more than 500ms in the future unless the prior block is more than 75% full by either NET or CPU bandwidth metrics.\n\nI, {{producer}}, agree not to set the RAM supply to more RAM than my nodes contain and to resign if I am unable to provide the RAM approved by more than two-thirds of active block producers, as shown in the system parameters." - } - ], - "variants": [] -} \ No newline at end of file diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.wasm b/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.wasm deleted file mode 100755 index 8a8a128..0000000 Binary files a/docker/leap-skynet-4.0.1/contracts/eosio.system/eosio.system.wasm and /dev/null differ diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.abi b/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.abi deleted file mode 100644 index d054da7..0000000 --- a/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.abi +++ /dev/null @@ -1,185 +0,0 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ", - "version": "eosio::abi/1.1", - "types": [], - "structs": [ - { - "name": "account", - "base": "", - "fields": [ - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "close", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - } - ] - }, - { - "name": "create", - "base": "", - "fields": [ - { - "name": "issuer", - "type": "name" - }, - { - "name": "maximum_supply", - "type": "asset" - } - ] - }, - { - "name": "currency_stats", - "base": "", - "fields": [ - { - "name": "supply", - "type": "asset" - }, - { - "name": "max_supply", - "type": "asset" - }, - { - "name": "issuer", - "type": "name" - } - ] - }, - { - "name": "issue", - "base": "", - "fields": [ - { - "name": "to", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "open", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - }, - { - "name": "ram_payer", - "type": "name" - } - ] - }, - { - "name": "retire", - "base": "", - "fields": [ - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "transfer", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - } - ], - "actions": [ - { - "name": "close", - "type": "close", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Close Token Balance\nsummary: 'Close {{nowrap owner}}’s zero quantity balance'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\n{{owner}} agrees to close their zero quantity balance for the {{symbol_to_symbol_code symbol}} token.\n\nRAM will be refunded to the RAM payer of the {{symbol_to_symbol_code symbol}} token balance for {{owner}}." - }, - { - "name": "create", - "type": "create", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Create New Token\nsummary: 'Create a new token'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\n{{$action.account}} agrees to create a new token with symbol {{asset_to_symbol_code maximum_supply}} to be managed by {{issuer}}.\n\nThis action will not result any any tokens being issued into circulation.\n\n{{issuer}} will be allowed to issue tokens into circulation, up to a maximum supply of {{maximum_supply}}.\n\nRAM will deducted from {{$action.account}}’s resources to create the necessary records." - }, - { - "name": "issue", - "type": "issue", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Issue Tokens into Circulation\nsummary: 'Issue {{nowrap quantity}} into circulation and transfer into {{nowrap to}}’s account'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nThe token manager 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 manager does not have a balance for {{asset_to_symbol_code quantity}}, the token manager 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 manager’s resources to create the necessary records.\n\nThis action does not allow the total quantity to exceed the max allowed supply of the token." - }, - { - "name": "open", - "type": "open", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Open Token Balance\nsummary: 'Open a zero quantity balance for {{nowrap owner}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\n{{ram_payer}} agrees to establish a zero quantity balance for {{owner}} for the {{symbol_to_symbol_code symbol}} token.\n\nIf {{owner}} does not have a balance for {{symbol_to_symbol_code symbol}}, {{ram_payer}} will be designated as the RAM payer of the {{symbol_to_symbol_code symbol}} token balance for {{owner}}. As a result, RAM will be deducted from {{ram_payer}}’s resources to create the necessary records." - }, - { - "name": "retire", - "type": "retire", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Remove Tokens from Circulation\nsummary: 'Remove {{nowrap quantity}} from circulation'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nThe token manager agrees to remove {{quantity}} from circulation, taken from their own account.\n\n{{#if memo}} There is a memo attached to the action stating:\n{{memo}}\n{{/if}}" - }, - { - "name": "transfer", - "type": "transfer", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Transfer Tokens\nsummary: 'Send {{nowrap quantity}} from {{nowrap from}} to {{nowrap to}}'\nicon: http://127.0.0.1/ricardian_assets/eosio.contracts/icons/transfer.png#5dfad0df72772ee1ccc155e670c1d124f5c5122f1d5027565df38b418042d1dd\n---\n\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.\n\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." - } - ], - "tables": [ - { - "name": "accounts", - "type": "account", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "stat", - "type": "currency_stats", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [], - "variants": [] -} \ No newline at end of file diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.wasm b/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.wasm deleted file mode 100755 index f21c5c5..0000000 Binary files a/docker/leap-skynet-4.0.1/contracts/eosio.token/eosio.token.wasm and /dev/null differ diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.abi b/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.abi deleted file mode 100644 index 7d1f2b5..0000000 --- a/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.abi +++ /dev/null @@ -1,130 +0,0 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Thu Apr 14 07:49:40 2022", - "version": "eosio::abi/1.1", - "structs": [ - { - "name": "action", - "base": "", - "fields": [ - { - "name": "account", - "type": "name" - }, - { - "name": "name", - "type": "name" - }, - { - "name": "authorization", - "type": "permission_level[]" - }, - { - "name": "data", - "type": "bytes" - } - ] - }, - { - "name": "exec", - "base": "", - "fields": [ - { - "name": "executer", - "type": "name" - }, - { - "name": "trx", - "type": "transaction" - } - ] - }, - { - "name": "extension", - "base": "", - "fields": [ - { - "name": "type", - "type": "uint16" - }, - { - "name": "data", - "type": "bytes" - } - ] - }, - { - "name": "permission_level", - "base": "", - "fields": [ - { - "name": "actor", - "type": "name" - }, - { - "name": "permission", - "type": "name" - } - ] - }, - { - "name": "transaction", - "base": "transaction_header", - "fields": [ - { - "name": "context_free_actions", - "type": "action[]" - }, - { - "name": "actions", - "type": "action[]" - }, - { - "name": "transaction_extensions", - "type": "extension[]" - } - ] - }, - { - "name": "transaction_header", - "base": "", - "fields": [ - { - "name": "expiration", - "type": "time_point_sec" - }, - { - "name": "ref_block_num", - "type": "uint16" - }, - { - "name": "ref_block_prefix", - "type": "uint32" - }, - { - "name": "max_net_usage_words", - "type": "varuint32" - }, - { - "name": "max_cpu_usage_ms", - "type": "uint8" - }, - { - "name": "delay_sec", - "type": "varuint32" - } - ] - } - ], - "types": [], - "actions": [ - { - "name": "exec", - "type": "exec", - "ricardian_contract": "" - } - ], - "tables": [], - "ricardian_clauses": [], - "variants": [], - "abi_extensions": [] -} \ No newline at end of file diff --git a/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.wasm b/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.wasm deleted file mode 100755 index e9c17cb..0000000 Binary files a/docker/leap-skynet-4.0.1/contracts/eosio.wrap/eosio.wrap.wasm and /dev/null differ diff --git a/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.abi b/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.abi deleted file mode 100644 index 232bf5c..0000000 --- a/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.abi +++ /dev/null @@ -1,1666 +0,0 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ", - "version": "eosio::abi/1.1", - "types": [], - "structs": [ - { - "name": "account", - "base": "", - "fields": [ - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "addfunds", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "quantity", - "type": "asset" - } - ] - }, - { - "name": "addoption", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "new_option_name", - "type": "name" - } - ] - }, - { - "name": "addseat", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "new_seat_name", - "type": "name" - } - ] - }, - { - "name": "archival", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "archived_until", - "type": "time_point_sec" - } - ] - }, - { - "name": "archive", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "archived_until", - "type": "time_point_sec" - } - ] - }, - { - "name": "assignseat", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "seat_name", - "type": "name" - }, - { - "name": "seat_holder", - "type": "name" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "ballot", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "publisher", - "type": "name" - }, - { - "name": "status", - "type": "name" - }, - { - "name": "title", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "content", - "type": "string" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "voting_method", - "type": "name" - }, - { - "name": "min_options", - "type": "uint8" - }, - { - "name": "max_options", - "type": "uint8" - }, - { - "name": "options", - "type": "pair_name_asset[]" - }, - { - "name": "total_voters", - "type": "uint32" - }, - { - "name": "total_delegates", - "type": "uint32" - }, - { - "name": "total_raw_weight", - "type": "asset" - }, - { - "name": "cleaned_count", - "type": "uint32" - }, - { - "name": "settings", - "type": "pair_name_bool[]" - }, - { - "name": "begin_time", - "type": "time_point_sec" - }, - { - "name": "end_time", - "type": "time_point_sec" - } - ] - }, - { - "name": "broadcast", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "final_results", - "type": "pair_name_asset[]" - }, - { - "name": "total_voters", - "type": "uint32" - } - ] - }, - { - "name": "burn", - "base": "", - "fields": [ - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "cancelballot", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "castvote", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "options", - "type": "name[]" - } - ] - }, - { - "name": "claimpayment", - "base": "", - "fields": [ - { - "name": "worker_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - } - ] - }, - { - "name": "cleanupvote", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "worker", - "type": "name?" - } - ] - }, - { - "name": "closevoting", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "broadcast", - "type": "bool" - } - ] - }, - { - "name": "committee", - "base": "", - "fields": [ - { - "name": "committee_title", - "type": "string" - }, - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "seats", - "type": "pair_name_name[]" - }, - { - "name": "updater_acct", - "type": "name" - }, - { - "name": "updater_auth", - "type": "name" - } - ] - }, - { - "name": "config", - "base": "", - "fields": [ - { - "name": "app_name", - "type": "string" - }, - { - "name": "app_version", - "type": "string" - }, - { - "name": "total_deposits", - "type": "asset" - }, - { - "name": "fees", - "type": "pair_name_asset[]" - }, - { - "name": "times", - "type": "pair_name_uint32[]" - } - ] - }, - { - "name": "delcommittee", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "delegate", - "base": "", - "fields": [ - { - "name": "delegate_name", - "type": "name" - }, - { - "name": "total_delegated", - "type": "asset" - }, - { - "name": "constituents", - "type": "uint32" - } - ] - }, - { - "name": "deleteballot", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - } - ] - }, - { - "name": "editdetails", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "title", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "content", - "type": "string" - } - ] - }, - { - "name": "editminmax", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "new_min_options", - "type": "uint8" - }, - { - "name": "new_max_options", - "type": "uint8" - } - ] - }, - { - "name": "editpayrate", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "period_length", - "type": "uint32" - }, - { - "name": "per_period", - "type": "asset" - } - ] - }, - { - "name": "edittrsinfo", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "title", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "icon", - "type": "string" - } - ] - }, - { - "name": "featured_ballot", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "featured_until", - "type": "time_point_sec" - } - ] - }, - { - "name": "forfeitwork", - "base": "", - "fields": [ - { - "name": "worker_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - } - ] - }, - { - "name": "init", - "base": "", - "fields": [ - { - "name": "app_version", - "type": "string" - } - ] - }, - { - "name": "labor", - "base": "", - "fields": [ - { - "name": "worker_name", - "type": "name" - }, - { - "name": "start_time", - "type": "time_point_sec" - }, - { - "name": "unclaimed_volume", - "type": "pair_name_asset[]" - }, - { - "name": "unclaimed_events", - "type": "pair_name_uint32[]" - } - ] - }, - { - "name": "labor_bucket", - "base": "", - "fields": [ - { - "name": "payroll_name", - "type": "name" - }, - { - "name": "claimable_volume", - "type": "pair_name_asset[]" - }, - { - "name": "claimable_events", - "type": "pair_name_uint32[]" - } - ] - }, - { - "name": "lock", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - } - ] - }, - { - "name": "mint", - "base": "", - "fields": [ - { - "name": "to", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "mutatemax", - "base": "", - "fields": [ - { - "name": "new_max_supply", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "newballot", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "publisher", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "voting_method", - "type": "name" - }, - { - "name": "initial_options", - "type": "name[]" - } - ] - }, - { - "name": "newtreasury", - "base": "", - "fields": [ - { - "name": "manager", - "type": "name" - }, - { - "name": "max_supply", - "type": "asset" - }, - { - "name": "access", - "type": "name" - } - ] - }, - { - "name": "openvoting", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "end_time", - "type": "time_point_sec" - } - ] - }, - { - "name": "pair_name_asset", - "base": "", - "fields": [ - { - "name": "key", - "type": "name" - }, - { - "name": "value", - "type": "asset" - } - ] - }, - { - "name": "pair_name_bool", - "base": "", - "fields": [ - { - "name": "key", - "type": "name" - }, - { - "name": "value", - "type": "bool" - } - ] - }, - { - "name": "pair_name_name", - "base": "", - "fields": [ - { - "name": "key", - "type": "name" - }, - { - "name": "value", - "type": "name" - } - ] - }, - { - "name": "pair_name_uint32", - "base": "", - "fields": [ - { - "name": "key", - "type": "name" - }, - { - "name": "value", - "type": "uint32" - } - ] - }, - { - "name": "payroll", - "base": "", - "fields": [ - { - "name": "payroll_name", - "type": "name" - }, - { - "name": "payroll_funds", - "type": "asset" - }, - { - "name": "period_length", - "type": "uint32" - }, - { - "name": "per_period", - "type": "asset" - }, - { - "name": "last_claim_time", - "type": "time_point_sec" - }, - { - "name": "claimable_pay", - "type": "asset" - }, - { - "name": "payee", - "type": "name" - } - ] - }, - { - "name": "postresults", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "light_results", - "type": "pair_name_asset[]" - }, - { - "name": "total_voters", - "type": "uint32" - } - ] - }, - { - "name": "rebalance", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "worker", - "type": "name?" - } - ] - }, - { - "name": "reclaim", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "refresh", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - } - ] - }, - { - "name": "regcommittee", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "committee_title", - "type": "string" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "initial_seats", - "type": "name[]" - }, - { - "name": "registree", - "type": "name" - } - ] - }, - { - "name": "regvoter", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "referrer", - "type": "name?" - } - ] - }, - { - "name": "removeseat", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "seat_name", - "type": "name" - } - ] - }, - { - "name": "rmvoption", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "option_name", - "type": "name" - } - ] - }, - { - "name": "setunlocker", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "new_unlock_acct", - "type": "name" - }, - { - "name": "new_unlock_auth", - "type": "name" - } - ] - }, - { - "name": "setupdater", - "base": "", - "fields": [ - { - "name": "committee_name", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "updater_account", - "type": "name" - }, - { - "name": "updater_auth", - "type": "name" - } - ] - }, - { - "name": "setversion", - "base": "", - "fields": [ - { - "name": "new_app_version", - "type": "string" - } - ] - }, - { - "name": "stake", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - } - ] - }, - { - "name": "toggle", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - }, - { - "name": "setting_name", - "type": "name" - } - ] - }, - { - "name": "togglebal", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "setting_name", - "type": "name" - } - ] - }, - { - "name": "transfer", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "treasury", - "base": "", - "fields": [ - { - "name": "supply", - "type": "asset" - }, - { - "name": "max_supply", - "type": "asset" - }, - { - "name": "access", - "type": "name" - }, - { - "name": "manager", - "type": "name" - }, - { - "name": "title", - "type": "string" - }, - { - "name": "description", - "type": "string" - }, - { - "name": "icon", - "type": "string" - }, - { - "name": "voters", - "type": "uint32" - }, - { - "name": "delegates", - "type": "uint32" - }, - { - "name": "committees", - "type": "uint32" - }, - { - "name": "open_ballots", - "type": "uint32" - }, - { - "name": "locked", - "type": "bool" - }, - { - "name": "unlock_acct", - "type": "name" - }, - { - "name": "unlock_auth", - "type": "name" - }, - { - "name": "settings", - "type": "pair_name_bool[]" - } - ] - }, - { - "name": "unarchive", - "base": "", - "fields": [ - { - "name": "ballot_name", - "type": "name" - }, - { - "name": "force", - "type": "bool" - } - ] - }, - { - "name": "unlock", - "base": "", - "fields": [ - { - "name": "treasury_symbol", - "type": "symbol" - } - ] - }, - { - "name": "unregvoter", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "treasury_symbol", - "type": "symbol" - } - ] - }, - { - "name": "unstake", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - } - ] - }, - { - "name": "unvoteall", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "ballot_name", - "type": "name" - } - ] - }, - { - "name": "updatefee", - "base": "", - "fields": [ - { - "name": "fee_name", - "type": "name" - }, - { - "name": "fee_amount", - "type": "asset" - } - ] - }, - { - "name": "updatetime", - "base": "", - "fields": [ - { - "name": "time_name", - "type": "name" - }, - { - "name": "length", - "type": "uint32" - } - ] - }, - { - "name": "vote", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "is_delegate", - "type": "bool" - }, - { - "name": "raw_votes", - "type": "asset" - }, - { - "name": "weighted_votes", - "type": "pair_name_asset[]" - }, - { - "name": "vote_time", - "type": "time_point_sec" - }, - { - "name": "worker", - "type": "name" - }, - { - "name": "rebalances", - "type": "uint8" - }, - { - "name": "rebalance_volume", - "type": "asset" - } - ] - }, - { - "name": "voter", - "base": "", - "fields": [ - { - "name": "liquid", - "type": "asset" - }, - { - "name": "staked", - "type": "asset" - }, - { - "name": "staked_time", - "type": "time_point_sec" - }, - { - "name": "delegated", - "type": "asset" - }, - { - "name": "delegated_to", - "type": "name" - }, - { - "name": "delegation_time", - "type": "time_point_sec" - } - ] - }, - { - "name": "withdraw", - "base": "", - "fields": [ - { - "name": "voter", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - } - ] - } - ], - "actions": [ - { - "name": "addfunds", - "type": "addfunds", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Add Payroll Funds\nsummary: 'Add to Treasury Payroll Funds'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\n{{$action.account}} adds {{quantity}} to the {{treasury_symbol}}'s {{payroll_name}} payroll." - }, - { - "name": "addoption", - "type": "addoption", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Add Ballot Option\nsummary: 'Add Ballot Option'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} adds the {{new_option_name}} option to the {{ballot_name}} ballot." - }, - { - "name": "addseat", - "type": "addseat", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Add Committee Seat\nsummary: 'Add Committee Seat'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nCommittee updater {{$action.account}} adds the {{seat_name}} seat to the {{committee_name}} committee." - }, - { - "name": "archive", - "type": "archive", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Archive Ballot\nsummary: 'Archive Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} archives the {{ballot_name}} ballot until {{archived_until}}." - }, - { - "name": "assignseat", - "type": "assignseat", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Assign Committee Seat\nsummary: 'Assign Committee Seat'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nCommittee updater {{$action.account}} assigns {{seat_holder}} to the {{seat_name}} seat in the {{committee_name}} committee." - }, - { - "name": "broadcast", - "type": "broadcast", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Broadcast Ballot Results\nsummary: 'Broadcast Ballot Results'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBroadcasts the final ballot results to the ballot publisher's account." - }, - { - "name": "burn", - "type": "burn", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Burn Tokens\nsummary: 'Burn Treasury Tokens from Manager Balance'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} burns {{quantity}} from their account." - }, - { - "name": "cancelballot", - "type": "cancelballot", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Cancel Ballot\nsummary: 'Cancel Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} cancels the {{ballot_name}} ballot and forfeits all fees spent in its creation.\n\n## Ballot Status Change\n\nThe {{ballot_name}} will be changed to the \"cancelled\" status. From there, it can be fully deleted with the deleteballot() action." - }, - { - "name": "castvote", - "type": "castvote", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Cast Vote\nsummary: 'Cast Vote on a Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nVoter {{$action.account}} casts votes for {{options}} on the {{ballot_name}} ballot." - }, - { - "name": "claimpayment", - "type": "claimpayment", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Claim Payment\nsummary: 'Claim Payment'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nWorker {{$action.account}} claims payment for all committed work on the {{treasury_symbol}} treasury." - }, - { - "name": "cleanupvote", - "type": "cleanupvote", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Clean Vote\nsummary: 'Clean Vote'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nWorker {{$action.account}} cleans {{voter}}'s vote on the {{ballot_name}}." - }, - { - "name": "closevoting", - "type": "closevoting", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Close Ballot Voting\nsummary: 'Close Ballot Voting'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} closes the completed {{ballot_name}} ballot." - }, - { - "name": "delcommittee", - "type": "delcommittee", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Delete Committee\nsummary: 'Delete Committee'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nCommittee Updater {{$action.account}} deletes the committee." - }, - { - "name": "deleteballot", - "type": "deleteballot", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Delete Ballot\nsummary: 'Delete Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\n{{$action.account}} deletes the {{ballot_name}} ballot." - }, - { - "name": "editdetails", - "type": "editdetails", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Edit Ballot Info\nsummary: 'Edit Ballot Info'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publiser {{$action.account}} edits the ballot title to {{title}}, the description to {{description}}, and the content to {{content}}." - }, - { - "name": "editminmax", - "type": "editminmax", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Edit Ballot Min/Max\nsummary: 'Edit Ballot Min/Max Options'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} edits number of minimum vote options to {{new_min_options}}, and the max vote options to {{new_max_options}}. This means voters can select between {{new_min_options}} and {{new_max_options}} options when voting." - }, - { - "name": "editpayrate", - "type": "editpayrate", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Edit Payroll Pay Rate\nsummary: 'Edit Payroll Pay Rate'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} changes {{treasury_symbol}}'s {{payroll_name}} pay rate to {{per_period}} per {{period_length}} second period." - }, - { - "name": "edittrsinfo", - "type": "edittrsinfo", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Edit Treasury Info\nsummary: 'Edit Treasury Info'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{$action.account}} sets the treasury title to {{title}}, the description to {{description}}, and the icon to {{icon}} for the {{treasury_symbol}} treasury." - }, - { - "name": "forfeitwork", - "type": "forfeitwork", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Forfeit Work\nsummary: 'Forfeit Work'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nWorker {{$action.account}} forfeits all currently commited work on the {{treasury_symbol}} treasury." - }, - { - "name": "init", - "type": "init", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Set Decide Config\nsummary: 'Set Decide Config Version'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\n{{$action.account}} sets the Telos Decide config to version {{app_version}}." - }, - { - "name": "lock", - "type": "lock", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Lock Treasury Settings\nsummary: 'Lock Treasury Settings'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} locks the {{treasury_symbol}} treasury." - }, - { - "name": "mint", - "type": "mint", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Mint Tokens\nsummary: 'Mint Treasury Tokens'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} mints {{quantity}} to {{to}} account." - }, - { - "name": "mutatemax", - "type": "mutatemax", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Mutate Max Supply\nsummary: 'Mutate Treasury Max Supply'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} mutates the {{treasury_symbol}} treasury's max supply to {{new_max_supply}}." - }, - { - "name": "newballot", - "type": "newballot", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: New Treasury Ballot\nsummary: 'Create New Treasury Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nVoter {{publisher}} creates the {{ballot_name}} ballot for the {{treasury_symbol}} treasury." - }, - { - "name": "newtreasury", - "type": "newtreasury", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Define New Treasury\nsummary: 'Define New Treasury'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{manager}} is defining a new treasury with a max supply of {{max_supply}} and an initial access method of {{access}}.\n\n## Initial Settings\n\nAll settings on the new treasury will be initialized to false." - }, - { - "name": "openvoting", - "type": "openvoting", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Open Ballot Voting\nsummary: 'Open Ballot For Voting'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot puboisher {{$action.account}} opens voting on {{ballot_name}} ballot until {{end_time}}." - }, - { - "name": "postresults", - "type": "postresults", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Post Light Ballot Results\nsummary: 'Post Light Ballot Results'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} posts the results of the {{ballot_name}} light ballot." - }, - { - "name": "rebalance", - "type": "rebalance", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Rebalance Vote\nsummary: 'Rebalance Vote'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nWorker {{$action.account}} rebalances {{voter}}'s vote on the {{ballot_name}} ballot." - }, - { - "name": "reclaim", - "type": "reclaim", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Reclaim Tokens\nsummary: 'Reclaim Treasury Tokens from Voter'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury manager {{$action.account}} reclaims {{quantity}} from {{voter}}." - }, - { - "name": "refresh", - "type": "refresh", - "ricardian_contract": "" - }, - { - "name": "regcommittee", - "type": "regcommittee", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Register New Committee\nsummary: 'Register New Committee'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nVoter {{$action.account}} registers the {{committee_name}} committee for the {{treasury_symbol}} treasury." - }, - { - "name": "regvoter", - "type": "regvoter", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Register Voter\nsummary: 'Register Voter'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nRegister the new voter {{$action.account}} to the {{treasury_symbol}} treasury." - }, - { - "name": "removeseat", - "type": "removeseat", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Remove Committee Seat\nsummary: 'Remove Committee Seat'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nCommittee updater {{$action.account}} removes the {{seat_name}} seat from the {{committee_name}} committee." - }, - { - "name": "rmvoption", - "type": "rmvoption", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Remove Ballot Option\nsummary: 'Remove Ballot Option'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} removes the {{option_name}} option from the {{ballot_name}} ballot." - }, - { - "name": "setunlocker", - "type": "setunlocker", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Set Treasury Unlocker\nsummary: 'Set Treasury Unlocker Account and Permission'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Manager {{$action.account}} sets the {{treasury_symbol}} unlocker auth to {{new_unlock_acct}}@{{new_unlock_auth}}." - }, - { - "name": "setupdater", - "type": "setupdater", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Set Committee Updater\nsummary: 'Set Committee Updater'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nCommittee updater {{$action.account}} sets the updater to {{updater_acct}}@{{updater_auth}} for the {{committee_name}} committee." - }, - { - "name": "setversion", - "type": "setversion", - "ricardian_contract": "" - }, - { - "name": "stake", - "type": "stake", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Stake Tokens\nsummary: 'Stake Tokens'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nVoter {{$action.account}} stakes {{quantity}}." - }, - { - "name": "toggle", - "type": "toggle", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Toggle Treasury Setting\nsummary: 'Toggle Treasury Setting'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/resource.png#3830f1ce8cb07f7757dbcf383b1ec1b11914ac34a1f9d8b065f07600fa9dac19\n---\n\n{{$action.account}} toggles the treasury setting {{setting_name}} for the {{treasury_symbol}} treasury." - }, - { - "name": "togglebal", - "type": "togglebal", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Toggle Ballot Setting\nsummary: 'Toggle Ballot Setting'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot publisher {{$action.account}} toggles the {{setting_name}} on the {{ballot_name}} ballot." - }, - { - "name": "transfer", - "type": "transfer", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Transfer Tokens\nsummary: 'Transfer Treasury Tokens'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/transfer.png#5dfad0df72772ee1ccc155e670c1d124f5c5122f1d5027565df38b418042d1dd\n---\n\nVoter {{$action.account}} transfers {{quantity}} to {{to}}." - }, - { - "name": "unarchive", - "type": "unarchive", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unarchive Ballot\nsummary: 'Unarchive Ballot'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nBallot archiver {{$action.account}} unarchives the {{ballot_name}} ballot." - }, - { - "name": "unlock", - "type": "unlock", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unlock Treasury Settings\nsummary: 'Unlock Treasury Settings'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/token.png#207ff68b0406eaa56618b08bda81d6a0954543f36adc328ab3065f31a5c5d654\n---\n\nTreasury Unlocker {{$action.account}} unlocks the {{treasury_symbol}} treasury." - }, - { - "name": "unregvoter", - "type": "unregvoter", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unregister voter\nsummary: 'Unregister Voter'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nUnregister the {{$action.account}} voter from the {{treasury_symbol}} treasury." - }, - { - "name": "unstake", - "type": "unstake", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unstake Tokens\nsummary: 'Unstake Tokens'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nVoter {{$action.account}} unstakes {{quantity}}." - }, - { - "name": "unvoteall", - "type": "unvoteall", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Unvote All Options\nsummary: 'Unvote All Options'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/voting.png#db28cd3db6e62d4509af3644ce7d377329482a14bb4bfaca2aa5f1400d8e8a84\n---\n\nVoter {{$action.account}} unvotes all options on their vote." - }, - { - "name": "updatefee", - "type": "updatefee", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Update Fee\nsummary: 'Update Platform Fee'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\nTrail Admin {{$action.account}} updates {{fee_name}} fee to {{fee_amount}}." - }, - { - "name": "updatetime", - "type": "updatetime", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Update Time Setting\nsummary: 'Update Platform Time Setting'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/admin.png#9bf1cec664863bd6aaac0f814b235f8799fb02c850e9aa5da34e8a004bd6518e\n---\n\nTrail Admin {{$action.account}} udpates the {{time_name}} time to {{length}} seconds." - }, - { - "name": "withdraw", - "type": "withdraw", - "ricardian_contract": "---\nspec_version: \"0.2.0\"\ntitle: Withdraw TLOS\nsummary: 'Withdraw TLOS from Trail to Wallet'\nicon: https://github.com/Telos-Foundation/images/raw/master/ricardian_assets/eosio.contracts/icons/account.png#3d55a2fc3a5c20b456f5657faf666bc25ffd06f4836c5e8256f741149b0b294f\n---\n\nAccount {{$action.account}} withdraws {{quantity}} from the Trail platform." - } - ], - "tables": [ - { - "name": "accounts", - "type": "account", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "archivals", - "type": "archival", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "ballots", - "type": "ballot", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "committees", - "type": "committee", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "config", - "type": "config", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "delegates", - "type": "delegate", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "featured", - "type": "featured_ballot", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "laborbuckets", - "type": "labor_bucket", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "labors", - "type": "labor", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "payrolls", - "type": "payroll", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "treasuries", - "type": "treasury", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "voters", - "type": "voter", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "votes", - "type": "vote", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [ - { - "id": "Intent", - "body": "The intention of the authors and invoker of this smart contract is to ..." - }, - { - "id": "Term", - "body": "This Contract expires at the conclusion of code execution." - }, - { - "id": "Warranty", - "body": "{{ name }} 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 Telos Blockchain Network 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": "Force Majeure", - "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": "Dispute Resolution", - "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under Telos Blockchain Network Arbitration Rules and Procedures. The arbitrator's award will be final.\"" - }, - { - "id": "Entire 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, except for the Telos Blockchain Network Core Governance Documents\"" - }, - { - "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": "Governing Law", - "body": "This Contract shall be construed in accordance with the Telos Blockchain Network Core Governance Documents, previously referenced." - }, - { - "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": "Waiver of Contractual Right", - "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": "Arbitrator's Fees to Prevailing Party", - "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": "Construction and Interpretation", - "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": "In Witness Whereof", - "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." - } - ], - "variants": [] -} \ No newline at end of file diff --git a/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.wasm b/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.wasm deleted file mode 100755 index d818604..0000000 Binary files a/docker/leap-skynet-4.0.1/contracts/telos.decide/decide.wasm and /dev/null differ diff --git a/docker/leap-skynet-4.0.1/genesis/skynet.json b/docker/leap-skynet-4.0.1/genesis/skynet.json deleted file mode 100644 index 82890c9..0000000 --- a/docker/leap-skynet-4.0.1/genesis/skynet.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "initial_timestamp": "2023-05-22T00:00:00.000", - "initial_key": "EOS5fLreY5Zq5owBhmNJTgQaLqQ4ufzXSTpStQakEyfxNFuUEgNs1", - "initial_configuration": { - "max_block_net_usage": 1048576, - "target_block_net_usage_pct": 1000, - "max_transaction_net_usage": 1048575, - "base_per_transaction_net_usage": 12, - "net_usage_leeway": 500, - "context_free_discount_net_usage_num": 20, - "context_free_discount_net_usage_den": 100, - "max_block_cpu_usage": 200000, - "target_block_cpu_usage_pct": 1000, - "max_transaction_cpu_usage": 150000, - "min_transaction_cpu_usage": 100, - "max_transaction_lifetime": 3600, - "deferred_trx_expiration_window": 600, - "max_transaction_delay": 3888000, - "max_inline_action_size": 4096, - "max_inline_action_depth": 4, - "max_authority_depth": 6 - } -} - - diff --git a/pytest.ini b/pytest.ini index 335075e..1c3d512 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,4 @@ [pytest] log_cli = True log_level = info +trio_mode = True diff --git a/skynet.ini.example b/skynet.ini.example index 1f9eab0..4cdd761 100644 --- a/skynet.ini.example +++ b/skynet.ini.example @@ -3,9 +3,10 @@ account = testworkerX permission = active key = 5Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -node_url = https://skynet.ancap.tech -hyperion_url = https://skynet.ancap.tech -ipfs_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +node_url = https://testnet.skygpu.net +hyperion_url = https://testnet.skygpu.net +ipfs_gateway_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +ipfs_url = http://127.0.0.1:5001 hf_home = hf_home hf_token = hf_XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx @@ -17,9 +18,10 @@ account = telegram permission = active key = 5Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -node_url = https://skynet.ancap.tech -hyperion_url = https://skynet.ancap.tech -ipfs_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +node_url = https://testnet.skygpu.net +hyperion_url = https://testnet.skygpu.net +ipfs_gateway_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +ipfs_url = http://127.0.0.1:5001 token = XXXXXXXXXX:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -28,8 +30,9 @@ account = discord permission = active key = 5Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -node_url = https://skynet.ancap.tech -hyperion_url = https://skynet.ancap.tech -ipfs_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +node_url = https://testnet.skygpu.net +hyperion_url = https://testnet.skygpu.net +ipfs_gateway_url = /ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv +ipfs_url = http://127.0.0.1:5001 token = XXXXXXXXXX:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/skynet/cli.py b/skynet/cli.py index 840b937..fde3131 100755 --- a/skynet/cli.py +++ b/skynet/cli.py @@ -16,7 +16,7 @@ from leap.cleos import CLEOS from leap.sugar import collect_stdout, Name, asset_from_str from leap.hyperion import HyperionAPI -from skynet.ipfs import IPFSHTTP +from skynet.ipfs import AsyncIPFSHTTP from .db import open_new_database @@ -125,8 +125,7 @@ def enqueue( key, account, permission = load_account_info( 'user', key, account, permission) - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) with open_cleos(node_url, key=key) as cleos: async def enqueue_n_jobs(): @@ -176,8 +175,7 @@ def clean( key, account, permission = load_account_info( 'user', key, account, permission) - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) logging.basicConfig(level=loglevel) cleos = CLEOS(None, None, url=node_url, remote=node_url) @@ -195,8 +193,7 @@ def clean( @click.option( '--node-url', '-n', default='https://skynet.ancap.tech') def queue(node_url: str): - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) resp = requests.post( f'{node_url}/v1/chain/get_table_rows', json={ @@ -213,8 +210,7 @@ def queue(node_url: str): '--node-url', '-n', default='https://skynet.ancap.tech') @click.argument('request-id') def status(node_url: str, request_id: int): - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) resp = requests.post( f'{node_url}/v1/chain/get_table_rows', json={ @@ -246,20 +242,22 @@ def dequeue( key, account, permission = load_account_info( 'user', key, account, permission) - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) - with open_cleos(node_url, key=key) as cleos: - res = trio.run(cleos.a_push_action, + cleos = CLEOS(None, None, url=node_url, remote=node_url) + res = trio.run( + partial( + cleos.a_push_action, 'telos.gpu', 'dequeue', { 'user': Name(account), 'request_id': int(request_id), }, - account, key, permission, + account, key, permission=permission ) - print(res) + ) + print(res) @skynet.command() @@ -285,20 +283,21 @@ def config( ): key, account, permission = load_account_info( 'user', key, account, permission) - - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) - with open_cleos(node_url, key=key) as cleos: - res = trio.run(cleos.a_push_action, + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) + cleos = CLEOS(None, None, url=node_url, remote=node_url) + res = trio.run( + partial( + cleos.a_push_action, 'telos.gpu', 'config', { 'token_contract': token_contract, 'token_symbol': token_symbol, }, - account, key, permission, + account, key, permission=permission ) - print(res) + ) + print(res) @skynet.command() @@ -321,12 +320,12 @@ def deposit( key, account, permission = load_account_info( 'user', key, account, permission) - node_url, _, _ = load_endpoint_info( - 'user', node_url, None, None) + node_url, _, _, _ = load_endpoint_info('user', node_url=node_url) - with open_cleos(node_url, key=key) as cleos: - res = trio.run(cleos.a_push_action, - 'eosio.token', + res = trio.run( + partial( + cleos.a_push_action, + 'telos.gpu', 'transfer', { 'sender': Name(account), @@ -334,9 +333,10 @@ def deposit( 'amount': asset_from_str(quantity), 'memo': f'{account} transferred {quantity} to telos.gpu' }, - account, key, permission, + account, key, permission=permission ) - print(res) + ) + print(res) @skynet.group() @@ -388,7 +388,9 @@ def dgpu( @click.option( '--node-url', '-n', default=f'https://testnet.{DEFAULT_DOMAIN}') @click.option( - '--ipfs-url', '-i', default=DEFAULT_IPFS_REMOTE) + '--ipfs-url', '-i', default=DEFAULT_IPFS_LOCAL) +@click.option( + '--ipfs-gateway-url', '-I', default=None) @click.option( '--db-host', '-h', default='localhost:5432') @click.option( @@ -402,6 +404,7 @@ def telegram( key: str | None, hyperion_url: str, ipfs_url: str, + ipfs_gateway_url: str, node_url: str, db_host: str, db_user: str, @@ -414,8 +417,8 @@ def telegram( key, account, permission = load_account_info( 'telegram', key, account, permission) - node_url, _, ipfs_url = load_endpoint_info( - 'telegram', node_url, None, None) + node_url, _, ipfs_gateway_url, ipfs_url = load_endpoint_info( + 'telegram', node_url=node_url, ipfs_gateway_url=ipfs_gateway_url) async def _async_main(): frontend = SkynetTelegramFrontend( @@ -425,7 +428,8 @@ def telegram( node_url, hyperion_url, db_host, db_user, db_pass, - remote_ipfs_node=ipfs_url, + ipfs_url, + remote_ipfs_node=ipfs_gateway_url, key=key ) @@ -449,7 +453,9 @@ def telegram( @click.option( '--node-url', '-n', default=f'https://testnet.{DEFAULT_DOMAIN}') @click.option( - '--ipfs-url', '-i', default=DEFAULT_IPFS_REMOTE) + '--ipfs-url', '-i', default=DEFAULT_IPFS_LOCAL) +@click.option( + '--ipfs-gateway-url', '-I', default=DEFAULT_IPFS_REMOTE) @click.option( '--db-host', '-h', default='localhost:5432') @click.option( @@ -463,6 +469,7 @@ def discord( key: str | None, hyperion_url: str, ipfs_url: str, + ipfs_gateway_url: str, node_url: str, db_host: str, db_user: str, @@ -475,8 +482,8 @@ def discord( key, account, permission = load_account_info( 'discord', key, account, permission) - node_url, _, ipfs_url = load_endpoint_info( - 'discord', node_url, None, None) + node_url, _, ipfs_gateway_url, ipfs_url = load_endpoint_info( + 'discord', node_url=node_url, ipfs_gateway_url=ipfs_gateway_url) async def _async_main(): frontend = SkynetDiscordFrontend( @@ -486,7 +493,8 @@ def discord( node_url, hyperion_url, db_host, db_user, db_pass, - remote_ipfs_node=ipfs_url, + ipfs_url, + remote_ipfs_node=ipfs_gateway_url, key=key ) @@ -516,7 +524,7 @@ def pinner(loglevel, ipfs_rpc, hyperion_url): from .ipfs.pinner import SkynetPinner logging.basicConfig(level=loglevel) - ipfs_node = IPFSHTTP(ipfs_rpc) + ipfs_node = AsyncIPFSHTTP(ipfs_rpc) hyperion = HyperionAPI(hyperion_url) pinner = SkynetPinner(hyperion, ipfs_node) diff --git a/skynet/config.py b/skynet/config.py index d668a41..a3c6769 100755 --- a/skynet/config.py +++ b/skynet/config.py @@ -93,6 +93,7 @@ def load_endpoint_info( node_url: str | None = None, hyperion_url: str | None = None, ipfs_url: str | None = None, + ipfs_gateway_url: str | None = None, file_path=DEFAULT_CONFIG_PATH ): config = load_skynet_ini(file_path=file_path) @@ -110,4 +111,7 @@ def load_endpoint_info( if not ipfs_url and 'ipfs_url' in sub_config: ipfs_url = sub_config['ipfs_url'] - return node_url, hyperion_url, ipfs_url + if not ipfs_gateway_url and 'ipfs_gateway_url' in sub_config: + ipfs_gateway_url = sub_config['ipfs_gateway_url'] + + return node_url, hyperion_url, ipfs_gateway_url, ipfs_url diff --git a/skynet/constants.py b/skynet/constants.py index ebc5343..b3ccbcb 100755 --- a/skynet/constants.py +++ b/skynet/constants.py @@ -185,6 +185,7 @@ CONFIG_ATTRS = [ DEFAULT_DOMAIN = 'skygpu.net' DEFAULT_IPFS_REMOTE = '/ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv' +DEFAULT_IPFS_LOCAL = 'http://127.0.0.1:5001' TG_MAX_WIDTH = 1280 TG_MAX_HEIGHT = 1280 diff --git a/skynet/dgpu/daemon.py b/skynet/dgpu/daemon.py index bf7c176..bd0f1f9 100644 --- a/skynet/dgpu/daemon.py +++ b/skynet/dgpu/daemon.py @@ -73,7 +73,7 @@ class SkynetDGPUDaemon: img_sha, img_raw = self.mm.compute_one( body['method'], body['params'], binary=binary) - ipfs_hash = self.conn.publish_on_ipfs( img_raw) + ipfs_hash = await self.conn.publish_on_ipfs(img_raw) await self.conn.submit_work(rid, request_hash, img_sha, ipfs_hash) break diff --git a/skynet/dgpu/network.py b/skynet/dgpu/network.py index 5309122..1447d79 100644 --- a/skynet/dgpu/network.py +++ b/skynet/dgpu/network.py @@ -3,13 +3,13 @@ from functools import partial import io import json +from pathlib import Path import time import logging import asks from PIL import Image -from contextlib import ExitStack from contextlib import asynccontextmanager as acm from leap.cleos import CLEOS @@ -17,8 +17,7 @@ from leap.sugar import Checksum256, Name, asset_from_str from skynet.constants import DEFAULT_DOMAIN from skynet.dgpu.errors import DGPUComputeError -from skynet.ipfs import get_ipfs_file -from skynet.ipfs.docker import open_ipfs_node +from skynet.ipfs import AsyncIPFSHTTP, get_ipfs_file async def failable(fn: partial, ret_fail=None): @@ -38,28 +37,17 @@ class SkynetGPUConnector: self.account = Name(config['account']) self.permission = config['permission'] self.key = config['key'] + self.node_url = config['node_url'] self.hyperion_url = config['hyperion_url'] - self.ipfs_url = config['ipfs_url'] self.cleos = CLEOS( None, None, self.node_url, remote=self.node_url) - self._exit_stack = ExitStack() - - def connect(self): - self.ipfs_node = self._exit_stack.enter_context( - open_ipfs_node()) - - def disconnect(self): - self._exit_stack.close() - - @acm - async def open(self): - self.connect() - yield self - self.disconnect() + self.ipfs_gateway_url = config['ipfs_gateway_url'] + self.ipfs_url = config['ipfs_url'] + self.ipfs_client = AsyncIPFSHTTP(self.ipfs_url) # blockchain helpers @@ -206,21 +194,23 @@ class SkynetGPUConnector: # IPFS helpers - def publish_on_ipfs(self, raw_img: bytes): + async def publish_on_ipfs(self, raw_img: bytes): logging.info('publish_on_ipfs') img = Image.open(io.BytesIO(raw_img)) - img.save(f'ipfs-docker-staging/image.png') + img.save('ipfs-docker-staging/image.png') # check peer connections, reconnect to skynet gateway if not - peers = self.ipfs_node.check_connect() - if self.ipfs_url not in peers: - self.ipfs_node.connect(self.ipfs_url) + gateway_id = Path(self.ipfs_gateway_url).name + peers = await self.ipfs_client.peers() + if gateway_id not in [p['Peer'] for p in peers]: + await self.ipfs_client.connect(self.ipfs_gateway_url) - ipfs_hash = self.ipfs_node.add('image.png') + file_info = await self.ipfs_client.add(Path('ipfs-docker-staging/image.png')) + file_cid = file_info['Hash'] - self.ipfs_node.pin(ipfs_hash) + await self.ipfs_client.pin(file_cid) - return ipfs_hash + return file_cid async def get_input_data(self, ipfs_hash: str) -> bytes: if ipfs_hash == '': diff --git a/skynet/frontend/discord/__init__.py b/skynet/frontend/discord/__init__.py index 3e17cf2..22c004b 100644 --- a/skynet/frontend/discord/__init__.py +++ b/skynet/frontend/discord/__init__.py @@ -19,9 +19,8 @@ from leap.hyperion import HyperionAPI import discord import io -from skynet.db import open_new_database, open_database_connection -from skynet.ipfs import get_ipfs_file -from skynet.ipfs.docker import open_ipfs_node +from skynet.db import open_database_connection +from skynet.ipfs import get_ipfs_file, AsyncIPFSHTTP from skynet.constants import * from . import * @@ -44,6 +43,7 @@ class SkynetDiscordFrontend: db_host: str, db_user: str, db_pass: str, + ipfs_url: str, remote_ipfs_node: str, key: str ): @@ -55,23 +55,21 @@ class SkynetDiscordFrontend: self.db_host = db_host self.db_user = db_user self.db_pass = db_pass + self.ipfs_url = ipfs_url self.remote_ipfs_node = remote_ipfs_node self.key = key self.bot = DiscordBot(self) self.cleos = CLEOS(None, None, url=node_url, remote=node_url) self.hyperion = HyperionAPI(hyperion_url) + self.ipfs_node = AsyncIPFSHTTP(ipfs_node) self._exit_stack = ExitStack() self._async_exit_stack = AsyncExitStack() async def start(self): - self.ipfs_node = self._exit_stack.enter_context( - open_ipfs_node()) - - self.ipfs_node.connect(self.remote_ipfs_node) - logging.info( - f'connected to remote ipfs node: {self.remote_ipfs_node}') + if self.remote_ipfs_node: + await self.ipfs_node.connect(self.remote_ipfs_node) self.db_call = await self._async_exit_stack.enter_async_context( open_database_connection( diff --git a/skynet/frontend/discord/handlers.py b/skynet/frontend/discord/handlers.py index 092714a..5b68892 100644 --- a/skynet/frontend/discord/handlers.py +++ b/skynet/frontend/discord/handlers.py @@ -217,10 +217,12 @@ def create_handler_context(frontend: 'SkynetDiscordFrontend'): image.thumbnail((512, 512)) logging.warning(f'resized it to {image.size}') - image.save(f'ipfs-docker-staging/image.png', format='PNG') + image_loc = 'ipfs-staging/image.png' + image.save(image_loc, format='PNG') - ipfs_hash = ipfs_node.add('image.png') - ipfs_node.pin(ipfs_hash) + ipfs_info = await ipfs_node.add(image_loc) + ipfs_hash = ipfs_info['Hash'] + await ipfs_node.pin(ipfs_hash) logging.info(f'published input image {ipfs_hash} on ipfs') diff --git a/skynet/frontend/telegram/__init__.py b/skynet/frontend/telegram/__init__.py index fd285b5..57e4a02 100644 --- a/skynet/frontend/telegram/__init__.py +++ b/skynet/frontend/telegram/__init__.py @@ -21,8 +21,7 @@ from telebot.types import InputMediaPhoto from telebot.async_telebot import AsyncTeleBot from skynet.db import open_new_database, open_database_connection -from skynet.ipfs import get_ipfs_file -from skynet.ipfs.docker import open_ipfs_node +from skynet.ipfs import get_ipfs_file, AsyncIPFSHTTP from skynet.constants import * from . import * @@ -43,7 +42,8 @@ class SkynetTelegramFrontend: db_host: str, db_user: str, db_pass: str, - remote_ipfs_node: str, + ipfs_node: str, + remote_ipfs_node: str | None, key: str ): self.token = token @@ -60,17 +60,13 @@ class SkynetTelegramFrontend: self.bot = AsyncTeleBot(token, exception_handler=SKYExceptionHandler) self.cleos = CLEOS(None, None, url=node_url, remote=node_url) self.hyperion = HyperionAPI(hyperion_url) + self.ipfs_node = AsyncIPFSHTTP(ipfs_node) - self._exit_stack = ExitStack() self._async_exit_stack = AsyncExitStack() async def start(self): - self.ipfs_node = self._exit_stack.enter_context( - open_ipfs_node()) - - # self.ipfs_node.connect(self.remote_ipfs_node) - logging.info( - f'connected to remote ipfs node: {self.remote_ipfs_node}') + if self.remote_ipfs_node: + await self.ipfs_node.connect(self.remote_ipfs_node) self.db_call = await self._async_exit_stack.enter_async_context( open_database_connection( @@ -80,7 +76,6 @@ class SkynetTelegramFrontend: async def stop(self): await self._async_exit_stack.aclose() - self._exit_stack.close() @acm async def open(self): diff --git a/skynet/frontend/telegram/handlers.py b/skynet/frontend/telegram/handlers.py index 7695790..da99941 100644 --- a/skynet/frontend/telegram/handlers.py +++ b/skynet/frontend/telegram/handlers.py @@ -217,10 +217,12 @@ def create_handler_context(frontend: 'SkynetTelegramFrontend'): image.thumbnail((512, 512)) logging.warning(f'resized it to {image.size}') - image.save(f'ipfs-docker-staging/image.png', format='PNG') + image_loc = 'ipfs-staging/image.png' + image.save(image_loc, format='PNG') - ipfs_hash = ipfs_node.add('image.png') - ipfs_node.pin(ipfs_hash) + ipfs_info = await ipfs_node.add(image_loc) + ipfs_hash = ipfs_info['Hash'] + await ipfs_node.pin(ipfs_hash) logging.info(f'published input image {ipfs_hash} on ipfs') diff --git a/skynet/ipfs/__init__.py b/skynet/ipfs/__init__.py index 9ee7b42..2f18253 100644 --- a/skynet/ipfs/__init__.py +++ b/skynet/ipfs/__init__.py @@ -1,28 +1,59 @@ #!/usr/bin/python import logging +from pathlib import Path import asks -import requests -class IPFSHTTP: +class IPFSClientException(BaseException): + ... + + +class AsyncIPFSHTTP: def __init__(self, endpoint: str): self.endpoint = endpoint - def pin(self, cid: str): - return requests.post( - f'{self.endpoint}/api/v0/pin/add', - params={'arg': cid} + async def _post(self, sub_url: str, *args, **kwargs): + resp = await asks.post( + self.endpoint + sub_url, + *args, **kwargs ) - async def a_pin(self, cid: str): - return await asks.post( - f'{self.endpoint}/api/v0/pin/add', - params={'arg': cid} + if resp.status_code != 200: + raise IPFSClientException(resp.text) + + return resp.json() + + async def add(self, file_path: Path, **kwargs): + files = { + 'file': file_path + } + return await self._post( + '/api/v0/add', + files=files, + params=kwargs ) + async def pin(self, cid: str): + return (await self._post( + '/api/v0/pin/add', + params={'arg': cid} + ))['Pins'] + + async def connect(self, multi_addr: str): + return await self._post( + '/api/v0/swarm/connect', + params={'arg': multi_addr} + ) + + async def peers(self, **kwargs): + return (await self._post( + '/api/v0/swarm/peers', + params=kwargs + ))['Peers'] + async def get_ipfs_file(ipfs_link: str, timeout: int = 60): logging.info(f'attempting to get image at {ipfs_link}') diff --git a/skynet/ipfs/docker.py b/skynet/ipfs/docker.py index 851bb12..96e4a05 100755 --- a/skynet/ipfs/docker.py +++ b/skynet/ipfs/docker.py @@ -51,9 +51,10 @@ class IPFSDocker: @cm -def open_ipfs_node(name='skynet-ipfs'): +def open_ipfs_node(name='skynet-ipfs', teardown=False): dclient = docker.from_env() + container = None try: container = dclient.containers.get(name) @@ -100,3 +101,6 @@ def open_ipfs_node(name='skynet-ipfs'): break yield IPFSDocker(container) + + if teardown and container: + container.stop() diff --git a/skynet/ipfs/pinner.py b/skynet/ipfs/pinner.py index c4aee10..146517f 100644 --- a/skynet/ipfs/pinner.py +++ b/skynet/ipfs/pinner.py @@ -9,7 +9,7 @@ import trio from leap.hyperion import HyperionAPI -from . import IPFSHTTP +from . import AsyncIPFSHTTP MAX_TIME = timedelta(seconds=20) @@ -20,7 +20,7 @@ class SkynetPinner: def __init__( self, hyperion: HyperionAPI, - ipfs_http: IPFSHTTP + ipfs_http: AsyncIPFSHTTP ): self.hyperion = hyperion self.ipfs_http = ipfs_http @@ -85,7 +85,7 @@ class SkynetPinner: for _ in range(6): try: with trio.move_on_after(5): - resp = await self.ipfs_http.a_pin(cid) + resp = await self.ipfs_http.pin(cid) if resp.status_code != 200: logging.error(f'error pinning {cid}:\n{resp.text}') del self._pinned[cid] diff --git a/tests/conftest.py b/tests/conftest.py index 8cc392e..03ed434 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,15 +1,18 @@ #!/usr/bin/python -import logging - -from pathlib import Path - import pytest from skynet.db import open_new_database +from skynet.ipfs import AsyncIPFSHTTP +from skynet.ipfs.docker import open_ipfs_node from skynet.nodeos import open_nodeos +@pytest.fixture(scope='session') +def ipfs_client(): + with open_ipfs_node(teardown=True): + yield AsyncIPFSHTTP('http://127.0.0.1:5001') + @pytest.fixture(scope='session') def postgres_db(): with open_new_database() as db_params: diff --git a/tests/test_ipfs_client.py b/tests/test_ipfs_client.py new file mode 100644 index 0000000..5ad4409 --- /dev/null +++ b/tests/test_ipfs_client.py @@ -0,0 +1,26 @@ +#!/usr/bin/python + + +from pathlib import Path + + +async def test_connection(ipfs_client): + await ipfs_client.connect( + '/ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv') + peers = await ipfs_client.peers() + assert '12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv' in [p['Peer'] for p in peers] + + +async def test_add_and_pin_file(ipfs_client): + test_file = Path('hello_world.txt') + with open(test_file, 'w+') as file: + file.write('Hello Skynet!') + + file_info = await ipfs_client.add(test_file) + file_cid = file_info['Hash'] + + pin_resp = await ipfs_client.pin(file_cid) + + assert file_cid in pin_resp + + test_file.unlink()