Skip to content

Commit

Permalink
revert changes to the integration script
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Nov 8, 2023
1 parent f1bb915 commit b145cbf
Showing 1 changed file with 96 additions and 96 deletions.
192 changes: 96 additions & 96 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,140 +20,140 @@ echo $OMNI_SWAP_CCTX

popd

# pushd "./omnichain/staking"
pushd "./omnichain/staking"

# yarn

# npx hardhat compile --force
yarn

# echo "Testing omnichain Staking"
npx hardhat compile --force

# OMNI_STAKING_CONTRACT=$(npx hardhat deploy --network zeta_testnet --chain goerli_testnet --json | jq -r '.address')
echo "Testing omnichain Staking"

# echo $OMNI_STAKING_CONTRACT
OMNI_STAKING_CONTRACT=$(npx hardhat deploy --network zeta_testnet --chain goerli_testnet --json | jq -r '.address')

# echo "Setting beneficiary"
# OMNI_STAKING_BENEFICIARY_TX=$(npx hardhat set-beneficiary $SENDER --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
# echo $OMNI_STAKING_BENEFICIARY_TX
# OMNI_STAKING_BENEFICIARY_CCTX=$(npx hardhat cctx $OMNI_STAKING_BENEFICIARY_TX --json)
# echo $OMNI_STAKING_BENEFICIARY_CCTX
echo $OMNI_STAKING_CONTRACT

# echo "Setting withdraw"
# OMNI_STAKING_WITHDRAW_TX=$(npx hardhat set-withdraw --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
# echo $OMNI_STAKING_WITHDRAW_TX
# OMNI_STAKING_WITHDRAW_CCTX=$(npx hardhat cctx $OMNI_STAKING_WITHDRAW_TX --json)
# echo $OMNI_STAKING_WITHDRAW_CCTX
echo "Setting beneficiary"
OMNI_STAKING_BENEFICIARY_TX=$(npx hardhat set-beneficiary $SENDER --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
echo $OMNI_STAKING_BENEFICIARY_TX
OMNI_STAKING_BENEFICIARY_CCTX=$(npx hardhat cctx $OMNI_STAKING_BENEFICIARY_TX --json)
echo $OMNI_STAKING_BENEFICIARY_CCTX

# echo "Stake"
# OMNI_STAKING_STAKE_TX=$(npx hardhat stake --amount 0.01 --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
# echo $OMNI_STAKING_STAKE_TX
# OMNI_STAKING_STAKE_CCTX=$(npx hardhat cctx $OMNI_STAKING_STAKE_TX --json)
# echo $OMNI_STAKING_STAKE_CCTX
echo "Setting withdraw"
OMNI_STAKING_WITHDRAW_TX=$(npx hardhat set-withdraw --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
echo $OMNI_STAKING_WITHDRAW_TX
OMNI_STAKING_WITHDRAW_CCTX=$(npx hardhat cctx $OMNI_STAKING_WITHDRAW_TX --json)
echo $OMNI_STAKING_WITHDRAW_CCTX

# echo "Unstake"
# OMNI_STAKING_UNSTAKE_TX=$(npx hardhat unstake --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
# echo $OMNI_STAKING_UNSTAKE_TX
# OMNI_STAKING_UNSTAKE_CCTX=$(npx hardhat cctx $OMNI_STAKING_UNSTAKE_TX --json)
# echo $OMNI_STAKING_UNSTAKE_CCTX
echo "Stake"
OMNI_STAKING_STAKE_TX=$(npx hardhat stake --amount 0.01 --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
echo $OMNI_STAKING_STAKE_TX
OMNI_STAKING_STAKE_CCTX=$(npx hardhat cctx $OMNI_STAKING_STAKE_TX --json)
echo $OMNI_STAKING_STAKE_CCTX

# popd
echo "Unstake"
OMNI_STAKING_UNSTAKE_TX=$(npx hardhat unstake --contract $OMNI_STAKING_CONTRACT --network goerli_testnet --json | jq -r '.hash')
echo $OMNI_STAKING_UNSTAKE_TX
OMNI_STAKING_UNSTAKE_CCTX=$(npx hardhat cctx $OMNI_STAKING_UNSTAKE_TX --json)
echo $OMNI_STAKING_UNSTAKE_CCTX

# pushd "./messaging/message"
popd

# yarn
pushd "./messaging/message"

# npx hardhat compile --force
yarn

# echo "Testing CCM Message"
npx hardhat compile --force

# CCM_MESSAGE_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json)
# CCM_MESSAGE_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $(echo $CCM_MESSAGE_CONTRACT | jq -r '.goerli_testnet') --message "Hello World" --destination mumbai_testnet --amount 0.01 --json )
# echo $CCM_MESSAGE_TX_OUT
# CCM_MESSAGE_TX=$(echo $CCM_MESSAGE_TX_OUT | jq -r '.hash')
# echo $CCM_MESSAGE_TX
# CCM_MESSAGE_CCTX=$(npx hardhat cctx $CCM_MESSAGE_TX --json)
# echo $CCM_MESSAGE_CCTX
echo "Testing CCM Message"

# popd
CCM_MESSAGE_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json)
CCM_MESSAGE_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $(echo $CCM_MESSAGE_CONTRACT | jq -r '.goerli_testnet') --message "Hello World" --destination mumbai_testnet --amount 0.01 --json )
echo $CCM_MESSAGE_TX_OUT
CCM_MESSAGE_TX=$(echo $CCM_MESSAGE_TX_OUT | jq -r '.hash')
echo $CCM_MESSAGE_TX
CCM_MESSAGE_CCTX=$(npx hardhat cctx $CCM_MESSAGE_TX --json)
echo $CCM_MESSAGE_CCTX

# pushd "./messaging/warriors"
popd

# yarn
pushd "./messaging/warriors"

# npx hardhat compile --force
yarn

# echo "Testing CCM Warriors"
npx hardhat compile --force

# CCM_NFT_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
# echo $CCM_NFT_CONTRACT
echo "Testing CCM Warriors"

# CCM_NFT_MINT=$(npx hardhat mint --network goerli_testnet --contract $CCM_NFT_CONTRACT --json)
# CCM_NFT_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_NFT_CONTRACT --token $CCM_NFT_MINT --destination mumbai_testnet --amount 0.01 --to $SENDER --json)
# echo $CCM_NFT_TX_OUT
# CCM_NFT_TX=$(echo $CCM_NFT_TX_OUT | jq -r '.hash')
# echo $CCM_NFT_TX
# CCM_NFT_CCTX=$(npx hardhat cctx $CCM_NFT_TX --json)
# echo $CCM_NFT_CCTX
CCM_NFT_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
echo $CCM_NFT_CONTRACT

# popd
CCM_NFT_MINT=$(npx hardhat mint --network goerli_testnet --contract $CCM_NFT_CONTRACT --json)
CCM_NFT_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_NFT_CONTRACT --token $CCM_NFT_MINT --destination mumbai_testnet --amount 0.01 --to $SENDER --json)
echo $CCM_NFT_TX_OUT
CCM_NFT_TX=$(echo $CCM_NFT_TX_OUT | jq -r '.hash')
echo $CCM_NFT_TX
CCM_NFT_CCTX=$(npx hardhat cctx $CCM_NFT_TX --json)
echo $CCM_NFT_CCTX

# pushd "./messaging/counter"
popd

# yarn
pushd "./messaging/counter"

# npx hardhat compile --force
yarn

# echo "Testing CCM Counter"
npx hardhat compile --force

# CCM_COUNTER_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
# echo $CCM_COUNTER_CONTRACT
# CCM_COUNTER_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_COUNTER_CONTRACT --destination mumbai_testnet --amount 0.01 --json)
# echo $CCM_COUNTER_TX_OUT
# CCM_COUNTER_TX=$(echo $CCM_COUNTER_TX_OUT | jq -r '.hash')
# echo $CCM_COUNTER_TX
# CCM_COUNTER_CCTX=$(npx hardhat cctx $CCM_COUNTER_TX --json)
# echo $CCM_COUNTER_CCTX
echo "Testing CCM Counter"

# popd
CCM_COUNTER_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
echo $CCM_COUNTER_CONTRACT
CCM_COUNTER_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_COUNTER_CONTRACT --destination mumbai_testnet --amount 0.01 --json)
echo $CCM_COUNTER_TX_OUT
CCM_COUNTER_TX=$(echo $CCM_COUNTER_TX_OUT | jq -r '.hash')
echo $CCM_COUNTER_TX
CCM_COUNTER_CCTX=$(npx hardhat cctx $CCM_COUNTER_TX --json)
echo $CCM_COUNTER_CCTX

# pushd "./messaging/value"
popd

# yarn
pushd "./messaging/value"

# npx hardhat compile --force
yarn

# echo "Testing CCM Value"
npx hardhat compile --force

# CCM_VALUE_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
# echo $CCM_VALUE_CONTRACT
# PROTOCOL_FEE=$(npx hardhat fees --json | jq -r ".feesCCM.mumbai_testnet.protocolFee")
# GAS_FEE=$(npx hardhat fees --json | jq -r ".feesCCM.mumbai_testnet.gasFee")
# # Multiply to be on the safe side
# CCM_FEE=$(echo "$PROTOCOL_FEE + $GAS_FEE * 3" | bc -l)
# CCM_VALUE_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_VALUE_CONTRACT --destination mumbai_testnet --amount $CCM_FEE --json)
# echo $CCM_VALUE_TX_OUT
# CCM_VALUE_TX=$(echo $CCM_VALUE_TX_OUT | jq -r '.hash')
# echo $CCM_VALUE_TX
# CCM_VALUE_CCTX=$(npx hardhat cctx $CCM_VALUE_TX --json)
# echo $CCM_VALUE_CCTX
echo "Testing CCM Value"

CCM_VALUE_CONTRACT=$(npx hardhat deploy --networks goerli_testnet,mumbai_testnet --json | jq -r '.goerli_testnet')
echo $CCM_VALUE_CONTRACT
PROTOCOL_FEE=$(npx hardhat fees --json | jq -r ".feesCCM.mumbai_testnet.protocolFee")
GAS_FEE=$(npx hardhat fees --json | jq -r ".feesCCM.mumbai_testnet.gasFee")
# Multiply to be on the safe side
CCM_FEE=$(echo "$PROTOCOL_FEE + $GAS_FEE * 3" | bc -l)
CCM_VALUE_TX_OUT=$(npx hardhat interact --network goerli_testnet --contract $CCM_VALUE_CONTRACT --destination mumbai_testnet --amount $CCM_FEE --json)
echo $CCM_VALUE_TX_OUT
CCM_VALUE_TX=$(echo $CCM_VALUE_TX_OUT | jq -r '.hash')
echo $CCM_VALUE_TX
CCM_VALUE_CCTX=$(npx hardhat cctx $CCM_VALUE_TX --json)
echo $CCM_VALUE_CCTX

# popd
popd

# pushd "./omnichain/multioutput"
pushd "./omnichain/multioutput"

# yarn
yarn

# npx hardhat compile --force
npx hardhat compile --force

# echo "Testing omnichain Multioutput"
echo "Testing omnichain Multioutput"

# OMNI_MULTIOUTPUT_CONTRACT=$(npx hardhat deploy --network zeta_testnet --json | jq -r '.address')
# echo $OMNI_MULTIOUTPUT_CONTRACT
OMNI_MULTIOUTPUT_CONTRACT=$(npx hardhat deploy --network zeta_testnet --json | jq -r '.address')
echo $OMNI_MULTIOUTPUT_CONTRACT

# npx hardhat destination --contract $OMNI_MULTIOUTPUT_CONTRACT --network zeta_testnet --destination mumbai_testnet
# OMNI_MULTIOUTPUT_TX=$(npx hardhat interact --contract $OMNI_MULTIOUTPUT_CONTRACT --network goerli_testnet --amount 0.01 --recipient $SENDER --json | jq -r '.hash')
# echo $OMNI_MULTIOUTPUT_TX
# OMNI_MULTIOUTPUT_CCTX=$(npx hardhat cctx $OMNI_MULTIOUTPUT_TX --json)
# echo $OMNI_MULTIOUTPUT_CCTX
npx hardhat destination --contract $OMNI_MULTIOUTPUT_CONTRACT --network zeta_testnet --destination mumbai_testnet
OMNI_MULTIOUTPUT_TX=$(npx hardhat interact --contract $OMNI_MULTIOUTPUT_CONTRACT --network goerli_testnet --amount 0.01 --recipient $SENDER --json | jq -r '.hash')
echo $OMNI_MULTIOUTPUT_TX
OMNI_MULTIOUTPUT_CCTX=$(npx hardhat cctx $OMNI_MULTIOUTPUT_TX --json)
echo $OMNI_MULTIOUTPUT_CCTX

# popd
popd

0 comments on commit b145cbf

Please sign in to comment.