generated from multiversx/mx-template-sc
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added set repair streak token identifier endpoint
- Loading branch information
1 parent
242dd90
commit e2f3a46
Showing
4 changed files
with
75 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
WALLET="${PWD}/wallet.pem" | ||
PROJECT="${PWD}" | ||
PROXY=https://gateway.multiversx.com | ||
CHAINID=D | ||
|
||
DEPLOY_GAS="30000000" | ||
SFT_IDENTIFIER=0x585354525245504149522d653162363733 #XSTRREPAIR-e1b673 | ||
|
||
CONTRACT_ADDRESS="erd1qqqqqqqqqqqqqpgqkm3wla3wk0yqk7lk725wee8yh0e2zeru76ls3gr0nj" | ||
|
||
deploy() { | ||
mxpy --verbose contract deploy \ | ||
--bytecode="output/on-chain-claim.wasm" \ | ||
--arguments ${SFT_IDENTIFIER} \ | ||
--pem=${WALLET} \ | ||
--gas-limit=${DEPLOY_GAS} \ | ||
--proxy=${PROXY} \ | ||
--chain=${CHAINID} \ | ||
--recall-nonce \ | ||
--send \ | ||
--outfile="deploy-mainnet.interaction.json" || return | ||
|
||
TRANSACTION=$(mxpy data parse --file="deploy-mainnet.interaction.json" --expression="data['emittedTransactionHash']") | ||
ADDRESS=$(mxpy data parse --file="deploy-mainnet.interaction.json" --expression="data['contractAddress']") | ||
|
||
mxpy data store --key=address-mainnet --value=${ADDRESS} | ||
mxpy data store --key=deployTransaction-mainnet --value=${TRANSACTION} | ||
|
||
echo "" | ||
echo "Smart contract address: ${ADDRESS}" | ||
} | ||
|
||
upgrade() { | ||
mxpy --verbose contract upgrade ${CONTRACT_ADDRESS} \ | ||
--bytecode="output/on-chain-claim.wasm" \ | ||
--pem=${WALLET} \ | ||
--gas-limit=${DEPLOY_GAS} \ | ||
--proxy=${PROXY} \ | ||
--chain=${CHAINID} \ | ||
--recall-nonce \ | ||
--send \ | ||
--outfile="upgrade-mainnet.interaction.json" || return | ||
|
||
TRANSACTION=$(mxpy data parse --file="upgrade-mainnet.interaction.json" --expression="data['emittedTransactionHash']") | ||
ADDRESS=$(mxpy data parse --file="upgrade-mainnet.interaction.json" --expression="data['contractAddress']") | ||
|
||
mxpy data store --key=address-mainnet --value=${ADDRESS} | ||
mxpy data store --key=upgradeTransaction-mainnet --value=${TRANSACTION} | ||
|
||
echo "" | ||
echo "Smart contract address: ${ADDRESS}" | ||
} |
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
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