-
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.
add tests and snippets, update sc framework
- Loading branch information
1 parent
4588bdd
commit e323e8b
Showing
15 changed files
with
329 additions
and
868 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 |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
|
||
# The erdpy output | ||
# output | ||
|
||
# Output interactions data | ||
*.interaction.json |
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,18 +1,18 @@ | ||
[package] | ||
name = "piggybank" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
authors = ["Julian Ćwirko <[email protected]>"] | ||
edition = "2018" | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
path = "src/lib.rs" | ||
|
||
[dependencies.elrond-wasm] | ||
version = "0.34.1" | ||
version = "0.38.0" | ||
|
||
[dev-dependencies.elrond-wasm-debug] | ||
version = "0.34.1" | ||
version = "0.38.0" | ||
|
||
[dev-dependencies] | ||
num-bigint = "0.4.2" | ||
|
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
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,50 @@ | ||
USER_PEM="../walletKey.pem" | ||
PROXY="https://devnet-gateway.elrond.com" | ||
CHAIN_ID="D" | ||
|
||
SC_ADDRESS=erd1qqqqqqqqqqqqqpgqz22zn8njz6649aazgqwnspefekcd3pkrvafs4x732r | ||
LOCK_EPOCH_TIMESTAMP=1675690008 | ||
AMOUNT_TO_LOCK=1000000000000000000 | ||
|
||
deploy() { | ||
erdpy --verbose contract deploy --project=${PROJECT} \ | ||
--recall-nonce --pem=${USER_PEM} \ | ||
--gas-limit=10000000 \ | ||
--send --outfile="deploy-devnet.interaction.json" \ | ||
--proxy=${PROXY} --chain=${CHAIN_ID} || return | ||
} | ||
|
||
createPiggy() { | ||
erdpy --verbose contract call ${SC_ADDRESS} \ | ||
--proxy=${PROXY} --chain=${CHAIN_ID} \ | ||
--send --recall-nonce --pem=${USER_PEM} \ | ||
--gas-limit=5000000 \ | ||
--arguments ${LOCK_EPOCH_TIMESTAMP} \ | ||
--function="createPiggy" | ||
} | ||
|
||
addAmount() { | ||
erdpy --verbose contract call ${SC_ADDRESS} \ | ||
--proxy=${PROXY} --chain=${CHAIN_ID} \ | ||
--send --recall-nonce --pem=${USER_PEM} \ | ||
--gas-limit=5000000 \ | ||
--value=${AMOUNT_TO_LOCK} \ | ||
--function="addAmount" | ||
} | ||
|
||
payOut() { | ||
erdpy --verbose contract call ${SC_ADDRESS} \ | ||
--proxy=${PROXY} --chain=${CHAIN_ID} \ | ||
--send --recall-nonce --pem=${USER_PEM} \ | ||
--gas-limit=5000000 \ | ||
--function="payOut" | ||
} | ||
|
||
upgrade() { | ||
erdpy --verbose contract upgrade ${SC_ADDRESS} \ | ||
--project=${PROJECT} \ | ||
--recall-nonce --pem=${USER_PEM} \ | ||
--gas-limit=20000000 \ | ||
--send --outfile="upgrade-devnet.interaction.json" \ | ||
--proxy=${PROXY} --chain=${CHAIN_ID} || return | ||
} |
Oops, something went wrong.