Skip to content

Commit

Permalink
♻️ bump to solc 0.8.18 and refactors
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed Feb 5, 2023
1 parent 8b8553a commit ce9d2c3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 130 deletions.
7 changes: 0 additions & 7 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
node_modules
lib
cache
artifacts
build
typechain-types
coverage
deployments
forge-artifacts
bin
out
33 changes: 0 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,47 +24,14 @@ node_modules

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Yarn integrity file
.yarn-integrity

# Optional npm cache directory
.npm

# Modern Yarn files
.pnp.*
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Hardhat files
cache
artifacts
.deps

# TypeScript bindings output directory
typechain-types

# solidity-coverage directory and output file
coverage
coverage.json

# xdeployer output directory
deployments

# Foundry output directory
forge-artifacts

# Ignore flattened files
flattened.sol

# Miscellaneous files
bin
out
build
7 changes: 0 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
node_modules
lib
cache
artifacts
build
typechain-types
coverage
deployments
forge-artifacts
bin
out
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ The easiest way to think about it, which is also fairly accurate, is that the So

The smart contract [`Create.sol`](./contracts/Create.sol) also provides a function `computeAddress` that returns (via the Recursive Length Prefix (RLP) encoding scheme) the address where a contract will be stored if deployed via `CREATE`.

## Deployments
## Test Deployments

- Rinkeby: [`0x3e4BfDAa089dB5E854CfF9ABe1D9Dd3B8373E2e3`](https://rinkeby.etherscan.io/address/0x3e4BfDAa089dB5E854CfF9ABe1D9Dd3B8373E2e3)
- Ropsten: [`0x1f569322C9b88d61984b18D1251460C83d7B1D34`](https://ropsten.etherscan.io/address/0x1f569322C9b88d61984b18D1251460C83d7B1D34)
- Kovan: [`0x3a923885708E6431A5215C501eae42e1b2e72baE`](https://kovan.etherscan.io/address/0x3a923885708E6431A5215C501eae42e1b2e72baE)
- Goerli: [`0x14EBa15433A35085393D5fE77f186e20e64Fe133`](https://goerli.etherscan.io/address/0x14EBa15433A35085393D5fE77f186e20e64Fe133)
- Sepolia: [`0xc8851BFCbE379cc058608cb548BC733F86448B3B`](https://sepolia.etherscan.io/address/0xc8851BFCbE379cc058608cb548BC733F86448B3B)
- Goerli: [`0xD14d8539401be204B50c67339b267ca8DDd7Ce31`](https://goerli.etherscan.io/address/0xD14d8539401be204B50c67339b267ca8DDd7Ce31)
- Sepolia: [`0xed50324e21879ea04ec0822281a320A875D9D9E9`](https://sepolia.etherscan.io/address/0xed50324e21879ea04ec0822281a320A875D9D9E9)

## `CREATE2` Factory

Expand Down
2 changes: 1 addition & 1 deletion contracts/Create.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.18;

/**
* @dev Error that occurs when the contract creation failed.
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC20Mock.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.18;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

Expand Down
4 changes: 2 additions & 2 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ require("@nomicfoundation/hardhat-chai-matchers");

module.exports = {
solidity: {
version: "0.8.17",
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 200,
runs: 999999,
},
},
},
Expand Down
36 changes: 0 additions & 36 deletions network-config.json

This file was deleted.

46 changes: 9 additions & 37 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,45 @@
require("dotenv").config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
const config = require("./network-config.json");

module.exports = {
// Configure our networks
networks: {
development: {
host: config.development.host,
port: config.development.port,
network_id: config.development.network_id,
host: "127.0.0.1",
port: 9545,
network_id: "*",
},
mainnet: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.mainnet.url}/${process.env.PROJECTID}`,
providerOrUrl: process.env.ETH_MAINNET_URL,
}),
network_id: config.mainnet.network_id,
},
rinkeby: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.rinkeby.url}/${process.env.PROJECTID}`,
}),
network_id: config.rinkeby.network_id,
},
ropsten: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.ropsten.url}/${process.env.PROJECTID}`,
}),
network_id: config.ropsten.network_id,
},
kovan: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.kovan.url}/${process.env.PROJECTID}`,
}),
network_id: config.kovan.network_id,
},
goerli: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.goerli.url}/${process.env.PROJECTID}`,
providerOrUrl: process.env.ETH_GOERLI_TESTNET_URL,
}),
network_id: config.goerli.network_id,
},
sepolia: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.SEEDPHRASE },
providerOrUrl: `${config.sepolia.url}`,
providerOrUrl: process.env.ETH_SEPOLIA_TESTNET_URL,
}),
network_id: config.sepolia.network_id,
},
},

// Configure our compilers
// Configure our compiler settings
compilers: {
solc: {
version: "0.8.17",
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 200,
runs: 999999,
},
},
},
Expand Down

0 comments on commit ce9d2c3

Please sign in to comment.