Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokamak-network/crrrngcontracts

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokamak-network/crrrngcontracts

CommitRevealRecover Random Number Generator Contracts

  • 0.0.3
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

Bicorn-RX

Commit Reveal Recover Solidity PoC
Random number generation in Titan (Layer 2)

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

  • Guide(login required) : https://www.notion.so/onther/verify-contract-4b72acaa7e6c4dd0a8ee09fddfa6c539

titan-goerli

npx hardhat verify <TARGET_ADDRESS> --network titangoerli

titan

npx hardhat verify <TARGET_ADDRESS> --network titan

FAQs

Package last updated on 07 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc