Skip to content

Native Chain - WASM

You can use the following steps to deploy a smart contract on the 5ire Native chain using a script:

  1. Connect to the 5ireChain network

  2. Have a compiled WASM smart contract. This will provide you an understanding of all the relevant technical details of the smart contract on the 5ire Native chain.

  3. For deploying the compiled WASM smart contract, the user should have access to a contract ABI and its WASM file or the user can also have only a .contract (for instance - ERC721.contract) file which already contains ABI and WASM.

  4. Clone this repo (https://github.com/5ire-tech/wasm-contract-deployment)

  5. Change directory to this repo and open it in VScode run ‘npm i’

  6. Users can then paste all the contents of the ‘.contract’ file into abi.js. They can also format the content using the VScode extension (right click>format document with>prettier)

  7. Change the input parameter in the wsProvider in deploy.js (Provide the endpoint for the chain that you want to connect)

    wasm1

    Endpoint for 5ireChain General Availability(GA) Testnet - wss://wss.ga.5ire.network

  8. Change the phrase variable in deploy.js (input the mnemonic phrase of an account that has access to some gas fees)

    wasm2

  9. Run ‘node deploy.js’

  10. After successfully deploying the contract on the blockchain, the terminal would provide you with the full contract address.