@@ -34,12 +34,28 @@ export MCD_PAUSE_DELAY=0
34
34
# Make sure there is not $MCD_ADM set, so a temporary roles is created as authority (to handle variables set up easier)
35
35
unset MCD_ADM
36
36
37
+ if [[ -z " $MCD_GOV " ]]; then
38
+ # It means the GOV token will be created now in the next deployment script call, then we can send funds to the Faucet and set permissions to FLOP
39
+ newGovToken=true
40
+ else
41
+ newGovToken=false
42
+ fi
43
+
37
44
# Deploy MCD Core Contratcs (solc optimized)
38
45
deploy-core
39
46
# shellcheck source=/dev/null
40
47
. " load-mcd-$( seth chain) "
41
48
rm " load-mcd-$( seth chain) "
42
49
50
+ # Mint Gov Token, send to the Faucet and set permissions if a new token
51
+ if [[ " $newGovToken " == true ]]; then
52
+ seth send " $MCD_GOV " ' mint(address,uint256)' " $FAUCET " " $( seth --to-uint256 " $( seth --to-wei 1000000 ETH) " ) "
53
+ seth send " $MCD_GOV " ' setAuthority(address)' " $MCD_GOV_GUARD "
54
+ seth send " $FAUCET " ' gulp(address)' " $MCD_GOV "
55
+ # Allow Flop to mint Gov token
56
+ seth send " $MCD_GOV_GUARD " ' permit(address,address,bytes32)' " $MCD_FLOP " " $MCD_GOV " " $( seth --to-bytes32 " $( seth sig ' mint(address,uint256)' ) " ) "
57
+ fi
58
+
43
59
# Deploy Collaterals (no solc optimization)
44
60
tokens=$( jq -r " .tokens | keys_unsorted[]" " $CONFIG_FILE " )
45
61
for token in $tokens ; do
@@ -88,19 +104,6 @@ PROXY_ACTIONS=$(dappCreate dss-proxy-actions DssProxyActions)
88
104
CDP_MANAGER=$( dappCreate dss-proxy-actions DssCdpManager " $MCD_VAT " )
89
105
GET_CDPS=$( dappCreate dss-proxy-actions GetCdps)
90
106
91
- dappBuild ds-chief
92
-
93
- # Deploy Gov token if doesn't exist
94
- if [[ -z " $MCD_GOV " ]]; then
95
- MCD_GOV=$( dappCreate ds-chief DSToken " $( seth --to-bytes32 " $( seth --from-ascii " MKR" ) " ) " )
96
- export MCD_GOV
97
- seth send " $MCD_GOV " ' mint(address,uint256)' " $FAUCET " " $( seth --to-uint256 " $( seth --to-wei 1000000 ETH) " ) "
98
- seth send " $MCD_GOV " ' setAuthority(address)' " $MCD_GOV_GUARD "
99
- seth send " $FAUCET " ' gulp(address)' " $MCD_GOV "
100
- # Allow Flop to mint Gov token
101
- seth send " $MCD_GOV_GUARD " ' permit(address,address,bytes32)' " $MCD_FLOP " " $MCD_GOV " " $( seth --to-bytes32 " $( seth sig ' mint(address,uint256)' ) " ) "
102
- fi
103
-
104
107
# Deploy Pause Proxy Actions (support contract for executing initial set up of the dss system)
105
108
dappBuild testchain-pause-proxy-actions
106
109
@@ -114,6 +117,7 @@ PROXY_DEPLOYER=0x"$(seth call "$PROXY_REGISTRY" 'proxies(address)(address)' "$ET
114
117
seth send " $MCD_ADM " ' setRootUser(address,bool)' " $PROXY_DEPLOYER " true
115
118
116
119
# Deploy chief as new $MCD_ADM (no solc optimization)
120
+ dappBuild ds-chief
117
121
MCD_IOU=$( dappCreate ds-chief DSToken " $( seth --to-bytes32 " $( seth --from-ascii " IOU" ) " ) " )
118
122
seth send " $MCD_IOU " ' setAuthority(address)' " $MCD_GOV_GUARD "
119
123
MCD_ADM=$( dappCreate ds-chief DSChief " $MCD_GOV " " $MCD_IOU " 5)
0 commit comments