Skip to content

Commit

Permalink
🐛 fix declare script
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Dec 13, 2023
1 parent a11d273 commit ade28d8
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions contracts/scripts/deploy_unruggable_memecoin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

# Deployment script for `UnruggableMemecoin` contract
# Arguments:
# 1: recipient address that will receive the initial supply of tokens
# 2: name of the token
# 3: symbol of the token
# 4: initial supply of tokens
RECIPIENT_ADDRESS=$1
TOKEN_NAME=$2
TOKEN_SYMBOL=$3
INITIAL_SUPPLY=$4
# 1: owner address that will have access to privileged functions
# 2: recipient address that will receive the initial supply of tokens
# 3: name of the token
# 4: symbol of the token
# 5: initial supply of tokens
OWNER_ADDRESS=$1
RECIPIENT_ADDRESS=$2
TOKEN_NAME=$3
TOKEN_SYMBOL=$4
INITIAL_SUPPLY=$5
DECIMALS_18_SUFFIX="000000000000000000"

# Requires the following env variables to be set:
Expand All @@ -23,7 +25,7 @@ DECIMALS_18_SUFFIX="000000000000000000"

# Prepare declare args
COMPILER_VERSION="2.1.0"
CONTRACT_CLASS_FILE="./target/dev/unruggablememecoin_UnruggableMemecoin.contract_class.json"
CONTRACT_CLASS_FILE="./target/dev/unruggable_UnruggableMemecoin.contract_class.json"
DECLARE_ARGS="--compiler-version=$COMPILER_VERSION"

# Declare the contract and capture the command output
Expand All @@ -39,4 +41,4 @@ echo "Class hash: $class_hash"
###############################################

# Deploy the contract using the extracted class hash
starkli deploy $class_hash $RECIPIENT_ADDRESS str:$TOKEN_NAME str:$TOKEN_SYMBOL u256:$INITIAL_SUPPLY$DECIMALS_18_SUFFIX
starkli deploy $class_hash $OWNER_ADDRESS $RECIPIENT_ADDRESS str:$TOKEN_NAME str:$TOKEN_SYMBOL u256:$INITIAL_SUPPLY$DECIMALS_18_SUFFIX

0 comments on commit ade28d8

Please sign in to comment.