-
Notifications
You must be signed in to change notification settings - Fork 1
/
gemforge.config.cjs
121 lines (121 loc) · 3.3 KB
/
gemforge.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
require('dotenv').config()
module.exports = {
version: 2,
solc: {
// SPDX License - to be inserted in all generated .sol files
license: 'MIT',
// Solidity compiler version - to be inserted in all generated .sol files
version: '0.8.21',
},
// commands to execute
commands: {
// the build command
build: 'forge build --names --sizes',
},
paths: {
// contract built artifacts folder
artifacts: 'out',
// source files
src: {
// file patterns to include in facet parsing
facets: [
// include all .sol files in the facets directory ending "Facet"
'src/facets/*Facet.sol'
],
},
// folders for gemforge-generated files
generated: {
// output folder for generated .sol files
solidity: 'src/generated',
// output folder for support scripts and files
support: '.gemforge',
// deployments JSON file
deployments: 'gemforge.deployments.json',
},
// library source code
lib: {
// diamond library
diamond: 'lib/diamond-2-hardhat',
}
},
// artifacts configuration
artifacts: {
// artifact format - "foundry" or "hardhat"
format: 'foundry'
},
// generator options
generator: {
// proxy interface options
proxyInterface: {
// imports to include in the generated IDiamondProxy interface
imports: [
"src/shared/Structs.sol"
],
},
},
// diamond configuration
diamond: {
// Whether to include public methods when generating the IDiamondProxy interface. Default is to only include external methods.
publicMethods: false,
// The diamond initialization contract - to be called when first deploying the diamond.
init: {
// The diamond initialization contract name
contract: 'InitDiamond',
// The diamond initialization function name
function: 'init',
},
// Names of core facet contracts - these will not be modified/removed once deployed and are also reserved names.
// This default list is taken from the diamond-2-hardhat library.
// NOTE: we recommend not removing any of these existing names unless you know what you are doing.
coreFacets: [
'OwnershipFacet',
'DiamondCutFacet',
'DiamondLoupeFacet',
],
},
// lifecycle hooks
hooks: {
// shell command to execute before build
preBuild: '',
// shell command to execute after build
postBuild: '',
// shell command to execute before deploy
preDeploy: '',
// shell command to execute after deploy
postDeploy: 'scripts/verify.js',
},
// Wallets to use for deployment
wallets: {
// Wallet named "wallet1"
wallet1: {
// Wallet type - mnemonic
type: 'mnemonic',
// Wallet config
config: {
// Mnemonic phrase
words: 'test test test test test test test test test test test junk',
// 0-based index of the account to use
index: 0,
}
},
},
// Networks to deploy to
networks: {
// Local network
local: {
// RPC endpoint URL
rpcUrl: 'http://localhost:8545',
},
},
// Targets to deploy
targets: {
local: {
// Network to deploy to
network: 'local',
// Wallet to use for deployment
wallet: 'wallet1',
// Initialization function arguments
initArgs: [],
},
}
}