This is a Cairo implementation for the Push Comm Contract.
Before running the deployment or declaration scripts, ensure you have the following configuration:
-
Create an
.env
FileCopy the
env.sample
file to create the.env
file with the following command:cp .env.sample .env
Make sure to update the .env
file with the correct RPC URLs and fee token.
-
Account Files
Create an account using
starkli
and place the account file and keystore file in the accounts directory.
-
Declare the Contract Class
First, you need to declare the contract class to upload the Cairo contract code to the blockchain. This step will provide you with a class_hash that is used in the deployment step.
bash sh/declare.sh -n <network> -k <keystore> -a <account> -c <contract_name>
-
Deploy the Contract
After declaring the contract class, you need to deploy the contract. Update the class_hash in ./deploy/2_deploy.sh with the value obtained from the declaration step.
bash sh/deploy.sh -n <network> -a <account> -k <keystore> -c <class_hash> -d "<constructor_calldata>"