diff --git a/contracts/core/wegld-swap/interaction/snippets.sh b/contracts/core/wegld-swap/interaction/snippets.sh index 84de70889c..0924be5139 100644 --- a/contracts/core/wegld-swap/interaction/snippets.sh +++ b/contracts/core/wegld-swap/interaction/snippets.sh @@ -2,7 +2,7 @@ ALICE="~/multiversx-sdk/testwallets/latest/users/alice.pem" BOB="~/multiversx-sdk/testwallets/latest/users/bob.pem" ADDRESS=$(mxpy data load --key=address-testnet-egld-esdt-swap) DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-testnet) -PROXY=https://testnet-gateway.elrond.com +PROXY=https://testnet-gateway.multiversx.com CHAIN_ID=T ESDT_SYSTEM_SC_ADDRESS=erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u diff --git a/contracts/core/wegld-swap/testnet.toml b/contracts/core/wegld-swap/testnet.toml deleted file mode 100644 index 3020c585d6..0000000000 --- a/contracts/core/wegld-swap/testnet.toml +++ /dev/null @@ -1,2 +0,0 @@ -[folders] -elrond_go = "/home/elrond/elrond-go" \ No newline at end of file diff --git a/contracts/examples/adder/README.md b/contracts/examples/adder/README.md index 821c76536a..4538caeca9 100644 --- a/contracts/examples/adder/README.md +++ b/contracts/examples/adder/README.md @@ -1,29 +1,3 @@ -# Interaction +# Adder -## On devnet - -Deploy & interact with contract: - -``` -python3 ./interaction/playground.py --pem=./testnet/wallets/users/alice.pem --proxy=http://localhost:7950 -``` - -Interact with existing contract: - -``` -python3 ./interaction/playground.py --pem=./testnet/wallets/users/alice.pem --proxy=http://localhost:7950 --contract=erd1... -``` - -## On testnet - -Deploy & interact with contract: - -``` -python3 ./interaction/playground.py --pem=my.pem --proxy=https://testnet-gateway.elrond.com -``` - -Interact with existing contract: - -``` -python3 ./interaction/playground.py --pem=my.pem --proxy=https://testnet-gateway.elrond.com --contract=erd1... -``` +`Adder` is a simple Smart Contract. diff --git a/contracts/examples/adder/interaction/Adder.erdjs.md b/contracts/examples/adder/interaction/Adder.erdjs.md deleted file mode 100644 index 8df942b3b0..0000000000 --- a/contracts/examples/adder/interaction/Adder.erdjs.md +++ /dev/null @@ -1,22 +0,0 @@ -# Adder - -First [set up a node terminal](../../../../tutorial/src/interaction/interaction-basic.md). - -```javascript -let erdjs = await require('@elrondnetwork/erdjs'); -let { erdSys, wallets: { alice } } = await erdjs.setupInteractive("local-testnet"); - -let adder = await erdSys.loadWrapper("contracts/examples/adder"); - -// Deploy the adder contract with an initial value of 42 -await adder.sender(alice).gas(20_000_000).call.deploy(42); - -// Check that the sum is 42 -await adder.query.getSum().then((sum) => sum.toString()); - -await adder.gas(3_000_000).call.add(30); - -// Check that the sum is 72 -await adder.query.getSum().then((sum) => sum.toString()); - -``` diff --git a/contracts/examples/adder/interaction/testnet.snippets.sh b/contracts/examples/adder/interaction/testnet.snippets.sh index 6bb5d71a08..06bb13e3ba 100644 --- a/contracts/examples/adder/interaction/testnet.snippets.sh +++ b/contracts/examples/adder/interaction/testnet.snippets.sh @@ -1,7 +1,7 @@ ALICE="${USERS}/alice.pem" ADDRESS=$(mxpy data load --key=address-testnet) DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-testnet) -PROXY=https://testnet-api.elrond.com +PROXY=https://testnet-api.multiversx.com deploy() { mxpy --verbose contract deploy --project=${PROJECT} --recall-nonce --pem=${ALICE} --gas-limit=50000000 --arguments 0 --send --outfile="deploy-testnet.interaction.json" --proxy=${PROXY} --chain=T || return diff --git a/contracts/examples/adder/testnet.toml b/contracts/examples/adder/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-egld.erdjs.md b/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-egld.erdjs.md deleted file mode 100644 index 2047217a89..0000000000 --- a/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-egld.erdjs.md +++ /dev/null @@ -1,50 +0,0 @@ -# Crowdfunding ESDT - Using EGLD - -First [set up a node terminal](../../../../tutorial/src/interaction/interaction-basic.md). - -```javascript -let erdjs = await require('@elrondnetwork/erdjs'); -let { erdSys, Egld, wallets: { alice, bob, carol }} = await erdjs.setupInteractive("local-testnet"); - -let crowdfunding = await erdSys.loadWrapper("contracts/examples/crowdfunding-esdt"); - -// Set the deadline to 1 minute from now (adjust this if you want more time before claiming the rewards) -let someTimeFromNow = await erdSys.currentNonce() + erdjs.minutesToNonce(1); - -// Deploy the crowdfunding contract with a target of 2 EGLD -await crowdfunding.sender(alice).gas(50_000_000).call.deploy(Egld(2), someTimeFromNow, Egld); - -// Bob and carol contribute 1.5 EGLD each -await crowdfunding.sender(bob).gas(10_000_000).value(Egld(1.5)).call.fund(); -await crowdfunding.sender(carol).value(Egld(1.5)).call.fund(); - -// Get the current funds. Note the usage of Egld.raw (since the balance comes as an integer from the smart contract) -let currentFunds = Egld.raw(await crowdfunding.query.currentFunds()); - -// Should print 3 EGLD (since bob and carol added 1.5 EGLD each) -erdjs.print(currentFunds); - -// Confirming the target is 2 EGLD -erdjs.print(Egld.raw(await crowdfunding.query.get_target())); - -// Check that alice is the owner -alice.address.equals(await crowdfunding.query.get_owner()); - -// Store alice's current balance (we'll use this to check the balance difference later on) -let aliceBalanceBefore = await erdSys.getBalance(alice, Egld); -erdjs.print(aliceBalanceBefore); - -// Wait a minute first, otherwise you'll get the "cannot claim before deadline" error -// If the claim doesn't return an error - there are two possibilities: -// - the funding failed, and 1.5 EGLD are sent back to both bob and carol -// - it was succesful and alice receives 3 EGLD -// Because the target sum specified on deployment was 2 EGLD, and we have 3 EGLD, the funding should be succesful -await crowdfunding.sender(alice).call.claim(); - -// Let's check if alice received the funds -let aliceBalanceAfter = await erdSys.getBalance(alice, Egld); -erdjs.print(aliceBalanceAfter); - -// If the previous claim was successful, this prints 2.99 EGLD (because of the gas costs) -erdjs.print(aliceBalanceAfter.minus(aliceBalanceBefore)); -``` diff --git a/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-esdt.erdjs.md b/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-esdt.erdjs.md deleted file mode 100644 index e590edd953..0000000000 --- a/contracts/examples/crowdfunding-esdt/interaction/Crowdfunding-esdt.erdjs.md +++ /dev/null @@ -1,58 +0,0 @@ -# Crowdfunding ESDT - Using ESDT (Fungible token) - -First [set up a node terminal](../../../../tutorial/src/interaction/interaction-basic.md). - -```javascript -let erdjs = await require('@elrondnetwork/erdjs'); -let { erdSys, wallets: { alice, bob, carol } } = await erdjs.setupInteractive("local-testnet"); - -let crowdfunding = await erdSys.loadWrapper("contracts/examples/crowdfunding-esdt"); - -// Issue a new fungible token -let MyToken = await erdSys.sender(alice).issueFungible("MyFungibleToken", "MYTOKEN", 1_000_00, 2); - -// Note: wait a few seconds, otherwise the first send fails -// Send some tokens to bob and carol (so that they can call fund later on) -await erdSys.sender(alice).value(MyToken(200.0)).send(bob); -await erdSys.sender(alice).value(MyToken(200.0)).send(carol); - -// Set the deadline to 1 minute from now (adjust this if you want more time before claiming the rewards) -let someTimeFromNow = await erdSys.currentNonce() + erdjs.minutesToNonce(1); - -// Deploy the crowdfunding contract -await crowdfunding.sender(alice).gas(50_000_000).call.deploy(MyToken(2), someTimeFromNow, MyToken); - -// Bob and carol contribute 1.5 MYTOKEN each -await crowdfunding.sender(bob).gas(10_000_000).value(MyToken(1.5)).call.fund(); -await crowdfunding.sender(carol).value(MyToken(1.5)).call.fund(); - -// Get the current funds. Note the usage of MyToken.raw (since the balance comes as an integer from the smart contract) -let currentFunds = MyToken.raw(await crowdfunding.query.currentFunds()); - -// Should print 3 MYTOKEN (since bob and carol added 1.5 MYTOKEN each) -erdjs.print(currentFunds); - -// Confirming the target is 2 MYTOKEN -erdjs.print(MyToken.raw(await crowdfunding.query.get_target())); - -// Check that alice is the owner -alice.address.equals(await crowdfunding.query.get_owner()); - -// Store alice's current balance (we'll use this to check the balance difference later on) -let aliceBalanceBefore = await erdSys.getBalance(alice, MyToken); -erdjs.print(aliceBalanceBefore); - -// Wait a minute first, otherwise you'll get the "cannot claim before deadline" error -// If the claim doesn't return an error - there are two possibilities: -// - the funding failed, and 1.5 MYTOKEN are sent back to both bob and carol -// - it was succesful and alice receives 3 MYTOKEN -// Because the target sum specified on deployment was 2 MYTOKEN, and we have 3 MYTOKEN, the funding should be succesful -await crowdfunding.sender(alice).call.claim(); - -// Let's check if alice received the funds -let aliceBalanceAfter = await erdSys.getBalance(alice, MyToken); -erdjs.print(aliceBalanceAfter); - -// If the previous claim was successful, this prints 3 MYTOKEN -erdjs.print(aliceBalanceAfter.minus(aliceBalanceBefore)); -``` diff --git a/contracts/examples/crowdfunding-esdt/interaction/testnet.snippets.sh b/contracts/examples/crowdfunding-esdt/interaction/testnet.snippets.sh index ae904001b1..2598e024cd 100644 --- a/contracts/examples/crowdfunding-esdt/interaction/testnet.snippets.sh +++ b/contracts/examples/crowdfunding-esdt/interaction/testnet.snippets.sh @@ -3,7 +3,7 @@ BOB="${USERS}/bob.pem" ADDRESS=$(mxpy data load --key=address-testnet) DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-testnet) -PROXY=https://testnet-api.elrond.com +PROXY=https://testnet-api.multiversx.com DEPLOY_GAS="80000000" TARGET=10 diff --git a/contracts/examples/crowdfunding-esdt/testnet.toml b/contracts/examples/crowdfunding-esdt/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crypto-bubbles/testnet.toml b/contracts/examples/crypto-bubbles/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crypto-kitties/kitty-auction/testnet.toml b/contracts/examples/crypto-kitties/kitty-auction/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crypto-kitties/kitty-genetic-alg/testnet.toml b/contracts/examples/crypto-kitties/kitty-genetic-alg/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crypto-kitties/kitty-ownership/testnet.toml b/contracts/examples/crypto-kitties/kitty-ownership/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/crypto-zombies/testnet.toml b/contracts/examples/crypto-zombies/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/digital-cash/testnet.toml b/contracts/examples/digital-cash/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/esdt-transfer-with-fee/testnet.toml b/contracts/examples/esdt-transfer-with-fee/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/factorial/testnet.toml b/contracts/examples/factorial/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/lottery-esdt/testnet.toml b/contracts/examples/lottery-esdt/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/nft-minter/interaction/snippets.sh b/contracts/examples/nft-minter/interaction/snippets.sh index 1064d4ff90..b593cff045 100644 --- a/contracts/examples/nft-minter/interaction/snippets.sh +++ b/contracts/examples/nft-minter/interaction/snippets.sh @@ -1,7 +1,7 @@ ALICE="" # PEM path ADDRESS=$(mxpy data load --key=address-devnet) DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-devnet) -PROXY=https://devnet-gateway.elrond.com +PROXY=https://devnet-gateway.multiversx.com CHAIN_ID=D deploy() { diff --git a/contracts/examples/nft-minter/testnet.toml b/contracts/examples/nft-minter/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/nft-storage-prepay/testnet.toml b/contracts/examples/nft-storage-prepay/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/order-book/factory/testnet.toml b/contracts/examples/order-book/factory/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/order-book/pair/testnet.toml b/contracts/examples/order-book/pair/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/ping-pong-egld/interaction/Ping-pong-egld.erdjs.md b/contracts/examples/ping-pong-egld/interaction/Ping-pong-egld.erdjs.md deleted file mode 100644 index 2fdf7d12c0..0000000000 --- a/contracts/examples/ping-pong-egld/interaction/Ping-pong-egld.erdjs.md +++ /dev/null @@ -1,23 +0,0 @@ -# Ping-pong - -First [set up a node terminal](../../../../tutorial/src/interaction/interaction-basic.md). - -```javascript -let erdjs = await require('@elrondnetwork/erdjs'); -let { erdSys, Egld, wallets: { alice, bob, carol, dan } } = await erdjs.setupInteractive("local-testnet"); - -let pingPong = await erdSys.loadWrapper("contracts/examples/ping-pong-egld"); - -await pingPong.sender(alice).gas(150_000_000).call.deploy(Egld(0.5), 2 * 60, null, Egld(1.5)); - -await pingPong.gas(20_000_000).sender(alice).value(Egld(0.5)).ping("note 1"); - -await pingPong.sender(bob).value(Egld(0.5)).ping(null); -await pingPong.sender(carol).value(Egld(0.5)).ping(null); - -// this fails because of the balance limit of 1.5 egld -await pingPong.sender(dan).value(Egld(0.5).ping(null); - -await pingPong.pongAll(); - -``` diff --git a/contracts/examples/ping-pong-egld/interaction/snippets.sh b/contracts/examples/ping-pong-egld/interaction/snippets.sh index 2e875dc407..64be1f5701 100755 --- a/contracts/examples/ping-pong-egld/interaction/snippets.sh +++ b/contracts/examples/ping-pong-egld/interaction/snippets.sh @@ -1,7 +1,7 @@ PEM_FILE="./ping-pong.pem" -PING_PONG_CONTRACT="./elrond-wasm-rs/contracts/examples/ping-pong-egld" +PING_PONG_CONTRACT="./mx-sdk-rs/contracts/examples/ping-pong-egld" -PROXY_ARGUMENT="--proxy=https://devnet-api.elrond.com" +PROXY_ARGUMENT="--proxy=https://devnet-api.multiversx.com" CHAIN_ARGUMENT="--chain=D" build_ping_pong() { diff --git a/contracts/examples/ping-pong-egld/testnet.toml b/contracts/examples/ping-pong-egld/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/examples/token-release/testnet.toml b/contracts/examples/token-release/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/composability/esdt-contract-pair/first-contract/testnet.toml b/contracts/feature-tests/composability/esdt-contract-pair/first-contract/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/composability/esdt-contract-pair/second-contract/testnet.toml b/contracts/feature-tests/composability/esdt-contract-pair/second-contract/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/child/testnet.toml b/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/child/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/testnet.toml b/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/composability/forwarder/interaction/snippets.sh b/contracts/feature-tests/composability/forwarder/interaction/snippets.sh index 65d57ebeab..21d7ecec9e 100644 --- a/contracts/feature-tests/composability/forwarder/interaction/snippets.sh +++ b/contracts/feature-tests/composability/forwarder/interaction/snippets.sh @@ -9,7 +9,7 @@ VAULT_ADDRESS_HEX="0x$(mxpy wallet bech32 --decode ${VAULT_ADDRESS_BECH32})" ECHO_ARGS_FUNC_NAME=echo_args_async -PROXY=https://testnet-api.elrond.com +PROXY=https://testnet-api.multiversx.com CHAIN_ID=T deployForwarder() { diff --git a/contracts/feature-tests/composability/local-esdt-and-nft/testnet.toml b/contracts/feature-tests/composability/local-esdt-and-nft/testnet.toml deleted file mode 100644 index 41ef1aaa6c..0000000000 --- a/contracts/feature-tests/composability/local-esdt-and-nft/testnet.toml +++ /dev/null @@ -1,2 +0,0 @@ -[folders] -elrond_go = "/home/elrond/elrond-go" diff --git a/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh b/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh index c22c3a2ed8..8660693fdb 100644 --- a/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh +++ b/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh @@ -9,7 +9,7 @@ TOKEN_ID="" TOKEN_ID_HEX="0x$(echo -n ${TOKEN_ID} | xxd -p -u | tr -d '\n')" TOKEN_AMOUNT_PER_TX=100 -PROXY="https://testnet-gateway.elrond.com" +PROXY="https://testnet-gateway.multiversx.com" CHAIN_ID="T" SC_WITH_ROLE_ADDRESS_BECH32= diff --git a/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/testnet.toml b/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/testnet.toml b/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/erc1155-user-mock/testnet.toml b/contracts/feature-tests/erc-style-contracts/erc1155-user-mock/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/erc1155/testnet.toml b/contracts/feature-tests/erc-style-contracts/erc1155/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/erc20/testnet.toml b/contracts/feature-tests/erc-style-contracts/erc20/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/erc721/testnet.toml b/contracts/feature-tests/erc-style-contracts/erc721/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/erc-style-contracts/lottery-erc20/testnet.toml b/contracts/feature-tests/erc-style-contracts/lottery-erc20/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/formatted-message-features/testnet.toml b/contracts/feature-tests/formatted-message-features/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contracts/feature-tests/rust-testing-framework-tester/testnet.toml b/contracts/feature-tests/rust-testing-framework-tester/testnet.toml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/mxpy-snippet-generator/src/constants.rs b/tools/mxpy-snippet-generator/src/constants.rs index da35d399d6..1f82bcf090 100644 --- a/tools/mxpy-snippet-generator/src/constants.rs +++ b/tools/mxpy-snippet-generator/src/constants.rs @@ -34,9 +34,9 @@ pub const NFT_TRANSFER_FUNC_NAME: &str = "ESDTNFTTransfer"; pub const MULTI_TRANSFER_FUNC_NAME: &str = "MultiESDTNFTTransfer"; // default proxies -pub const TESTNET_PROXY: &str = "https://testnet-gateway.elrond.com"; -pub const DEVNET_PROXY: &str = "https://devnet-gateway.elrond.com"; -pub const MAINNET_PROXY: &str = "https://gateway.elrond.com"; +pub const TESTNET_PROXY: &str = "https://testnet-gateway.multiversx.com"; +pub const DEVNET_PROXY: &str = "https://devnet-gateway.multiversx.com"; +pub const MAINNET_PROXY: &str = "https://gateway.multiversx.com"; // default chain IDs pub const TESTNET_CHAIN_ID: &str = "T";