Once you are ready to deploy your smart contract to MainNet
you’ll need to change your network by prepending NEAR_ENV=mainnet
to all near-cli
commands.
- Start off by logging into the account you want to deploy your contract
to:
NEAR_ENV=mainnet near login
- Next deploy your contract:
NEAR_ENV=mainnet near deploy --accountId YOUR_CONTRACT_ACCOUNT.near --wasmFile out/YOUR_CONTRACT.wasm
- Finally, you can call any initialization contract methods:
NEAR_ENV=mainnet near call YOUR_CONTRACT_ACCOUNT.near init '{}' --accountId YOUR_CONTRACT_ACCOUNT.near
Generate comment with AI 2 nL