Skip to content

Support all transaction types in Relayer #907

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

Open
wants to merge 1 commit into
base: relayer-and-pure-tokens
Choose a base branch
from

Conversation

shermike
Copy link
Contributor

  • New Relayer functional:
    • Support gas forwarding
    • Support request/response transactions
    • Support deploy transactions
    • Support bounce transactions
  • Introduce async modifier for functions that initiate cross-shard transactions. It is required to enable gas forwarding.
  • Since deployment is currently performed by the Relayer (i.e., from Solidity code), we should leverage the CREATE2 opcode. Therefore, Nil.CreateAddress internally uses Nil.CreateAddressForCreate2, with the Relayer address as the sender.
  • Add NilBase.nilReceive() method to allow receiving funds even if the contract lacks a receive() function.

*/
function calculateGasForTargetCall(bool request) internal view returns(uint) {
uint gasForResponse = 50_000;
uint requiredGasForFinish = 50_000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a comment here explainig that requiredGasForFinish is actually for finishing receiveTx, otherwise it's not very clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants