1.0.2 • Published 3 years ago

@taiyangc/dmx-trade-contracts v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

DMX Contracts

Hardhat Commands

Update npm dependencies

$ make deps

Compile contracts

// v2 local deploy
$ make deploy-hardhat-v2
// v3 testnet (ropsten) deploy, make sure to set $ETH_NODE_URL and $ETH_PRIVATE_KEY
$ make deploy-ropsten-v3

Deploy contracts to Hardhat

$ make compile

Run Hardhat node

$ make node

Run link with Remix

$ make remixd

Troubleshooting

No contract call is working

On each new Hardhat instantiation reset MetaMask nonce "Settings -> Advanced -> Reset Account".

Certain contract invocations are failing with "XXX: EXPIRED"

Make one more unrestricted contract call (such as a new deploy) to advance the current Hardhat block timestamp.

Contracts

Update compiler version

Modify solidity.version inside hardhat.config.js.

Update init hash on changes

Deploy UniswapV2Factory and execute pairCodeHash, then update the result into UniswapV2Library.sol. Finally update UI where INIT_CODE_HASH is referenced.