1
- import { ethers } from 'hardhat'
1
+ import { ethers , run } from 'hardhat'
2
2
3
3
async function main ( ) {
4
4
console . log ( 'Starting deploy script on sbt-tokens...' )
5
5
6
6
const [ signer ] = await ethers . getSigners ( )
7
7
console . log ( 'Signer is: ' , signer . address )
8
+ console . log ( )
8
9
10
+ // @TODO : modify this when deploying...
11
+ const minterUpdater = signer . address
12
+ // @TODO : modify this when deploying...
13
+ const minters = [ signer . address ]
9
14
// @TODO : modify this address when deploying...
10
15
const proxyAdmin = '0x2e8fCbd8d3968252f1FC427Ff06928343B650bc3'
11
16
@@ -14,6 +19,10 @@ async function main() {
14
19
const sbtFactory = await ethers . getContractFactory ( 'SBT' )
15
20
const sbtImplementation = await sbtFactory . deploy ( )
16
21
await sbtImplementation . deployed ( )
22
+ console . log (
23
+ ` - SBT implementation deployed at address:${ sbtImplementation . address } `
24
+ )
25
+ console . log ( )
17
26
18
27
// >>> Deploy SBTProxy >>>
19
28
console . log ( 'Deploying SBT proxy...' )
@@ -24,15 +33,29 @@ async function main() {
24
33
ethers . utils . arrayify ( '0x' )
25
34
)
26
35
await sbtProxyInstance . deployed ( )
36
+ console . log ( ` - SBT proxy deployed at address:${ sbtProxyInstance . address } ` )
37
+ console . log ( )
27
38
28
39
// >>> Initialize SBT Proxy >>>
29
40
console . log ( 'Initializing SBT proxy...' )
30
41
const sbtProxy = sbtFactory . attach ( sbtProxyInstance . address )
31
- await sbtProxy . functions . initialize ( signer . address , [ signer . address ] )
42
+ await sbtProxy . functions . initialize ( minterUpdater , minters )
43
+
44
+ // >>> Verify SBTImplementation code >>>
45
+ await run ( `verify:verify` , {
46
+ address : sbtImplementation . address ,
47
+ constructorArguments : [ ] ,
48
+ } )
32
49
33
- console . log ( 'Signer:' , signer . address )
34
- console . log ( 'SBTProxy deployed to:' , sbtProxyInstance . address )
35
- console . log ( 'SBTImplementation deployed to:' , sbtImplementation . address )
50
+ // >>> Verify SBTProxy code >>>
51
+ await run ( `verify:verify` , {
52
+ address : sbtProxyInstance . address ,
53
+ constructorArguments : [
54
+ sbtImplementation . address ,
55
+ proxyAdmin ,
56
+ ethers . utils . arrayify ( '0x' ) ,
57
+ ] ,
58
+ } )
36
59
}
37
60
38
61
main ( )
0 commit comments