0.1.4-alpha • Published 2 years ago

@type3/smart-contracts v0.1.4-alpha

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@type3/smart-contracts

Note: This project is in development, it is not advised 
to use any smart contracts in this repository on production
environment if you don't have full understanding of the code!

Available smart contracts

NameDescription
contracts/v1/core
Core
CoreCell
WhitelistedContracts
PriceOracleUniswapV2abstract contract for UniswapV2 to get price from LP
contracts/v1
PriceOraclethis smart contract allows you to get price of any token from DEX based on UniswapV2. In tests you will find example for Trader Joe LPs on Avalanche blockchain

.env

In this repo you can find file .env.example which contains environment variables needed for tests and deployment of smart contracts

ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1

ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
RINKEBY_URL=https://eth-rinkeby.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
AVALANCHE_MAINNET_URL=https://api.avax.network/ext/bc/C/rpc
MUMBAI_URL=https://polygon-mumbai.g.alchemy.com/v2/<YOUR KEY>

HARMONY_URL=https://api.harmony.one
HARMONY_TEST_URL=https://api.s0.b.hmny.io

hardhat config

If you would like to fork locally Avalanche blockchain, you can use settings below in your hardhat.config.ts file

hardhat: {
  chainId: 43114,
  gasPrice: 225000000000,
  throwOnTransactionFailures: false,
  loggingEnabled: true,
  forking: {
    url: AVALANCHE_MAINNET_URL as string,
    enabled: true,
    blockNumber: 16373926,
  },
},