Native Chain - WASM
You can use the following steps to deploy a smart contract on the 5ire Native chain using a script:
-
Connect to the 5ireChain network
-
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.
-
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.
-
Clone this repo (https://github.com/5ire-tech/wasm-contract-deployment)
-
Change directory to this repo and open it in VScode run ‘npm i’
-
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)
-
Change the input parameter in the wsProvider in deploy.js (Provide the endpoint for the chain that you want to connect)
Endpoint for 5ireChain General Availability(GA) Testnet - wss://wss.ga.5ire.network
-
Change the phrase variable in deploy.js (input the mnemonic phrase of an account that has access to some gas fees)
-
Run ‘node deploy.js’
-
After successfully deploying the contract on the blockchain, the terminal would provide you with the full contract address.