From f855349d3db7a74653f8cb370b3320f8b39b30c2 Mon Sep 17 00:00:00 2001 From: axenteoctavian Date: Mon, 20 Jan 2025 14:31:09 +0200 Subject: [PATCH 1/3] sovereign wallet path in config --- scripts/testnet/sovereignBridge/config/common.snippets.sh | 2 +- scripts/testnet/sovereignBridge/config/configs.cfg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/testnet/sovereignBridge/config/common.snippets.sh b/scripts/testnet/sovereignBridge/config/common.snippets.sh index 3097b89907a..456bb33cc3f 100644 --- a/scripts/testnet/sovereignBridge/config/common.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/common.snippets.sh @@ -12,7 +12,7 @@ getFundsInAddressSovereign() { local OUTFILE="${OUTFILE_PATH}/get-funds-sovereign.interaction.json" mxpy tx new \ - --pem="~/MultiversX/testnet/node/config/walletKey.pem" \ + --pem=${WALLET_SOVEREIGN} \ --pem-index 0 \ --proxy=${PROXY_SOVEREIGN} \ --chain=${CHAIN_ID_SOVEREIGN} \ diff --git a/scripts/testnet/sovereignBridge/config/configs.cfg b/scripts/testnet/sovereignBridge/config/configs.cfg index dd709951b85..a7a30b97a2f 100644 --- a/scripts/testnet/sovereignBridge/config/configs.cfg +++ b/scripts/testnet/sovereignBridge/config/configs.cfg @@ -5,6 +5,7 @@ CONTRACTS_DIRECTORY="${SOVEREIGN_DIRECTORY}/contracts" #============ OWNER ============== WALLET="~/wallet.pem" +WALLET_SOVEREIGN="~/MultiversX/testnet/node/config/walletKey.pem" #=========== NETWORK CONFIGURATION =========== PROXY=https://testnet-gateway.multiversx.com From ae1c426b66ac465f3adeb5fe42a7f74c613850fc Mon Sep 17 00:00:00 2001 From: axenteoctavian Date: Mon, 20 Jan 2025 15:06:06 +0200 Subject: [PATCH 2/3] deleted --chain parameter because it's taken from --proxy --- scripts/testnet/sovereignBridge/config/common.snippets.sh | 1 - scripts/testnet/sovereignBridge/config/configs.cfg | 2 -- .../testnet/sovereignBridge/config/esdt-safe.snippets.sh | 6 ------ .../testnet/sovereignBridge/config/fee-market.snippets.sh | 5 ----- .../sovereignBridge/config/header-verifier.snippets.sh | 3 --- scripts/testnet/sovereignBridge/config/token.snippets.sh | 6 ------ 6 files changed, 23 deletions(-) diff --git a/scripts/testnet/sovereignBridge/config/common.snippets.sh b/scripts/testnet/sovereignBridge/config/common.snippets.sh index 456bb33cc3f..bb168f8ba94 100644 --- a/scripts/testnet/sovereignBridge/config/common.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/common.snippets.sh @@ -15,7 +15,6 @@ getFundsInAddressSovereign() { --pem=${WALLET_SOVEREIGN} \ --pem-index 0 \ --proxy=${PROXY_SOVEREIGN} \ - --chain=${CHAIN_ID_SOVEREIGN} \ --receiver=${WALLET_ADDRESS} \ --value=100000000000000000000000 \ --gas-limit=50000 \ diff --git a/scripts/testnet/sovereignBridge/config/configs.cfg b/scripts/testnet/sovereignBridge/config/configs.cfg index a7a30b97a2f..95d0bbf7abe 100644 --- a/scripts/testnet/sovereignBridge/config/configs.cfg +++ b/scripts/testnet/sovereignBridge/config/configs.cfg @@ -9,9 +9,7 @@ WALLET_SOVEREIGN="~/MultiversX/testnet/node/config/walletKey.pem" #=========== NETWORK CONFIGURATION =========== PROXY=https://testnet-gateway.multiversx.com -CHAIN_ID=T PROXY_SOVEREIGN=http://localhost:${PORT_PROXY} -CHAIN_ID_SOVEREIGN=${DEFAULT_CHAIN_ID} #=========== NETWORK CONSTANTS =========== ESDT_SYSTEM_SC_ADDRESS=erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u diff --git a/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh b/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh index 2328ef3e735..a82d097821f 100644 --- a/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh @@ -9,7 +9,6 @@ deployEsdtSafeContract() { --bytecode=$(eval echo ${ESDT_SAFE_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments \ false \ @@ -62,7 +61,6 @@ upgradeEsdtSafeContractCall() { --bytecode=$(eval echo ${ESDT_SAFE_WASM}) \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -98,7 +96,6 @@ pauseEsdtSafeContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=10000000 \ --function="pause" \ --outfile=${OUTFILE} \ @@ -135,7 +132,6 @@ unpauseEsdtSafeContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=10000000 \ --function="unpause" \ --outfile=${OUTFILE} \ @@ -173,7 +169,6 @@ setFeeMarketAddressCall() { mxpy contract call ${ESDT_SAFE_CONTRACT_ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=10000000 \ --function="setFeeMarketAddress" \ --arguments ${FEE_MARKET_CONTRACT_ADDRESS} \ @@ -193,7 +188,6 @@ setHeaderVerifierAddressInEsdtSafe() { mxpy contract call ${ESDT_SAFE_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=10000000 \ --function="setHeaderVerifierAddress" \ --arguments ${HEADER_VERIFIER_ADDRESS} \ diff --git a/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh b/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh index bb488c6761e..8f12c01295b 100644 --- a/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh @@ -11,7 +11,6 @@ deployFeeMarketContract() { --bytecode=$(eval echo ${FEE_MARKET_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments \ ${ESDT_SAFE_ADDRESS} \ @@ -65,7 +64,6 @@ upgradeFeeMarketContractCall() { --bytecode=$(eval echo ${FEE_MARKET_WASM}) \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -101,7 +99,6 @@ removeFeeInFeeMarketContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=10000000 \ --function="removeFee" \ --outfile=${OUTFILE} \ @@ -138,7 +135,6 @@ setFixedFeeMarketContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ - --chain=${CHAIN} \ --gas-limit=10000000 \ --function="setFee" \ --arguments \ @@ -186,7 +182,6 @@ distributeFees() { mxpy contract call ${FEE_MARKET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=20000000 \ --function="distributeFees" \ --arguments \ diff --git a/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh b/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh index 53a2ea83caf..e01ee75e2c8 100644 --- a/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh @@ -12,7 +12,6 @@ deployHeaderVerifierContract() { --bytecode=$(eval echo ${HEADER_VERIFIER_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments ${BLS_PUB_KEYS} \ --outfile=${OUTFILE} \ @@ -38,7 +37,6 @@ upgradeHeaderVerifierContract() { --bytecode=$(eval echo ${HEADER_VERIFIER_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -56,7 +54,6 @@ setEsdtSafeAddressInHeaderVerifier() { mxpy contract call ${HEADER_VERIFIER_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=10000000 \ --function="setEsdtSafeAddress" \ --arguments ${ESDT_SAFE_ADDRESS} \ diff --git a/scripts/testnet/sovereignBridge/config/token.snippets.sh b/scripts/testnet/sovereignBridge/config/token.snippets.sh index be03624e2b8..c31bdeb53b8 100644 --- a/scripts/testnet/sovereignBridge/config/token.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/token.snippets.sh @@ -8,7 +8,6 @@ issueToken() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=60000000 \ --value=${ESDT_ISSUE_COST} \ --function="issue" \ @@ -42,7 +41,6 @@ depositTokenInSC() { mxpy contract call ${WALLET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=20000000 \ --function="MultiESDTNFTTransfer" \ --arguments \ @@ -71,7 +69,6 @@ issueTokenSovereign() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ - --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=60000000 \ --value=${ESDT_ISSUE_COST} \ --function="issue" \ @@ -102,7 +99,6 @@ registerSovereignToken() { mxpy contract call ${ESDT_SAFE_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ - --chain=${CHAIN_ID} \ --gas-limit=100000000 \ --function="registerToken" \ --value=${ESDT_ISSUE_COST} \ @@ -128,7 +124,6 @@ setLocalBurnRoleSovereign() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ - --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=60000000 \ --function="setSpecialRole" \ --arguments \ @@ -152,7 +147,6 @@ depositTokenInSCSovereign() { mxpy contract call ${WALLET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ - --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=20000000 \ --function="MultiESDTNFTTransfer" \ --arguments \ From 40d4e60d36ea01b84ff50d3646db413bed30d1b9 Mon Sep 17 00:00:00 2001 From: axenteoctavian Date: Mon, 20 Jan 2025 16:14:46 +0200 Subject: [PATCH 3/3] Revert "deleted --chain parameter because it's taken from --proxy" This reverts commit ae1c426b66ac465f3adeb5fe42a7f74c613850fc. --- scripts/testnet/sovereignBridge/config/common.snippets.sh | 1 + scripts/testnet/sovereignBridge/config/configs.cfg | 2 ++ .../testnet/sovereignBridge/config/esdt-safe.snippets.sh | 6 ++++++ .../testnet/sovereignBridge/config/fee-market.snippets.sh | 5 +++++ .../sovereignBridge/config/header-verifier.snippets.sh | 3 +++ scripts/testnet/sovereignBridge/config/token.snippets.sh | 6 ++++++ 6 files changed, 23 insertions(+) diff --git a/scripts/testnet/sovereignBridge/config/common.snippets.sh b/scripts/testnet/sovereignBridge/config/common.snippets.sh index bb168f8ba94..456bb33cc3f 100644 --- a/scripts/testnet/sovereignBridge/config/common.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/common.snippets.sh @@ -15,6 +15,7 @@ getFundsInAddressSovereign() { --pem=${WALLET_SOVEREIGN} \ --pem-index 0 \ --proxy=${PROXY_SOVEREIGN} \ + --chain=${CHAIN_ID_SOVEREIGN} \ --receiver=${WALLET_ADDRESS} \ --value=100000000000000000000000 \ --gas-limit=50000 \ diff --git a/scripts/testnet/sovereignBridge/config/configs.cfg b/scripts/testnet/sovereignBridge/config/configs.cfg index 95d0bbf7abe..a7a30b97a2f 100644 --- a/scripts/testnet/sovereignBridge/config/configs.cfg +++ b/scripts/testnet/sovereignBridge/config/configs.cfg @@ -9,7 +9,9 @@ WALLET_SOVEREIGN="~/MultiversX/testnet/node/config/walletKey.pem" #=========== NETWORK CONFIGURATION =========== PROXY=https://testnet-gateway.multiversx.com +CHAIN_ID=T PROXY_SOVEREIGN=http://localhost:${PORT_PROXY} +CHAIN_ID_SOVEREIGN=${DEFAULT_CHAIN_ID} #=========== NETWORK CONSTANTS =========== ESDT_SYSTEM_SC_ADDRESS=erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u diff --git a/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh b/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh index a82d097821f..2328ef3e735 100644 --- a/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/esdt-safe.snippets.sh @@ -9,6 +9,7 @@ deployEsdtSafeContract() { --bytecode=$(eval echo ${ESDT_SAFE_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments \ false \ @@ -61,6 +62,7 @@ upgradeEsdtSafeContractCall() { --bytecode=$(eval echo ${ESDT_SAFE_WASM}) \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -96,6 +98,7 @@ pauseEsdtSafeContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=10000000 \ --function="pause" \ --outfile=${OUTFILE} \ @@ -132,6 +135,7 @@ unpauseEsdtSafeContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=10000000 \ --function="unpause" \ --outfile=${OUTFILE} \ @@ -169,6 +173,7 @@ setFeeMarketAddressCall() { mxpy contract call ${ESDT_SAFE_CONTRACT_ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=10000000 \ --function="setFeeMarketAddress" \ --arguments ${FEE_MARKET_CONTRACT_ADDRESS} \ @@ -188,6 +193,7 @@ setHeaderVerifierAddressInEsdtSafe() { mxpy contract call ${ESDT_SAFE_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=10000000 \ --function="setHeaderVerifierAddress" \ --arguments ${HEADER_VERIFIER_ADDRESS} \ diff --git a/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh b/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh index 8f12c01295b..bb488c6761e 100644 --- a/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/fee-market.snippets.sh @@ -11,6 +11,7 @@ deployFeeMarketContract() { --bytecode=$(eval echo ${FEE_MARKET_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments \ ${ESDT_SAFE_ADDRESS} \ @@ -64,6 +65,7 @@ upgradeFeeMarketContractCall() { --bytecode=$(eval echo ${FEE_MARKET_WASM}) \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -99,6 +101,7 @@ removeFeeInFeeMarketContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=10000000 \ --function="removeFee" \ --outfile=${OUTFILE} \ @@ -135,6 +138,7 @@ setFixedFeeMarketContractCall() { mxpy contract call ${ADDRESS} \ --pem=${WALLET} \ --proxy=${URL} \ + --chain=${CHAIN} \ --gas-limit=10000000 \ --function="setFee" \ --arguments \ @@ -182,6 +186,7 @@ distributeFees() { mxpy contract call ${FEE_MARKET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=20000000 \ --function="distributeFees" \ --arguments \ diff --git a/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh b/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh index e01ee75e2c8..53a2ea83caf 100644 --- a/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/header-verifier.snippets.sh @@ -12,6 +12,7 @@ deployHeaderVerifierContract() { --bytecode=$(eval echo ${HEADER_VERIFIER_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --arguments ${BLS_PUB_KEYS} \ --outfile=${OUTFILE} \ @@ -37,6 +38,7 @@ upgradeHeaderVerifierContract() { --bytecode=$(eval echo ${HEADER_VERIFIER_WASM}) \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=200000000 \ --outfile=${OUTFILE} \ --recall-nonce \ @@ -54,6 +56,7 @@ setEsdtSafeAddressInHeaderVerifier() { mxpy contract call ${HEADER_VERIFIER_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=10000000 \ --function="setEsdtSafeAddress" \ --arguments ${ESDT_SAFE_ADDRESS} \ diff --git a/scripts/testnet/sovereignBridge/config/token.snippets.sh b/scripts/testnet/sovereignBridge/config/token.snippets.sh index c31bdeb53b8..be03624e2b8 100644 --- a/scripts/testnet/sovereignBridge/config/token.snippets.sh +++ b/scripts/testnet/sovereignBridge/config/token.snippets.sh @@ -8,6 +8,7 @@ issueToken() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=60000000 \ --value=${ESDT_ISSUE_COST} \ --function="issue" \ @@ -41,6 +42,7 @@ depositTokenInSC() { mxpy contract call ${WALLET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=20000000 \ --function="MultiESDTNFTTransfer" \ --arguments \ @@ -69,6 +71,7 @@ issueTokenSovereign() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ + --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=60000000 \ --value=${ESDT_ISSUE_COST} \ --function="issue" \ @@ -99,6 +102,7 @@ registerSovereignToken() { mxpy contract call ${ESDT_SAFE_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY} \ + --chain=${CHAIN_ID} \ --gas-limit=100000000 \ --function="registerToken" \ --value=${ESDT_ISSUE_COST} \ @@ -124,6 +128,7 @@ setLocalBurnRoleSovereign() { mxpy contract call ${ESDT_SYSTEM_SC_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ + --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=60000000 \ --function="setSpecialRole" \ --arguments \ @@ -147,6 +152,7 @@ depositTokenInSCSovereign() { mxpy contract call ${WALLET_ADDRESS} \ --pem=${WALLET} \ --proxy=${PROXY_SOVEREIGN} \ + --chain=${CHAIN_ID_SOVEREIGN} \ --gas-limit=20000000 \ --function="MultiESDTNFTTransfer" \ --arguments \