Current project is based on nodejs 16.12 and yarn 1.22.17
Download zip file or git clone https://github.com/zess11/tendi-revenue-dist.git
Go to the source directory and open terminal, please run this command.
npm install
npx hardhat compile
Rename .env.example to .env and open it, then fill the mainnet url and account's private key.
PRIVATE_KEY=Your mainnet account's private key
PROVIDER_URL=Your mainnet infra url
For example
As you can see, you just copy and past your mainnet's infra url and account's private key for deploying.
Open the scripts/deploy.js and fill the Oracle's owner address at line 8.
Oracle's owner is the account to access to Revenue contract from tendi-revenue-oracle service.
You can also set this same account when deploy tendi-revenue-oracle service.
Please run this command.
npx hardhat run scripts/deploy.js --network mainnet
Once deployed, you can see the Revenue contract's address on terminal.
Save the Revenue contract's address and use it when deploy tendi-revenue-oracle service.