▶️Deploying your contracts
The example is based on Hardhat framework
Prerequisite
Example: To create a Fixed-cap Asset
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol";
contract MyToken is ERC20Capped {
constructor(uint256 _cap) ERC20("MyToken", "XXX") ERC20Capped(_cap) {
ERC20._mint(msg.sender, _cap);
}
}
const config: HardhatUserConfig = {
...
networks: {
rei: {
url: 'https://rei-rpc.moonrhythm.io',
chainId: 55555,
},
reitest: {
url: 'https://rei-testnet-rpc.moonrhythm.io',
chainId: 55556,
},
...
solidity: {
compilers: [
{
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
},
},
],
},
...
}Compile your code using
Deploy script
Deploy to testnet
Deploy to mainnet
Verify Contract



To get flattened code
Last updated
Was this helpful?