Deploying smart contracts
You need to deploy your smart contract for it to be available to users of OONE Chain.
To deploy a smart contract, you merely send an OONE Chain transaction containing the compiled code of the smart contract without specifying any recipient.
How to deploy a smart contract
What you'll need
- your contract's bytecode – this is generated through compilation
- OONE for gas – you'll set your gas limit like other transactions so be aware that contract deployment needs a lot more gas than a simple OONE transfer
- a deployment script or plugin
- access to an OONE Chain node, either by running your own or connecting to a public node
Steps to deploy a smart contract
The specific steps involved will depend on the tooling you use. For an example, check out the Hardhat documentation on deploying your contracts or Truffle documentation on networks and app deployment. These are two of the most popular tools for smart contract deployment, which involve writing a script to handle the deployment steps.
Once deployed, your contract will have an OONE Chain address like other accounts.
Related tools
Remix - Remix IDE allows developing, deploying and administering smart contracts for Ethereum like blockchains
Tenderly - Web3 development platform that provides debugging, observability, and infrastructure building blocks for developing, testing, monitoring, and operating smart contracts
Hardhat - A development environment to compile, deploy, test, and debug your Ethereum software
Truffle - A development environment, testing framework, build pipeline, and other tools.
thirdweb - Easily deploy any contract to any EVM compatible chain, using a single command
Further reading
- https://docs.openzeppelin.com/learn/deploying-and-interacting - OpenZeppelin
- Deploying your contracts with Hardhat - Nomic Labs