Skip to content
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

feat(cross-chain): add callbackGasPrice to cross-chain package #121

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

cosinlink
Copy link
Contributor

@cosinlink cosinlink commented Mar 9, 2023

Description

add callbackGasPrice to cross-chain package

Rationale

In order to support charging a relayer fee based on gasUsed of callback on BSC.

Example

  1. sync package of BSC => GNFD
// event payload =  abi.encodePacked(packageType, uint64(block.timestamp), relayFee, ackRelayFee, callbackGasPrice, msgBytes)

ackRelayFee = baseAckRelayFee + callbackGasPrice * callbackGasLimit
baseAckRelayFee = relayFee  
  1. ack / failAck package of GNFD => BSC
// event payload =  abi.encodePacked(packageType, uint64(block.timestamp), relayFee, ackRelayFee, callbackGasPrice, msgBytes)

// relayFee = ackRelayFee from its corresponding sync package of BSC => GNFD

Changes

Notable changes:

  • add callbackGasPrice to cross-chain package
  • modify proto files of CrossChain Events

@unclezoro unclezoro merged commit dd9cbde into develop Mar 9, 2023
yutianwu added a commit that referenced this pull request Mar 12, 2023
unclezoro pushed a commit that referenced this pull request Mar 12, 2023
* Revert "feat(cross-chain): add callbackGasPrice to cross-chain package (#121)"

This reverts commit dd9cbde.

* Revert "fix: fix the crosschain keeper in params module"

This reverts commit 873110f.
@unclezoro unclezoro deleted the gaslimit branch April 18, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants