Skip to content

Commit

Permalink
Merge pull request #307 from m-Peter/add-burner-system-contract
Browse files Browse the repository at this point in the history
[test] Add `Burner` system contract
  • Loading branch information
turbolent authored Mar 12, 2024
2 parents b59415a + acca69c commit ebec4e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/emulator_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ var systemContracts = func() []common.AddressLocation {
"RandomBeaconHistory": serviceAddress,
"EVM": serviceAddress,
"FungibleTokenSwitchboard": chainContracts.FungibleToken.Address.HexWithPrefix(),
"Burner": serviceAddress,
}

locations := make([]common.AddressLocation, 0)
Expand Down
9 changes: 6 additions & 3 deletions test/test_framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1106,11 +1106,12 @@ func TestImportBuiltinContracts(t *testing.T) {

const testEVMContract = `
import "EVM"
import "Burner"
access(all) fun main(): Bool {
let account <- EVM.createCadenceOwnedAccount()
let address = account.address()
destroy account
let coa <- EVM.createCadenceOwnedAccount()
let address = coa.address()
Burner.burn(<- coa)
assert(address.bytes != [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
return true
Expand Down Expand Up @@ -4137,6 +4138,7 @@ func TestCoverageReportForUnitTests(t *testing.T) {
"I.BlockchainHelpers",
"s.7465737400000000000000000000000000000000000000000000000000000000",
"A.0000000000000002.FungibleTokenSwitchboard",
"A.0000000000000001.Burner",
},
coverageReport.ExcludedLocationIDs(),
)
Expand Down Expand Up @@ -4361,6 +4363,7 @@ func TestCoverageReportForIntegrationTests(t *testing.T) {
"A.0000000000000001.RandomBeaconHistory",
"A.0000000000000001.EVM",
"A.0000000000000002.FungibleTokenSwitchboard",
"A.0000000000000001.Burner",
},
coverageReport.ExcludedLocationIDs(),
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func contractValueHandler(
}

func (r *TestRunner) interpreterContractValueHandler(
stdlibHandler stdlib.StandardLibraryHandler,
_ stdlib.StandardLibraryHandler,
) interpreter.ContractValueHandlerFunc {
return func(
inter *interpreter.Interpreter,
Expand Down

0 comments on commit ebec4e2

Please sign in to comment.