@tokamak-network/rngcontracts

0.0.1 • Public • Published

Pietrzak-VDF-Verifier

Pietrzak VDF verifier implementation for EVM

INSTALL

yarn

SET .env

ALCHEMY_MAINNET_RPC_URL=<GET_URL_FROM_https://dashboard.alchemy.com/>
MAINNET_RPC_URL=<GET_URL_FROM_https://app.infura.io/dashboard>
SEPOLIA_RPC_URL=<GET_URL_FROM_https://app.infura.io/dashboard>
ALCHEMY_SEPOLIA_RPC_URL=<GET_URL_FROM_https://dashboard.alchemy.com/>
POLYGON_MAINNET_RPC_URL=<GET_URL_FROM_https://app.infura.io/dashboard>
PRIVATE_KEY=<PRIVATE_KEY>
ETHERSCAN_API_KEY=<GET_KEY_FROM_https://etherscan.io/myapikey/>
REPORT_GAS=true
COINMARKETCAP_API_KEY=<GET_KEY_FROM_https://pro.coinmarketcap.com/account/>

DEPLOYMENT

to localhost

npx hardhat node
#Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/

npx hardhat deploy --network localhost --tags CommitRevealRecoverRNG --reset
#deploying "CommitRevealRecoverRNG" (tx: 0xec0ed0faa71c54e85ecec9347227609b69acd980e00e35a1e3839bc71409b222)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 2821690 gas

to target network

## CHANGE in hardhat.config.ts files at network :{} section
npx hardhat deploy --network <WRITE_YOUR_OWN_NETWORK_NAME> --tags CommitRevealRecoverRNG --reset

TEST

hardhat

#It runs test/CommitRevealRecoverRNG.test.ts
npx hardhat test test/CommitRevealRecoverRNG.test.ts --network hardhat

localhost

#It runs test/CommitRevealRecoverRNG.test.ts
npx hardhat node
#Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/
npx hardhat test test/CommitRevealRecoverRNG.test.ts --network localhost

VERIFY CODE

titan-goerli

npx hardhat verify <TARGET_ADDRESS> --network titangoerli

titan

npx hardhat verify <TARGET_ADDRESS> --network titan

Readme

Keywords

none

Package Sidebar

Install

npm i @tokamak-network/rngcontracts

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

3.75 MB

Total Files

21

Last publish

Collaborators

  • youngsungson
  • harvey-tokamak
  • bhlee
  • usgeeus
  • zena.p