Skip to content

Commit e7eaca0

Browse files
fix system contract variable name inconsistency
1 parent c271a58 commit e7eaca0

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

fvm/environment/system_contracts.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (sys *SystemContracts) DeductTransactionFees(
157157
// uses `FlowServiceAccount.setupNewAccount` from https://github.com/onflow/flow-core-contracts/blob/master/contracts/FlowServiceAccount.cdc
158158
var setupNewAccountSpec = ContractFunctionSpec{
159159
AddressFromChain: ServiceAddress,
160-
LocationName: systemcontracts.ContractServiceAccount,
160+
LocationName: systemcontracts.ContractNameServiceAccount,
161161
FunctionName: systemcontracts.ContractServiceAccountFunction_setupNewAccount,
162162
ArgumentTypes: []sema.Type{
163163
sema.AuthAccountType,
@@ -182,7 +182,7 @@ func (sys *SystemContracts) SetupNewAccount(
182182

183183
var accountAvailableBalanceSpec = ContractFunctionSpec{
184184
AddressFromChain: ServiceAddress,
185-
LocationName: systemcontracts.ContractStorageFees,
185+
LocationName: systemcontracts.ContractNameStorageFees,
186186
FunctionName: systemcontracts.ContractStorageFeesFunction_defaultTokenAvailableBalance,
187187
ArgumentTypes: []sema.Type{
188188
&sema.AddressType{},
@@ -204,7 +204,7 @@ func (sys *SystemContracts) AccountAvailableBalance(
204204

205205
var accountBalanceInvocationSpec = ContractFunctionSpec{
206206
AddressFromChain: ServiceAddress,
207-
LocationName: systemcontracts.ContractServiceAccount,
207+
LocationName: systemcontracts.ContractNameServiceAccount,
208208
FunctionName: systemcontracts.ContractServiceAccountFunction_defaultTokenBalance,
209209
ArgumentTypes: []sema.Type{
210210
sema.PublicAccountType,
@@ -226,7 +226,7 @@ func (sys *SystemContracts) AccountBalance(
226226

227227
var accountStorageCapacitySpec = ContractFunctionSpec{
228228
AddressFromChain: ServiceAddress,
229-
LocationName: systemcontracts.ContractStorageFees,
229+
LocationName: systemcontracts.ContractNameStorageFees,
230230
FunctionName: systemcontracts.ContractStorageFeesFunction_calculateAccountCapacity,
231231
ArgumentTypes: []sema.Type{
232232
&sema.AddressType{},
@@ -260,7 +260,7 @@ func (sys *SystemContracts) AccountsStorageCapacity(
260260
return sys.Invoke(
261261
ContractFunctionSpec{
262262
AddressFromChain: ServiceAddress,
263-
LocationName: systemcontracts.ContractStorageFees,
263+
LocationName: systemcontracts.ContractNameStorageFees,
264264
FunctionName: systemcontracts.ContractStorageFeesFunction_getAccountsCapacityForTransactionStorageCheck,
265265
ArgumentTypes: []sema.Type{
266266
sema.NewConstantSizedType(

fvm/systemcontracts/system_contracts.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const (
2323

2424
// Unqualified names of system smart contracts (not including address prefix)
2525

26-
ContractNameEpoch = "FlowEpoch"
27-
ContractNameClusterQC = "FlowClusterQC"
28-
ContractNameDKG = "FlowDKG"
29-
ContractServiceAccount = "FlowServiceAccount"
30-
ContractNameFlowFees = "FlowFees"
31-
ContractStorageFees = "FlowStorageFees"
26+
ContractNameEpoch = "FlowEpoch"
27+
ContractNameClusterQC = "FlowClusterQC"
28+
ContractNameDKG = "FlowDKG"
29+
ContractNameServiceAccount = "FlowServiceAccount"
30+
ContractNameFlowFees = "FlowFees"
31+
ContractNameStorageFees = "FlowStorageFees"
3232

3333
// Unqualified names of service events (not including address prefix or contract name)
3434

0 commit comments

Comments
 (0)