Skip to content

Commit

Permalink
Merge pull request onflow#6505 from onflow/jribbink/fix-burner
Browse files Browse the repository at this point in the history
Fix `systemcontracts` Burner address for Testnet/Mainnet
  • Loading branch information
turbolent authored Sep 27, 2024
2 parents 2fa508e + 18f86d1 commit 39e679b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fvm/systemcontracts/system_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,15 @@ func init() {
}
}

burnerAddressFunc := func(chain flow.ChainID) flow.Address {
switch chain {
case flow.Mainnet, flow.Testnet:
return nthAddressFunc(FungibleTokenAccountIndex)(chain)
default:
return serviceAddressFunc(chain)
}
}

contractAddressFunc = map[string]func(id flow.ChainID) flow.Address{
ContractNameIDTableStaking: epochAddressFunc,
ContractNameEpoch: epochAddressFunc,
Expand All @@ -355,7 +364,7 @@ func init() {
ContractNameEVM: serviceAddressFunc,
AccountNameEVMStorage: evmStorageEVMFunc,

ContractNameBurner: serviceAddressFunc,
ContractNameBurner: burnerAddressFunc,
}

getSystemContractsForChain := func(chainID flow.ChainID) *SystemContracts {
Expand Down

0 comments on commit 39e679b

Please sign in to comment.