├── .gitignore ├── README.md ├── boot-scripts-1.2.1 ├── 0_boot_all_in_one.sh ├── 1_start.sh ├── 2_deploy_bios.sh ├── 3_create_system_accounts.sh ├── 4_deploy_token.sh ├── 5_deploy_system.sh ├── 6_kick_off_shuffle.sh ├── 7_create_accounts.sh ├── 8_resign_eosio.sh ├── a ├── clean.sh ├── config-dir │ ├── config.ini │ └── genesis.json ├── contract_hello_test.sh ├── env.sh ├── grep.sh ├── kill.sh ├── reboot.sh └── unlock.sh ├── ide-debug ├── 0_boot_all_in_one.sh ├── 1_start.sh ├── 2_deploy_bios.sh ├── 3_create_system_accounts.sh ├── 4_deploy_token.sh ├── 5_deploy_system.sh ├── 6_kick_off_shuffle.sh ├── 7_create_accounts.sh ├── 8_resign_eosio.sh ├── clean.sh ├── config-dir │ ├── config.ini │ └── genesis.json ├── config.sh ├── env.sh ├── grep.sh └── kill.sh ├── launch-scripts ├── 1_start.sh ├── 2_deploy_bios.sh ├── 3_deploy_token.sh ├── 4_create_and_issue.sh ├── 5_deploy_system.sh ├── 6_create_account.sh ├── 7_reg_prod.sh ├── 8_transfer.sh ├── 9_vote_producer.sh ├── buyram.sh ├── check_balance.sh ├── check_votes.sh ├── clear.sh ├── config-dir │ ├── config.ini │ └── genesis.json ├── env.sh ├── grep.sh ├── kill.sh ├── regproxy.sh ├── sellram.sh ├── set_priv.sh ├── set_producer.sh ├── set_ram.sh ├── unlock_wallet.sh └── watch.sh ├── scripts-bos-test ├── contracts │ ├── eosio.bios │ │ ├── eosio.bios.abi │ │ ├── eosio.bios.abi.hpp │ │ └── eosio.bios.wasm │ ├── eosio.msig │ │ ├── eosio.msig.abi │ │ ├── eosio.msig.abi.hpp │ │ └── eosio.msig.wasm │ ├── eosio.sudo │ │ ├── eosio.sudo.abi │ │ ├── eosio.sudo.abi.hpp │ │ └── eosio.sudo.wasm │ ├── eosio.system │ │ ├── eosio.system.abi │ │ ├── eosio.system.abi.hpp │ │ └── eosio.system.wasm │ └── eosio.token │ │ ├── eosio.token.abi │ │ ├── eosio.token.abi.hpp │ │ └── eosio.token.wasm ├── cron-vote-bos-test.sh ├── env-bos-test.sh ├── start-bos-test.sh ├── upgrade.sh └── upgrade │ ├── eosio.system.abi │ └── eosio.system.wasm └── vote-scripts ├── create_account.sh ├── create_voter_account.sh ├── delegate_bandwidth.sh ├── eosio_transfer_token.sh ├── get_account_resource.sh ├── get_account_resource_from_table.sh ├── get_balance.sh ├── get_producer_info.sh ├── get_refund_time.sh ├── get_totalband.sh ├── get_voter_account.sh ├── issue_token.sh ├── reg_producer.sh ├── start_docker_mysql.sh ├── undelegate_bandwidth.sh └── vote_producer.sh /.gitignore: -------------------------------------------------------------------------------- 1 | scripts/data-dir 2 | scripts/*.pid 3 | scripts/logs/* 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### boot-scripts-1.1.1 2 | 3 | This folder contains shell to boot a local dev environment 4 | 5 | ##### How to Use 6 | 1. update configuration in env.sh 7 | 2. run 8 | ```. ./env.sh``` 9 | 3. run ./0_boot_all_in_one.sh 10 | 4. use watch.sh to watch logs 11 | 5. use grep.sh to check pids 12 | 6. use kill.sh and clean.sh to clean data and logs 13 | 14 | ### launch-scripts 15 | 16 | This folder contains handy shell to boot a eos node and deploy contracts. 17 | 18 | ##### How To Use 19 | 1. update configuration in env.sh 20 | 2. run 21 | ```. ./env.sh``` 22 | 23 | 3. run each steps sequentially 24 | 4. use watch.sh to watch logs 25 | 5. use grep.sh to check pids 26 | 6. use kill.sh and clean.sh to clean data and logs 27 | 28 | 29 | ### vote-scripts 30 | 31 | This folder contains helper shell related to vote. 32 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/0_boot_all_in_one.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | printHeader() { 4 | printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - 5 | printf "$1\n" 6 | } 7 | 8 | printHeader 1_start.sh 9 | ./1_start.sh 10 | 11 | printHeader 2_deploy_bios.sh 12 | ./2_deploy_bios.sh 13 | 14 | printHeader 3_create_system_accounts.sh 15 | ./3_create_system_accounts.sh 16 | 17 | printHeader 4_deploy_token.sh 18 | ./4_deploy_token.sh 19 | 20 | printHeader 5_deploy_system.sh 21 | ./5_deploy_system.sh 22 | 23 | printHeader 6_kick_off_shuffle.sh 24 | ./6_kick_off_shuffle.sh 25 | 26 | printHeader 7_create_accounts.sh 27 | ./7_create_accounts.sh 28 | 29 | #printHeader 8_resign_eosio.sh 30 | #./8_resign_eosio.sh 31 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/1_start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | mkdir -p logs 4 | nohup nodeos --contracts-console --data-dir ./data-dir --config-dir ./config-dir > ./logs/eos.log 2>&1 & 5 | echo $! > eos.pid 6 | nohup keosd -d ./data-dir --http-server-address localhost:8900 >./logs/wallet.log 2>&1 & 7 | echo $! > wallet.pid 8 | echo "Waiting nodeos start for 3 seconds" 9 | sleep 1; 10 | cleos wallet create --file wallet.pw 11 | #cleos wallet import 5JFGWibbcKfq1ft2e8rNXFQoXUTw2qombWvCmaYVmE2e3VxtzAK 12 | cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 13 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/2_deploy_bios.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.bios/ -p eosio 4 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/3_create_system_accounts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SYSTEM_ACCOUNT="eosio.bpay eosio.msig eosio.names eosio.ram eosio.ramfee eosio.saving eosio.stake eosio.token eosio.vpay" 4 | 5 | for sa in $SYSTEM_ACCOUNT 6 | do 7 | echo $sa 8 | cleos create account eosio $sa EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV -p eosio 9 | done 10 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/4_deploy_token.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | #cleos push action eosio setpriv '["eosio.token",1]' -p eosio 5 | cleos set contract eosio.token $EOS_BUILD_DIR/contracts/eosio.token -p eosio.token 6 | 7 | cleos push action eosio.token create '["eosio", "10000000000.0000 EOS", 0, 0, 0]' -p eosio.token 8 | cleos push action eosio.token issue '["eosio", "1000000000.0000 EOS", "issue 1B to eosio"]' -p eosio 9 | 10 | cleos set contract eosio.msig $EOS_BUILD_DIR/contracts/eosio.msig -p eosio.msig 11 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/5_deploy_system.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | 5 | cleos create account eosio b1 EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif 6 | cleos wallet import --private-key 5KE3vxAZ5tBXubjMeFJ9uCHHjfQeAzDqPLeW4XHGVcuKHPPLCrA 7 | cleos transfer eosio b1 "100000000.0000 EOS" "transfer 100M to b1" 8 | 9 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.system -p eosio 10 | 11 | cleos push action eosio setpriv '["eosio.msig",1]' -p eosio 12 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/6_kick_off_shuffle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #cleos system newaccount eosio whale "1 EOS" "1 EOS" 4 | cleos system newaccount eosio whale EOS7tkkmx2CgqA3fJMcrSWkjw2kjvWxqDz2iKbzxSXgag9QnhJgDn EOS7tkkmx2CgqA3fJMcrSWkjw2kjvWxqDz2iKbzxSXgag9QnhJgDn --stake-net "1 EOS" --stake-cpu "1 EOS" --buy-ram "1 EOS" 5 | cleos transfer eosio whale "150000000 EOS" "kick off" 6 | cleos wallet import --private-key 5KYeJw8jRBFGodMb8ux49jmKHQ6oBaNgwvcJrybhdiuuPeTYTHf 7 | cleos system delegatebw whale whale "75000000 EOS" "75000000 EOS" 8 | cleos system voteproducer prods whale 9 | cleos system newaccount eosio eosio.sg EOS8YARNxXNLYPak3cjhgUdTWkwCKQkXxwMuW2CpE2d6YnVtVbywG EOS8YARNxXNLYPak3cjhgUdTWkwCKQkXxwMuW2CpE2d6YnVtVbywG --stake-net "1 EOS" --stake-cpu "1 EOS" --buy-ram "1 EOS" 10 | cleos wallet import --private-key 5JaFJxn2RpugGBi32P2f3ykMMKgqZzB1TZQi5zxxS8i1N62hdLd 11 | cleos transfer eosio eosio.sg "500000000 EOS" "make us rich" 12 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/7_create_accounts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ACCOUNTS="alice1111111 bob111111111 carl11111111 localtest111 localtest222 localtest333 localtest444 localtest555" 4 | 5 | for acc in $ACCOUNTS 6 | do 7 | echo $acc 8 | cleos system newaccount eosio $acc EOS4v9UCqsPxKkfm267Q1xJbuE6KRbrXLamGQpo45ZS5xfJqMkaDP EOS4v9UCqsPxKkfm267Q1xJbuE6KRbrXLamGQpo45ZS5xfJqMkaDP --stake-cpu "1000 EOS" --stake-net "1000 EOS" --buy-ram "1000 EOS" -p eosio 9 | cleos transfer eosio $acc "1000 EOS" "red packet" -p eosio 10 | done 11 | 12 | cleos wallet import --private-key 5KbYnXiRxDqaej7qP7A6Pji3ZNiwaFiYRGayGRtHLk8jTFvGCdN 13 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/8_resign_eosio.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for sa in "${SYSTEM_ACCOUNT[@]}" 4 | do 5 | account="$sa" 6 | controller="eosio" 7 | cleos push action eosio updateauth '{"account": "'$account'", "permission": "owner", "parent": "", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "'$controller'", "permission": "active"} }] } } ' -p $account@owner 8 | cleos push action eosio updateauth '{"account": "'$account'", "permission": "active", "parent": "owner", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "'$controller'", "permission": "active"} }] } }' -p $account@active 9 | 10 | done 11 | 12 | cleos push action eosio updateauth '{"account": "eosio", "permission": "owner", "parent": "", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"} }] } } ' -p eosio@owner 13 | cleos push action eosio updateauth '{"account": "eosio", "permission": "active", "parent": "owner", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"} }] } }' -p eosio@active 14 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/boot-scripts-1.2.1/a -------------------------------------------------------------------------------- /boot-scripts-1.2.1/clean.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -r data-dir/ 4 | rm -r logs/ 5 | rm wallet.pw 6 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/config-dir/config.ini: -------------------------------------------------------------------------------- 1 | # the endpoint upon which to listen for incoming connections (eosio::bnet_plugin) 2 | bnet-endpoint = 0.0.0.0:4321 3 | 4 | # the number of threads to use to process network messages (eosio::bnet_plugin) 5 | # bnet-threads = 6 | 7 | # remote endpoint of other node to connect to; Use multiple bnet-connect options as needed to compose a network (eosio::bnet_plugin) 8 | # bnet-connect = 9 | 10 | # this peer will request no pending transactions from other nodes (eosio::bnet_plugin) 11 | bnet-no-trx = false 12 | 13 | # the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin) 14 | blocks-dir = "blocks" 15 | 16 | # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin) 17 | # checkpoint = 18 | 19 | # Override default WASM runtime (eosio::chain_plugin) 20 | # wasm-runtime = 21 | 22 | # Maximum size (in MB) of the chain state database (eosio::chain_plugin) 23 | chain-state-db-size-mb = 1024 24 | 25 | # Maximum size (in MB) of the reversible blocks database (eosio::chain_plugin) 26 | reversible-blocks-db-size-mb = 340 27 | 28 | # print contract's output to console (eosio::chain_plugin) 29 | contracts-console = true 30 | 31 | # Account added to actor whitelist (may specify multiple times) (eosio::chain_plugin) 32 | # actor-whitelist = 33 | 34 | # Account added to actor blacklist (may specify multiple times) (eosio::chain_plugin) 35 | # actor-blacklist = 36 | 37 | # Contract account added to contract whitelist (may specify multiple times) (eosio::chain_plugin) 38 | # contract-whitelist = 39 | 40 | # Contract account added to contract blacklist (may specify multiple times) (eosio::chain_plugin) 41 | # contract-blacklist = 42 | 43 | # Track actions which match receiver:action:actor. Actor may be blank to include all. Receiver and Action may not be blank. (eosio::history_plugin) 44 | #filter-on = 45 | 46 | # PEM encoded trusted root certificate (or path to file containing one) used to validate any TLS connections made. (may specify multiple times) 47 | # (eosio::http_client_plugin) 48 | # https-client-root-cert = 49 | 50 | # true: validate that the peer certificates are valid and trusted, false: ignore cert errors (eosio::http_client_plugin) 51 | https-client-validate-peers = 1 52 | 53 | # The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) 54 | http-server-address = 0.0.0.0:8888 55 | 56 | # The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) 57 | # https-server-address = 58 | 59 | # Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) 60 | # https-certificate-chain-file = 61 | 62 | # Filename with https private key in PEM format. Required for https (eosio::http_plugin) 63 | # https-private-key-file = 64 | 65 | # Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) 66 | # access-control-allow-origin = 67 | 68 | # Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin) 69 | # access-control-allow-headers = 70 | 71 | # Specify the Access-Control-Max-Age to be returned on each request. (eosio::http_plugin) 72 | # access-control-max-age = 73 | 74 | # Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) 75 | access-control-allow-credentials = false 76 | 77 | # The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin) 78 | p2p-listen-endpoint = 0.0.0.0:9876 79 | 80 | # An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin) 81 | # p2p-server-address = 82 | 83 | # The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin) 84 | 85 | # Maximum number of client0nodes from any single IP address (eosio::net_plugin) 86 | p2p-max-nodes-per-host = 1 87 | 88 | # The name supplied to identify this node amongst the peers. (eosio::net_plugin) 89 | agent-name = "EOS Test Agent" 90 | 91 | # Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin) 92 | allowed-connection = any 93 | 94 | # Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin) 95 | # peer-key = 96 | 97 | # Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin) 98 | # peer-private-key = 99 | 100 | # Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin) 101 | max-clients = 25 102 | 103 | # number of seconds to wait before cleaning up dead connections (eosio::net_plugin) 104 | connection-cleanup-period = 30 105 | 106 | # True to require exact match of peer network version. (eosio::net_plugin) 107 | network-version-match = 0 108 | 109 | # number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin) 110 | sync-fetch-span = 100 111 | 112 | # maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin) 113 | max-implicit-request = 1500 114 | 115 | # Enable block production, even if the chain is stale. (eosio::producer_plugin) 116 | enable-stale-production = true 117 | 118 | # Start this node in a state where production is paused (eosio::producer_plugin) 119 | pause-on-startup = false 120 | 121 | # Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin) 122 | max-transaction-time = 50000 123 | 124 | # Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain this node will produce blocks on (use negative value to indicate unlimited) (eosio::producer_plugin) 125 | max-irreversible-block-age = -1 126 | 127 | # ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin) 128 | producer-name = eosio 129 | 130 | # (DEPRECATED - Use signature-provider instead) Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin) 131 | # private-key = 132 | 133 | # Key=Value pairs in the form = 134 | # Where: 135 | # is a string form of a vaild EOSIO public key 136 | # 137 | # is a string in the form : 138 | # 139 | # is KEY, or KEOSD 140 | # 141 | # KEY: is a string form of a valid EOSIO private key which maps to the provided public key 142 | # 143 | # KEOSD: is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin) 144 | signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 145 | 146 | # Limits the maximum time (in milliseconds) that is allowd for sending blocks to a keosd provider for signing (eosio::producer_plugin) 147 | keosd-provider-timeout = 5 148 | 149 | # Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin) 150 | txn-reference-block-lag = 0 151 | 152 | # The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin) 153 | wallet-dir = "." 154 | 155 | # Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin) 156 | unlock-timeout = 9000 157 | 158 | # eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin) 159 | # eosio-key = 160 | 161 | # Plugin(s) to enable, may be specified multiple times 162 | plugin = eosio::chain_api_plugin 163 | plugin = eosio::history_plugin 164 | plugin = eosio::history_api_plugin 165 | #plugin = eosio::producer_plugin 166 | #plugin = eosio::producer_api_plugin 167 | #plugin = eosio::mongo_db_plugin 168 | #mongodb-uri = mongodb://localhost:27017/eos 169 | #abi-serializer-max-time-ms = 500 170 | 171 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/config-dir/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "initial_timestamp": "2018-06-08T08:08:08.888", 3 | "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", 4 | "initial_configuration": { 5 | "max_block_net_usage": 1048576, 6 | "target_block_net_usage_pct": 1000, 7 | "max_transaction_net_usage": 524288, 8 | "base_per_transaction_net_usage": 12, 9 | "net_usage_leeway": 500, 10 | "context_free_discount_net_usage_num": 20, 11 | "context_free_discount_net_usage_den": 100, 12 | "max_block_cpu_usage": 200000, 13 | "target_block_cpu_usage_pct": 1000, 14 | "max_transaction_cpu_usage": 150000, 15 | "min_transaction_cpu_usage": 100, 16 | "max_transaction_lifetime": 3600, 17 | "deferred_trx_expiration_window": 600, 18 | "max_transaction_delay": 3888000, 19 | "max_inline_action_size": 4096, 20 | "max_inline_action_depth": 4, 21 | "max_authority_depth": 6 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/contract_hello_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cleos set contract whale $EOS_BUILD_DIR/contracts/hello $EOS_BUILD_DIR/contracts/hello/hello.wast $EOS_BUILD_DIR/contracts/hello/hello.abi -p whale 4 | cleos push action whale hi '["aaa"]' -p whale 5 | 6 | cleos set contract whale $EOS_BUILD_DIR/contracts/infinite $EOS_BUILD_DIR/contracts/infinite/infinite.wast $EOS_BUILD_DIR/contracts/infinite/infinite.abi -p whale 7 | cleos push action whale hi '["aaa"]' -p whale 8 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export CLEOS=cleos 4 | export EOS_BUILD_DIR=~/GitHub/eos/build/ 5 | 6 | #private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"] 7 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/grep.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ $# -eq 0 ] 4 | then 5 | ps aux | grep eos 6 | else 7 | ps aux | grep "$@" 8 | fi 9 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/kill.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | kill `cat eos.pid` 4 | kill `cat wallet.pid` 5 | rm eos.pid 6 | rm wallet.pid 7 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/reboot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | set -x 4 | 5 | ./kill.sh 6 | ./clean.sh 7 | ./0_boot_all_in_one.sh 8 | -------------------------------------------------------------------------------- /boot-scripts-1.2.1/unlock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cleos wallet unlock --password=$(cat wallet.pw|cut -c 2-54) 4 | -------------------------------------------------------------------------------- /ide-debug/0_boot_all_in_one.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | printHeader() { 4 | printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - 5 | printf "$1\n" 6 | } 7 | 8 | printHeader 1_start.sh 9 | ./1_start.sh 10 | 11 | printHeader 2_deploy_bios.sh 12 | ./2_deploy_bios.sh 13 | 14 | printHeader 3_create_system_accounts.sh 15 | ./3_create_system_accounts.sh 16 | 17 | printHeader 4_deploy_token.sh 18 | ./4_deploy_token.sh 19 | 20 | printHeader 5_deploy_system.sh 21 | ./5_deploy_system.sh 22 | 23 | printHeader 6_kick_off_shuffle.sh 24 | ./6_kick_off_shuffle.sh 25 | 26 | printHeader 7_create_accounts.sh 27 | ./7_create_accounts.sh 28 | 29 | #printHeader 8_resign_eosio.sh 30 | #./8_resign_eosio.sh 31 | -------------------------------------------------------------------------------- /ide-debug/1_start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | mkdir -p "$EOS_ROOT/logs" 4 | mkdir -p "$EOS_ROOT/keosd" 5 | 6 | nohup keosd -d "$EOS_ROOT/keosd" --http-server-address localhost:8900 > "$EOS_ROOT/keosd/wallet.log" 2>&1 & 7 | echo $! > "$EOS_ROOT/keosd/wallet.pid" 8 | sleep 1; 9 | 10 | cleos wallet create > "$EOS_ROOT/keosd/wallet.pw" 11 | cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 12 | 13 | -------------------------------------------------------------------------------- /ide-debug/2_deploy_bios.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.bios/ -p eosio 4 | -------------------------------------------------------------------------------- /ide-debug/3_create_system_accounts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SYSTEM_ACCOUNT="eosio.bpay eosio.msig eosio.names eosio.ram eosio.ramfee eosio.saving eosio.stake eosio.token eosio.vpay" 4 | 5 | for sa in $SYSTEM_ACCOUNT 6 | do 7 | echo $sa 8 | cleos create account eosio $sa EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV -p eosio 9 | done 10 | -------------------------------------------------------------------------------- /ide-debug/4_deploy_token.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | #cleos push action eosio setpriv '["eosio.token",1]' -p eosio 5 | cleos set contract eosio.token $EOS_BUILD_DIR/contracts/eosio.token -p eosio.token 6 | 7 | cleos push action eosio.token create '["eosio", "10000000000.0000 EOS", 0, 0, 0]' -p eosio.token 8 | cleos push action eosio.token issue '["eosio", "1000000000.0000 EOS", "issue 1B to eosio"]' -p eosio 9 | 10 | cleos set contract eosio.msig $EOS_BUILD_DIR/contracts/eosio.msig -p eosio.msig 11 | -------------------------------------------------------------------------------- /ide-debug/5_deploy_system.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | 5 | cleos create account eosio b1 EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif 6 | cleos wallet import --private-key 5KE3vxAZ5tBXubjMeFJ9uCHHjfQeAzDqPLeW4XHGVcuKHPPLCrA 7 | cleos transfer eosio b1 "100000000.0000 EOS" "transfer 100M to b1" 8 | 9 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.system -p eosio 10 | 11 | cleos push action eosio setpriv '["eosio.msig",1]' -p eosio 12 | -------------------------------------------------------------------------------- /ide-debug/6_kick_off_shuffle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #cleos system newaccount eosio whale "1 EOS" "1 EOS" 4 | cleos system newaccount eosio whale EOS7tkkmx2CgqA3fJMcrSWkjw2kjvWxqDz2iKbzxSXgag9QnhJgDn EOS7tkkmx2CgqA3fJMcrSWkjw2kjvWxqDz2iKbzxSXgag9QnhJgDn --stake-net "1 EOS" --stake-cpu "1 EOS" --buy-ram "1 EOS" 5 | cleos transfer eosio whale "150000000 EOS" "kick off" 6 | cleos wallet import --private-key 5KYeJw8jRBFGodMb8ux49jmKHQ6oBaNgwvcJrybhdiuuPeTYTHf 7 | cleos system delegatebw whale whale "75000000 EOS" "75000000 EOS" 8 | cleos system voteproducer prods whale 9 | cleos system newaccount eosio eosio.sg EOS8YARNxXNLYPak3cjhgUdTWkwCKQkXxwMuW2CpE2d6YnVtVbywG EOS8YARNxXNLYPak3cjhgUdTWkwCKQkXxwMuW2CpE2d6YnVtVbywG --stake-net "1 EOS" --stake-cpu "1 EOS" --buy-ram "1 EOS" 10 | cleos wallet import --private-key 5JaFJxn2RpugGBi32P2f3ykMMKgqZzB1TZQi5zxxS8i1N62hdLd 11 | cleos transfer eosio eosio.sg "500000000 EOS" "make us rich" 12 | -------------------------------------------------------------------------------- /ide-debug/7_create_accounts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ACCOUNTS="alice1111111 bob111111111 carl11111111 localtest111 localtest222 localtest333 localtest444 localtest555" 4 | 5 | for acc in $ACCOUNTS 6 | do 7 | echo $acc 8 | cleos system newaccount eosio $acc EOS4v9UCqsPxKkfm267Q1xJbuE6KRbrXLamGQpo45ZS5xfJqMkaDP EOS4v9UCqsPxKkfm267Q1xJbuE6KRbrXLamGQpo45ZS5xfJqMkaDP --stake-cpu "1000 EOS" --stake-net "1000 EOS" --buy-ram "1000 EOS" -p eosio 9 | cleos transfer eosio $acc "1000 EOS" "red packet" -p eosio 10 | done 11 | 12 | cleos wallet import --private-key 5KbYnXiRxDqaej7qP7A6Pji3ZNiwaFiYRGayGRtHLk8jTFvGCdN 13 | -------------------------------------------------------------------------------- /ide-debug/8_resign_eosio.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for sa in "${SYSTEM_ACCOUNT[@]}" 4 | do 5 | account="$sa" 6 | controller="eosio" 7 | cleos push action eosio updateauth '{"account": "'$account'", "permission": "owner", "parent": "", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "'$controller'", "permission": "active"} }] } } ' -p $account@owner 8 | cleos push action eosio updateauth '{"account": "'$account'", "permission": "active", "parent": "owner", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "'$controller'", "permission": "active"} }] } }' -p $account@active 9 | 10 | done 11 | 12 | cleos push action eosio updateauth '{"account": "eosio", "permission": "owner", "parent": "", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"} }] } } ' -p eosio@owner 13 | cleos push action eosio updateauth '{"account": "eosio", "permission": "active", "parent": "owner", "auth": { "threshold": 1, "keys": [], "waits": [], "accounts": [{ "weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"} }] } }' -p eosio@active 14 | -------------------------------------------------------------------------------- /ide-debug/clean.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -r "$EOS_ROOT/keosd" 4 | rm -r "$EOS_ROOT/data" 5 | rm -r "$EOS_ROOT/logs" 6 | -------------------------------------------------------------------------------- /ide-debug/config-dir/config.ini: -------------------------------------------------------------------------------- 1 | # the endpoint upon which to listen for incoming connections (eosio::bnet_plugin) 2 | bnet-endpoint = 0.0.0.0:4321 3 | 4 | # the number of threads to use to process network messages (eosio::bnet_plugin) 5 | # bnet-threads = 6 | 7 | # remote endpoint of other node to connect to; Use multiple bnet-connect options as needed to compose a network (eosio::bnet_plugin) 8 | # bnet-connect = 9 | 10 | # this peer will request no pending transactions from other nodes (eosio::bnet_plugin) 11 | bnet-no-trx = false 12 | 13 | # the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin) 14 | blocks-dir = "blocks" 15 | 16 | # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin) 17 | # checkpoint = 18 | 19 | # Override default WASM runtime (eosio::chain_plugin) 20 | # wasm-runtime = 21 | 22 | # Maximum size (in MB) of the chain state database (eosio::chain_plugin) 23 | chain-state-db-size-mb = 1024 24 | 25 | # Maximum size (in MB) of the reversible blocks database (eosio::chain_plugin) 26 | reversible-blocks-db-size-mb = 340 27 | 28 | # print contract's output to console (eosio::chain_plugin) 29 | contracts-console = true 30 | 31 | # Account added to actor whitelist (may specify multiple times) (eosio::chain_plugin) 32 | # actor-whitelist = 33 | 34 | # Account added to actor blacklist (may specify multiple times) (eosio::chain_plugin) 35 | # actor-blacklist = 36 | 37 | # Contract account added to contract whitelist (may specify multiple times) (eosio::chain_plugin) 38 | # contract-whitelist = 39 | 40 | # Contract account added to contract blacklist (may specify multiple times) (eosio::chain_plugin) 41 | # contract-blacklist = 42 | 43 | # Track actions which match receiver:action:actor. Actor may be blank to include all. Receiver and Action may not be blank. (eosio::history_plugin) 44 | filter-on = * 45 | 46 | # PEM encoded trusted root certificate (or path to file containing one) used to validate any TLS connections made. (may specify multiple times) 47 | # (eosio::http_client_plugin) 48 | # https-client-root-cert = 49 | 50 | # true: validate that the peer certificates are valid and trusted, false: ignore cert errors (eosio::http_client_plugin) 51 | https-client-validate-peers = 1 52 | 53 | # The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) 54 | http-server-address = 0.0.0.0:8888 55 | 56 | # The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) 57 | # https-server-address = 58 | 59 | # Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) 60 | # https-certificate-chain-file = 61 | 62 | # Filename with https private key in PEM format. Required for https (eosio::http_plugin) 63 | # https-private-key-file = 64 | 65 | # Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) 66 | # access-control-allow-origin = 67 | 68 | # Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin) 69 | # access-control-allow-headers = 70 | 71 | # Specify the Access-Control-Max-Age to be returned on each request. (eosio::http_plugin) 72 | # access-control-max-age = 73 | 74 | # Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) 75 | access-control-allow-credentials = false 76 | 77 | # The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin) 78 | p2p-listen-endpoint = 0.0.0.0:9876 79 | 80 | # An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin) 81 | # p2p-server-address = 82 | 83 | # The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin) 84 | 85 | # Maximum number of client0nodes from any single IP address (eosio::net_plugin) 86 | p2p-max-nodes-per-host = 1 87 | 88 | # The name supplied to identify this node amongst the peers. (eosio::net_plugin) 89 | agent-name = "EOS Test Agent" 90 | 91 | # Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin) 92 | allowed-connection = any 93 | 94 | # Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin) 95 | # peer-key = 96 | 97 | # Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin) 98 | # peer-private-key = 99 | 100 | # Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin) 101 | max-clients = 25 102 | 103 | # number of seconds to wait before cleaning up dead connections (eosio::net_plugin) 104 | connection-cleanup-period = 30 105 | 106 | # True to require exact match of peer network version. (eosio::net_plugin) 107 | network-version-match = 0 108 | 109 | # number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin) 110 | sync-fetch-span = 100 111 | 112 | # maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin) 113 | max-implicit-request = 1500 114 | 115 | # Enable block production, even if the chain is stale. (eosio::producer_plugin) 116 | enable-stale-production = true 117 | 118 | # Start this node in a state where production is paused (eosio::producer_plugin) 119 | pause-on-startup = false 120 | 121 | # Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin) 122 | max-transaction-time = 50000 123 | 124 | # Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain this node will produce blocks on (use negative value to indicate unlimited) (eosio::producer_plugin) 125 | max-irreversible-block-age = -1 126 | 127 | # ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin) 128 | producer-name = eosio 129 | 130 | # (DEPRECATED - Use signature-provider instead) Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin) 131 | # private-key = 132 | 133 | # Key=Value pairs in the form = 134 | # Where: 135 | # is a string form of a vaild EOSIO public key 136 | # 137 | # is a string in the form : 138 | # 139 | # is KEY, or KEOSD 140 | # 141 | # KEY: is a string form of a valid EOSIO private key which maps to the provided public key 142 | # 143 | # KEOSD: is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin) 144 | signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 145 | 146 | # Limits the maximum time (in milliseconds) that is allowd for sending blocks to a keosd provider for signing (eosio::producer_plugin) 147 | keosd-provider-timeout = 5 148 | 149 | # Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin) 150 | txn-reference-block-lag = 0 151 | 152 | # The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin) 153 | wallet-dir = "." 154 | 155 | # Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin) 156 | unlock-timeout = 9000 157 | 158 | # eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin) 159 | # eosio-key = 160 | 161 | # Plugin(s) to enable, may be specified multiple times 162 | plugin = eosio::chain_api_plugin 163 | plugin = eosio::history_plugin 164 | plugin = eosio::history_api_plugin 165 | #plugin = eosio::producer_plugin 166 | #plugin = eosio::producer_api_plugin 167 | #plugin = eosio::mongo_db_plugin 168 | #mongodb-uri = mongodb://localhost:27017/eos 169 | #abi-serializer-max-time-ms = 500 170 | -------------------------------------------------------------------------------- /ide-debug/config-dir/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "initial_timestamp": "2018-06-08T08:08:08.888", 3 | "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", 4 | "initial_configuration": { 5 | "max_block_net_usage": 1048576, 6 | "target_block_net_usage_pct": 1000, 7 | "max_transaction_net_usage": 524288, 8 | "base_per_transaction_net_usage": 12, 9 | "net_usage_leeway": 500, 10 | "context_free_discount_net_usage_num": 20, 11 | "context_free_discount_net_usage_den": 100, 12 | "max_block_cpu_usage": 200000, 13 | "target_block_cpu_usage_pct": 1000, 14 | "max_transaction_cpu_usage": 150000, 15 | "min_transaction_cpu_usage": 100, 16 | "max_transaction_lifetime": 3600, 17 | "deferred_trx_expiration_window": 600, 18 | "max_transaction_delay": 3888000, 19 | "max_inline_action_size": 4096, 20 | "max_inline_action_depth": 4, 21 | "max_authority_depth": 6 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ide-debug/config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cp config-dir/config.ini "$EOS_ROOT/config/" 4 | cp config-dir/genesis.json "$EOS_ROOT/config/" 5 | -------------------------------------------------------------------------------- /ide-debug/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export CLEOS=cleos 4 | export EOS_BUILD_DIR=~/GitHub/eos/build/ 5 | export EOS_ROOT=~/"Library/Application Support/eosio/nodeos" 6 | 7 | #private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"] 8 | -------------------------------------------------------------------------------- /ide-debug/grep.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ $# -eq 0 ] 4 | then 5 | ps aux | grep eos 6 | else 7 | ps aux | grep "$@" 8 | fi 9 | -------------------------------------------------------------------------------- /ide-debug/kill.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | kill `cat "$EOS_ROOT/keosd/wallet.pid"` 4 | rm "$EOS_ROOT/keosd/wallet.pid" 5 | -------------------------------------------------------------------------------- /launch-scripts/1_start.sh: -------------------------------------------------------------------------------- 1 | mkdir -p logs 2 | nohup nodeos --data-dir ./data-dir --config-dir ./config-dir > ./logs/eos.log 2>&1 & 3 | echo $! > eos.pid 4 | nohup keosd -d ./data-dir --http-server-address localhost:8900 >./logs/wallet.log 2>&1 & 5 | echo $! > wallet.pid 6 | -------------------------------------------------------------------------------- /launch-scripts/2_deploy_bios.sh: -------------------------------------------------------------------------------- 1 | cleos wallet create 2 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.bios/ -p eosio 3 | -------------------------------------------------------------------------------- /launch-scripts/3_deploy_token.sh: -------------------------------------------------------------------------------- 1 | # eosio.token 2 | cleos create account eosio eosio.token EOS6QahzfDoDvdXGTjV8YWxZ6vEYHqxen9v16U1aRZj7kWiPpmb4E EOS6QahzfDoDvdXGTjV8YWxZ6vEYHqxen9v16U1aRZj7kWiPpmb4E 3 | cleos create account eosio eosio.msig EOS6QahzfDoDvdXGTjV8YWxZ6vEYHqxen9v16U1aRZj7kWiPpmb4E EOS6QahzfDoDvdXGTjV8YWxZ6vEYHqxen9v16U1aRZj7kWiPpmb4E 4 | cleos wallet import 5KTdTrTr1pYzLQjo8hSUmtzShEtHaonmVfHF7mAdv3azpxhE6Xr 5 | 6 | cleos set contract eosio.token $EOS_BUILD_DIR/contracts/eosio.token -p eosio.token 7 | cleos set contract eosio.msig $EOS_BUILD_DIR/contracts/eosio.token -p eosio.msig 8 | -------------------------------------------------------------------------------- /launch-scripts/4_create_and_issue.sh: -------------------------------------------------------------------------------- 1 | cleos push action eosio.token create '["eosio", "1000000000.0000 SYS", 0, 0, 0]' -p eosio.token 2 | cleos push action eosio.token issue '["eosio", "1000000000.0000 SYS", "xxxxx"]' -p eosio 3 | -------------------------------------------------------------------------------- /launch-scripts/5_deploy_system.sh: -------------------------------------------------------------------------------- 1 | # eosio.system 2 | cleos set contract eosio $EOS_BUILD_DIR/contracts/eosio.system -p eosio 3 | -------------------------------------------------------------------------------- /launch-scripts/6_create_account.sh: -------------------------------------------------------------------------------- 1 | cleos system newaccount eosio frank1111111 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV --stake-net "1.0000 SYS" --stake-cpu "1.0000 SYS" --buy-ram-EOS "1.0000 SYS" 2 | cleos system newaccount eosio producer1111 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV --stake-net "1.0000 SYS" --stake-cpu "1.0000 SYS" --buy-ram-EOS "1.0000 SYS" 3 | 4 | -------------------------------------------------------------------------------- /launch-scripts/7_reg_prod.sh: -------------------------------------------------------------------------------- 1 | cleos system regproducer frank1111111 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV eosio.sg 2 | cleos system regproducer producer1111 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV eosio.sg 3 | -------------------------------------------------------------------------------- /launch-scripts/8_transfer.sh: -------------------------------------------------------------------------------- 1 | #cleos push action eosio.token transfer '["eosio", "frank", "1000.0000 EOS","m"]' -p eosio 2 | #cleos push action eosio.token transfer '["voter", "voter1", "100.0000 EOS","m"]' -p voter 3 | #cleos push action eosio.token transfer '["voter", "voter2", "50.0000 EOS", "m"]' -p voter 4 | #cleos push action eosio.token transfer '["voter1", "voter2", "10.0000 EOS", "m"]' -p voter1 5 | 6 | #cleos push action eosio.token transfer '["voter", "proxy", "100.0000 EOS","m"]' -p voter 7 | 8 | cleos transfer eosio frank1111111 "1000000000.0000 SYS" 9 | cleos transfer frank1111111 producer1111 "10000.0000 SYS" 10 | -------------------------------------------------------------------------------- /launch-scripts/9_vote_producer.sh: -------------------------------------------------------------------------------- 1 | #cleos push action eosio delegatebw '{"from":"voter","receiver":"voter","stake_net_quantity":"23.0000 EOS","stake_cpu_quantity":"20.0000 EOS","stake_storage_quantity":"1.0000 EOS"}' -p voter 2 | #cleos push action eosio voteproducer '["voter", "", ["producer1"]]' -p voter 3 | #cleos system voteproducer prods voter producer1 -p voter 4 | 5 | cleos system delegatebw frank1111111 frank1111111 "100000000.0000 SYS" "50000000.0000 SYS" --transfer 6 | cleos system voteproducer prods frank1111111 frank1111111 producer1111 7 | 8 | #cleos push action eosio voteproducer '["xiaohua", "", ["frank", "producer"]]' -p xiaohua 9 | 10 | 11 | -------------------------------------------------------------------------------- /launch-scripts/buyram.sh: -------------------------------------------------------------------------------- 1 | cleos system buyram frank1111111 frank1111111 "10000000.0000 SYS" 2 | -------------------------------------------------------------------------------- /launch-scripts/check_balance.sh: -------------------------------------------------------------------------------- 1 | echo voter `cleos get currency balance eosio.token voter` 2 | echo voter1 `cleos get currency balance eosio.token voter1` 3 | echo voter2 `cleos get currency balance eosio.token voter2` 4 | 5 | 6 | echo producer `cleos get currency balance eosio.token producer` 7 | echo producer1 `cleos get currency balance eosio.token producer1` 8 | echo producer2 `cleos get currency balance eosio.token producer2` 9 | 10 | echo proxy `cleos get currency balance eosio.token proxy` 11 | echo proxy1 `cleos get currency balance eosio.token proxy1` 12 | -------------------------------------------------------------------------------- /launch-scripts/check_votes.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | cleos get table eosio eosio producerinfo | jq ".rows[0].owner" 4 | cleos get table eosio eosio producerinfo | jq ".rows[0].total_votes" 5 | 6 | cleos get table eosio eosio producerinfo | jq ".rows[1].owner" 7 | cleos get table eosio eosio producerinfo | jq ".rows[1].total_votes" 8 | 9 | cleos get table eosio eosio producerinfo | jq ".rows[2].owner" 10 | cleos get table eosio eosio producerinfo | jq ".rows[2].total_votes" 11 | -------------------------------------------------------------------------------- /launch-scripts/clear.sh: -------------------------------------------------------------------------------- 1 | rm -rf data-dir/ 2 | rm -rf logs/*.* 3 | -------------------------------------------------------------------------------- /launch-scripts/config-dir/config.ini: -------------------------------------------------------------------------------- 1 | # File to read Genesis State from (eosio::chain_plugin) 2 | genesis-json = "genesis.json" 3 | 4 | # override the initial timestamp in the Genesis State file (eosio::chain_plugin) 5 | # genesis-timestamp = 6 | 7 | # the location of the block log (absolute path or relative to application data dir) (eosio::chain_plugin) 8 | block-log-dir = "blocks" 9 | 10 | # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin) 11 | # checkpoint = 12 | 13 | # Override default WASM runtime (eosio::chain_plugin) 14 | # wasm-runtime = 15 | 16 | # Maximum size MB of database shared memory file (eosio::chain_plugin) 17 | shared-memory-size-mb = 1024 18 | 19 | # Track only transactions whose scopes involve the listed accounts. Default is to track all transactions. (eosio::history_plugin) 20 | # filter_on_accounts = 21 | 22 | # The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) 23 | http-server-address = 127.0.0.1:8888 24 | 25 | # The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) 26 | # https-server-address = 27 | 28 | # Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) 29 | # https-certificate-chain-file = 30 | 31 | # Filename with https private key in PEM format. Required for https (eosio::http_plugin) 32 | # https-private-key-file = 33 | 34 | # Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) 35 | # access-control-allow-origin = 36 | 37 | # Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin) 38 | # access-control-allow-headers = 39 | 40 | # Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) 41 | access-control-allow-credentials = false 42 | 43 | # The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin) 44 | p2p-listen-endpoint = 0.0.0.0:9876 45 | 46 | # An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin) 47 | p2p-server-address = 0.0.0.0:9876 48 | 49 | # The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin) 50 | # p2p-peer-address = 51 | 52 | # The name supplied to identify this node amongst the peers. (eosio::net_plugin) 53 | agent-name = "EOS Test Agent" 54 | 55 | # Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin) 56 | allowed-connection = any 57 | 58 | # Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin) 59 | # peer-key = 60 | 61 | # Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin) 62 | # peer-private-key = 63 | 64 | # Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin) 65 | max-clients = 25 66 | 67 | # number of seconds to wait before cleaning up dead connections (eosio::net_plugin) 68 | connection-cleanup-period = 30 69 | 70 | # True to require exact match of peer network version. (eosio::net_plugin) 71 | network-version-match = 0 72 | 73 | # number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin) 74 | sync-fetch-span = 100 75 | 76 | # maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin) 77 | max-implicit-request = 1500 78 | 79 | # Enable block production, even if the chain is stale. (eosio::producer_plugin) 80 | enable-stale-production = true 81 | 82 | # Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin) 83 | max-transaction-time = 5000 84 | 85 | # Percent of producers (0-100) that must be participating in order to produce blocks (eosio::producer_plugin) 86 | required-participation = 33 87 | 88 | # ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin) 89 | producer-name = eosio 90 | 91 | # Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin) 92 | private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"] 93 | 94 | # Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin) 95 | txn-reference-block-lag = 0 96 | 97 | # The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin) 98 | wallet-dir = "." 99 | 100 | # Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin) 101 | unlock-timeout = 900 102 | 103 | # eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin) 104 | # eosio-key = 105 | 106 | # Plugin(s) to enable, may be specified multiple times 107 | plugin = eosio::chain_api_plugin 108 | 109 | -------------------------------------------------------------------------------- /launch-scripts/config-dir/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", 3 | "initial_timestamp": "2018-05-12T00:00:00", 4 | "initial_parameters": { 5 | "maintenance_interval": 86400, 6 | "maintenance_skip_slots": 3, 7 | "maximum_transaction_size": 2048, 8 | "maximum_block_size": 2048000000, 9 | "maximum_time_until_expiration": 86400, 10 | "maximum_producer_count": 1001 11 | }, 12 | "immutable_parameters": { 13 | "min_producer_count": 21 14 | }, 15 | "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000001" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /launch-scripts/env.sh: -------------------------------------------------------------------------------- 1 | export CLEOS=cleos 2 | export EOS_BUILD_DIR=~/eos/build 3 | -------------------------------------------------------------------------------- /launch-scripts/grep.sh: -------------------------------------------------------------------------------- 1 | ps aux | grep eos 2 | -------------------------------------------------------------------------------- /launch-scripts/kill.sh: -------------------------------------------------------------------------------- 1 | kill `cat eos.pid` 2 | kill `cat wallet.pid` 3 | rm eos.pid 4 | rm wallet.pid 5 | -------------------------------------------------------------------------------- /launch-scripts/regproxy.sh: -------------------------------------------------------------------------------- 1 | cleos push action eosio regproxy '{"proxy":"xiaohua", "isproxy":true}' -p xiaohua 2 | -------------------------------------------------------------------------------- /launch-scripts/sellram.sh: -------------------------------------------------------------------------------- 1 | cleos system sellram frank1111111 62472115275 -p frank1111111 2 | -------------------------------------------------------------------------------- /launch-scripts/set_priv.sh: -------------------------------------------------------------------------------- 1 | cleos push action eosio setpriv '{"account":"eosio", "is_priv": 0}' -p eosio 2 | -------------------------------------------------------------------------------- /launch-scripts/set_producer.sh: -------------------------------------------------------------------------------- 1 | cleos push action eosio setprods '{"schedule": [ { "producer_name": "producer", "block_signing_key":"EOS8dCVTUjdCv94GB7wr7vFTJri7iRYd7c4y6U8tHGaK3peMerUr5" } ] }' -p eosio -j 2 | -------------------------------------------------------------------------------- /launch-scripts/set_ram.sh: -------------------------------------------------------------------------------- 1 | cleos push action eosio setram '{"max_ram_size": 1099511600000}' -p eosio 2 | -------------------------------------------------------------------------------- /launch-scripts/unlock_wallet.sh: -------------------------------------------------------------------------------- 1 | cleos wallet unlock --password=PW5HzNaafwDzd9GbxwFZKb7YjrpmjBr4afuVMRSm6iXbPumSZ1Kek 2 | -------------------------------------------------------------------------------- /launch-scripts/watch.sh: -------------------------------------------------------------------------------- 1 | tail -f -n 100 logs/eos.log 2 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.bios/eosio.bios.abi: -------------------------------------------------------------------------------- 1 | { 2 | "version": "eosio::abi/1.0", 3 | "types": [{ 4 | "new_type_name": "account_name", 5 | "type": "name" 6 | },{ 7 | "new_type_name": "permission_name", 8 | "type": "name" 9 | },{ 10 | "new_type_name": "action_name", 11 | "type": "name" 12 | },{ 13 | "new_type_name": "transaction_id_type", 14 | "type": "checksum256" 15 | },{ 16 | "new_type_name": "weight_type", 17 | "type": "uint16" 18 | }], 19 | "structs": [{ 20 | "name": "permission_level", 21 | "base": "", 22 | "fields": [ 23 | {"name":"actor", "type":"account_name"}, 24 | {"name":"permission", "type":"permission_name"} 25 | ] 26 | },{ 27 | "name": "key_weight", 28 | "base": "", 29 | "fields": [ 30 | {"name":"key", "type":"public_key"}, 31 | {"name":"weight", "type":"weight_type"} 32 | ] 33 | },{ 34 | "name": "permission_level_weight", 35 | "base": "", 36 | "fields": [ 37 | {"name":"permission", "type":"permission_level"}, 38 | {"name":"weight", "type":"weight_type"} 39 | ] 40 | },{ 41 | "name": "wait_weight", 42 | "base": "", 43 | "fields": [ 44 | {"name":"wait_sec", "type":"uint32"}, 45 | {"name":"weight", "type":"weight_type"} 46 | ] 47 | },{ 48 | "name": "authority", 49 | "base": "", 50 | "fields": [ 51 | {"name":"threshold", "type":"uint32"}, 52 | {"name":"keys", "type":"key_weight[]"}, 53 | {"name":"accounts", "type":"permission_level_weight[]"}, 54 | {"name":"waits", "type":"wait_weight[]"} 55 | ] 56 | },{ 57 | "name": "blockchain_parameters", 58 | "base": "", 59 | "fields": [ 60 | {"name":"max_block_net_usage", "type":"uint64"}, 61 | {"name":"target_block_net_usage_pct", "type":"uint32"}, 62 | {"name":"max_transaction_net_usage", "type":"uint32"}, 63 | {"name":"base_per_transaction_net_usage", "type":"uint32"}, 64 | {"name":"net_usage_leeway", "type":"uint32"}, 65 | {"name":"context_free_discount_net_usage_num", "type":"uint32"}, 66 | {"name":"context_free_discount_net_usage_den", "type":"uint32"}, 67 | {"name":"max_block_cpu_usage", "type":"uint32"}, 68 | {"name":"target_block_cpu_usage_pct", "type":"uint32"}, 69 | {"name":"max_transaction_cpu_usage", "type":"uint32"}, 70 | {"name":"min_transaction_cpu_usage", "type":"uint32"}, 71 | {"name":"max_transaction_lifetime", "type":"uint32"}, 72 | {"name":"deferred_trx_expiration_window", "type":"uint32"}, 73 | {"name":"max_transaction_delay", "type":"uint32"}, 74 | {"name":"max_inline_action_size", "type":"uint32"}, 75 | {"name":"max_inline_action_depth", "type":"uint16"}, 76 | {"name":"max_authority_depth", "type":"uint16"} 77 | ] 78 | },{ 79 | "name": "newaccount", 80 | "base": "", 81 | "fields": [ 82 | {"name":"creator", "type":"account_name"}, 83 | {"name":"name", "type":"account_name"}, 84 | {"name":"owner", "type":"authority"}, 85 | {"name":"active", "type":"authority"} 86 | ] 87 | },{ 88 | "name": "setcode", 89 | "base": "", 90 | "fields": [ 91 | {"name":"account", "type":"account_name"}, 92 | {"name":"vmtype", "type":"uint8"}, 93 | {"name":"vmversion", "type":"uint8"}, 94 | {"name":"code", "type":"bytes"} 95 | ] 96 | },{ 97 | "name": "setabi", 98 | "base": "", 99 | "fields": [ 100 | {"name":"account", "type":"account_name"}, 101 | {"name":"abi", "type":"bytes"} 102 | ] 103 | },{ 104 | "name": "updateauth", 105 | "base": "", 106 | "fields": [ 107 | {"name":"account", "type":"account_name"}, 108 | {"name":"permission", "type":"permission_name"}, 109 | {"name":"parent", "type":"permission_name"}, 110 | {"name":"auth", "type":"authority"} 111 | ] 112 | },{ 113 | "name": "deleteauth", 114 | "base": "", 115 | "fields": [ 116 | {"name":"account", "type":"account_name"}, 117 | {"name":"permission", "type":"permission_name"} 118 | ] 119 | },{ 120 | "name": "linkauth", 121 | "base": "", 122 | "fields": [ 123 | {"name":"account", "type":"account_name"}, 124 | {"name":"code", "type":"account_name"}, 125 | {"name":"type", "type":"action_name"}, 126 | {"name":"requirement", "type":"permission_name"} 127 | ] 128 | },{ 129 | "name": "unlinkauth", 130 | "base": "", 131 | "fields": [ 132 | {"name":"account", "type":"account_name"}, 133 | {"name":"code", "type":"account_name"}, 134 | {"name":"type", "type":"action_name"} 135 | ] 136 | },{ 137 | "name": "canceldelay", 138 | "base": "", 139 | "fields": [ 140 | {"name":"canceling_auth", "type":"permission_level"}, 141 | {"name":"trx_id", "type":"transaction_id_type"} 142 | ] 143 | },{ 144 | "name": "onerror", 145 | "base": "", 146 | "fields": [ 147 | {"name":"sender_id", "type":"uint128"}, 148 | {"name":"sent_trx", "type":"bytes"} 149 | ] 150 | },{ 151 | "name": "set_account_limits", 152 | "base": "", 153 | "fields": [ 154 | {"name":"account", "type":"account_name"}, 155 | {"name":"ram_bytes", "type":"int64"}, 156 | {"name":"net_weight", "type":"int64"}, 157 | {"name":"cpu_weight", "type":"int64"} 158 | ] 159 | },{ 160 | "name": "setpriv", 161 | "base": "", 162 | "fields": [ 163 | {"name":"account", "type":"account_name"}, 164 | {"name":"is_priv", "type":"int8"} 165 | ] 166 | },{ 167 | "name": "set_global_limits", 168 | "base": "", 169 | "fields": [ 170 | {"name":"cpu_usec_per_period", "type":"int64"} 171 | ] 172 | },{ 173 | "name": "producer_key", 174 | "base": "", 175 | "fields": [ 176 | {"name":"producer_name", "type":"account_name"}, 177 | {"name":"block_signing_key", "type":"public_key"} 178 | ] 179 | },{ 180 | "name": "set_producers", 181 | "base": "", 182 | "fields": [ 183 | {"name":"schedule", "type":"producer_key[]"} 184 | ] 185 | },{ 186 | "name": "setparams", 187 | "base": "", 188 | "fields": [ 189 | {"name":"params", "type":"blockchain_parameters"} 190 | ] 191 | },{ 192 | "name": "require_auth", 193 | "base": "", 194 | "fields": [ 195 | {"name":"from", "type":"account_name"} 196 | ] 197 | }], 198 | "actions": [{ 199 | "name": "newaccount", 200 | "type": "newaccount", 201 | "ricardian_contract": "" 202 | },{ 203 | "name": "setcode", 204 | "type": "setcode", 205 | "ricardian_contract": "" 206 | },{ 207 | "name": "setabi", 208 | "type": "setabi", 209 | "ricardian_contract": "" 210 | },{ 211 | "name": "updateauth", 212 | "type": "updateauth", 213 | "ricardian_contract": "" 214 | },{ 215 | "name": "deleteauth", 216 | "type": "deleteauth", 217 | "ricardian_contract": "" 218 | },{ 219 | "name": "linkauth", 220 | "type": "linkauth", 221 | "ricardian_contract": "" 222 | },{ 223 | "name": "unlinkauth", 224 | "type": "unlinkauth", 225 | "ricardian_contract": "" 226 | },{ 227 | "name": "canceldelay", 228 | "type": "canceldelay", 229 | "ricardian_contract": "" 230 | },{ 231 | "name": "onerror", 232 | "type": "onerror", 233 | "ricardian_contract": "" 234 | },{ 235 | "name": "setalimits", 236 | "type": "set_account_limits", 237 | "ricardian_contract": "" 238 | },{ 239 | "name": "setglimits", 240 | "type": "set_global_limits", 241 | "ricardian_contract": "" 242 | },{ 243 | "name": "setpriv", 244 | "type": "setpriv", 245 | "ricardian_contract": "" 246 | },{ 247 | "name": "setprods", 248 | "type": "set_producers", 249 | "ricardian_contract": "" 250 | },{ 251 | "name": "setparams", 252 | "type": "setparams", 253 | "ricardian_contract": "" 254 | },{ 255 | "name": "reqauth", 256 | "type": "require_auth", 257 | "ricardian_contract": "" 258 | } 259 | ], 260 | "tables": [], 261 | "ricardian_clauses": [], 262 | "abi_extensions": [] 263 | } 264 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.bios/eosio.bios.abi.hpp: -------------------------------------------------------------------------------- 1 | const char* const eosio_bios_abi = R"=====( 2 | { 3 | "version": "eosio::abi/1.0", 4 | "types": [{ 5 | "new_type_name": "account_name", 6 | "type": "name" 7 | },{ 8 | "new_type_name": "permission_name", 9 | "type": "name" 10 | },{ 11 | "new_type_name": "action_name", 12 | "type": "name" 13 | },{ 14 | "new_type_name": "transaction_id_type", 15 | "type": "checksum256" 16 | },{ 17 | "new_type_name": "weight_type", 18 | "type": "uint16" 19 | }], 20 | "structs": [{ 21 | "name": "permission_level", 22 | "base": "", 23 | "fields": [ 24 | {"name":"actor", "type":"account_name"}, 25 | {"name":"permission", "type":"permission_name"} 26 | ] 27 | },{ 28 | "name": "key_weight", 29 | "base": "", 30 | "fields": [ 31 | {"name":"key", "type":"public_key"}, 32 | {"name":"weight", "type":"weight_type"} 33 | ] 34 | },{ 35 | "name": "permission_level_weight", 36 | "base": "", 37 | "fields": [ 38 | {"name":"permission", "type":"permission_level"}, 39 | {"name":"weight", "type":"weight_type"} 40 | ] 41 | },{ 42 | "name": "wait_weight", 43 | "base": "", 44 | "fields": [ 45 | {"name":"wait_sec", "type":"uint32"}, 46 | {"name":"weight", "type":"weight_type"} 47 | ] 48 | },{ 49 | "name": "authority", 50 | "base": "", 51 | "fields": [ 52 | {"name":"threshold", "type":"uint32"}, 53 | {"name":"keys", "type":"key_weight[]"}, 54 | {"name":"accounts", "type":"permission_level_weight[]"}, 55 | {"name":"waits", "type":"wait_weight[]"} 56 | ] 57 | },{ 58 | "name": "blockchain_parameters", 59 | "base": "", 60 | "fields": [ 61 | {"name":"max_block_net_usage", "type":"uint64"}, 62 | {"name":"target_block_net_usage_pct", "type":"uint32"}, 63 | {"name":"max_transaction_net_usage", "type":"uint32"}, 64 | {"name":"base_per_transaction_net_usage", "type":"uint32"}, 65 | {"name":"net_usage_leeway", "type":"uint32"}, 66 | {"name":"context_free_discount_net_usage_num", "type":"uint32"}, 67 | {"name":"context_free_discount_net_usage_den", "type":"uint32"}, 68 | {"name":"max_block_cpu_usage", "type":"uint32"}, 69 | {"name":"target_block_cpu_usage_pct", "type":"uint32"}, 70 | {"name":"max_transaction_cpu_usage", "type":"uint32"}, 71 | {"name":"min_transaction_cpu_usage", "type":"uint32"}, 72 | {"name":"max_transaction_lifetime", "type":"uint32"}, 73 | {"name":"deferred_trx_expiration_window", "type":"uint32"}, 74 | {"name":"max_transaction_delay", "type":"uint32"}, 75 | {"name":"max_inline_action_size", "type":"uint32"}, 76 | {"name":"max_inline_action_depth", "type":"uint16"}, 77 | {"name":"max_authority_depth", "type":"uint16"} 78 | ] 79 | },{ 80 | "name": "newaccount", 81 | "base": "", 82 | "fields": [ 83 | {"name":"creator", "type":"account_name"}, 84 | {"name":"name", "type":"account_name"}, 85 | {"name":"owner", "type":"authority"}, 86 | {"name":"active", "type":"authority"} 87 | ] 88 | },{ 89 | "name": "setcode", 90 | "base": "", 91 | "fields": [ 92 | {"name":"account", "type":"account_name"}, 93 | {"name":"vmtype", "type":"uint8"}, 94 | {"name":"vmversion", "type":"uint8"}, 95 | {"name":"code", "type":"bytes"} 96 | ] 97 | },{ 98 | "name": "setabi", 99 | "base": "", 100 | "fields": [ 101 | {"name":"account", "type":"account_name"}, 102 | {"name":"abi", "type":"bytes"} 103 | ] 104 | },{ 105 | "name": "updateauth", 106 | "base": "", 107 | "fields": [ 108 | {"name":"account", "type":"account_name"}, 109 | {"name":"permission", "type":"permission_name"}, 110 | {"name":"parent", "type":"permission_name"}, 111 | {"name":"auth", "type":"authority"} 112 | ] 113 | },{ 114 | "name": "deleteauth", 115 | "base": "", 116 | "fields": [ 117 | {"name":"account", "type":"account_name"}, 118 | {"name":"permission", "type":"permission_name"} 119 | ] 120 | },{ 121 | "name": "linkauth", 122 | "base": "", 123 | "fields": [ 124 | {"name":"account", "type":"account_name"}, 125 | {"name":"code", "type":"account_name"}, 126 | {"name":"type", "type":"action_name"}, 127 | {"name":"requirement", "type":"permission_name"} 128 | ] 129 | },{ 130 | "name": "unlinkauth", 131 | "base": "", 132 | "fields": [ 133 | {"name":"account", "type":"account_name"}, 134 | {"name":"code", "type":"account_name"}, 135 | {"name":"type", "type":"action_name"} 136 | ] 137 | },{ 138 | "name": "canceldelay", 139 | "base": "", 140 | "fields": [ 141 | {"name":"canceling_auth", "type":"permission_level"}, 142 | {"name":"trx_id", "type":"transaction_id_type"} 143 | ] 144 | },{ 145 | "name": "onerror", 146 | "base": "", 147 | "fields": [ 148 | {"name":"sender_id", "type":"uint128"}, 149 | {"name":"sent_trx", "type":"bytes"} 150 | ] 151 | },{ 152 | "name": "set_account_limits", 153 | "base": "", 154 | "fields": [ 155 | {"name":"account", "type":"account_name"}, 156 | {"name":"ram_bytes", "type":"int64"}, 157 | {"name":"net_weight", "type":"int64"}, 158 | {"name":"cpu_weight", "type":"int64"} 159 | ] 160 | },{ 161 | "name": "setpriv", 162 | "base": "", 163 | "fields": [ 164 | {"name":"account", "type":"account_name"}, 165 | {"name":"is_priv", "type":"int8"} 166 | ] 167 | },{ 168 | "name": "set_global_limits", 169 | "base": "", 170 | "fields": [ 171 | {"name":"cpu_usec_per_period", "type":"int64"} 172 | ] 173 | },{ 174 | "name": "producer_key", 175 | "base": "", 176 | "fields": [ 177 | {"name":"producer_name", "type":"account_name"}, 178 | {"name":"block_signing_key", "type":"public_key"} 179 | ] 180 | },{ 181 | "name": "set_producers", 182 | "base": "", 183 | "fields": [ 184 | {"name":"schedule", "type":"producer_key[]"} 185 | ] 186 | },{ 187 | "name": "setparams", 188 | "base": "", 189 | "fields": [ 190 | {"name":"params", "type":"blockchain_parameters"} 191 | ] 192 | },{ 193 | "name": "require_auth", 194 | "base": "", 195 | "fields": [ 196 | {"name":"from", "type":"account_name"} 197 | ] 198 | }], 199 | "actions": [{ 200 | "name": "newaccount", 201 | "type": "newaccount", 202 | "ricardian_contract": "" 203 | },{ 204 | "name": "setcode", 205 | "type": "setcode", 206 | "ricardian_contract": "" 207 | },{ 208 | "name": "setabi", 209 | "type": "setabi", 210 | "ricardian_contract": "" 211 | },{ 212 | "name": "updateauth", 213 | "type": "updateauth", 214 | "ricardian_contract": "" 215 | },{ 216 | "name": "deleteauth", 217 | "type": "deleteauth", 218 | "ricardian_contract": "" 219 | },{ 220 | "name": "linkauth", 221 | "type": "linkauth", 222 | "ricardian_contract": "" 223 | },{ 224 | "name": "unlinkauth", 225 | "type": "unlinkauth", 226 | "ricardian_contract": "" 227 | },{ 228 | "name": "canceldelay", 229 | "type": "canceldelay", 230 | "ricardian_contract": "" 231 | },{ 232 | "name": "onerror", 233 | "type": "onerror", 234 | "ricardian_contract": "" 235 | },{ 236 | "name": "setalimits", 237 | "type": "set_account_limits", 238 | "ricardian_contract": "" 239 | },{ 240 | "name": "setglimits", 241 | "type": "set_global_limits", 242 | "ricardian_contract": "" 243 | },{ 244 | "name": "setpriv", 245 | "type": "setpriv", 246 | "ricardian_contract": "" 247 | },{ 248 | "name": "setprods", 249 | "type": "set_producers", 250 | "ricardian_contract": "" 251 | },{ 252 | "name": "setparams", 253 | "type": "setparams", 254 | "ricardian_contract": "" 255 | },{ 256 | "name": "reqauth", 257 | "type": "require_auth", 258 | "ricardian_contract": "" 259 | } 260 | ], 261 | "tables": [], 262 | "ricardian_clauses": [], 263 | "abi_extensions": [] 264 | } 265 | )====="; 266 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.bios/eosio.bios.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/contracts/eosio.bios/eosio.bios.wasm -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.msig/eosio.msig.abi: -------------------------------------------------------------------------------- 1 | { 2 | "version": "eosio::abi/1.0", 3 | "types": [{ 4 | "new_type_name": "account_name", 5 | "type": "name" 6 | },{ 7 | "new_type_name": "permission_name", 8 | "type": "name" 9 | },{ 10 | "new_type_name": "action_name", 11 | "type": "name" 12 | }], 13 | "structs": [{ 14 | "name": "permission_level", 15 | "base": "", 16 | "fields": [ 17 | {"name": "actor", "type": "account_name"}, 18 | {"name": "permission", "type": "permission_name"} 19 | ] 20 | },{ 21 | "name": "action", 22 | "base": "", 23 | "fields": [ 24 | {"name": "account", "type": "account_name"}, 25 | {"name": "name", "type": "action_name"}, 26 | {"name": "authorization", "type": "permission_level[]"}, 27 | {"name": "data", "type": "bytes"} 28 | ] 29 | },{ 30 | "name": "transaction_header", 31 | "base": "", 32 | "fields": [ 33 | {"name": "expiration", "type": "time_point_sec"}, 34 | {"name": "ref_block_num", "type": "uint16"}, 35 | {"name": "ref_block_prefix", "type": "uint32"}, 36 | {"name": "max_net_usage_words", "type": "varuint32"}, 37 | {"name": "max_cpu_usage_ms", "type": "uint8"}, 38 | {"name": "delay_sec", "type": "varuint32"} 39 | ] 40 | },{ 41 | "name": "extension", 42 | "base": "", 43 | "fields": [ 44 | {"name": "type", "type" : "uint16" }, 45 | {"name": "data", "type": "bytes"} 46 | ] 47 | },{ 48 | "name": "transaction", 49 | "base": "transaction_header", 50 | "fields": [ 51 | {"name": "context_free_actions", "type": "action[]"}, 52 | {"name": "actions", "type": "action[]"}, 53 | {"name": "transaction_extensions", "type": "extension[]"} 54 | ] 55 | },{ 56 | "name": "propose", 57 | "base": "", 58 | "fields": [ 59 | {"name":"proposer", "type":"account_name"}, 60 | {"name":"proposal_name", "type":"name"}, 61 | {"name":"requested", "type":"permission_level[]"}, 62 | {"name":"trx", "type":"transaction"} 63 | ] 64 | },{ 65 | "name": "approve", 66 | "base": "", 67 | "fields": [ 68 | {"name":"proposer", "type":"account_name"}, 69 | {"name":"proposal_name", "type":"name"}, 70 | {"name":"level", "type":"permission_level"} 71 | ] 72 | },{ 73 | "name": "unapprove", 74 | "base": "", 75 | "fields": [ 76 | {"name":"proposer", "type":"account_name"}, 77 | {"name":"proposal_name", "type":"name"}, 78 | {"name":"level", "type":"permission_level"} 79 | ] 80 | },{ 81 | "name": "cancel", 82 | "base": "", 83 | "fields": [ 84 | {"name":"proposer", "type":"account_name"}, 85 | {"name":"proposal_name", "type":"name"}, 86 | {"name":"canceler", "type":"account_name"} 87 | ] 88 | },{ 89 | "name": "exec", 90 | "base": "", 91 | "fields": [ 92 | {"name":"proposer", "type":"account_name"}, 93 | {"name":"proposal_name", "type":"name"}, 94 | {"name":"executer", "type":"account_name"} 95 | ] 96 | },{ 97 | "name": "proposal", 98 | "base": "", 99 | "fields": [ 100 | {"name": "proposal_name", "type": "name"}, 101 | {"name": "packed_transaction", "type": "bytes"} 102 | ] 103 | },{ 104 | "name": "approvals_info", 105 | "base": "", 106 | "fields": [ 107 | {"name": "proposal_name", "type": "name"}, 108 | {"name": "requested_approvals", "type": "permission_level[]"}, 109 | {"name": "provided_approvals", "type": "permission_level[]"} 110 | ] 111 | } 112 | ], 113 | "actions": [{ 114 | "name": "propose", 115 | "type": "propose", 116 | "ricardian_contract": "" 117 | },{ 118 | "name": "approve", 119 | "type": "approve", 120 | "ricardian_contract": "" 121 | },{ 122 | "name": "unapprove", 123 | "type": "unapprove", 124 | "ricardian_contract": "" 125 | }, { 126 | "name": "cancel", 127 | "type": "cancel", 128 | "ricardian_contract": "" 129 | }, { 130 | "name": "exec", 131 | "type": "exec", 132 | "ricardian_contract": "" 133 | } 134 | 135 | ], 136 | "tables": [{ 137 | "name": "proposal", 138 | "type": "proposal", 139 | "index_type": "i64", 140 | "key_names" : ["proposal_name"], 141 | "key_types" : ["name"] 142 | },{ 143 | "name": "approvals", 144 | "type": "approvals_info", 145 | "index_type": "i64", 146 | "key_names" : ["proposal_name"], 147 | "key_types" : ["name"] 148 | } 149 | ], 150 | "ricardian_clauses": [], 151 | "abi_extensions": [] 152 | } 153 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.msig/eosio.msig.abi.hpp: -------------------------------------------------------------------------------- 1 | const char* const eosio_msig_abi = R"=====( 2 | { 3 | "version": "eosio::abi/1.0", 4 | "types": [{ 5 | "new_type_name": "account_name", 6 | "type": "name" 7 | },{ 8 | "new_type_name": "permission_name", 9 | "type": "name" 10 | },{ 11 | "new_type_name": "action_name", 12 | "type": "name" 13 | }], 14 | "structs": [{ 15 | "name": "permission_level", 16 | "base": "", 17 | "fields": [ 18 | {"name": "actor", "type": "account_name"}, 19 | {"name": "permission", "type": "permission_name"} 20 | ] 21 | },{ 22 | "name": "action", 23 | "base": "", 24 | "fields": [ 25 | {"name": "account", "type": "account_name"}, 26 | {"name": "name", "type": "action_name"}, 27 | {"name": "authorization", "type": "permission_level[]"}, 28 | {"name": "data", "type": "bytes"} 29 | ] 30 | },{ 31 | "name": "transaction_header", 32 | "base": "", 33 | "fields": [ 34 | {"name": "expiration", "type": "time_point_sec"}, 35 | {"name": "ref_block_num", "type": "uint16"}, 36 | {"name": "ref_block_prefix", "type": "uint32"}, 37 | {"name": "max_net_usage_words", "type": "varuint32"}, 38 | {"name": "max_cpu_usage_ms", "type": "uint8"}, 39 | {"name": "delay_sec", "type": "varuint32"} 40 | ] 41 | },{ 42 | "name": "extension", 43 | "base": "", 44 | "fields": [ 45 | {"name": "type", "type" : "uint16" }, 46 | {"name": "data", "type": "bytes"} 47 | ] 48 | },{ 49 | "name": "transaction", 50 | "base": "transaction_header", 51 | "fields": [ 52 | {"name": "context_free_actions", "type": "action[]"}, 53 | {"name": "actions", "type": "action[]"}, 54 | {"name": "transaction_extensions", "type": "extension[]"} 55 | ] 56 | },{ 57 | "name": "propose", 58 | "base": "", 59 | "fields": [ 60 | {"name":"proposer", "type":"account_name"}, 61 | {"name":"proposal_name", "type":"name"}, 62 | {"name":"requested", "type":"permission_level[]"}, 63 | {"name":"trx", "type":"transaction"} 64 | ] 65 | },{ 66 | "name": "approve", 67 | "base": "", 68 | "fields": [ 69 | {"name":"proposer", "type":"account_name"}, 70 | {"name":"proposal_name", "type":"name"}, 71 | {"name":"level", "type":"permission_level"} 72 | ] 73 | },{ 74 | "name": "unapprove", 75 | "base": "", 76 | "fields": [ 77 | {"name":"proposer", "type":"account_name"}, 78 | {"name":"proposal_name", "type":"name"}, 79 | {"name":"level", "type":"permission_level"} 80 | ] 81 | },{ 82 | "name": "cancel", 83 | "base": "", 84 | "fields": [ 85 | {"name":"proposer", "type":"account_name"}, 86 | {"name":"proposal_name", "type":"name"}, 87 | {"name":"canceler", "type":"account_name"} 88 | ] 89 | },{ 90 | "name": "exec", 91 | "base": "", 92 | "fields": [ 93 | {"name":"proposer", "type":"account_name"}, 94 | {"name":"proposal_name", "type":"name"}, 95 | {"name":"executer", "type":"account_name"} 96 | ] 97 | },{ 98 | "name": "proposal", 99 | "base": "", 100 | "fields": [ 101 | {"name": "proposal_name", "type": "name"}, 102 | {"name": "packed_transaction", "type": "bytes"} 103 | ] 104 | },{ 105 | "name": "approvals_info", 106 | "base": "", 107 | "fields": [ 108 | {"name": "proposal_name", "type": "name"}, 109 | {"name": "requested_approvals", "type": "permission_level[]"}, 110 | {"name": "provided_approvals", "type": "permission_level[]"} 111 | ] 112 | } 113 | ], 114 | "actions": [{ 115 | "name": "propose", 116 | "type": "propose", 117 | "ricardian_contract": "" 118 | },{ 119 | "name": "approve", 120 | "type": "approve", 121 | "ricardian_contract": "" 122 | },{ 123 | "name": "unapprove", 124 | "type": "unapprove", 125 | "ricardian_contract": "" 126 | }, { 127 | "name": "cancel", 128 | "type": "cancel", 129 | "ricardian_contract": "" 130 | }, { 131 | "name": "exec", 132 | "type": "exec", 133 | "ricardian_contract": "" 134 | } 135 | 136 | ], 137 | "tables": [{ 138 | "name": "proposal", 139 | "type": "proposal", 140 | "index_type": "i64", 141 | "key_names" : ["proposal_name"], 142 | "key_types" : ["name"] 143 | },{ 144 | "name": "approvals", 145 | "type": "approvals_info", 146 | "index_type": "i64", 147 | "key_names" : ["proposal_name"], 148 | "key_types" : ["name"] 149 | } 150 | ], 151 | "ricardian_clauses": [], 152 | "abi_extensions": [] 153 | } 154 | )====="; 155 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.msig/eosio.msig.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/contracts/eosio.msig/eosio.msig.wasm -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.sudo/eosio.sudo.abi: -------------------------------------------------------------------------------- 1 | { 2 | "version": "eosio::abi/1.0", 3 | "types": [{ 4 | "new_type_name": "account_name", 5 | "type": "name" 6 | },{ 7 | "new_type_name": "permission_name", 8 | "type": "name" 9 | },{ 10 | "new_type_name": "action_name", 11 | "type": "name" 12 | }], 13 | "structs": [{ 14 | "name": "permission_level", 15 | "base": "", 16 | "fields": [ 17 | {"name": "actor", "type": "account_name"}, 18 | {"name": "permission", "type": "permission_name"} 19 | ] 20 | },{ 21 | "name": "action", 22 | "base": "", 23 | "fields": [ 24 | {"name": "account", "type": "account_name"}, 25 | {"name": "name", "type": "action_name"}, 26 | {"name": "authorization", "type": "permission_level[]"}, 27 | {"name": "data", "type": "bytes"} 28 | ] 29 | },{ 30 | "name": "transaction_header", 31 | "base": "", 32 | "fields": [ 33 | {"name": "expiration", "type": "time_point_sec"}, 34 | {"name": "ref_block_num", "type": "uint16"}, 35 | {"name": "ref_block_prefix", "type": "uint32"}, 36 | {"name": "max_net_usage_words", "type": "varuint32"}, 37 | {"name": "max_cpu_usage_ms", "type": "uint8"}, 38 | {"name": "delay_sec", "type": "varuint32"} 39 | ] 40 | },{ 41 | "name": "extension", 42 | "base": "", 43 | "fields": [ 44 | {"name": "type", "type" : "uint16" }, 45 | {"name": "data", "type": "bytes"} 46 | ] 47 | },{ 48 | "name": "transaction", 49 | "base": "transaction_header", 50 | "fields": [ 51 | {"name": "context_free_actions", "type": "action[]"}, 52 | {"name": "actions", "type": "action[]"}, 53 | {"name": "transaction_extensions", "type": "extension[]"} 54 | ] 55 | },{ 56 | "name": "exec", 57 | "base": "", 58 | "fields": [ 59 | {"name":"executer", "type":"account_name"}, 60 | {"name":"trx", "type":"transaction"} 61 | ] 62 | } 63 | ], 64 | "actions": [{ 65 | "name": "exec", 66 | "type": "exec", 67 | "ricardian_contract": "" 68 | } 69 | ], 70 | "tables": [], 71 | "ricardian_clauses": [], 72 | "abi_extensions": [] 73 | } 74 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.sudo/eosio.sudo.abi.hpp: -------------------------------------------------------------------------------- 1 | const char* const eosio_sudo_abi = R"=====( 2 | { 3 | "version": "eosio::abi/1.0", 4 | "types": [{ 5 | "new_type_name": "account_name", 6 | "type": "name" 7 | },{ 8 | "new_type_name": "permission_name", 9 | "type": "name" 10 | },{ 11 | "new_type_name": "action_name", 12 | "type": "name" 13 | }], 14 | "structs": [{ 15 | "name": "permission_level", 16 | "base": "", 17 | "fields": [ 18 | {"name": "actor", "type": "account_name"}, 19 | {"name": "permission", "type": "permission_name"} 20 | ] 21 | },{ 22 | "name": "action", 23 | "base": "", 24 | "fields": [ 25 | {"name": "account", "type": "account_name"}, 26 | {"name": "name", "type": "action_name"}, 27 | {"name": "authorization", "type": "permission_level[]"}, 28 | {"name": "data", "type": "bytes"} 29 | ] 30 | },{ 31 | "name": "transaction_header", 32 | "base": "", 33 | "fields": [ 34 | {"name": "expiration", "type": "time_point_sec"}, 35 | {"name": "ref_block_num", "type": "uint16"}, 36 | {"name": "ref_block_prefix", "type": "uint32"}, 37 | {"name": "max_net_usage_words", "type": "varuint32"}, 38 | {"name": "max_cpu_usage_ms", "type": "uint8"}, 39 | {"name": "delay_sec", "type": "varuint32"} 40 | ] 41 | },{ 42 | "name": "extension", 43 | "base": "", 44 | "fields": [ 45 | {"name": "type", "type" : "uint16" }, 46 | {"name": "data", "type": "bytes"} 47 | ] 48 | },{ 49 | "name": "transaction", 50 | "base": "transaction_header", 51 | "fields": [ 52 | {"name": "context_free_actions", "type": "action[]"}, 53 | {"name": "actions", "type": "action[]"}, 54 | {"name": "transaction_extensions", "type": "extension[]"} 55 | ] 56 | },{ 57 | "name": "exec", 58 | "base": "", 59 | "fields": [ 60 | {"name":"executer", "type":"account_name"}, 61 | {"name":"trx", "type":"transaction"} 62 | ] 63 | } 64 | ], 65 | "actions": [{ 66 | "name": "exec", 67 | "type": "exec", 68 | "ricardian_contract": "" 69 | } 70 | ], 71 | "tables": [], 72 | "ricardian_clauses": [], 73 | "abi_extensions": [] 74 | } 75 | )====="; 76 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.sudo/eosio.sudo.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/contracts/eosio.sudo/eosio.sudo.wasm -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.system/eosio.system.abi: -------------------------------------------------------------------------------- 1 | { 2 | "version": "eosio::abi/1.0", 3 | "types": [{ 4 | "new_type_name": "account_name", 5 | "type": "name" 6 | },{ 7 | "new_type_name": "permission_name", 8 | "type": "name" 9 | },{ 10 | "new_type_name": "action_name", 11 | "type": "name" 12 | },{ 13 | "new_type_name": "transaction_id_type", 14 | "type": "checksum256" 15 | },{ 16 | "new_type_name": "weight_type", 17 | "type": "uint16" 18 | }], 19 | "____comment": "eosio.bios structs: set_account_limits, setpriv, set_global_limits, producer_key, set_producers, require_auth are provided so abi available for deserialization in future.", 20 | "structs": [{ 21 | "name": "permission_level", 22 | "base": "", 23 | "fields": [ 24 | {"name":"actor", "type":"account_name"}, 25 | {"name":"permission", "type":"permission_name"} 26 | ] 27 | },{ 28 | "name": "key_weight", 29 | "base": "", 30 | "fields": [ 31 | {"name":"key", "type":"public_key"}, 32 | {"name":"weight", "type":"weight_type"} 33 | ] 34 | },{ 35 | "name": "bidname", 36 | "base": "", 37 | "fields": [ 38 | {"name":"bidder", "type":"account_name"}, 39 | {"name":"newname", "type":"account_name"}, 40 | {"name":"bid", "type":"asset"} 41 | ] 42 | },{ 43 | "name": "permission_level_weight", 44 | "base": "", 45 | "fields": [ 46 | {"name":"permission", "type":"permission_level"}, 47 | {"name":"weight", "type":"weight_type"} 48 | ] 49 | },{ 50 | "name": "wait_weight", 51 | "base": "", 52 | "fields": [ 53 | {"name":"wait_sec", "type":"uint32"}, 54 | {"name":"weight", "type":"weight_type"} 55 | ] 56 | },{ 57 | "name": "authority", 58 | "base": "", 59 | "fields": [ 60 | {"name":"threshold", "type":"uint32"}, 61 | {"name":"keys", "type":"key_weight[]"}, 62 | {"name":"accounts", "type":"permission_level_weight[]"}, 63 | {"name":"waits", "type":"wait_weight[]"} 64 | ] 65 | },{ 66 | "name": "newaccount", 67 | "base": "", 68 | "fields": [ 69 | {"name":"creator", "type":"account_name"}, 70 | {"name":"name", "type":"account_name"}, 71 | {"name":"owner", "type":"authority"}, 72 | {"name":"active", "type":"authority"} 73 | ] 74 | },{ 75 | "name": "setcode", 76 | "base": "", 77 | "fields": [ 78 | {"name":"account", "type":"account_name"}, 79 | {"name":"vmtype", "type":"uint8"}, 80 | {"name":"vmversion", "type":"uint8"}, 81 | {"name":"code", "type":"bytes"} 82 | ] 83 | },{ 84 | "name": "setabi", 85 | "base": "", 86 | "fields": [ 87 | {"name":"account", "type":"account_name"}, 88 | {"name":"abi", "type":"bytes"} 89 | ] 90 | },{ 91 | "name": "updateauth", 92 | "base": "", 93 | "fields": [ 94 | {"name":"account", "type":"account_name"}, 95 | {"name":"permission", "type":"permission_name"}, 96 | {"name":"parent", "type":"permission_name"}, 97 | {"name":"auth", "type":"authority"} 98 | ] 99 | },{ 100 | "name": "deleteauth", 101 | "base": "", 102 | "fields": [ 103 | {"name":"account", "type":"account_name"}, 104 | {"name":"permission", "type":"permission_name"} 105 | ] 106 | },{ 107 | "name": "linkauth", 108 | "base": "", 109 | "fields": [ 110 | {"name":"account", "type":"account_name"}, 111 | {"name":"code", "type":"account_name"}, 112 | {"name":"type", "type":"action_name"}, 113 | {"name":"requirement", "type":"permission_name"} 114 | ] 115 | },{ 116 | "name": "unlinkauth", 117 | "base": "", 118 | "fields": [ 119 | {"name":"account", "type":"account_name"}, 120 | {"name":"code", "type":"account_name"}, 121 | {"name":"type", "type":"action_name"} 122 | ] 123 | },{ 124 | "name": "canceldelay", 125 | "base": "", 126 | "fields": [ 127 | {"name":"canceling_auth", "type":"permission_level"}, 128 | {"name":"trx_id", "type":"transaction_id_type"} 129 | ] 130 | },{ 131 | "name": "onerror", 132 | "base": "", 133 | "fields": [ 134 | {"name":"sender_id", "type":"uint128"}, 135 | {"name":"sent_trx", "type":"bytes"} 136 | ] 137 | },{ 138 | "name": "buyrambytes", 139 | "base": "", 140 | "fields": [ 141 | {"name":"payer", "type":"account_name"}, 142 | {"name":"receiver", "type":"account_name"}, 143 | {"name":"bytes", "type":"uint32"} 144 | ] 145 | },{ 146 | "name": "sellram", 147 | "base": "", 148 | "fields": [ 149 | {"name":"account", "type":"account_name"}, 150 | {"name":"bytes", "type":"uint64"} 151 | ] 152 | },{ 153 | "name": "buyram", 154 | "base": "", 155 | "fields": [ 156 | {"name":"payer", "type":"account_name"}, 157 | {"name":"receiver", "type":"account_name"}, 158 | {"name":"quant", "type":"asset"} 159 | ] 160 | },{ 161 | "name": "delegatebw", 162 | "base": "", 163 | "fields": [ 164 | {"name":"from", "type":"account_name"}, 165 | {"name":"receiver", "type":"account_name"}, 166 | {"name":"stake_net_quantity", "type":"asset"}, 167 | {"name":"stake_cpu_quantity", "type":"asset"}, 168 | {"name":"transfer", "type":"bool"} 169 | ] 170 | },{ 171 | "name": "undelegatebw", 172 | "base": "", 173 | "fields": [ 174 | {"name":"from", "type":"account_name"}, 175 | {"name":"receiver", "type":"account_name"}, 176 | {"name":"unstake_net_quantity", "type":"asset"}, 177 | {"name":"unstake_cpu_quantity", "type":"asset"} 178 | ] 179 | },{ 180 | "name": "refund", 181 | "base": "", 182 | "fields": [ 183 | {"name":"owner", "type":"account_name"} 184 | ] 185 | },{ 186 | "name": "delegated_bandwidth", 187 | "base": "", 188 | "fields": [ 189 | {"name":"from", "type":"account_name"}, 190 | {"name":"to", "type":"account_name"}, 191 | {"name":"net_weight", "type":"asset"}, 192 | {"name":"cpu_weight", "type":"asset"} 193 | ] 194 | },{ 195 | "name": "user_resources", 196 | "base": "", 197 | "fields": [ 198 | {"name":"owner", "type":"account_name"}, 199 | {"name":"net_weight", "type":"asset"}, 200 | {"name":"cpu_weight", "type":"asset"}, 201 | {"name":"ram_bytes", "type":"uint64"} 202 | ] 203 | },{ 204 | "name": "total_resources", 205 | "base": "", 206 | "fields": [ 207 | {"name":"owner", "type":"account_name"}, 208 | {"name":"net_weight", "type":"asset"}, 209 | {"name":"cpu_weight", "type":"asset"}, 210 | {"name":"ram_bytes", "type":"uint64"} 211 | ] 212 | },{ 213 | "name": "refund_request", 214 | "base": "", 215 | "fields": [ 216 | {"name":"owner", "type":"account_name"}, 217 | {"name":"request_time", "type":"time_point_sec"}, 218 | {"name":"net_amount", "type":"asset"}, 219 | {"name":"cpu_amount", "type":"asset"} 220 | ] 221 | },{ 222 | "name": "blockchain_parameters", 223 | "base": "", 224 | "fields": [ 225 | 226 | {"name":"max_block_net_usage", "type":"uint64"}, 227 | {"name":"target_block_net_usage_pct", "type":"uint32"}, 228 | {"name":"max_transaction_net_usage", "type":"uint32"}, 229 | {"name":"base_per_transaction_net_usage", "type":"uint32"}, 230 | {"name":"net_usage_leeway", "type":"uint32"}, 231 | {"name":"context_free_discount_net_usage_num", "type":"uint32"}, 232 | {"name":"context_free_discount_net_usage_den", "type":"uint32"}, 233 | {"name":"max_block_cpu_usage", "type":"uint32"}, 234 | {"name":"target_block_cpu_usage_pct", "type":"uint32"}, 235 | {"name":"max_transaction_cpu_usage", "type":"uint32"}, 236 | {"name":"min_transaction_cpu_usage", "type":"uint32"}, 237 | {"name":"max_transaction_lifetime", "type":"uint32"}, 238 | {"name":"deferred_trx_expiration_window", "type":"uint32"}, 239 | {"name":"max_transaction_delay", "type":"uint32"}, 240 | {"name":"max_inline_action_size", "type":"uint32"}, 241 | {"name":"max_inline_action_depth", "type":"uint16"}, 242 | {"name":"max_authority_depth", "type":"uint16"} 243 | 244 | ] 245 | },{ 246 | "name": "eosio_global_state", 247 | "base": "blockchain_parameters", 248 | "fields": [ 249 | {"name":"max_ram_size", "type":"uint64"}, 250 | {"name":"total_ram_bytes_reserved", "type":"uint64"}, 251 | {"name":"total_ram_stake", "type":"int64"}, 252 | {"name":"last_producer_schedule_update", "type":"block_timestamp_type"}, 253 | {"name":"last_pervote_bucket_fill", "type":"uint64"}, 254 | {"name":"pervote_bucket", "type":"int64"}, 255 | {"name":"perblock_bucket", "type":"int64"}, 256 | {"name":"total_unpaid_blocks", "type":"uint32"}, 257 | {"name":"total_activated_stake", "type":"int64"}, 258 | {"name":"thresh_activated_stake_time", "type":"uint64"}, 259 | {"name":"last_producer_schedule_size", "type":"uint16"}, 260 | {"name":"total_producer_vote_weight", "type":"float64"}, 261 | {"name":"last_name_close", "type":"block_timestamp_type"} 262 | ] 263 | },{ 264 | "name": "producer_info", 265 | "base": "", 266 | "fields": [ 267 | {"name":"owner", "type":"account_name"}, 268 | {"name":"total_votes", "type":"float64"}, 269 | {"name":"producer_key", "type":"public_key"}, 270 | {"name":"is_active", "type":"bool"}, 271 | {"name":"url", "type":"string"}, 272 | {"name":"unpaid_blocks", "type":"uint32"}, 273 | {"name":"last_claim_time", "type":"uint64"}, 274 | {"name":"location", "type":"uint16"} 275 | ] 276 | },{ 277 | "name": "regproducer", 278 | "base": "", 279 | "fields": [ 280 | {"name":"producer", "type":"account_name"}, 281 | {"name":"producer_key", "type":"public_key"}, 282 | {"name":"url", "type":"string"}, 283 | {"name":"location", "type":"uint16"} 284 | ] 285 | },{ 286 | "name": "unregprod", 287 | "base": "", 288 | "fields": [ 289 | {"name":"producer", "type":"account_name"} 290 | ] 291 | },{ 292 | "name": "setram", 293 | "base": "", 294 | "fields": [ 295 | {"name":"max_ram_size", "type":"uint64"} 296 | ] 297 | },{ 298 | "name": "regproxy", 299 | "base": "", 300 | "fields": [ 301 | {"name":"proxy", "type":"account_name"}, 302 | {"name":"isproxy", "type":"bool"} 303 | ] 304 | },{ 305 | "name": "voteproducer", 306 | "base": "", 307 | "fields": [ 308 | {"name":"voter", "type":"account_name"}, 309 | {"name":"proxy", "type":"account_name"}, 310 | {"name":"producers", "type":"account_name[]"} 311 | ] 312 | },{ 313 | "name": "voter_info", 314 | "base": "", 315 | "fields": [ 316 | {"name":"owner", "type":"account_name"}, 317 | {"name":"proxy", "type":"account_name"}, 318 | {"name":"producers", "type":"account_name[]"}, 319 | {"name":"staked", "type":"int64"}, 320 | {"name":"last_vote_weight", "type":"float64"}, 321 | {"name":"proxied_vote_weight", "type":"float64"}, 322 | {"name":"is_proxy", "type":"bool"} 323 | ] 324 | },{ 325 | "name": "claimrewards", 326 | "base": "", 327 | "fields": [ 328 | {"name":"owner", "type":"account_name"} 329 | ] 330 | },{ 331 | "name": "setpriv", 332 | "base": "", 333 | "fields": [ 334 | {"name":"account", "type":"account_name"}, 335 | {"name":"is_priv", "type":"int8"} 336 | ] 337 | },{ 338 | "name": "rmvproducer", 339 | "base": "", 340 | "fields": [ 341 | {"name":"producer", "type":"account_name"} 342 | ] 343 | },{ 344 | "name": "set_account_limits", 345 | "base": "", 346 | "fields": [ 347 | {"name":"account", "type":"account_name"}, 348 | {"name":"ram_bytes", "type":"int64"}, 349 | {"name":"net_weight", "type":"int64"}, 350 | {"name":"cpu_weight", "type":"int64"} 351 | ] 352 | },{ 353 | "name": "set_global_limits", 354 | "base": "", 355 | "fields": [ 356 | {"name":"cpu_usec_per_period", "type":"int64"} 357 | ] 358 | },{ 359 | "name": "producer_key", 360 | "base": "", 361 | "fields": [ 362 | {"name":"producer_name", "type":"account_name"}, 363 | {"name":"block_signing_key", "type":"public_key"} 364 | ] 365 | },{ 366 | "name": "set_producers", 367 | "base": "", 368 | "fields": [ 369 | {"name":"schedule", "type":"producer_key[]"} 370 | ] 371 | },{ 372 | "name": "require_auth", 373 | "base": "", 374 | "fields": [ 375 | {"name":"from", "type":"account_name"} 376 | ] 377 | },{ 378 | "name": "setparams", 379 | "base": "", 380 | "fields": [ 381 | {"name":"params", "type":"blockchain_parameters"} 382 | ] 383 | },{ 384 | "name": "connector", 385 | "base": "", 386 | "fields": [ 387 | {"name":"balance", "type":"asset"}, 388 | {"name":"weight", "type":"float64"} 389 | ] 390 | },{ 391 | "name": "exchange_state", 392 | "base": "", 393 | "fields": [ 394 | {"name":"supply", "type":"asset"}, 395 | {"name":"base", "type":"connector"}, 396 | {"name":"quote", "type":"connector"} 397 | ] 398 | }, { 399 | "name": "namebid_info", 400 | "base": "", 401 | "fields": [ 402 | {"name":"newname", "type":"account_name"}, 403 | {"name":"high_bidder", "type":"account_name"}, 404 | {"name":"high_bid", "type":"int64"}, 405 | {"name":"last_bid_time", "type":"uint64"} 406 | ] 407 | } 408 | ], 409 | "actions": [{ 410 | "name": "newaccount", 411 | "type": "newaccount", 412 | "ricardian_contract": "" 413 | },{ 414 | "name": "setcode", 415 | "type": "setcode", 416 | "ricardian_contract": "" 417 | },{ 418 | "name": "setabi", 419 | "type": "setabi", 420 | "ricardian_contract": "" 421 | },{ 422 | "name": "updateauth", 423 | "type": "updateauth", 424 | "ricardian_contract": "" 425 | },{ 426 | "name": "deleteauth", 427 | "type": "deleteauth", 428 | "ricardian_contract": "" 429 | },{ 430 | "name": "linkauth", 431 | "type": "linkauth", 432 | "ricardian_contract": "" 433 | },{ 434 | "name": "unlinkauth", 435 | "type": "unlinkauth", 436 | "ricardian_contract": "" 437 | },{ 438 | "name": "canceldelay", 439 | "type": "canceldelay", 440 | "ricardian_contract": "" 441 | },{ 442 | "name": "onerror", 443 | "type": "onerror", 444 | "ricardian_contract": "" 445 | },{ 446 | "name": "buyrambytes", 447 | "type": "buyrambytes", 448 | "ricardian_contract": "" 449 | },{ 450 | "name": "buyram", 451 | "type": "buyram", 452 | "ricardian_contract": "" 453 | },{ 454 | "name": "sellram", 455 | "type": "sellram", 456 | "ricardian_contract": "" 457 | },{ 458 | "name": "delegatebw", 459 | "type": "delegatebw", 460 | "ricardian_contract": "" 461 | },{ 462 | "name": "undelegatebw", 463 | "type": "undelegatebw", 464 | "ricardian_contract": "" 465 | },{ 466 | "name": "refund", 467 | "type": "refund", 468 | "ricardian_contract": "" 469 | },{ 470 | "name": "regproducer", 471 | "type": "regproducer", 472 | "ricardian_contract": "" 473 | },{ 474 | "name": "setram", 475 | "type": "setram", 476 | "ricardian_contract": "" 477 | },{ 478 | "name": "bidname", 479 | "type": "bidname", 480 | "ricardian_contract": "" 481 | },{ 482 | "name": "unregprod", 483 | "type": "unregprod", 484 | "ricardian_contract": "" 485 | },{ 486 | "name": "regproxy", 487 | "type": "regproxy", 488 | "ricardian_contract": "" 489 | },{ 490 | "name": "voteproducer", 491 | "type": "voteproducer", 492 | "ricardian_contract": "" 493 | },{ 494 | "name": "claimrewards", 495 | "type": "claimrewards", 496 | "ricardian_contract": "" 497 | },{ 498 | "name": "setpriv", 499 | "type": "setpriv", 500 | "ricardian_contract": "" 501 | },{ 502 | "name": "rmvproducer", 503 | "type": "rmvproducer", 504 | "ricardian_contract": "" 505 | },{ 506 | "name": "setalimits", 507 | "type": "set_account_limits", 508 | "ricardian_contract": "" 509 | },{ 510 | "name": "setglimits", 511 | "type": "set_global_limits", 512 | "ricardian_contract": "" 513 | },{ 514 | "name": "setprods", 515 | "type": "set_producers", 516 | "ricardian_contract": "" 517 | },{ 518 | "name": "reqauth", 519 | "type": "require_auth", 520 | "ricardian_contract": "" 521 | },{ 522 | "name": "setparams", 523 | "type": "setparams", 524 | "ricardian_contract": "" 525 | }], 526 | "tables": [{ 527 | "name": "producers", 528 | "type": "producer_info", 529 | "index_type": "i64", 530 | "key_names" : ["owner"], 531 | "key_types" : ["uint64"] 532 | },{ 533 | "name": "global", 534 | "type": "eosio_global_state", 535 | "index_type": "i64", 536 | "key_names" : [], 537 | "key_types" : [] 538 | },{ 539 | "name": "voters", 540 | "type": "voter_info", 541 | "index_type": "i64", 542 | "key_names" : ["owner"], 543 | "key_types" : ["account_name"] 544 | },{ 545 | "name": "userres", 546 | "type": "user_resources", 547 | "index_type": "i64", 548 | "key_names" : ["owner"], 549 | "key_types" : ["uint64"] 550 | },{ 551 | "name": "delband", 552 | "type": "delegated_bandwidth", 553 | "index_type": "i64", 554 | "key_names" : ["to"], 555 | "key_types" : ["uint64"] 556 | },{ 557 | "name": "rammarket", 558 | "type": "exchange_state", 559 | "index_type": "i64", 560 | "key_names" : ["supply"], 561 | "key_types" : ["uint64"] 562 | },{ 563 | "name": "refunds", 564 | "type": "refund_request", 565 | "index_type": "i64", 566 | "key_names" : ["owner"], 567 | "key_types" : ["uint64"] 568 | },{ 569 | "name": "namebids", 570 | "type": "namebid_info", 571 | "index_type": "i64", 572 | "key_names" : ["newname"], 573 | "key_types" : ["account_name"] 574 | } 575 | ], 576 | "ricardian_clauses": [], 577 | "abi_extensions": [] 578 | } 579 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.system/eosio.system.abi.hpp: -------------------------------------------------------------------------------- 1 | const char* const eosio_system_abi = R"=====( 2 | { 3 | "version": "eosio::abi/1.0", 4 | "types": [{ 5 | "new_type_name": "account_name", 6 | "type": "name" 7 | },{ 8 | "new_type_name": "permission_name", 9 | "type": "name" 10 | },{ 11 | "new_type_name": "action_name", 12 | "type": "name" 13 | },{ 14 | "new_type_name": "transaction_id_type", 15 | "type": "checksum256" 16 | },{ 17 | "new_type_name": "weight_type", 18 | "type": "uint16" 19 | }], 20 | "____comment": "eosio.bios structs: set_account_limits, setpriv, set_global_limits, producer_key, set_producers, require_auth are provided so abi available for deserialization in future.", 21 | "structs": [{ 22 | "name": "permission_level", 23 | "base": "", 24 | "fields": [ 25 | {"name":"actor", "type":"account_name"}, 26 | {"name":"permission", "type":"permission_name"} 27 | ] 28 | },{ 29 | "name": "key_weight", 30 | "base": "", 31 | "fields": [ 32 | {"name":"key", "type":"public_key"}, 33 | {"name":"weight", "type":"weight_type"} 34 | ] 35 | },{ 36 | "name": "bidname", 37 | "base": "", 38 | "fields": [ 39 | {"name":"bidder", "type":"account_name"}, 40 | {"name":"newname", "type":"account_name"}, 41 | {"name":"bid", "type":"asset"} 42 | ] 43 | },{ 44 | "name": "permission_level_weight", 45 | "base": "", 46 | "fields": [ 47 | {"name":"permission", "type":"permission_level"}, 48 | {"name":"weight", "type":"weight_type"} 49 | ] 50 | },{ 51 | "name": "wait_weight", 52 | "base": "", 53 | "fields": [ 54 | {"name":"wait_sec", "type":"uint32"}, 55 | {"name":"weight", "type":"weight_type"} 56 | ] 57 | },{ 58 | "name": "authority", 59 | "base": "", 60 | "fields": [ 61 | {"name":"threshold", "type":"uint32"}, 62 | {"name":"keys", "type":"key_weight[]"}, 63 | {"name":"accounts", "type":"permission_level_weight[]"}, 64 | {"name":"waits", "type":"wait_weight[]"} 65 | ] 66 | },{ 67 | "name": "newaccount", 68 | "base": "", 69 | "fields": [ 70 | {"name":"creator", "type":"account_name"}, 71 | {"name":"name", "type":"account_name"}, 72 | {"name":"owner", "type":"authority"}, 73 | {"name":"active", "type":"authority"} 74 | ] 75 | },{ 76 | "name": "setcode", 77 | "base": "", 78 | "fields": [ 79 | {"name":"account", "type":"account_name"}, 80 | {"name":"vmtype", "type":"uint8"}, 81 | {"name":"vmversion", "type":"uint8"}, 82 | {"name":"code", "type":"bytes"} 83 | ] 84 | },{ 85 | "name": "setabi", 86 | "base": "", 87 | "fields": [ 88 | {"name":"account", "type":"account_name"}, 89 | {"name":"abi", "type":"bytes"} 90 | ] 91 | },{ 92 | "name": "updateauth", 93 | "base": "", 94 | "fields": [ 95 | {"name":"account", "type":"account_name"}, 96 | {"name":"permission", "type":"permission_name"}, 97 | {"name":"parent", "type":"permission_name"}, 98 | {"name":"auth", "type":"authority"} 99 | ] 100 | },{ 101 | "name": "deleteauth", 102 | "base": "", 103 | "fields": [ 104 | {"name":"account", "type":"account_name"}, 105 | {"name":"permission", "type":"permission_name"} 106 | ] 107 | },{ 108 | "name": "linkauth", 109 | "base": "", 110 | "fields": [ 111 | {"name":"account", "type":"account_name"}, 112 | {"name":"code", "type":"account_name"}, 113 | {"name":"type", "type":"action_name"}, 114 | {"name":"requirement", "type":"permission_name"} 115 | ] 116 | },{ 117 | "name": "unlinkauth", 118 | "base": "", 119 | "fields": [ 120 | {"name":"account", "type":"account_name"}, 121 | {"name":"code", "type":"account_name"}, 122 | {"name":"type", "type":"action_name"} 123 | ] 124 | },{ 125 | "name": "canceldelay", 126 | "base": "", 127 | "fields": [ 128 | {"name":"canceling_auth", "type":"permission_level"}, 129 | {"name":"trx_id", "type":"transaction_id_type"} 130 | ] 131 | },{ 132 | "name": "onerror", 133 | "base": "", 134 | "fields": [ 135 | {"name":"sender_id", "type":"uint128"}, 136 | {"name":"sent_trx", "type":"bytes"} 137 | ] 138 | },{ 139 | "name": "buyrambytes", 140 | "base": "", 141 | "fields": [ 142 | {"name":"payer", "type":"account_name"}, 143 | {"name":"receiver", "type":"account_name"}, 144 | {"name":"bytes", "type":"uint32"} 145 | ] 146 | },{ 147 | "name": "sellram", 148 | "base": "", 149 | "fields": [ 150 | {"name":"account", "type":"account_name"}, 151 | {"name":"bytes", "type":"uint64"} 152 | ] 153 | },{ 154 | "name": "buyram", 155 | "base": "", 156 | "fields": [ 157 | {"name":"payer", "type":"account_name"}, 158 | {"name":"receiver", "type":"account_name"}, 159 | {"name":"quant", "type":"asset"} 160 | ] 161 | },{ 162 | "name": "delegatebw", 163 | "base": "", 164 | "fields": [ 165 | {"name":"from", "type":"account_name"}, 166 | {"name":"receiver", "type":"account_name"}, 167 | {"name":"stake_net_quantity", "type":"asset"}, 168 | {"name":"stake_cpu_quantity", "type":"asset"}, 169 | {"name":"transfer", "type":"bool"} 170 | ] 171 | },{ 172 | "name": "undelegatebw", 173 | "base": "", 174 | "fields": [ 175 | {"name":"from", "type":"account_name"}, 176 | {"name":"receiver", "type":"account_name"}, 177 | {"name":"unstake_net_quantity", "type":"asset"}, 178 | {"name":"unstake_cpu_quantity", "type":"asset"} 179 | ] 180 | },{ 181 | "name": "refund", 182 | "base": "", 183 | "fields": [ 184 | {"name":"owner", "type":"account_name"} 185 | ] 186 | },{ 187 | "name": "delegated_bandwidth", 188 | "base": "", 189 | "fields": [ 190 | {"name":"from", "type":"account_name"}, 191 | {"name":"to", "type":"account_name"}, 192 | {"name":"net_weight", "type":"asset"}, 193 | {"name":"cpu_weight", "type":"asset"} 194 | ] 195 | },{ 196 | "name": "user_resources", 197 | "base": "", 198 | "fields": [ 199 | {"name":"owner", "type":"account_name"}, 200 | {"name":"net_weight", "type":"asset"}, 201 | {"name":"cpu_weight", "type":"asset"}, 202 | {"name":"ram_bytes", "type":"uint64"} 203 | ] 204 | },{ 205 | "name": "total_resources", 206 | "base": "", 207 | "fields": [ 208 | {"name":"owner", "type":"account_name"}, 209 | {"name":"net_weight", "type":"asset"}, 210 | {"name":"cpu_weight", "type":"asset"}, 211 | {"name":"ram_bytes", "type":"uint64"} 212 | ] 213 | },{ 214 | "name": "refund_request", 215 | "base": "", 216 | "fields": [ 217 | {"name":"owner", "type":"account_name"}, 218 | {"name":"request_time", "type":"time_point_sec"}, 219 | {"name":"net_amount", "type":"asset"}, 220 | {"name":"cpu_amount", "type":"asset"} 221 | ] 222 | },{ 223 | "name": "blockchain_parameters", 224 | "base": "", 225 | "fields": [ 226 | 227 | {"name":"max_block_net_usage", "type":"uint64"}, 228 | {"name":"target_block_net_usage_pct", "type":"uint32"}, 229 | {"name":"max_transaction_net_usage", "type":"uint32"}, 230 | {"name":"base_per_transaction_net_usage", "type":"uint32"}, 231 | {"name":"net_usage_leeway", "type":"uint32"}, 232 | {"name":"context_free_discount_net_usage_num", "type":"uint32"}, 233 | {"name":"context_free_discount_net_usage_den", "type":"uint32"}, 234 | {"name":"max_block_cpu_usage", "type":"uint32"}, 235 | {"name":"target_block_cpu_usage_pct", "type":"uint32"}, 236 | {"name":"max_transaction_cpu_usage", "type":"uint32"}, 237 | {"name":"min_transaction_cpu_usage", "type":"uint32"}, 238 | {"name":"max_transaction_lifetime", "type":"uint32"}, 239 | {"name":"deferred_trx_expiration_window", "type":"uint32"}, 240 | {"name":"max_transaction_delay", "type":"uint32"}, 241 | {"name":"max_inline_action_size", "type":"uint32"}, 242 | {"name":"max_inline_action_depth", "type":"uint16"}, 243 | {"name":"max_authority_depth", "type":"uint16"} 244 | 245 | ] 246 | },{ 247 | "name": "eosio_global_state", 248 | "base": "blockchain_parameters", 249 | "fields": [ 250 | {"name":"max_ram_size", "type":"uint64"}, 251 | {"name":"total_ram_bytes_reserved", "type":"uint64"}, 252 | {"name":"total_ram_stake", "type":"int64"}, 253 | {"name":"last_producer_schedule_update", "type":"block_timestamp_type"}, 254 | {"name":"last_pervote_bucket_fill", "type":"uint64"}, 255 | {"name":"pervote_bucket", "type":"int64"}, 256 | {"name":"perblock_bucket", "type":"int64"}, 257 | {"name":"total_unpaid_blocks", "type":"uint32"}, 258 | {"name":"total_activated_stake", "type":"int64"}, 259 | {"name":"thresh_activated_stake_time", "type":"uint64"}, 260 | {"name":"last_producer_schedule_size", "type":"uint16"}, 261 | {"name":"total_producer_vote_weight", "type":"float64"}, 262 | {"name":"last_name_close", "type":"block_timestamp_type"} 263 | ] 264 | },{ 265 | "name": "producer_info", 266 | "base": "", 267 | "fields": [ 268 | {"name":"owner", "type":"account_name"}, 269 | {"name":"total_votes", "type":"float64"}, 270 | {"name":"producer_key", "type":"public_key"}, 271 | {"name":"is_active", "type":"bool"}, 272 | {"name":"url", "type":"string"}, 273 | {"name":"unpaid_blocks", "type":"uint32"}, 274 | {"name":"last_claim_time", "type":"uint64"}, 275 | {"name":"location", "type":"uint16"} 276 | ] 277 | },{ 278 | "name": "regproducer", 279 | "base": "", 280 | "fields": [ 281 | {"name":"producer", "type":"account_name"}, 282 | {"name":"producer_key", "type":"public_key"}, 283 | {"name":"url", "type":"string"}, 284 | {"name":"location", "type":"uint16"} 285 | ] 286 | },{ 287 | "name": "unregprod", 288 | "base": "", 289 | "fields": [ 290 | {"name":"producer", "type":"account_name"} 291 | ] 292 | },{ 293 | "name": "setram", 294 | "base": "", 295 | "fields": [ 296 | {"name":"max_ram_size", "type":"uint64"} 297 | ] 298 | },{ 299 | "name": "regproxy", 300 | "base": "", 301 | "fields": [ 302 | {"name":"proxy", "type":"account_name"}, 303 | {"name":"isproxy", "type":"bool"} 304 | ] 305 | },{ 306 | "name": "voteproducer", 307 | "base": "", 308 | "fields": [ 309 | {"name":"voter", "type":"account_name"}, 310 | {"name":"proxy", "type":"account_name"}, 311 | {"name":"producers", "type":"account_name[]"} 312 | ] 313 | },{ 314 | "name": "voter_info", 315 | "base": "", 316 | "fields": [ 317 | {"name":"owner", "type":"account_name"}, 318 | {"name":"proxy", "type":"account_name"}, 319 | {"name":"producers", "type":"account_name[]"}, 320 | {"name":"staked", "type":"int64"}, 321 | {"name":"last_vote_weight", "type":"float64"}, 322 | {"name":"proxied_vote_weight", "type":"float64"}, 323 | {"name":"is_proxy", "type":"bool"} 324 | ] 325 | },{ 326 | "name": "claimrewards", 327 | "base": "", 328 | "fields": [ 329 | {"name":"owner", "type":"account_name"} 330 | ] 331 | },{ 332 | "name": "setpriv", 333 | "base": "", 334 | "fields": [ 335 | {"name":"account", "type":"account_name"}, 336 | {"name":"is_priv", "type":"int8"} 337 | ] 338 | },{ 339 | "name": "rmvproducer", 340 | "base": "", 341 | "fields": [ 342 | {"name":"producer", "type":"account_name"} 343 | ] 344 | },{ 345 | "name": "set_account_limits", 346 | "base": "", 347 | "fields": [ 348 | {"name":"account", "type":"account_name"}, 349 | {"name":"ram_bytes", "type":"int64"}, 350 | {"name":"net_weight", "type":"int64"}, 351 | {"name":"cpu_weight", "type":"int64"} 352 | ] 353 | },{ 354 | "name": "set_global_limits", 355 | "base": "", 356 | "fields": [ 357 | {"name":"cpu_usec_per_period", "type":"int64"} 358 | ] 359 | },{ 360 | "name": "producer_key", 361 | "base": "", 362 | "fields": [ 363 | {"name":"producer_name", "type":"account_name"}, 364 | {"name":"block_signing_key", "type":"public_key"} 365 | ] 366 | },{ 367 | "name": "set_producers", 368 | "base": "", 369 | "fields": [ 370 | {"name":"schedule", "type":"producer_key[]"} 371 | ] 372 | },{ 373 | "name": "require_auth", 374 | "base": "", 375 | "fields": [ 376 | {"name":"from", "type":"account_name"} 377 | ] 378 | },{ 379 | "name": "setparams", 380 | "base": "", 381 | "fields": [ 382 | {"name":"params", "type":"blockchain_parameters"} 383 | ] 384 | },{ 385 | "name": "connector", 386 | "base": "", 387 | "fields": [ 388 | {"name":"balance", "type":"asset"}, 389 | {"name":"weight", "type":"float64"} 390 | ] 391 | },{ 392 | "name": "exchange_state", 393 | "base": "", 394 | "fields": [ 395 | {"name":"supply", "type":"asset"}, 396 | {"name":"base", "type":"connector"}, 397 | {"name":"quote", "type":"connector"} 398 | ] 399 | }, { 400 | "name": "namebid_info", 401 | "base": "", 402 | "fields": [ 403 | {"name":"newname", "type":"account_name"}, 404 | {"name":"high_bidder", "type":"account_name"}, 405 | {"name":"high_bid", "type":"int64"}, 406 | {"name":"last_bid_time", "type":"uint64"} 407 | ] 408 | } 409 | ], 410 | "actions": [{ 411 | "name": "newaccount", 412 | "type": "newaccount", 413 | "ricardian_contract": "" 414 | },{ 415 | "name": "setcode", 416 | "type": "setcode", 417 | "ricardian_contract": "" 418 | },{ 419 | "name": "setabi", 420 | "type": "setabi", 421 | "ricardian_contract": "" 422 | },{ 423 | "name": "updateauth", 424 | "type": "updateauth", 425 | "ricardian_contract": "" 426 | },{ 427 | "name": "deleteauth", 428 | "type": "deleteauth", 429 | "ricardian_contract": "" 430 | },{ 431 | "name": "linkauth", 432 | "type": "linkauth", 433 | "ricardian_contract": "" 434 | },{ 435 | "name": "unlinkauth", 436 | "type": "unlinkauth", 437 | "ricardian_contract": "" 438 | },{ 439 | "name": "canceldelay", 440 | "type": "canceldelay", 441 | "ricardian_contract": "" 442 | },{ 443 | "name": "onerror", 444 | "type": "onerror", 445 | "ricardian_contract": "" 446 | },{ 447 | "name": "buyrambytes", 448 | "type": "buyrambytes", 449 | "ricardian_contract": "" 450 | },{ 451 | "name": "buyram", 452 | "type": "buyram", 453 | "ricardian_contract": "" 454 | },{ 455 | "name": "sellram", 456 | "type": "sellram", 457 | "ricardian_contract": "" 458 | },{ 459 | "name": "delegatebw", 460 | "type": "delegatebw", 461 | "ricardian_contract": "" 462 | },{ 463 | "name": "undelegatebw", 464 | "type": "undelegatebw", 465 | "ricardian_contract": "" 466 | },{ 467 | "name": "refund", 468 | "type": "refund", 469 | "ricardian_contract": "" 470 | },{ 471 | "name": "regproducer", 472 | "type": "regproducer", 473 | "ricardian_contract": "" 474 | },{ 475 | "name": "setram", 476 | "type": "setram", 477 | "ricardian_contract": "" 478 | },{ 479 | "name": "bidname", 480 | "type": "bidname", 481 | "ricardian_contract": "" 482 | },{ 483 | "name": "unregprod", 484 | "type": "unregprod", 485 | "ricardian_contract": "" 486 | },{ 487 | "name": "regproxy", 488 | "type": "regproxy", 489 | "ricardian_contract": "" 490 | },{ 491 | "name": "voteproducer", 492 | "type": "voteproducer", 493 | "ricardian_contract": "" 494 | },{ 495 | "name": "claimrewards", 496 | "type": "claimrewards", 497 | "ricardian_contract": "" 498 | },{ 499 | "name": "setpriv", 500 | "type": "setpriv", 501 | "ricardian_contract": "" 502 | },{ 503 | "name": "rmvproducer", 504 | "type": "rmvproducer", 505 | "ricardian_contract": "" 506 | },{ 507 | "name": "setalimits", 508 | "type": "set_account_limits", 509 | "ricardian_contract": "" 510 | },{ 511 | "name": "setglimits", 512 | "type": "set_global_limits", 513 | "ricardian_contract": "" 514 | },{ 515 | "name": "setprods", 516 | "type": "set_producers", 517 | "ricardian_contract": "" 518 | },{ 519 | "name": "reqauth", 520 | "type": "require_auth", 521 | "ricardian_contract": "" 522 | },{ 523 | "name": "setparams", 524 | "type": "setparams", 525 | "ricardian_contract": "" 526 | }], 527 | "tables": [{ 528 | "name": "producers", 529 | "type": "producer_info", 530 | "index_type": "i64", 531 | "key_names" : ["owner"], 532 | "key_types" : ["uint64"] 533 | },{ 534 | "name": "global", 535 | "type": "eosio_global_state", 536 | "index_type": "i64", 537 | "key_names" : [], 538 | "key_types" : [] 539 | },{ 540 | "name": "voters", 541 | "type": "voter_info", 542 | "index_type": "i64", 543 | "key_names" : ["owner"], 544 | "key_types" : ["account_name"] 545 | },{ 546 | "name": "userres", 547 | "type": "user_resources", 548 | "index_type": "i64", 549 | "key_names" : ["owner"], 550 | "key_types" : ["uint64"] 551 | },{ 552 | "name": "delband", 553 | "type": "delegated_bandwidth", 554 | "index_type": "i64", 555 | "key_names" : ["to"], 556 | "key_types" : ["uint64"] 557 | },{ 558 | "name": "rammarket", 559 | "type": "exchange_state", 560 | "index_type": "i64", 561 | "key_names" : ["supply"], 562 | "key_types" : ["uint64"] 563 | },{ 564 | "name": "refunds", 565 | "type": "refund_request", 566 | "index_type": "i64", 567 | "key_names" : ["owner"], 568 | "key_types" : ["uint64"] 569 | },{ 570 | "name": "namebids", 571 | "type": "namebid_info", 572 | "index_type": "i64", 573 | "key_names" : ["newname"], 574 | "key_types" : ["account_name"] 575 | } 576 | ], 577 | "ricardian_clauses": [], 578 | "abi_extensions": [] 579 | } 580 | )====="; 581 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.system/eosio.system.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/contracts/eosio.system/eosio.system.wasm -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.token/eosio.token.abi: -------------------------------------------------------------------------------- 1 | { 2 | "version": "eosio::abi/1.0", 3 | "types": [{ 4 | "new_type_name": "account_name", 5 | "type": "name" 6 | }], 7 | "structs": [{ 8 | "name": "transfer", 9 | "base": "", 10 | "fields": [ 11 | {"name":"from", "type":"account_name"}, 12 | {"name":"to", "type":"account_name"}, 13 | {"name":"quantity", "type":"asset"}, 14 | {"name":"memo", "type":"string"} 15 | ] 16 | },{ 17 | "name": "create", 18 | "base": "", 19 | "fields": [ 20 | {"name":"issuer", "type":"account_name"}, 21 | {"name":"maximum_supply", "type":"asset"} 22 | ] 23 | },{ 24 | "name": "issue", 25 | "base": "", 26 | "fields": [ 27 | {"name":"to", "type":"account_name"}, 28 | {"name":"quantity", "type":"asset"}, 29 | {"name":"memo", "type":"string"} 30 | ] 31 | },{ 32 | "name": "account", 33 | "base": "", 34 | "fields": [ 35 | {"name":"balance", "type":"asset"} 36 | ] 37 | },{ 38 | "name": "currency_stats", 39 | "base": "", 40 | "fields": [ 41 | {"name":"supply", "type":"asset"}, 42 | {"name":"max_supply", "type":"asset"}, 43 | {"name":"issuer", "type":"account_name"} 44 | ] 45 | } 46 | ], 47 | "actions": [{ 48 | "name": "transfer", 49 | "type": "transfer", 50 | "ricardian_contract": "" 51 | },{ 52 | "name": "issue", 53 | "type": "issue", 54 | "ricardian_contract": "" 55 | }, { 56 | "name": "create", 57 | "type": "create", 58 | "ricardian_contract": "" 59 | } 60 | 61 | ], 62 | "tables": [{ 63 | "name": "accounts", 64 | "type": "account", 65 | "index_type": "i64", 66 | "key_names" : ["currency"], 67 | "key_types" : ["uint64"] 68 | },{ 69 | "name": "stat", 70 | "type": "currency_stats", 71 | "index_type": "i64", 72 | "key_names" : ["currency"], 73 | "key_types" : ["uint64"] 74 | } 75 | ], 76 | "ricardian_clauses": [], 77 | "abi_extensions": [] 78 | } 79 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.token/eosio.token.abi.hpp: -------------------------------------------------------------------------------- 1 | const char* const eosio_token_abi = R"=====( 2 | { 3 | "version": "eosio::abi/1.0", 4 | "types": [{ 5 | "new_type_name": "account_name", 6 | "type": "name" 7 | }], 8 | "structs": [{ 9 | "name": "transfer", 10 | "base": "", 11 | "fields": [ 12 | {"name":"from", "type":"account_name"}, 13 | {"name":"to", "type":"account_name"}, 14 | {"name":"quantity", "type":"asset"}, 15 | {"name":"memo", "type":"string"} 16 | ] 17 | },{ 18 | "name": "create", 19 | "base": "", 20 | "fields": [ 21 | {"name":"issuer", "type":"account_name"}, 22 | {"name":"maximum_supply", "type":"asset"} 23 | ] 24 | },{ 25 | "name": "issue", 26 | "base": "", 27 | "fields": [ 28 | {"name":"to", "type":"account_name"}, 29 | {"name":"quantity", "type":"asset"}, 30 | {"name":"memo", "type":"string"} 31 | ] 32 | },{ 33 | "name": "account", 34 | "base": "", 35 | "fields": [ 36 | {"name":"balance", "type":"asset"} 37 | ] 38 | },{ 39 | "name": "currency_stats", 40 | "base": "", 41 | "fields": [ 42 | {"name":"supply", "type":"asset"}, 43 | {"name":"max_supply", "type":"asset"}, 44 | {"name":"issuer", "type":"account_name"} 45 | ] 46 | } 47 | ], 48 | "actions": [{ 49 | "name": "transfer", 50 | "type": "transfer", 51 | "ricardian_contract": "" 52 | },{ 53 | "name": "issue", 54 | "type": "issue", 55 | "ricardian_contract": "" 56 | }, { 57 | "name": "create", 58 | "type": "create", 59 | "ricardian_contract": "" 60 | } 61 | 62 | ], 63 | "tables": [{ 64 | "name": "accounts", 65 | "type": "account", 66 | "index_type": "i64", 67 | "key_names" : ["currency"], 68 | "key_types" : ["uint64"] 69 | },{ 70 | "name": "stat", 71 | "type": "currency_stats", 72 | "index_type": "i64", 73 | "key_names" : ["currency"], 74 | "key_types" : ["uint64"] 75 | } 76 | ], 77 | "ricardian_clauses": [], 78 | "abi_extensions": [] 79 | } 80 | )====="; 81 | -------------------------------------------------------------------------------- /scripts-bos-test/contracts/eosio.token/eosio.token.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/contracts/eosio.token/eosio.token.wasm -------------------------------------------------------------------------------- /scripts-bos-test/cron-vote-bos-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # set -ex 4 | 5 | #export remote="-u http://api-boscore-lib-testnet-boscore-bp-cluster-ap-northeast-1.eosio.sg" 6 | #export remote="-u http://api-boscore-lib-testnet-ali-boscore-bp-cluster-ap-southeast-2.eosio.sg" 7 | export remote="-u http://47.75.107.217:6666" 8 | SELECTED=() 9 | 10 | shuffle_and_select_bps(){ 11 | N=21 12 | # BPS=( bombay111111 boscorebos11 boscorebos12 bpa bpb bpc bpd bpe bpf bpg bph bpi bpj bpk bpl bpm bpn bpo bpp bpq bpw dubai1111111 franklin1111 hongkong1111 london111111 siliconvaley ) 13 | BPS=( bpa bpb bpc bpd bpe bpf bpg bph bpi bpj bpk bpl bpm bpn bpo bpp bpq bpr bps bpt bpu bpv bpw bpx bpy bpz ) 14 | tmp=() 15 | for index in $(shuf --input-range=0-$(( ${#BPS[*]} - 1 )) -n ${N}) 16 | do 17 | tmp+=(${BPS[$index]}) 18 | done 19 | SELECTED=($(echo "${tmp[@]}" | tr ' ' '\n' | sort)) 20 | } 21 | 22 | shuffle_and_select_bps 23 | echo ${SELECTED[@]} 24 | 25 | while : 26 | do 27 | shuffle_and_select_bps 28 | cleos $remote system voteproducer prods voter ${SELECTED[*]} -p voter ; 29 | #cleos $remote transfer voter bpa "1.0000 EOS" "test"; 30 | echo "sleep 1 seconds" 31 | sleep 1 32 | done 33 | 34 | 35 | 36 | # N=11 37 | # BPS=( bpa bpb bpc bpd bpe bpf bpg bph bpi bpj bpk bpl bpm bpn ) 38 | # SELECTED=() 39 | # for index in $(shuf --input-range=0-$(( ${#BPS[*]} - 1 )) -n ${N}) 40 | # do 41 | # echo "selecte: ${BPS[$index]}" 42 | # SELECTED+=(${BPS[$index]}) 43 | # done 44 | # 45 | # echo ${BPS[*]} 46 | # echo ${SELECTED[*]} 47 | # 48 | # while : 49 | # do 50 | # cleos $remote system voteproducer prods voter -p voter 51 | # echo "sleep 120 seconds" 52 | # sleep 120 53 | # 54 | # cleos $remote system voteproducer prods voter -p voter 55 | # echo "sleep 120 seconds" 56 | # sleep 120 57 | # 58 | # cleos $remote system voteproducer prods voter -p voter 59 | # echo "sleep 120 seconds" 60 | # sleep 120 61 | # 62 | # done 63 | # bpa bpb bpc bpd bpe bpf bpg bph bpi bpj bpk bpl bpm bpn 64 | -------------------------------------------------------------------------------- /scripts-bos-test/env-bos-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export remote="-u http://api-boscore-lib-testnet-boscore-bp-cluster-ap-northeast-1.eosio.sg" 4 | -------------------------------------------------------------------------------- /scripts-bos-test/start-bos-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #export remote="-u http://api-boscore-lib-testnet-boscore-bp-cluster-ap-northeast-1.eosio.sg" 4 | export remote="-u http://47.75.107.217:6666" 5 | #import eosio key 6 | cleos wallet import -n lib --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 7 | 8 | # deploy bios 9 | cleos $remote set contract eosio ./contracts/eosio.bios/ eosio.bios.wasm eosio.bios.abi -p eosio 10 | 11 | # create system account 12 | SYSTEM_ACCOUNT="eosio.bpay eosio.msig eosio.names eosio.ram eosio.ramfee eosio.saving eosio.stake eosio.token eosio.vpay" 13 | 14 | for sa in $SYSTEM_ACCOUNT 15 | do 16 | echo $sa 17 | cleos $remote create account eosio $sa EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV -p eosio 18 | done 19 | 20 | # deploy token contract and issue 21 | cleos $remote set contract eosio.token contracts/eosio.token eosio.token.wasm eosio.token.abi -p eosio.token ; 22 | 23 | sleep 2; 24 | cleos $remote push action eosio.token create '["eosio", "10000000000.0000 EOS", 0, 0, 0]' -p eosio.token 25 | cleos $remote push action eosio.token issue '["eosio", "1000000000.0000 EOS", "issue 1B to eosio"]' -p eosio 26 | 27 | # deploy msig contract 28 | cleos $remote set contract eosio.msig contracts/eosio.msig eosio.msig.wasm eosio.msig.abi -p eosio.msig 29 | 30 | # deploy system contract 31 | cleos $remote set contract eosio contracts/eosio.system eosio.system.wasm eosio.system.abi -p eosio 32 | 33 | sleep 2; 34 | cleos $remote system newaccount eosio voter EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif --stake-net "10 EOS" --stake-cpu "10 EOS" --buy-ram-kbytes 10000 35 | cleos wallet import -n lib --private-key 5KE3vxAZ5tBXubjMeFJ9uCHHjfQeAzDqPLeW4XHGVcuKHPPLCrA 36 | cleos $remote transfer eosio voter "200000000.0000 EOS" "transfer 200M to voter" 37 | sleep 2; 38 | cleos $remote system delegatebw voter voter '100000000.0000 EOS' '100000000.0000 EOS' -p voter 39 | 40 | 41 | 42 | #cleos $remote push action eosio setpriv '["eosio.msig",1]' -p eosio 43 | 44 | # create bps 45 | # create bps 46 | ACCOUNTS="abp bpa bpb bpc bpd bpe bpf bpg bph bpi bpj bpk bpl bpm bpn bpo bpp bpq bpr bps bpt bpu bpv bpw bpx bpy bpz" 47 | 48 | for acc in $ACCOUNTS 49 | do 50 | echo $acc 51 | cleos $remote system newaccount eosio $acc EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif EOS54HgSQ9d6qjUT7pEZgbP83zQpcymR4QW1jz2jPDEdbAeKGaUif --stake-cpu "1000 EOS" --stake-net "1000 EOS" --buy-ram "1000 EOS" -p eosio 52 | cleos $remote transfer eosio $acc "1000 EOS" "red packet" -p eosio 53 | done 54 | 55 | 56 | cleos $remote system regproducer bpa EOS7BbmLoTdmuUkht7VrFBJTLac1i9ChLWsMZDNo4q3qiJw7crtVc '' 0 -p bpa 57 | cleos $remote system regproducer bpb EOS5dUiLcsqMzSoZinnHhtqi1kk9YmEZCnyRmDWN68qbXMMXrCMvP '' 0 -p bpb 58 | cleos $remote system regproducer bpc EOS6eMGpgRJ3HRHctRuJFs564RsQ4GhohUBE7qA98rBY88bRsjQM1 '' 0 -p bpc 59 | cleos $remote system regproducer bpd EOS7E1K17MFd31xF7EeNXVSvEuHihmvUC54HfK7YkHTydSCKa1Ddt '' 0 -p bpd 60 | cleos $remote system regproducer bpe EOS5aXTHWuh5mZFiWwSZGV8D4WWZMZR8TTjXeBfToWBbMT7QMwRgM '' 0 -p bpe 61 | cleos $remote system regproducer bpf EOS6F5vU6nFwFsThUPU285Yw4PXpzxJFXrA3P2i4kmP8Z1Yu6d6M4 '' 0 -p bpf 62 | cleos $remote system regproducer bpg EOS59VzXAtqT61rBeG5X967XH6chv96i7EWCdWPtT3ZUNBMPvaUa8 '' 0 -p bpg 63 | cleos $remote system regproducer bph EOS6NGoJuxZ1nhYczfR5V68tSFpVf3nQmvHJBdDFTUm75mWQ6bcRp '' 0 -p bph 64 | cleos $remote system regproducer bpi EOS6U1Kj9VNJvxJeKr3t1dmawAFTkcsaPBL8wkKr9akXLX4wqU1jV '' 0 -p bpi 65 | cleos $remote system regproducer bpj EOS6vboxEGBf43r6P7UjrTvE3sTt49ZsVz3ULPV6QUmfkTjuJ6EHa '' 0 -p bpj 66 | cleos $remote system regproducer bpk EOS6fYF2DBV3qe6Px3bt8wavRufEvfepTDKZZSizcfXksiDAR4xvv '' 0 -p bpk 67 | cleos $remote system regproducer bpl EOS8VRfSoyS1frV3CBPeobJ1cvMCYGY3cwx1YiqPYydXDWgmyNXrE '' 0 -p bpl 68 | cleos $remote system regproducer bpm EOS82bUcqrCGCHZXJ2h6cPvoarYTfWt6hDzNW8dg8iXR2t7ytNsK7 '' 0 -p bpm 69 | cleos $remote system regproducer bpn EOS8mtf18vDppwW17LWi3gkJyvT8R6BkiW4YKysQFNjg1z1qyoKPH '' 0 -p bpn 70 | cleos $remote system regproducer bpo EOS8A98zLF4X2mGCcrX7f1BtmSuxf6ucb7FNFNLUNiq5jUu5p86Fy '' 0 -p bpo 71 | cleos $remote system regproducer bpp EOS5RS7zr2um4z8cChehvg4nAjoEzLh7FpqbJN7fx4iwCJLJ8WZ8a '' 0 -p bpp 72 | cleos $remote system regproducer bpq EOS5TnNcuyzYSaMtVCfK961HuTAtERH4J467KvZm7CSiwbEPcvyta '' 0 -p bpq 73 | cleos $remote system regproducer bpr EOS6S2fmuFfkH7HyTc1e3nBtDo8QaJq4onYvJGcNgiA3xfGBGWwRn '' 0 -p bpr 74 | cleos $remote system regproducer bps EOS8Na7TRhhkWRaDEbyQdAx5mtPWTrTnbQE2849NtGyWYUCCa2iAJ '' 0 -p bps 75 | cleos $remote system regproducer bpt EOS5BTMBpKb4pqUSLmH41nLE8s9m6MEd4VJct2NHUnKAyKafbSWkp '' 0 -p bpt 76 | cleos $remote system regproducer bpu EOS8fa1zFZXourRwd1qVAVcUKPKLvzhtnYDaCQiNs7EDh2Zdi7j2u '' 0 -p bpu 77 | cleos $remote system regproducer bpv EOS5kBwkKxvUYpCnwdQMVPkVKxQj9Ekog541YfybeYHKeqcMXsQvo '' 0 -p bpv 78 | cleos $remote system regproducer bpw EOS5QZyPh8kfs5Ar3R2vzJ9QjDrH1x8o6X1CsR6vyANDkVFdmzjbj '' 0 -p bpw 79 | cleos $remote system regproducer bpx EOS4vRTZ9ZMQ32YbfopkJzxRRLW9i3FRGvyFE5CvWf5gcokXtp61e '' 0 -p bpx 80 | cleos $remote system regproducer bpy EOS82bXWznxM5wLzemsqycGF9Czqco6X5vtiUqNq7nzGAbWgnfXHZ '' 0 -p bpy 81 | cleos $remote system regproducer bpz EOS8PdC1MGvTwaGBDAWhBF4GNAAk8AaRA9o2RJ6zy5TWHYxLhcWGn '' 0 -p bpz 82 | -------------------------------------------------------------------------------- /scripts-bos-test/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #export remote="-u http://api-boscore-lib-testnet-boscore-bp-cluster-ap-northeast-1.eosio.sg" 3 | export remote="-u http://api-boscore-lib-testnet-ali-boscore-bp-cluster-ap-southeast-2.eosio.sg" 4 | cleos $remote set contract eosio upgrade eosio.system.wasm eosio.system.abi -p eosio 5 | 6 | cleos $remote push action eosio setupgrade '[[4000]]' -p eosio 7 | -------------------------------------------------------------------------------- /scripts-bos-test/upgrade/eosio.system.abi: -------------------------------------------------------------------------------- 1 | { 2 | "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Thu Apr 11 14:15:06 2019", 3 | "version": "eosio::abi/1.1", 4 | "structs": [ 5 | { 6 | "name": "abi_hash", 7 | "base": "", 8 | "fields": [ 9 | { 10 | "name": "owner", 11 | "type": "name" 12 | }, 13 | { 14 | "name": "hash", 15 | "type": "checksum256" 16 | } 17 | ] 18 | }, 19 | { 20 | "name": "authority", 21 | "base": "", 22 | "fields": [ 23 | { 24 | "name": "threshold", 25 | "type": "uint32" 26 | }, 27 | { 28 | "name": "keys", 29 | "type": "key_weight[]" 30 | }, 31 | { 32 | "name": "accounts", 33 | "type": "permission_level_weight[]" 34 | }, 35 | { 36 | "name": "waits", 37 | "type": "wait_weight[]" 38 | } 39 | ] 40 | }, 41 | { 42 | "name": "bid_refund", 43 | "base": "", 44 | "fields": [ 45 | { 46 | "name": "bidder", 47 | "type": "name" 48 | }, 49 | { 50 | "name": "amount", 51 | "type": "asset" 52 | } 53 | ] 54 | }, 55 | { 56 | "name": "bidname", 57 | "base": "", 58 | "fields": [ 59 | { 60 | "name": "bidder", 61 | "type": "name" 62 | }, 63 | { 64 | "name": "newname", 65 | "type": "name" 66 | }, 67 | { 68 | "name": "bid", 69 | "type": "asset" 70 | } 71 | ] 72 | }, 73 | { 74 | "name": "bidrefund", 75 | "base": "", 76 | "fields": [ 77 | { 78 | "name": "bidder", 79 | "type": "name" 80 | }, 81 | { 82 | "name": "newname", 83 | "type": "name" 84 | } 85 | ] 86 | }, 87 | { 88 | "name": "block_header", 89 | "base": "", 90 | "fields": [ 91 | { 92 | "name": "timestamp", 93 | "type": "uint32" 94 | }, 95 | { 96 | "name": "producer", 97 | "type": "name" 98 | }, 99 | { 100 | "name": "confirmed", 101 | "type": "uint16" 102 | }, 103 | { 104 | "name": "previous", 105 | "type": "checksum256" 106 | }, 107 | { 108 | "name": "transaction_mroot", 109 | "type": "checksum256" 110 | }, 111 | { 112 | "name": "action_mroot", 113 | "type": "checksum256" 114 | }, 115 | { 116 | "name": "schedule_version", 117 | "type": "uint32" 118 | }, 119 | { 120 | "name": "new_producers", 121 | "type": "producer_schedule?" 122 | } 123 | ] 124 | }, 125 | { 126 | "name": "blockchain_parameters", 127 | "base": "", 128 | "fields": [ 129 | { 130 | "name": "max_block_net_usage", 131 | "type": "uint64" 132 | }, 133 | { 134 | "name": "target_block_net_usage_pct", 135 | "type": "uint32" 136 | }, 137 | { 138 | "name": "max_transaction_net_usage", 139 | "type": "uint32" 140 | }, 141 | { 142 | "name": "base_per_transaction_net_usage", 143 | "type": "uint32" 144 | }, 145 | { 146 | "name": "net_usage_leeway", 147 | "type": "uint32" 148 | }, 149 | { 150 | "name": "context_free_discount_net_usage_num", 151 | "type": "uint32" 152 | }, 153 | { 154 | "name": "context_free_discount_net_usage_den", 155 | "type": "uint32" 156 | }, 157 | { 158 | "name": "max_block_cpu_usage", 159 | "type": "uint32" 160 | }, 161 | { 162 | "name": "target_block_cpu_usage_pct", 163 | "type": "uint32" 164 | }, 165 | { 166 | "name": "max_transaction_cpu_usage", 167 | "type": "uint32" 168 | }, 169 | { 170 | "name": "min_transaction_cpu_usage", 171 | "type": "uint32" 172 | }, 173 | { 174 | "name": "max_transaction_lifetime", 175 | "type": "uint32" 176 | }, 177 | { 178 | "name": "deferred_trx_expiration_window", 179 | "type": "uint32" 180 | }, 181 | { 182 | "name": "max_transaction_delay", 183 | "type": "uint32" 184 | }, 185 | { 186 | "name": "max_inline_action_size", 187 | "type": "uint32" 188 | }, 189 | { 190 | "name": "max_inline_action_depth", 191 | "type": "uint16" 192 | }, 193 | { 194 | "name": "max_authority_depth", 195 | "type": "uint16" 196 | } 197 | ] 198 | }, 199 | { 200 | "name": "buyram", 201 | "base": "", 202 | "fields": [ 203 | { 204 | "name": "payer", 205 | "type": "name" 206 | }, 207 | { 208 | "name": "receiver", 209 | "type": "name" 210 | }, 211 | { 212 | "name": "quant", 213 | "type": "asset" 214 | } 215 | ] 216 | }, 217 | { 218 | "name": "buyrambytes", 219 | "base": "", 220 | "fields": [ 221 | { 222 | "name": "payer", 223 | "type": "name" 224 | }, 225 | { 226 | "name": "receiver", 227 | "type": "name" 228 | }, 229 | { 230 | "name": "bytes", 231 | "type": "uint32" 232 | } 233 | ] 234 | }, 235 | { 236 | "name": "canceldelay", 237 | "base": "", 238 | "fields": [ 239 | { 240 | "name": "canceling_auth", 241 | "type": "permission_level" 242 | }, 243 | { 244 | "name": "trx_id", 245 | "type": "checksum256" 246 | } 247 | ] 248 | }, 249 | { 250 | "name": "claimrewards", 251 | "base": "", 252 | "fields": [ 253 | { 254 | "name": "owner", 255 | "type": "name" 256 | } 257 | ] 258 | }, 259 | { 260 | "name": "connector", 261 | "base": "", 262 | "fields": [ 263 | { 264 | "name": "balance", 265 | "type": "asset" 266 | }, 267 | { 268 | "name": "weight", 269 | "type": "float64" 270 | } 271 | ] 272 | }, 273 | { 274 | "name": "delegatebw", 275 | "base": "", 276 | "fields": [ 277 | { 278 | "name": "from", 279 | "type": "name" 280 | }, 281 | { 282 | "name": "receiver", 283 | "type": "name" 284 | }, 285 | { 286 | "name": "stake_net_quantity", 287 | "type": "asset" 288 | }, 289 | { 290 | "name": "stake_cpu_quantity", 291 | "type": "asset" 292 | }, 293 | { 294 | "name": "transfer", 295 | "type": "bool" 296 | } 297 | ] 298 | }, 299 | { 300 | "name": "delegated_bandwidth", 301 | "base": "", 302 | "fields": [ 303 | { 304 | "name": "from", 305 | "type": "name" 306 | }, 307 | { 308 | "name": "to", 309 | "type": "name" 310 | }, 311 | { 312 | "name": "net_weight", 313 | "type": "asset" 314 | }, 315 | { 316 | "name": "cpu_weight", 317 | "type": "asset" 318 | } 319 | ] 320 | }, 321 | { 322 | "name": "deleteauth", 323 | "base": "", 324 | "fields": [ 325 | { 326 | "name": "account", 327 | "type": "name" 328 | }, 329 | { 330 | "name": "permission", 331 | "type": "name" 332 | } 333 | ] 334 | }, 335 | { 336 | "name": "eosio_global_state", 337 | "base": "blockchain_parameters", 338 | "fields": [ 339 | { 340 | "name": "max_ram_size", 341 | "type": "uint64" 342 | }, 343 | { 344 | "name": "total_ram_bytes_reserved", 345 | "type": "uint64" 346 | }, 347 | { 348 | "name": "total_ram_stake", 349 | "type": "int64" 350 | }, 351 | { 352 | "name": "last_producer_schedule_update", 353 | "type": "block_timestamp_type" 354 | }, 355 | { 356 | "name": "last_pervote_bucket_fill", 357 | "type": "time_point" 358 | }, 359 | { 360 | "name": "pervote_bucket", 361 | "type": "int64" 362 | }, 363 | { 364 | "name": "perblock_bucket", 365 | "type": "int64" 366 | }, 367 | { 368 | "name": "total_unpaid_blocks", 369 | "type": "uint32" 370 | }, 371 | { 372 | "name": "total_activated_stake", 373 | "type": "int64" 374 | }, 375 | { 376 | "name": "thresh_activated_stake_time", 377 | "type": "time_point" 378 | }, 379 | { 380 | "name": "last_producer_schedule_size", 381 | "type": "uint16" 382 | }, 383 | { 384 | "name": "total_producer_vote_weight", 385 | "type": "float64" 386 | }, 387 | { 388 | "name": "last_name_close", 389 | "type": "block_timestamp_type" 390 | } 391 | ] 392 | }, 393 | { 394 | "name": "eosio_global_state2", 395 | "base": "", 396 | "fields": [ 397 | { 398 | "name": "new_ram_per_block", 399 | "type": "uint16" 400 | }, 401 | { 402 | "name": "last_ram_increase", 403 | "type": "block_timestamp_type" 404 | }, 405 | { 406 | "name": "last_block_num", 407 | "type": "block_timestamp_type" 408 | }, 409 | { 410 | "name": "total_producer_votepay_share", 411 | "type": "float64" 412 | }, 413 | { 414 | "name": "revision", 415 | "type": "uint8" 416 | } 417 | ] 418 | }, 419 | { 420 | "name": "eosio_global_state3", 421 | "base": "", 422 | "fields": [ 423 | { 424 | "name": "last_vpay_state_update", 425 | "type": "time_point" 426 | }, 427 | { 428 | "name": "total_vpay_share_change_rate", 429 | "type": "float64" 430 | } 431 | ] 432 | }, 433 | { 434 | "name": "eosio_guaranteed_min_res", 435 | "base": "", 436 | "fields": [ 437 | { 438 | "name": "ram", 439 | "type": "uint32" 440 | }, 441 | { 442 | "name": "cpu", 443 | "type": "uint32" 444 | }, 445 | { 446 | "name": "net", 447 | "type": "uint32" 448 | } 449 | ] 450 | }, 451 | { 452 | "name": "exchange_state", 453 | "base": "", 454 | "fields": [ 455 | { 456 | "name": "supply", 457 | "type": "asset" 458 | }, 459 | { 460 | "name": "base", 461 | "type": "connector" 462 | }, 463 | { 464 | "name": "quote", 465 | "type": "connector" 466 | } 467 | ] 468 | }, 469 | { 470 | "name": "init", 471 | "base": "", 472 | "fields": [ 473 | { 474 | "name": "version", 475 | "type": "varuint32" 476 | }, 477 | { 478 | "name": "core", 479 | "type": "symbol" 480 | } 481 | ] 482 | }, 483 | { 484 | "name": "key_weight", 485 | "base": "", 486 | "fields": [ 487 | { 488 | "name": "key", 489 | "type": "public_key" 490 | }, 491 | { 492 | "name": "weight", 493 | "type": "uint16" 494 | } 495 | ] 496 | }, 497 | { 498 | "name": "linkauth", 499 | "base": "", 500 | "fields": [ 501 | { 502 | "name": "account", 503 | "type": "name" 504 | }, 505 | { 506 | "name": "code", 507 | "type": "name" 508 | }, 509 | { 510 | "name": "type", 511 | "type": "name" 512 | }, 513 | { 514 | "name": "requirement", 515 | "type": "name" 516 | } 517 | ] 518 | }, 519 | { 520 | "name": "name_bid", 521 | "base": "", 522 | "fields": [ 523 | { 524 | "name": "newname", 525 | "type": "name" 526 | }, 527 | { 528 | "name": "high_bidder", 529 | "type": "name" 530 | }, 531 | { 532 | "name": "high_bid", 533 | "type": "int64" 534 | }, 535 | { 536 | "name": "last_bid_time", 537 | "type": "time_point" 538 | } 539 | ] 540 | }, 541 | { 542 | "name": "namelist", 543 | "base": "", 544 | "fields": [ 545 | { 546 | "name": "list", 547 | "type": "string" 548 | }, 549 | { 550 | "name": "action", 551 | "type": "string" 552 | }, 553 | { 554 | "name": "names", 555 | "type": "name[]" 556 | } 557 | ] 558 | }, 559 | { 560 | "name": "newaccount", 561 | "base": "", 562 | "fields": [ 563 | { 564 | "name": "creator", 565 | "type": "name" 566 | }, 567 | { 568 | "name": "newact", 569 | "type": "name" 570 | }, 571 | { 572 | "name": "owner", 573 | "type": "authority" 574 | }, 575 | { 576 | "name": "active", 577 | "type": "authority" 578 | } 579 | ] 580 | }, 581 | { 582 | "name": "onblock", 583 | "base": "", 584 | "fields": [ 585 | { 586 | "name": "header", 587 | "type": "block_header" 588 | } 589 | ] 590 | }, 591 | { 592 | "name": "onerror", 593 | "base": "", 594 | "fields": [ 595 | { 596 | "name": "sender_id", 597 | "type": "uint128" 598 | }, 599 | { 600 | "name": "sent_trx", 601 | "type": "bytes" 602 | } 603 | ] 604 | }, 605 | { 606 | "name": "permission_level", 607 | "base": "", 608 | "fields": [ 609 | { 610 | "name": "actor", 611 | "type": "name" 612 | }, 613 | { 614 | "name": "permission", 615 | "type": "name" 616 | } 617 | ] 618 | }, 619 | { 620 | "name": "permission_level_weight", 621 | "base": "", 622 | "fields": [ 623 | { 624 | "name": "permission", 625 | "type": "permission_level" 626 | }, 627 | { 628 | "name": "weight", 629 | "type": "uint16" 630 | } 631 | ] 632 | }, 633 | { 634 | "name": "producer_info", 635 | "base": "", 636 | "fields": [ 637 | { 638 | "name": "owner", 639 | "type": "name" 640 | }, 641 | { 642 | "name": "total_votes", 643 | "type": "float64" 644 | }, 645 | { 646 | "name": "producer_key", 647 | "type": "public_key" 648 | }, 649 | { 650 | "name": "is_active", 651 | "type": "bool" 652 | }, 653 | { 654 | "name": "url", 655 | "type": "string" 656 | }, 657 | { 658 | "name": "unpaid_blocks", 659 | "type": "uint32" 660 | }, 661 | { 662 | "name": "last_claim_time", 663 | "type": "time_point" 664 | }, 665 | { 666 | "name": "location", 667 | "type": "uint16" 668 | } 669 | ] 670 | }, 671 | { 672 | "name": "producer_info2", 673 | "base": "", 674 | "fields": [ 675 | { 676 | "name": "owner", 677 | "type": "name" 678 | }, 679 | { 680 | "name": "votepay_share", 681 | "type": "float64" 682 | }, 683 | { 684 | "name": "last_votepay_share_update", 685 | "type": "time_point" 686 | } 687 | ] 688 | }, 689 | { 690 | "name": "producer_key", 691 | "base": "", 692 | "fields": [ 693 | { 694 | "name": "producer_name", 695 | "type": "name" 696 | }, 697 | { 698 | "name": "block_signing_key", 699 | "type": "public_key" 700 | } 701 | ] 702 | }, 703 | { 704 | "name": "producer_schedule", 705 | "base": "", 706 | "fields": [ 707 | { 708 | "name": "version", 709 | "type": "uint32" 710 | }, 711 | { 712 | "name": "producers", 713 | "type": "producer_key[]" 714 | } 715 | ] 716 | }, 717 | { 718 | "name": "refund", 719 | "base": "", 720 | "fields": [ 721 | { 722 | "name": "owner", 723 | "type": "name" 724 | } 725 | ] 726 | }, 727 | { 728 | "name": "refund_request", 729 | "base": "", 730 | "fields": [ 731 | { 732 | "name": "owner", 733 | "type": "name" 734 | }, 735 | { 736 | "name": "request_time", 737 | "type": "time_point_sec" 738 | }, 739 | { 740 | "name": "net_amount", 741 | "type": "asset" 742 | }, 743 | { 744 | "name": "cpu_amount", 745 | "type": "asset" 746 | } 747 | ] 748 | }, 749 | { 750 | "name": "regproducer", 751 | "base": "", 752 | "fields": [ 753 | { 754 | "name": "producer", 755 | "type": "name" 756 | }, 757 | { 758 | "name": "producer_key", 759 | "type": "public_key" 760 | }, 761 | { 762 | "name": "url", 763 | "type": "string" 764 | }, 765 | { 766 | "name": "location", 767 | "type": "uint16" 768 | } 769 | ] 770 | }, 771 | { 772 | "name": "regproxy", 773 | "base": "", 774 | "fields": [ 775 | { 776 | "name": "proxy", 777 | "type": "name" 778 | }, 779 | { 780 | "name": "isproxy", 781 | "type": "bool" 782 | } 783 | ] 784 | }, 785 | { 786 | "name": "rmvproducer", 787 | "base": "", 788 | "fields": [ 789 | { 790 | "name": "producer", 791 | "type": "name" 792 | } 793 | ] 794 | }, 795 | { 796 | "name": "sellram", 797 | "base": "", 798 | "fields": [ 799 | { 800 | "name": "account", 801 | "type": "name" 802 | }, 803 | { 804 | "name": "bytes", 805 | "type": "int64" 806 | } 807 | ] 808 | }, 809 | { 810 | "name": "setabi", 811 | "base": "", 812 | "fields": [ 813 | { 814 | "name": "account", 815 | "type": "name" 816 | }, 817 | { 818 | "name": "abi", 819 | "type": "bytes" 820 | } 821 | ] 822 | }, 823 | { 824 | "name": "setacctcpu", 825 | "base": "", 826 | "fields": [ 827 | { 828 | "name": "account", 829 | "type": "name" 830 | }, 831 | { 832 | "name": "cpu_weight", 833 | "type": "int64?" 834 | } 835 | ] 836 | }, 837 | { 838 | "name": "setacctnet", 839 | "base": "", 840 | "fields": [ 841 | { 842 | "name": "account", 843 | "type": "name" 844 | }, 845 | { 846 | "name": "net_weight", 847 | "type": "int64?" 848 | } 849 | ] 850 | }, 851 | { 852 | "name": "setacctram", 853 | "base": "", 854 | "fields": [ 855 | { 856 | "name": "account", 857 | "type": "name" 858 | }, 859 | { 860 | "name": "ram_bytes", 861 | "type": "int64?" 862 | } 863 | ] 864 | }, 865 | { 866 | "name": "setalimits", 867 | "base": "", 868 | "fields": [ 869 | { 870 | "name": "account", 871 | "type": "name" 872 | }, 873 | { 874 | "name": "ram_bytes", 875 | "type": "int64" 876 | }, 877 | { 878 | "name": "net_weight", 879 | "type": "int64" 880 | }, 881 | { 882 | "name": "cpu_weight", 883 | "type": "int64" 884 | } 885 | ] 886 | }, 887 | { 888 | "name": "setcode", 889 | "base": "", 890 | "fields": [ 891 | { 892 | "name": "account", 893 | "type": "name" 894 | }, 895 | { 896 | "name": "vmtype", 897 | "type": "uint8" 898 | }, 899 | { 900 | "name": "vmversion", 901 | "type": "uint8" 902 | }, 903 | { 904 | "name": "code", 905 | "type": "bytes" 906 | } 907 | ] 908 | }, 909 | { 910 | "name": "setguaminres", 911 | "base": "", 912 | "fields": [ 913 | { 914 | "name": "ram", 915 | "type": "uint32" 916 | }, 917 | { 918 | "name": "cpu", 919 | "type": "uint32" 920 | }, 921 | { 922 | "name": "net", 923 | "type": "uint32" 924 | } 925 | ] 926 | }, 927 | { 928 | "name": "setparams", 929 | "base": "", 930 | "fields": [ 931 | { 932 | "name": "params", 933 | "type": "blockchain_parameters" 934 | } 935 | ] 936 | }, 937 | { 938 | "name": "setpriv", 939 | "base": "", 940 | "fields": [ 941 | { 942 | "name": "account", 943 | "type": "name" 944 | }, 945 | { 946 | "name": "is_priv", 947 | "type": "uint8" 948 | } 949 | ] 950 | }, 951 | { 952 | "name": "setram", 953 | "base": "", 954 | "fields": [ 955 | { 956 | "name": "max_ram_size", 957 | "type": "uint64" 958 | } 959 | ] 960 | }, 961 | { 962 | "name": "setramrate", 963 | "base": "", 964 | "fields": [ 965 | { 966 | "name": "bytes_per_block", 967 | "type": "uint16" 968 | } 969 | ] 970 | }, 971 | { 972 | "name": "setupgrade", 973 | "base": "", 974 | "fields": [ 975 | { 976 | "name": "params", 977 | "type": "upgrade_parameters" 978 | } 979 | ] 980 | }, 981 | { 982 | "name": "undelegatebw", 983 | "base": "", 984 | "fields": [ 985 | { 986 | "name": "from", 987 | "type": "name" 988 | }, 989 | { 990 | "name": "receiver", 991 | "type": "name" 992 | }, 993 | { 994 | "name": "unstake_net_quantity", 995 | "type": "asset" 996 | }, 997 | { 998 | "name": "unstake_cpu_quantity", 999 | "type": "asset" 1000 | } 1001 | ] 1002 | }, 1003 | { 1004 | "name": "unlinkauth", 1005 | "base": "", 1006 | "fields": [ 1007 | { 1008 | "name": "account", 1009 | "type": "name" 1010 | }, 1011 | { 1012 | "name": "code", 1013 | "type": "name" 1014 | }, 1015 | { 1016 | "name": "type", 1017 | "type": "name" 1018 | } 1019 | ] 1020 | }, 1021 | { 1022 | "name": "unregprod", 1023 | "base": "", 1024 | "fields": [ 1025 | { 1026 | "name": "producer", 1027 | "type": "name" 1028 | } 1029 | ] 1030 | }, 1031 | { 1032 | "name": "updateauth", 1033 | "base": "", 1034 | "fields": [ 1035 | { 1036 | "name": "account", 1037 | "type": "name" 1038 | }, 1039 | { 1040 | "name": "permission", 1041 | "type": "name" 1042 | }, 1043 | { 1044 | "name": "parent", 1045 | "type": "name" 1046 | }, 1047 | { 1048 | "name": "auth", 1049 | "type": "authority" 1050 | } 1051 | ] 1052 | }, 1053 | { 1054 | "name": "updtrevision", 1055 | "base": "", 1056 | "fields": [ 1057 | { 1058 | "name": "revision", 1059 | "type": "uint8" 1060 | } 1061 | ] 1062 | }, 1063 | { 1064 | "name": "upgrade_parameters", 1065 | "base": "", 1066 | "fields": [ 1067 | { 1068 | "name": "target_block_num", 1069 | "type": "uint32" 1070 | } 1071 | ] 1072 | }, 1073 | { 1074 | "name": "upgrade_state", 1075 | "base": "upgrade_parameters", 1076 | "fields": [ 1077 | { 1078 | "name": "current_version", 1079 | "type": "uint16" 1080 | } 1081 | ] 1082 | }, 1083 | { 1084 | "name": "user_resources", 1085 | "base": "", 1086 | "fields": [ 1087 | { 1088 | "name": "owner", 1089 | "type": "name" 1090 | }, 1091 | { 1092 | "name": "net_weight", 1093 | "type": "asset" 1094 | }, 1095 | { 1096 | "name": "cpu_weight", 1097 | "type": "asset" 1098 | }, 1099 | { 1100 | "name": "ram_bytes", 1101 | "type": "int64" 1102 | } 1103 | ] 1104 | }, 1105 | { 1106 | "name": "voteproducer", 1107 | "base": "", 1108 | "fields": [ 1109 | { 1110 | "name": "voter", 1111 | "type": "name" 1112 | }, 1113 | { 1114 | "name": "proxy", 1115 | "type": "name" 1116 | }, 1117 | { 1118 | "name": "producers", 1119 | "type": "name[]" 1120 | } 1121 | ] 1122 | }, 1123 | { 1124 | "name": "voter_info", 1125 | "base": "", 1126 | "fields": [ 1127 | { 1128 | "name": "owner", 1129 | "type": "name" 1130 | }, 1131 | { 1132 | "name": "proxy", 1133 | "type": "name" 1134 | }, 1135 | { 1136 | "name": "producers", 1137 | "type": "name[]" 1138 | }, 1139 | { 1140 | "name": "staked", 1141 | "type": "int64" 1142 | }, 1143 | { 1144 | "name": "last_vote_weight", 1145 | "type": "float64" 1146 | }, 1147 | { 1148 | "name": "proxied_vote_weight", 1149 | "type": "float64" 1150 | }, 1151 | { 1152 | "name": "is_proxy", 1153 | "type": "bool" 1154 | }, 1155 | { 1156 | "name": "flags1", 1157 | "type": "uint32" 1158 | }, 1159 | { 1160 | "name": "reserved2", 1161 | "type": "uint32" 1162 | }, 1163 | { 1164 | "name": "reserved3", 1165 | "type": "asset" 1166 | } 1167 | ] 1168 | }, 1169 | { 1170 | "name": "wait_weight", 1171 | "base": "", 1172 | "fields": [ 1173 | { 1174 | "name": "wait_sec", 1175 | "type": "uint32" 1176 | }, 1177 | { 1178 | "name": "weight", 1179 | "type": "uint16" 1180 | } 1181 | ] 1182 | } 1183 | ], 1184 | "types": [], 1185 | "actions": [ 1186 | { 1187 | "name": "bidname", 1188 | "type": "bidname", 1189 | "ricardian_contract": "" 1190 | }, 1191 | { 1192 | "name": "bidrefund", 1193 | "type": "bidrefund", 1194 | "ricardian_contract": "" 1195 | }, 1196 | { 1197 | "name": "buyram", 1198 | "type": "buyram", 1199 | "ricardian_contract": "" 1200 | }, 1201 | { 1202 | "name": "buyrambytes", 1203 | "type": "buyrambytes", 1204 | "ricardian_contract": "" 1205 | }, 1206 | { 1207 | "name": "canceldelay", 1208 | "type": "canceldelay", 1209 | "ricardian_contract": "" 1210 | }, 1211 | { 1212 | "name": "claimrewards", 1213 | "type": "claimrewards", 1214 | "ricardian_contract": "" 1215 | }, 1216 | { 1217 | "name": "delegatebw", 1218 | "type": "delegatebw", 1219 | "ricardian_contract": "" 1220 | }, 1221 | { 1222 | "name": "deleteauth", 1223 | "type": "deleteauth", 1224 | "ricardian_contract": "" 1225 | }, 1226 | { 1227 | "name": "init", 1228 | "type": "init", 1229 | "ricardian_contract": "" 1230 | }, 1231 | { 1232 | "name": "linkauth", 1233 | "type": "linkauth", 1234 | "ricardian_contract": "" 1235 | }, 1236 | { 1237 | "name": "namelist", 1238 | "type": "namelist", 1239 | "ricardian_contract": "" 1240 | }, 1241 | { 1242 | "name": "newaccount", 1243 | "type": "newaccount", 1244 | "ricardian_contract": "" 1245 | }, 1246 | { 1247 | "name": "onblock", 1248 | "type": "onblock", 1249 | "ricardian_contract": "" 1250 | }, 1251 | { 1252 | "name": "onerror", 1253 | "type": "onerror", 1254 | "ricardian_contract": "" 1255 | }, 1256 | { 1257 | "name": "refund", 1258 | "type": "refund", 1259 | "ricardian_contract": "" 1260 | }, 1261 | { 1262 | "name": "regproducer", 1263 | "type": "regproducer", 1264 | "ricardian_contract": "" 1265 | }, 1266 | { 1267 | "name": "regproxy", 1268 | "type": "regproxy", 1269 | "ricardian_contract": "" 1270 | }, 1271 | { 1272 | "name": "rmvproducer", 1273 | "type": "rmvproducer", 1274 | "ricardian_contract": "" 1275 | }, 1276 | { 1277 | "name": "sellram", 1278 | "type": "sellram", 1279 | "ricardian_contract": "" 1280 | }, 1281 | { 1282 | "name": "setabi", 1283 | "type": "setabi", 1284 | "ricardian_contract": "" 1285 | }, 1286 | { 1287 | "name": "setacctcpu", 1288 | "type": "setacctcpu", 1289 | "ricardian_contract": "" 1290 | }, 1291 | { 1292 | "name": "setacctnet", 1293 | "type": "setacctnet", 1294 | "ricardian_contract": "" 1295 | }, 1296 | { 1297 | "name": "setacctram", 1298 | "type": "setacctram", 1299 | "ricardian_contract": "" 1300 | }, 1301 | { 1302 | "name": "setalimits", 1303 | "type": "setalimits", 1304 | "ricardian_contract": "" 1305 | }, 1306 | { 1307 | "name": "setcode", 1308 | "type": "setcode", 1309 | "ricardian_contract": "" 1310 | }, 1311 | { 1312 | "name": "setguaminres", 1313 | "type": "setguaminres", 1314 | "ricardian_contract": "" 1315 | }, 1316 | { 1317 | "name": "setparams", 1318 | "type": "setparams", 1319 | "ricardian_contract": "" 1320 | }, 1321 | { 1322 | "name": "setpriv", 1323 | "type": "setpriv", 1324 | "ricardian_contract": "" 1325 | }, 1326 | { 1327 | "name": "setram", 1328 | "type": "setram", 1329 | "ricardian_contract": "" 1330 | }, 1331 | { 1332 | "name": "setramrate", 1333 | "type": "setramrate", 1334 | "ricardian_contract": "" 1335 | }, 1336 | { 1337 | "name": "setupgrade", 1338 | "type": "setupgrade", 1339 | "ricardian_contract": "" 1340 | }, 1341 | { 1342 | "name": "undelegatebw", 1343 | "type": "undelegatebw", 1344 | "ricardian_contract": "" 1345 | }, 1346 | { 1347 | "name": "unlinkauth", 1348 | "type": "unlinkauth", 1349 | "ricardian_contract": "" 1350 | }, 1351 | { 1352 | "name": "unregprod", 1353 | "type": "unregprod", 1354 | "ricardian_contract": "" 1355 | }, 1356 | { 1357 | "name": "updateauth", 1358 | "type": "updateauth", 1359 | "ricardian_contract": "" 1360 | }, 1361 | { 1362 | "name": "updtrevision", 1363 | "type": "updtrevision", 1364 | "ricardian_contract": "" 1365 | }, 1366 | { 1367 | "name": "voteproducer", 1368 | "type": "voteproducer", 1369 | "ricardian_contract": "" 1370 | } 1371 | ], 1372 | "tables": [ 1373 | { 1374 | "name": "abihash", 1375 | "type": "abi_hash", 1376 | "index_type": "i64", 1377 | "key_names": [], 1378 | "key_types": [] 1379 | }, 1380 | { 1381 | "name": "bidrefunds", 1382 | "type": "bid_refund", 1383 | "index_type": "i64", 1384 | "key_names": [], 1385 | "key_types": [] 1386 | }, 1387 | { 1388 | "name": "delband", 1389 | "type": "delegated_bandwidth", 1390 | "index_type": "i64", 1391 | "key_names": [], 1392 | "key_types": [] 1393 | }, 1394 | { 1395 | "name": "global", 1396 | "type": "eosio_global_state", 1397 | "index_type": "i64", 1398 | "key_names": [], 1399 | "key_types": [] 1400 | }, 1401 | { 1402 | "name": "global2", 1403 | "type": "eosio_global_state2", 1404 | "index_type": "i64", 1405 | "key_names": [], 1406 | "key_types": [] 1407 | }, 1408 | { 1409 | "name": "global3", 1410 | "type": "eosio_global_state3", 1411 | "index_type": "i64", 1412 | "key_names": [], 1413 | "key_types": [] 1414 | }, 1415 | { 1416 | "name": "guaranminres", 1417 | "type": "eosio_guaranteed_min_res", 1418 | "index_type": "i64", 1419 | "key_names": [], 1420 | "key_types": [] 1421 | }, 1422 | { 1423 | "name": "namebids", 1424 | "type": "name_bid", 1425 | "index_type": "i64", 1426 | "key_names": [], 1427 | "key_types": [] 1428 | }, 1429 | { 1430 | "name": "producers", 1431 | "type": "producer_info", 1432 | "index_type": "i64", 1433 | "key_names": [], 1434 | "key_types": [] 1435 | }, 1436 | { 1437 | "name": "producers2", 1438 | "type": "producer_info2", 1439 | "index_type": "i64", 1440 | "key_names": [], 1441 | "key_types": [] 1442 | }, 1443 | { 1444 | "name": "rammarket", 1445 | "type": "exchange_state", 1446 | "index_type": "i64", 1447 | "key_names": [], 1448 | "key_types": [] 1449 | }, 1450 | { 1451 | "name": "refunds", 1452 | "type": "refund_request", 1453 | "index_type": "i64", 1454 | "key_names": [], 1455 | "key_types": [] 1456 | }, 1457 | { 1458 | "name": "upgrade", 1459 | "type": "upgrade_state", 1460 | "index_type": "i64", 1461 | "key_names": [], 1462 | "key_types": [] 1463 | }, 1464 | { 1465 | "name": "userres", 1466 | "type": "user_resources", 1467 | "index_type": "i64", 1468 | "key_names": [], 1469 | "key_types": [] 1470 | }, 1471 | { 1472 | "name": "voters", 1473 | "type": "voter_info", 1474 | "index_type": "i64", 1475 | "key_names": [], 1476 | "key_types": [] 1477 | } 1478 | ], 1479 | "ricardian_clauses": [], 1480 | "variants": [], 1481 | "abi_extensions": [] 1482 | } -------------------------------------------------------------------------------- /scripts-bos-test/upgrade/eosio.system.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eosiosg/scripts/0b568f962bdb58673b4f208dbed485567b8c99fd/scripts-bos-test/upgrade/eosio.system.wasm -------------------------------------------------------------------------------- /vote-scripts/create_account.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $1 - account name 3 | # $2 - public key 4 | # $3 - private key 5 | 6 | cleos system newaccount eosio $1 $2 $2 --stake-net "0.1000 SYS" --stake-cpu "0.1000 SYS" --buy-ram-EOS "0.1000 SYS" 7 | cleos wallet import $3 8 | -------------------------------------------------------------------------------- /vote-scripts/create_voter_account.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cleos create account eosio $1 $2 $2 3 | cleos wallet import $3 -------------------------------------------------------------------------------- /vote-scripts/delegate_bandwidth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - from 4 | # $2 - receiver 5 | # $3 - net stake 6 | # $4 - cpu stake 7 | 8 | cleos system delegatebw $1 $2 "$3 SYS" "$4 SYS" --transfer 9 | -------------------------------------------------------------------------------- /vote-scripts/eosio_transfer_token.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name of requiring tokens 4 | # $2 - token amount required 5 | 6 | cleos push action eosio.token transfer '["eosio","'"$1"'","'"$2"' SYS","transfer '"$2"' SYS to '"$1"'"]' -p eosio 7 | 8 | 9 | -------------------------------------------------------------------------------- /vote-scripts/get_account_resource.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name 4 | cleos get account $1 -j 5 | -------------------------------------------------------------------------------- /vote-scripts/get_account_resource_from_table.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name 4 | cleos get table eosio $1 userres 5 | -------------------------------------------------------------------------------- /vote-scripts/get_balance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name 4 | 5 | cleos get currency balance eosio.token $1 6 | 7 | 8 | -------------------------------------------------------------------------------- /vote-scripts/get_producer_info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cleos get table eosio eosio producers -l 1000000000 -------------------------------------------------------------------------------- /vote-scripts/get_refund_time.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $1 - account_name 3 | 4 | cleos get table eosio $1 refunds 5 | -------------------------------------------------------------------------------- /vote-scripts/get_totalband.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name 4 | 5 | cleos get table eosio $1 totalband 6 | -------------------------------------------------------------------------------- /vote-scripts/get_voter_account.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cleos get table eosio eosio voters -l 1000000000000 3 | 4 | -------------------------------------------------------------------------------- /vote-scripts/issue_token.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - account_name of requiring tokens 4 | # $2 - token amount required 5 | 6 | cleos push action eosio.token issue '["'"$1"'","'"$2"' SYS","issue '"$2"' SYS to '"$1"'"]' -p eosio 7 | -------------------------------------------------------------------------------- /vote-scripts/reg_producer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $1 - producer name 3 | # $2 - public key 4 | # $3 - url 5 | # $4 - location 6 | cleos system regproducer $1 $2 $3 $4 7 | -------------------------------------------------------------------------------- /vote-scripts/start_docker_mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:5.7.22 -------------------------------------------------------------------------------- /vote-scripts/undelegate_bandwidth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - from 4 | # $2 - receiver 5 | # $3 - net stake 6 | # $4 - cpu stake 7 | 8 | cleos system undelegatebw $1 $2 "$3 SYS" "$4 SYS" 9 | -------------------------------------------------------------------------------- /vote-scripts/vote_producer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $1 - voter name 4 | # $2 - list of producer name 5 | 6 | cleos push action eosio voteproducer '{"voter":"'"$1"'","proxy":"","producers":['"$2"']}' -p $1 --------------------------------------------------------------------------------