...
...
Add new actions
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"listdomain","contract":"fio.escrow","actor":"eosio"}' --permission p eosio
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"cxlistdomain","contract":"fio.escrow","actor":"eosio"}' --permission p eosio
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"buydomain","contract":"fio.escrow","actor":"eosio"}' --permission p eosio
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"setmrkplcfg","contract":"fio.escrow","actor":"eosio"}' --permission p eosio
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"cxburned","contract":"fio.escrow","actor":"eosio"}' --permission p eosio
./clio -u http://localhost:8889 .sh push action eosio addaction '{"action":"xferescrow","contract":"fio.address","actor":"eosio"}' --permission eosiop eosio
./clio.sh push action eosio addaction '{"action":"retire","contract":"fio.token","actor":"eosio"}' -p eosio
Validation: run get_actions to confirm new actions
Testnet example: https://fio-test.bloks.io/msig/gws1hlwlqhq1/fioaddaction
Create the new fees
Mainnet fees shown below (removed nft createfee calls that were testnet only):
./clio -u http://localhost:8898 .sh push action -f fio.fee createfee '{"end_point":"list_domain","type":"10","suf_amount":"3000000000304804402"}' --permission p fio.fee@activefee
./clio -u http://localhost:8898 .sh push action -f fio.fee createfee '{"end_point":"cancel_list_domain","type":"10","suf_amount":"3000000000203202935"}' --permission p fio.fee@activefee
./clio -u http://localhost:8898 .sh push action -f fio.fee createfee '{"end_point":"buy_domain","type":"10","suf_amount":"3000000000203202935"}' --permission p fio.fee@activefee
./clio -u http://localhost:8898 .sh push action -f fio.fee createfee '{"end_point":"set_marketplace_config","type":"10","suf_amount":"3000000000203202935"}' --permission p fio.fee@active
Deploy system contract
./clio -u http://localhost:8889 set contract -j eosio /home/ubuntu/fio.contracts/build/contracts/fio.system fio.system.wasm fio.system.abi --permission eosio@activefee
Validation: look at fio.fee fiofees table to confirm new fees
Testnet example: https://fio-test.bloks.io/msig/gws1hlwlqhq1/fiocreatefee
Create account and set permissions
...
Create the new account
./clio -u http://localhost:8898 create account eosio fio.escrow FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS -p eosio@active
Set the account permissions
...
(Part 1)
(Part 1 must be done before Part 2 msigs can be created)
First, create a file called “payload.json” with the following permissions:
Code Block |
---|
{
"creator": "eosio",
"name": "fio.escrow",
"owner": {
"threshold": 1,
"keys": [],
"accounts": [{
"permission": {"actor": "eosio", "permission": "active"},
"weight": 1
}],
"waits": []
},
"active": {
"threshold": 1,
"keys": [],
"accounts": [{
"permission": {"actor": "eosio", "permission": "active"},
"weight": 1
},
{
"permission": {"actor": "fio.escrow", "permission": "eosio.code"},
"weight": 1
}],
"waits": []
}
} |
Next create a new account with those permissions.
./clio.sh push action -j -s -d eosio newaccount newaccount_payload.json -p eosio@active
Validation: compare account permissions on bloks.io to existing system account
Testnet example: https://fio-test.bloks.io/msig/bsbdk2lectan/crtfioescrow2
Create account to be privileged and set RAM limits. (Part 2)
Set the account to be privileged.
./clio -u http://localhost:8898 push action .sh eosio setpriv '["fio.escrow",1]' -p eosio@active
...
Validation: get_account for fio.escrow should return: "privileged": true
Remove RAM limits on the new account, this may be called by eosio, and fio.system only!
./clio -u http://localhost:8889 .sh push action eosio setnolimits '{"account":"fio.escrow"}' --permission eosio@active
Validation: get_account for fio.escrow should return: ”ram_quota": -1
Testnet example: https://fio-test.bloks.io/msig/un3emex141fp/setpriv.a
Deploy system contract
./clio.sh set contract eosio /opt/FIO/bin/Contracts/last/fio.system/ -p eosio
Validation: run fio.devtools “Contract Hashes” query to confirm ABI and contract hashes match.
Testnet example: https://fio-test.bloks.io/msig/bsbdk2lectan/updfiosys
Set the contract on the new account
./clio -u http://localhost:8889 .sh set contract -j fio.escrow /homeopt/ubuntuFIO/fio.contractsbin/buildContracts/contractslast/fio.escrow/ -p fio.escrow.wasm fio.escrow.abi --permission fio.escrow@active
Validation: run fio.devtools “Contract Hashes” query to confirm ABI and contract hashes match.
Testnet example: https://fio-test.bloks.io/msig/bsbdk2lectan/crtfioesc
Set all other contracts
...
Need to confirm no changes to: eosio.msig, eosio.wrap, fio.fee, fio.tpid, fio.staking
...
./clio -u http://localhost:8889 .sh set contract -j fio.address /homeopt/ubuntuFIO/fio.contractsbin/buildContracts/contractslast/fio.address/ -p fio.address.wasm fio.address.abi --permission fio.address@active
...
./clio -u http://localhost:8889 .sh set contract -j fio.reqobt /homeopt/ubuntuFIO/fio.contractsbin/buildContracts/contractslast/fio.request.obt fio.request.obt.wasm fio.request.obt.abi --permission fio.reqobt@active
...
/ -p fio.reqobt
./clio -u http://localhost:8889 .sh set contract -j fio.token /homeopt/ubuntuFIO/fio.contractsbin/buildContracts/contractslast/fio.token/ -p fio.token.wasm fio.token.abi --permission fio.token@active
...
./clio.sh set contract fio.treasury /opt/FIO/bin/Contracts/last/fio.treasury/ -p fio.treasury
./clio -u http://localhost:8889 .sh set contract -j fio.treasury /home/ubuntustaking /opt/FIO/bin/Contracts/last/fio.contracts/build/contracts/fio.treasury fio.treasury.wasm fio.treasury.abi --permission fio.treasury @activestaking/ -p fio.staking
Validation: run fio.devtools “Contract Hashes” query to confirm ABI and contract hashes match.
Initialize the Marketplace Account (must be done after escrow contract is set)
This initializes the marketplace TESTNET admin account. Thomas will need to create a Mainnet account as well.
TESTNET: ./clio.sh push action fio.escrow setmrkplcfg '{"actor":"p325sqluvj4u", "listing_fee": "5000000000", "commission_fee": 3, "max_fee": "1000000000", "e_break": 0}' -p eosio@active
MAINNET: ./clio.sh push action fio.escrow setmrkplcfg '{"actor":"q3k31xlj413z", "listing_fee": "5000000000", "commission_fee": 3, "max_fee": "1000000000", "e_break": 0}' -p eosio@active
Validation: check fio.escrow mrkplconfigs table to confirm account was added
Testnet example: https://fio-test.bloks.io/msig/bsbdk2lectan/setmrkplcfg