-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test add additional fee amount (Part 1) #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just some small comments. Let's prioritize getting this merged into general-e2e
so that other PRs can integrate the abigen changes made here.
tests/add_fee_amount.go
Outdated
addFeeAmount(&network.LocalNetwork{}) | ||
} | ||
|
||
func addFeeAmount(network network.Network) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's export this function so that a separate application can call it to test against Fuji
network.RelayMessage(ctx, sendCrossChainMsgReceipt.BlockHash, sendCrossChainMsgReceipt.BlockNumber, subnetAInfo, subnetBInfo) | ||
|
||
// Check Teleporter message received on the destination | ||
delivered, err := subnetBTeleporterMessenger.MessageReceived(&bind.CallOpts{}, subnetAInfo.BlockchainID, messageID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great way to call the contracts, I'll update my own PRs to use this interface
tests/add_fee_amount.go
Outdated
// check the fee amount | ||
amount, err := subnetATeleporterMessenger.CheckRelayerRewardAmount(&bind.CallOpts{}, fundedAddress, mockTokenAddress) | ||
Expect(err).Should(BeNil()) | ||
Expect(amount).Should(Equal(big.NewInt(1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add variables initialFeeAmount
and adjustedFeeAmount
and check against those rather than checking against the number on its own?
Why this should be merged
Implements the following test cases from #94
How this works
See above
How this was tested
New E2E test cases
How is this documented