Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ Truffle
2. Start Ganache on port 8545
3. In terminal```truffle migrate```

---------
Deploy on ropsten:
```$ npx hardhat run --network ropsten scripts/deploy.ts```

Verify on ropsten:
```$ npx hardhat verify --network ropsten --constructor-args resources/arguments.js [DEPLOYED ADDRESS```

npx hardhat verify --network ropsten --constructor-args resources/arguments.js 0xC6DBaDc1e1bB4Ec1E3792CDb2Aad09b9b2720e86

#### Deploying to Matic
Deployment to the Mumbai Testnet is configured in ```./truffle-config.js```

Expand Down
241 changes: 90 additions & 151 deletions contracts/SinglePlayerCommit.sol

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import "./tasks/accounts";
import "./tasks/clean";

import "@nomiclabs/hardhat-waffle";
// import "@nomiclabs/hardhat-ethers";
import "hardhat-typechain";
import "solidity-coverage";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-abi-exporter";
import { removeConsoleLog } from 'hardhat-preprocessor';

const chainIds = {
ganache: 1337,
Expand Down Expand Up @@ -53,6 +54,13 @@ function createTestnetConfig(network: keyof typeof chainIds): NetworkUserConfig
}

const config: HardhatUserConfig = {
// https://hardhat.org/plugins/hardhat-abi-exporter.html
abiExporter: {
path: './out/abi',
clear: true,
flat: false,
only: [],
},
defaultNetwork: "hardhat",
etherscan: {
// Your API key for Etherscan
Expand All @@ -74,6 +82,9 @@ const config: HardhatUserConfig = {
sources: "./contracts",
tests: "./test",
},
preprocess: {
eachLine: removeConsoleLog((hre) => hre.network.name !== 'hardhat' && hre.network.name !== 'localhost'),
},
solidity: {
version: "0.6.10",
settings: {
Expand All @@ -90,4 +101,4 @@ const config: HardhatUserConfig = {
},
};

export default config;
export default config;
Loading