Skip to content

Commit

Permalink
Merge pull request #72 from fioprotocol/feature/FIP-40-fiodevtools-de…
Browse files Browse the repository at this point in the history
…v-03172023

FIP-40 modifications for fio.devtools
  • Loading branch information
edrotthoff committed May 4, 2023
2 parents 8072f7f + 9f195ec commit 7b154ce
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 5 deletions.
10 changes: 10 additions & 0 deletions scripts/actions/update_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ if [ -f ../fio.contracts/build/contracts/fio.escrow/fio.escrow.wasm ]; then
else
echo 'No wasm file found at $PWD/build/contracts/fio.escrow'
fi
#FIP-40
if [ -f ../fio.contracts/build/contracts/fio.perms/fio.perms.wasm ]; then
fio_perms_name_path="$oldpath/../../fio.contracts/build/contracts/fio.perms"
else
echo 'No wasm file found at $PWD/build/contracts/fio.perms'
fi
#FIP-40


if [ -f ../fio.contracts/build/contracts/fio.treasury/fio.treasury.wasm ]; then
fio_treasury_name_path="$oldpath/../../fio.contracts/build/contracts/fio.treasury"
Expand Down Expand Up @@ -98,3 +106,5 @@ 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
#FIP-40
./clio -u http://localhost:8879 set contract -j fio.perms $fio_perms_name_path fio.perms.wasm fio.perms.abi --permission fio.perms@active
14 changes: 11 additions & 3 deletions scripts/fio_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ if [ $mChoice == 1 ]; then
else
echo 'No wasm file found at $PWD/build/contracts/fio.escrow'
fi
# echo "EDEDEDEDEDED just checked for escrow wasm file!!!"
# sleep 10

#FIP-40
if [ -f ../fio.contracts/build/contracts/fio.perms/fio.perms.wasm ]; then
fio_perms_name_path="$oldpath/../../fio.contracts/build/contracts/fio.perms"
else
echo 'No wasm file found at $PWD/build/contracts/fio.perms'
fi

if [ -f ../fio.contracts/build/contracts/fio.treasury/fio.treasury.wasm ]; then
fio_treasury_name_path="$oldpath/../../fio.contracts/build/contracts/fio.treasury"
else
Expand Down Expand Up @@ -189,6 +193,8 @@ if [ $mChoice == 1 ]; then
export fio_tpid_name_path
export fio_staking_name_path
export fio_escrow_name_path
#FIP-40
export fio_perms_name_path
export fio_treasury_name_path
export eosio_wrap_name_path
export fio_oracle_name_path
Expand Down Expand Up @@ -315,6 +321,8 @@ elif [ $mChoice == 2 ]; then
cp ./contracts/fio.address/fio.address.abi ./build/contracts/fio.address/fio.address.abi
cp ./contracts/fio.fee/fio.fee.abi ./build/contracts/fio.fee/fio.fee.abi
cp ./contracts/fio.escrow/fio.escrow.abi ./build/contracts/fio.escrow/fio.escrow.abi
#FIP-40
cp ./contracts/fio.perms/fio.perms.abi ./build/contracts/fio.perms/fio.perms.abi
cp ./contracts/fio.oracle/fio.oracle.abi ./build/contracts/fio.oracle/fio.oracle.abi
cp ./contracts/fio.request.obt/fio.request.obt.abi ./build/contracts/fio.request.obt/fio.request.obt.abi
cp ./contracts/fio.staking/fio.staking.abi ./build/contracts/fio.staking/fio.staking.abi
Expand Down
2 changes: 2 additions & 0 deletions scripts/launch/04_create_accounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ echo creating dev account for escrow and marketplace
#Private key: 5JXkawfVHHZuTAdZrVpdkg4mUNfUytuw8uDUBWcAvb8YMK5R4yY
#FIO Internal Account (actor name): i4wplnm2ogsd
./clio -u http://localhost:8879 create account eosio fio.escrow FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS
######### FIP-40 fio.perms
./clio -u http://localhost:8879 create account eosio fio.perms FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS
sleep 2

#Set Contracts..done using the bios node
Expand Down
5 changes: 3 additions & 2 deletions scripts/launch/09_set_permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
./clio -u http://localhost:8879 set account permission fio.escrow active '{"threshold": 1,"keys": [{"key": "FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS","weight": 1}],"accounts": [{"permission":{"actor":"fio.escrow","permission":"eosio.code"},"weight":1}]}}' 4000000000 owner -p fio.escrow@owner
./clio -u http://localhost:8879 push action eosio setpriv '["fio.escrow",1]' -p eosio@active

#echo "EDEDEDEEEDEDED set permissions escrow account "
#sleep 10
#FIP-40
./clio -u http://localhost:8879 set account permission fio.perms active '{"threshold": 1,"keys": [{"key": "FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS","weight": 1}],"accounts": [{"permission":{"actor":"fio.perms","permission":"eosio.code"},"weight":1}]}}' 4000000000 owner -p fio.perms@owner
./clio -u http://localhost:8879 push action eosio setpriv '["fio.perms",1]' -p eosio@active

./clio -u http://localhost:8879 set account permission r41zuwovtn44 active '{"threshold":1,"keys":[{"key":"FIO5oBUYbtGTxMS66pPkjC2p8pbA3zCtc8XD4dq9fMut867GRdh82","weight":1}],"accounts":[{"permission":{"actor":"r41zuwovtn44","permission":"eosio.code"},"weight":1}]}' 4000000000 owner -p r41zuwovtn44@owner
./clio -u http://localhost:8879 push action eosio setpriv '["r41zuwovtn44",1]' -p eosio@active
Expand Down
4 changes: 4 additions & 0 deletions scripts/launch/12_add_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ sleep 10
./clio -u http://$host push action eosio addaction '{"action":"cxlistdomain","contract":"fio.escrow","actor":"eosio"}' --permission eosio
./clio -u http://$host push action eosio addaction '{"action":"setmrkplcfg","contract":"fio.escrow","actor":"eosio"}' --permission eosio
./clio -u http://$host push action eosio addaction '{"action":"xferescrow","contract":"fio.address","actor":"eosio"}' --permission eosio
#FIP-40 fio.perms
./clio -u http://$host push action eosio addaction '{"action":"addperm","contract":"fio.perms","actor":"eosio"}' --permission eosio
./clio -u http://$host push action eosio addaction '{"action":"remperm","contract":"fio.perms","actor":"eosio"}' --permission eosio
./clio -u http://$host push action eosio addaction '{"action":"clearperm","contract":"fio.perms","actor":"eosio"}' --permission eosio

## admin action only called from fio.address::burnexpired
./clio -u http://$host push action eosio addaction '{"action":"cxburned","contract":"fio.escrow","actor":"eosio"}' --permission eosio
Expand Down
5 changes: 5 additions & 0 deletions scripts/launch/18_create_set_fees_after_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@
./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"set_marketplace_config","type":"0","suf_amount":"500000000"}' --permission fio.fee@active

./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"register_fio_domain_address","type":"0","suf_amount":"800000000000"}' --permission fio.fee@active
#FIP-40 fees
./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"add_fio_permission","type":"0","suf_amount":"514287432"}' --permission fio.fee@active
# for perf testing only ./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"add_fio_permission","type":"0","suf_amount":"0"}' --permission fio.fee@active
./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"remove_fio_permission","type":"0","suf_amount":"212354321"}' --permission fio.fee@active

2 changes: 2 additions & 0 deletions scripts/launch/19_bind_dev_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ sleep 1.5
./clio -u http://localhost:8879 set contract fio.tpid $fio_tpid_name_path fio.tpid.wasm fio.tpid.abi
./clio -u http://localhost:8879 set contract fio.staking $fio_staking_name_path fio.staking.wasm fio.staking.abi
./clio -u http://localhost:8879 set contract fio.escrow $fio_escrow_name_path fio.escrow.wasm fio.escrow.abi
#FIP-40
./clio -u http://localhost:8879 set contract fio.perms $fio_perms_name_path fio.perms.wasm fio.perms.abi

./clio -u http://localhost:8879 set contract eosio.msig $eosio_msig_contract_name_path eosio.msig.wasm eosio.msig.abi
./clio -u http://localhost:8879 set contract fio.address $fio_contract_name_path fio.address.wasm fio.address.abi --permission fio.address@active
Expand Down

0 comments on commit 7b154ce

Please sign in to comment.