Hi.
This repo will guide you to create / compile and deploy your smartpy contracts on tezos network.
Here's how you should start.
Install SmartPy CLI Tool: https://smartpy.io/docs/cli/ Now, you are good to go.
Here's the command.
npx create-tezos-app name-of-your-dapp
|---bin (You should totally ignore this, its npmjs shit)
|---config
|------config.ts (Declaring config constants)
|---contracts
|------build (This is where your compiled Michaelson contracts are saved as json files.)
|------src (This is where you keep your smartpy contracts.)
|---scripts (This is where deploy script is saved, more if created in future.)
NOTE: A sample contract has been kept in the repo and compiled for reference.
Create a .env file with the keys mentioned in the .env.example file.
ORIGINATOR_PRIVATE_KEY
-> Add the private key through which you'd want to deploy your contracts.
npm run compile [contractName]
Example: npm run compile counter
Note: Make sure the contract name is in lowercase and is inside the contract/src/ folder.
npm run deploy [contractName] [@network]
Example: npm run deploy counter @mainnet
npm run deploy counter @ghostnet
npm run deploy counter @kathmandunet
npm run deploy counter @jakartanet
Note: Make sure the compiled contracts are inside the contract/build/ folder.