@@ -56,6 +56,7 @@ import Morley.Tezos.Address
56
56
(Address , ConstrainedAddress (.. ), ContractAddress , KindedAddress (.. ), L1Address , TxRollupAddress )
57
57
import Morley.Tezos.Address.Alias (AddressOrAlias (.. ), Alias (.. ), ContractAlias , unAlias )
58
58
import Morley.Tezos.Core (Mutez , zeroMutez )
59
+ import Morley.Util.Default (def )
59
60
import Morley.Util.Interpolate (itu )
60
61
import Morley.Util.Named (arg , pattern (:!) , (:!) )
61
62
@@ -65,8 +66,7 @@ import Lorentz.Contracts.Stablecoin
65
66
Roles (.. ), Storage (.. ), StorageRPC (.. ), UpdateOperatorData (.. ), contractMetadataContract ,
66
67
metadataJSON , metadataMap , mkContractMetadataRegistryStorage , parseMetadataUri ,
67
68
stablecoinContract )
68
- import Stablecoin.Client.Contract
69
- (InitialStorageData (.. ), InitialStorageOptions (.. ), mkInitialStorage )
69
+ import Stablecoin.Client.Contract (InitialStorageOptions (.. ))
70
70
import Stablecoin.Client.L1AddressOrAlias
71
71
import Stablecoin.Client.Metadata (ViewParam (.. ), callOffChainView )
72
72
import Stablecoin.Client.Parser (ContractMetadataOptions (.. ))
@@ -120,19 +120,25 @@ deploy (arg #sender -> sender) alias InitialStorageOptions {..} = do
120
120
Nothing
121
121
pure $ RemoteContract contractMetadataRegistryAddress
122
122
123
- let initialStorageData = InitialStorageData
124
- { isdMasterMinter = masterMinter
125
- , isdContractOwner = contractOwner
126
- , isdPauser = pauser
127
- , isdTransferlist = transferlist
128
- , isdContractMetadataStorage = metadataMap contractMetadataUri
129
- , isdTokenSymbol = isoTokenSymbol
130
- , isdTokenName = isoTokenName
131
- , isdTokenDecimals = isoTokenDecimals
132
- , isdDefaultExpiry = isoDefaultExpiry
133
- }
134
-
135
- let initialStorage = mkInitialStorage initialStorageData
123
+ let initialStorage =
124
+ Storage
125
+ { sDefaultExpiry = isoDefaultExpiry
126
+ , sLedger = def
127
+ , sMintingAllowances = mempty
128
+ , sOperators = def
129
+ , sPaused = False
130
+ , sPermitCounter = 0
131
+ , sPermits = def
132
+ , sRoles = Roles
133
+ { rMasterMinter = toAddress masterMinter
134
+ , rOwner = toAddress contractOwner
135
+ , rPauser = toAddress pauser
136
+ , rPendingOwner = Nothing
137
+ }
138
+ , sTransferlistContract = toAddress <$> transferlist
139
+ , sMetadata = metadataMap contractMetadataUri
140
+ , sTotalSupply = 0
141
+ }
136
142
137
143
let cmdAddress = case contractMetadataUri of
138
144
RemoteContract addr -> Just addr
0 commit comments