-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b31f49e
commit 929ae70
Showing
11 changed files
with
50 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ | |
|
||
# Output interactions data | ||
*.interaction.json | ||
mxpy.data-storage.json | ||
|
||
.vscode |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "piggybank" | ||
version = "0.5.0" | ||
version = "0.5.1" | ||
authors = ["Julian Ćwirko <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
USER_PEM="../walletKey.pem" | ||
PROXY="https://devnet-gateway.multiversx.com" | ||
CHAIN_ID="D" | ||
|
||
SC_ADDRESS=$(mxpy data load --key=address-devnet) | ||
|
||
## Example values: | ||
# LOCK_EPOCH_TIMESTAMP=1675690008 | ||
# AMOUNT_TO_LOCK=1000000000000000000 | ||
|
||
deploy() { | ||
mxpy --verbose contract deploy --chain=${CHAIN_ID} --project=${PROJECT} --pem=${USER_PEM} --gas-limit=20000000 --proxy=${PROXY} --recall-nonce --outfile="deploy-devnet.interaction.json" --send | ||
|
||
SC_ADDRESS=$(mxpy data parse --file="deploy-devnet.interaction.json" --expression="data['contractAddress']") | ||
mxpy data store --key=address-devnet --value=${SC_ADDRESS} | ||
|
||
echo "" | ||
echo "Smart contract address: ${SC_ADDRESS}" | ||
} | ||
|
||
createPiggy() { | ||
read -p "LOCK_EPOCH_TIMESTAMP: Enter date in future using Unix Epoch timestamp: " LOCK_EPOCH_TIMESTAMP | ||
mxpy --verbose contract call ${SC_ADDRESS} --function="createPiggy" --chain=${CHAIN_ID} --pem=${USER_PEM} --gas-limit=2000000 --proxy=${PROXY} --recall-nonce --arguments ${LOCK_EPOCH_TIMESTAMP} --send | ||
} | ||
|
||
addAmount() { | ||
read -p "AMOUNT_TO_LOCK: Enter amount to lock in EGLD (1 = 1000000000000000000): " AMOUNT_TO_LOCK | ||
mxpy --verbose contract call ${SC_ADDRESS} --function="addAmount" --chain=${CHAIN_ID} --pem=${USER_PEM} --gas-limit=2000000 --proxy=${PROXY} --recall-nonce --value=${AMOUNT_TO_LOCK} --send | ||
} | ||
|
||
payOut() { | ||
mxpy --verbose contract call ${SC_ADDRESS} --function="payOut" --chain=${CHAIN_ID} --pem=${USER_PEM} --gas-limit=2000000 --proxy=${PROXY} --recall-nonce --send | ||
} | ||
|
||
upgrade() { | ||
mxpy --verbose contract upgrade ${SC_ADDRESS} --project=${PROJECT} --chain=${CHAIN_ID} --pem=${USER_PEM} --gas-limit=2000000 --proxy=${PROXY} --recall-nonce --send | ||
} |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "piggybank-meta" | ||
version = "0.5.0" | ||
version = "0.5.1" | ||
authors = ["Julian Ćwirko <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "piggybank-wasm" | ||
version = "0.5.0" | ||
version = "0.5.1" | ||
authors = ["Julian Ćwirko <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|