diff --git a/scripts/actions/update_contracts.sh b/scripts/actions/update_contracts.sh index 5528422..633765e 100755 --- a/scripts/actions/update_contracts.sh +++ b/scripts/actions/update_contracts.sh @@ -68,6 +68,12 @@ if [ -f ../fio.contracts/build/contracts/eosio.wrap/eosio.wrap.wasm ]; then echo 'No wasm file found at $PWD/build/contracts/eosio.wrap' fi +if [ -f ../fio.contracts/build/contracts/fio.oracle/fio.oracle.wasm ]; then + fio_oracle_name_path="$oldpath/../../fio.contracts/build/contracts/fio.oracle" + else + echo 'No wasm file found at $PWD/build/contracts/fio.oracle' +fi + cd ~/fio/$vChoice/bin walletkey=$(head -n 1 $oldpath/../walletkey.ini) @@ -88,5 +94,7 @@ sleep 1.5 ./clio -u http://localhost:8879 set contract -j fio.fee $fio_fee_name_path fio.fee.wasm fio.fee.abi --permission fio.fee@active sleep 1.5 ./clio -u http://localhost:8889 set contract -j fio.treasury $fio_treasury_name_path fio.treasury.wasm fio.treasury.abi --permission fio.treasury@active +sleep 1.5s +./clio -u http://localhost:8879 set contract -j fio.oracle $fio_oracle_name_path fio.oracle.wasm fio.oracle.abi --permission fio.oracle@active ./clio -u http://localhost:8879 set contract -j fio.staking $fio_staking_name_path fio.staking.wasm fio.staking.abi --permission fio.staking@active ./clio -u http://localhost:8879 set contract -j fio.escrow $fio_escrow_name_path fio.escrow.wasm fio.escrow.abi --permission fio.escrow@active diff --git a/scripts/fio_launch.sh b/scripts/fio_launch.sh index 9b149b3..b917fc0 100755 --- a/scripts/fio_launch.sh +++ b/scripts/fio_launch.sh @@ -57,6 +57,7 @@ if [ $mChoice == 2 ]; then cp ./contracts/fio.fee/fio.fee.abi ./build/contracts/fio.fee/fio.fee.abi cp ./contracts/fio.address/fio.address.abi ./build/contracts/fio.address/fio.address.abi cp ./contracts/fio.request.obt/fio.request.obt.abi ./build/contracts/fio.request.obt/fio.request.obt.abi + cp ./contracts/fio.oracle/fio.oracle.abi ./build/contracts/fio.oracle/fio.oracle.abi cp ./contracts/fio.staking/fio.staking.abi ./build/contracts/fio.staking/fio.staking.abi cp ./contracts/fio.escrow/fio.escrow.abi ./build/contracts/fio.escrow/fio.escrow.abi echo COMPLETE - READY TO LAUNCH @@ -141,6 +142,12 @@ if [ $mChoice == 1 ]; then echo 'No wasm file found at $PWD/build/contracts/eosio.wrap' fi + if [ -f ../fio.contracts/build/contracts/fio.oracle/fio.oracle.wasm ]; then + fio_oracle_name_path="$oldpath/../../fio.contracts/build/contracts/fio.oracle" + else + echo 'No wasm file found at $PWD/build/contracts/fio.oracle' + fi + #FIO Base Directory Check if [ -f bin/baseContract/master/fio.contracts/build/contracts/eosio.bios/eosio.bios.wasm ]; then eosio_bios_contract_base_path="$basepath/fio.contracts/build/contracts/eosio.bios" @@ -214,6 +221,7 @@ if [ $mChoice == 1 ]; then export fio_escrow_name_path export fio_treasury_name_path export eosio_wrap_name_path + export fio_oracle_name_path export eosio_bios_contract_base_path export fio_system_contract_base_path diff --git a/scripts/launch/02_import_keys.sh b/scripts/launch/02_import_keys.sh index 1d8f639..ac97653 100755 --- a/scripts/launch/02_import_keys.sh +++ b/scripts/launch/02_import_keys.sh @@ -8,6 +8,7 @@ #foundation msig account, this becomes useless when the msig is created. ./clio wallet import --private-key 5KjKZyDuk1t5b8UGpjbqzmSYZViUdcPVgfJUsDjPGTKdHUtdHvt -n fio ./clio wallet import --private-key 5JxUfAkXoCQdeZKNMhXEqRkFcZMYa3KR3vbie7SKsPv6rS3pCHg -n fio +# eosio ./clio wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 -n fio ./clio wallet import --private-key 5KDQzVMaD1iUdYDrA2PNK3qEP7zNbUf8D41ZVKqGzZ117PdM5Ap -n fio ./clio wallet import --private-key 5Jr2SxVH6bh6QcJerJrGKvNAp7zfemN98rp4BfzFonkJQmcumvP -n fio @@ -59,6 +60,10 @@ #faucet account sleep 1 ./clio wallet import --private-key 5KF2B21xT5pE5G3LNA6LKJc6AP2pAd2EnfpAUrJH12SFV8NtvCD -n fio +sleep 1s + +# fio.oracle +./clio wallet import --private-key 5JXkawfVHHZuTAdZrVpdkg4mUNfUytuw8uDUBWcAvb8YMK5R4yY -n fio sleep 0.5 # blocksmith dev accounts diff --git a/scripts/launch/04_create_accounts.sh b/scripts/launch/04_create_accounts.sh index 48d5916..ed0972c 100755 --- a/scripts/launch/04_create_accounts.sh +++ b/scripts/launch/04_create_accounts.sh @@ -27,5 +27,15 @@ sleep 1.5 ./clio -u http://localhost:8879 set contract fio.tpid $fio_tpid_base_path fio.tpid.wasm fio.tpid.abi sleep 10 ./clio -u http://localhost:8879 set contract eosio.msig $eosio_msig_contract_base_path eosio.msig.wasm eosio.msig.abi + +./clio -u http://localhost:8879 set contract -j fio.address $fio_contract_base_path fio.address.wasm fio.address.abi --permission fio.address@active +sleep 2s + +echo creating dev account for escrow and marketplace +###### ESCROW +#Public Key: FIO5VEZHHBJwgzjVtLrdUYZ4dPbTFNHGLDcaB4gKDo2GHhwHbW7QE +#Private key: 5JXkawfVHHZuTAdZrVpdkg4mUNfUytuw8uDUBWcAvb8YMK5R4yY +#FIO Internal Account (actor name): i4wplnm2ogsd +./clio -u http://localhost:8879 create account eosio fio.oracle FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS ./clio -u http://localhost:8879 set contract fio.address $fio_contract_base_path fio.address.wasm fio.address.abi --permission fio.address@active sleep 2 diff --git a/scripts/launch/09_set_permissions.sh b/scripts/launch/09_set_permissions.sh index fb2be0d..a81921e 100755 --- a/scripts/launch/09_set_permissions.sh +++ b/scripts/launch/09_set_permissions.sh @@ -37,3 +37,7 @@ ./clio -u http://localhost:8889 set account permission fio.treasury active --add-code sleep 1 ./clio -u http://localhost:8889 push action fio.treasury startclock '{"":""}' -p fio.treasury@active + +#fio.oracle +./clio -u http://localhost:8879 push action eosio setpriv '["fio.oracle",1]' -p eosio@active +./clio -u http://localhost:8879 set account permission fio.oracle active '{"threshold": 1,"keys": [{"key": "FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS","weight": 1}],"accounts": [{"permission":{"actor":"fio.oracle","permission":"eosio.code"},"weight":1}]}}' 4000000000 owner -p fio.oracle@owner diff --git a/scripts/launch/12_add_actions.sh b/scripts/launch/12_add_actions.sh index 37e5001..0497608 100755 --- a/scripts/launch/12_add_actions.sh +++ b/scripts/launch/12_add_actions.sh @@ -61,6 +61,17 @@ sleep 10 ./clio -u http://$host push action eosio addaction '{"action":"newfundsreq","contract":"fio.reqobt","actor":"eosio"}' --permission eosio ./clio -u http://$host push action eosio addaction '{"action":"rewardspaid","contract":"fio.tpid","actor":"eosio"}' --permission eosio ./clio -u http://$host push action eosio addaction '{"action":"updatetpid","contract":"fio.tpid","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"execute","contract":"eosio.wrap","actor":"eosio"}' --permission eosio +# fio.oracle: +./clio -u http://$host push action eosio addaction '{"action":"wraptokens","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"unwraptokens","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"regoracle","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"unregoracle","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"setoraclefee","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"wrapdomain","contract":"fio.oracle","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"xferescrow","contract":"fio.address","actor":"eosio"}' --permission eosio +./clio -u http://$host push action eosio addaction '{"action":"unwrapdomain","contract":"fio.oracle","actor":"eosio"}' --permission eosio + # USED FOR TESTING: ./clio -u http://$host push action eosio addaction '{"action":"migrtrx","contract":"fio.reqobt","actor":"eosio"}' --permission eosio ./clio -u http://$host push action eosio addaction '{"action":"addnft","contract":"fio.address","actor":"eosio"}' --permission eosio diff --git a/scripts/launch/18_create_set_fees_after_genesis.sh b/scripts/launch/18_create_set_fees_after_genesis.sh index f59e53b..e2524fb 100755 --- a/scripts/launch/18_create_set_fees_after_genesis.sh +++ b/scripts/launch/18_create_set_fees_after_genesis.sh @@ -36,6 +36,9 @@ ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"msig_cancel","type":"0","suf_amount":"400000000"}' --permission fio.fee@active ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"msig_exec","type":"0","suf_amount":"400000000"}' --permission fio.fee@active ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"msig_invalidate","type":"0","suf_amount":"400000000"}' --permission fio.fee@active + +./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"wrap_fio_tokens","type":"0","suf_amount":"400000000"}' --permission fio.fee@active +./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"wrap_fio_domain","type":"0","suf_amount":"400000000"}' --permission fio.fee@active ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"add_nft","type":"1","suf_amount":"600000000"}' --permission fio.fee@active ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"remove_nft","type":"1","suf_amount":"600000000"}' --permission fio.fee@active ./clio -u http://localhost:8879 push action -f fio.fee createfee '{"end_point":"remove_all_nfts","type":"1","suf_amount":"1200000000"}' --permission fio.fee@active diff --git a/scripts/launch/19_bind_dev_contracts.sh b/scripts/launch/19_bind_dev_contracts.sh index 16d0149..ecef897 100755 --- a/scripts/launch/19_bind_dev_contracts.sh +++ b/scripts/launch/19_bind_dev_contracts.sh @@ -13,11 +13,15 @@ sleep 1.5 ./clio -u http://localhost:8879 set contract fio.address $fio_contract_name_path fio.address.wasm fio.address.abi --permission fio.address@active # Bind more fio contracts -./clio -u http://localhost:8879 set contract fio.reqobt $fio_reqobt_name_path fio.request.obt.wasm fio.request.obt.abi --permission fio.reqobt@active -sleep 1.5 -./clio -u http://localhost:8879 set contract fio.fee $fio_fee_name_path fio.fee.wasm fio.fee.abi --permission fio.fee@active -sleep 1.5 -./clio -u http://localhost:8889 set contract fio.treasury $fio_treasury_name_path fio.treasury.wasm fio.treasury.abi --permission fio.treasury@active +./clio -u http://localhost:8879 set contract -j fio.reqobt $fio_reqobt_name_path fio.request.obt.wasm fio.request.obt.abi --permission fio.reqobt@active +sleep 1.5s +./clio -u http://localhost:8879 set contract -j fio.fee $fio_fee_name_path fio.fee.wasm fio.fee.abi --permission fio.fee@active +sleep 1.5s +./clio -u http://localhost:8889 set contract -j fio.treasury $fio_treasury_name_path fio.treasury.wasm fio.treasury.abi --permission fio.treasury@active + +# oracle contract +./clio -u http://localhost:8889 set contract -j fio.oracle $fio_oracle_name_path fio.oracle.wasm fio.oracle.abi --permission fio.oracle@active +sleep 1.5s ############ Initial marketplace config action that requires EOSIO permissions diff --git a/scripts/queries/tables.sh b/scripts/queries/tables.sh index 4462fb6..813b299 100755 --- a/scripts/queries/tables.sh +++ b/scripts/queries/tables.sh @@ -3,7 +3,7 @@ cd ~/fio/$vChoice/bin if [ -z "$1" ]; then - read -p $'\n1. fioreqctxts 2. fionames 3. domains 4. accountmap 5. fioreqsts\n6. producers 7. voters 8. fdtnrewards 9. recordobts 10. FIO Token Stat 11. bundlevoters 12. fiotrxts\nChoose(#):' mChoice + read -p $'\n1. fioreqctxts 2. fionames 3. domains 4. accountmap 5. fioreqsts\n6. producers 7. voters 8. fdtnrewards 9. recordobts 10. FIO Token Stat 11. bundlevoters 12. fiotrxts 13. oraclelgdrs 14. oracless\nChoose(#):' mChoice else mChoice=$1 fi @@ -31,6 +31,10 @@ elif [ $mChoice == 10 ]; then elif [ $mChoice == 11 ]; then ./clio -u http://localhost:8889 get table fio.fee fio.fee bundlevoters elif [ $mChoice == 12 ]; then - ./clio -u http://localhost:8889 get table -l -1 fio.reqobt fio.reqobt fiotrxts + ./clio -u http://localhost:8889 get table -l -1 fio.reqobt fio.reqobt fiotrxtss +elif [ $mChoice == 13 ]; then + ./clio -u http://localhost:8889 get table -l -1 fio.oracle fio.oracle oraclelgdrs +elif [ $mChoice == 14 ]; then + ./clio -u http://localhost:8889 get table -l -1 fio.oracle fio.oracle oracless fi