Skip to content

Contract deployment


Procedure to deploy contracts on local as well as public blockchains.

→Clone the Repository Modular-Contract

→Install the dependencies by running -

    npm install

For deployment on the local network:

→Start truffle development console by running following command in terminal -

    truffle develop

→For compiling and deploying on the local blockchain, run -

    compile --all
    migrate --reset

For deployment on the public test network:

→Create a ‘.env’ file in the root directory and add a private key :

    PK = <PRIVATE_KEY>
    INFURA_API = <YOUR INFURA API>
    BSC_API = <BINANCE API>

→For compiling and deploying on the public test blockchain, run -

    truffle compile --all
    truffle migrate --reset --network testnet