Skip to content

Commit

Permalink
Merge branch 'master' into forwarder-tests-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ovstinga authored Sep 13, 2023
2 parents 79b9d47 + 98191b8 commit d4bd644
Show file tree
Hide file tree
Showing 57 changed files with 189 additions and 335 deletions.
2 changes: 1 addition & 1 deletion contracts/core/wegld-swap/interaction/snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions contracts/core/wegld-swap/testnet.toml

This file was deleted.

30 changes: 2 additions & 28 deletions contracts/examples/adder/README.md
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 0 additions & 22 deletions contracts/examples/adder/interaction/Adder.erdjs.md

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/examples/adder/interaction/testnet.snippets.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
},
"str:fee": "10",
"str:collected_fees": "10"
"str:collectedFees": "10"
},
"code": "file:../output/digital-cash.wasm"
},
Expand All @@ -163,7 +163,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "6",
"nonce": "7",
"balance": "1,000,000",
"esdt": {
"str:CASHTOKEN-123456": "50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
}
},
"str:fee": "10",
"str:collected_fees": "10"
"str:collectedFees": "10"
},
"code": "file:../output/digital-cash.wasm"
},
Expand All @@ -165,7 +165,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "2",
"nonce": "3",
"balance": "999,990",
"esdt": {
"str:CASHTOKEN-123456": "50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"tx": {
"from": "address:acc2",
"to": "sc:the_digital_cash_contract",
"function": "claim_fees",
"function": "claimFees",
"gasLimit": "500,000,000",
"gasPrice": "0"
},
Expand Down Expand Up @@ -40,7 +40,7 @@
"tx": {
"from": "address:digital_cash_owner_address",
"to": "sc:the_digital_cash_contract",
"function": "claim_fees",
"function": "claimFees",
"gasLimit": "500,000,000",
"gasPrice": "0"
},
Expand Down Expand Up @@ -97,7 +97,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "7",
"nonce": "8",
"balance": "1,000,000",
"esdt": {
"str:CASHTOKEN-123456": "50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
}
},
"str:fee": "10",
"str:collected_fees": "30"
"str:collectedFees": "30"
},
"code": "file:../output/digital-cash.wasm"
},
Expand All @@ -160,7 +160,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "6",
"nonce": "7",
"balance": "999,000",
"esdt": {
"str:CASHTOKEN-123456": "50",
Expand Down
8 changes: 4 additions & 4 deletions contracts/examples/digital-cash/scenarios/forward.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"from": "address:acc2",
"to": "sc:the_digital_cash_contract",
"egldValue": "1,000",
"function": "deposit_fees",
"function": "depositFees",
"arguments": [
"0xa40e72cdac3580e7203a4c2565c932f7691c35e624bcfd82718d7f559c88f440"
],
Expand Down Expand Up @@ -82,7 +82,7 @@
"from": "address:acc2",
"to": "sc:the_digital_cash_contract",
"egldValue": "1,000",
"function": "deposit_fees",
"function": "depositFees",
"arguments": [
"0x8dc17613990e9b7476401a36d112d1a4d31190dec21e7e9a3c933872a27613ee"
],
Expand Down Expand Up @@ -168,7 +168,7 @@
}
},
"str:fee": "10",
"str:collected_fees": "40"
"str:collectedFees": "40"
},
"code": "file:../output/digital-cash.wasm"
},
Expand All @@ -178,7 +178,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "7",
"nonce": "8",
"balance": "997,000",
"esdt": {
"str:CASHTOKEN-123456": "50"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"from": "address:acc1",
"to": "sc:the_digital_cash_contract",
"egldValue": "1,000",
"function": "deposit_fees",
"function": "depositFees",
"arguments": [
"0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60"
],
Expand Down Expand Up @@ -135,7 +135,7 @@
"from": "address:acc2",
"to": "sc:the_digital_cash_contract",
"egldValue": "1,000",
"function": "deposit_fees",
"function": "depositFees",
"arguments": [
"0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd"
],
Expand Down Expand Up @@ -248,6 +248,34 @@
{
"step": "scCall",
"id": "fund-fail-2",
"tx": {
"from": "address:acc2",
"to": "sc:the_digital_cash_contract",
"esdtValue": [
{
"tokenIdentifier": "str:CASHTOKEN-123456",
"value": "10"
}
],
"function": "fund",
"arguments": [
"0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd",
"u64:100"
],
"gasLimit": "100,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "4",
"message": "str:key already used",
"gas": "*",
"refund": "*"
}
},
{
"step": "scCall",
"id": "fund-fail-3",
"tx": {
"from": "address:acc3",
"to": "sc:the_digital_cash_contract",
Expand Down Expand Up @@ -276,7 +304,7 @@
"expect": {
"out": [],
"status": "4",
"message": "str:key already used",
"message": "str:invalid depositor",
"gas": "*",
"refund": "*"
}
Expand All @@ -288,7 +316,7 @@
"from": "address:acc3",
"to": "sc:the_digital_cash_contract",
"egldValue": "1,000",
"function": "deposit_fees",
"function": "depositFees",
"arguments": [
"0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d"
],
Expand Down Expand Up @@ -396,7 +424,7 @@
"storage": {}
},
"address:acc2": {
"nonce": "2",
"nonce": "3",
"balance": "999,000",
"esdt": {
"str:CASHTOKEN-123456": "50"
Expand Down
Loading

0 comments on commit d4bd644

Please sign in to comment.