Skip to content

Commit

Permalink
feat(deploy): marketplace deploy and verify script
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Nov 10, 2023
1 parent 1be339c commit 1ca4a50
Show file tree
Hide file tree
Showing 30 changed files with 1,819 additions and 252 deletions.
25 changes: 17 additions & 8 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-viem";
import "@openzeppelin/hardhat-upgrades";
import "@openzeppelin/defender-sdk";

import "@primitivefi/hardhat-dodoc";
import { config as dotenvConfig } from "dotenv";
Expand All @@ -11,6 +12,8 @@ import "hardhat-abi-exporter";
import "hardhat-preprocessor";
import { resolve } from "path";

import "xdeployer";

import "./tasks";

function getRemappings() {
Expand Down Expand Up @@ -104,14 +107,11 @@ const config: HardhatUserConfig = {
path: "./abi",
runOnCompile: true,
clear: true,
flat: true,
format: "minimal",
except: ["@openzeppelin"],
},
defender: {
apiKey: OPENZEPPELIN_API_KEY!,
apiSecret: OPENZEPPELIN_SECRET_KEY!,
useDefenderDeploy: true,
},
dodoc: {
runOnCompile: true,
Expand All @@ -138,20 +138,26 @@ const config: HardhatUserConfig = {
],
},
networks: {
fork: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
},
hardhat: {
// Setting this is necessary for metamask to work with hardhat. Otherwise
// metamask can't transfer when connected to hardhat's network.
initialBaseFeePerGas: 0,
accounts: {
count: 10,
mnemonic: MNEMONIC,
path: "m/44'/60'/0'/0",
},
chainId: chainIds.hardhat,
forking: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
},
},
localhost: {
url: process.env.LOCALHOST_NETWORK_URL || "http://127.0.0.1:8545",
accounts: {
count: 10,
mnemonic: MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
"celo-mainnet": getChainConfig("celo-mainnet"),
goerli: getChainConfig("goerli"),
Expand Down Expand Up @@ -183,6 +189,9 @@ const config: HardhatUserConfig = {
solidity: {
version: "0.8.17",
settings: {
metadata: {
bytecodeHash: "none",
},
optimizer: {
enabled: true,
runs: 5_000,
Expand Down
9 changes: 7 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
"@commitlint/config-conventional": "^17.1.0",
"@dlsl/hardhat-markup": "^1.0.0-rc.7",
"@looksrare/contracts-libs": "^3.4.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@openzeppelin/contracts": "<5.0.0",
"@nomicfoundation/hardhat-viem": "^1.0.0",
"@openzeppelin/contracts": "^4.9.3",
"@openzeppelin/defender-sdk": "^1.4.0",
"@openzeppelin/hardhat-upgrades": "2.3.3",
"@primitivefi/hardhat-dodoc": "^0.2.3",
Expand Down Expand Up @@ -71,7 +74,9 @@
"solmate": "^6.2.0",
"ts-node": "^10.9.1",
"typechain": "^8.3.1",
"typescript": "^4.9.4"
"typescript": "^4.9.4",
"viem": "^1.18.9",
"xdeployer": "^2.1.13"
},
"keywords": [
"blockchain",
Expand Down
117 changes: 0 additions & 117 deletions contracts/scripts/deployment/Deployment.s.sol

This file was deleted.

Loading

0 comments on commit 1ca4a50

Please sign in to comment.