How to Deploy a Smart Contract
Requirements
To deploy a smart contract on Quai, you’ll need a few things:- QUAI to cover gas: similar to a normal transaction, you’ll need to set your gas limit. Be aware that contract deployment requires significantly more gas than a simple transfer.
- Contract Bytecode: generated using a compiler.
- Deployment script or plugin
- Access to a Quai node: you can do this either by running your own node, accessing a publicly available node, or through API key via a node service.
Deployment
Smart contracts on Quai Network can be deployed using a number of different methods. The most straightforward and widely used methods are using deployment tools like Hardhat. Contracts can also be deployed using the quais.js library, which offers increased flexibility and the ability to deploy via frontend or simple script. Information on how to deploy a simple smart contract with hardhat can be found in the Solidity Deployment Tutorial.Cross-Chain Smart Contracts
Documentation for deploying cross-chain smart contracts with SolidityX is
coming soon. Developers interested in converting their existing contracts to
be cross-chain compatible in the future should implement upgradeable (proxy)
patterns.
- Asynchronously track the state of contracts within other chains in the network
- Natively transfer value and tokens to different contexts without bridges
- Create a network secured mesh of smart contracts