Skip to content

Commit

Permalink
Add test for burntContract
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis committed Oct 23, 2023
1 parent e07deef commit bb8eeb9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions params/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,14 @@ func TestBorKeyValueConfigHelper(t *testing.T) {
assert.Equal(t, borKeyValueConfigHelper(config, 100000000-1), uint64(2))
assert.Equal(t, borKeyValueConfigHelper(config, 100000000), uint64(3))
assert.Equal(t, borKeyValueConfigHelper(config, 100000000+1), uint64(3))

burntContract := map[string]string{
"22640000": "0x70bcA57F4579f58670aB2d18Ef16e02C17553C38",
"41824608": "0x617b94CCCC2511808A3C9478ebb96f455CF167aA",
}
assert.Equal(t, borKeyValueConfigHelper(burntContract, 22640000), "0x70bcA57F4579f58670aB2d18Ef16e02C17553C38")
assert.Equal(t, borKeyValueConfigHelper(burntContract, 22640000+1), "0x70bcA57F4579f58670aB2d18Ef16e02C17553C38")
assert.Equal(t, borKeyValueConfigHelper(burntContract, 41824608-1), "0x70bcA57F4579f58670aB2d18Ef16e02C17553C38")
assert.Equal(t, borKeyValueConfigHelper(burntContract, 41824608), "0x617b94CCCC2511808A3C9478ebb96f455CF167aA")
assert.Equal(t, borKeyValueConfigHelper(burntContract, 41824608+1), "0x617b94CCCC2511808A3C9478ebb96f455CF167aA")
}

0 comments on commit bb8eeb9

Please sign in to comment.