-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: relayer-and-pure-tokens
Are you sure you want to change the base?
Conversation
| */ | ||
| function calculateGasForTargetCall(bool request) internal view returns(uint) { | ||
| uint gasForResponse = 50_000; | ||
| uint requiredGasForFinish = 50_000; |
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.
I think we should add a comment here explainig that requiredGasForFinish is actually for finishing receiveTx, otherwise it's not very clear
| } else { | ||
| bt.Printf("data_size: %d\n", len(txn.Data)) | ||
| if len(txn.Data) < 1024 { | ||
| bt.Printf("data: %s\n", hexutil.Encode(txn.Data)) |
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.
| bt.Printf("data: %s\n", hexutil.Encode(txn.Data)) | |
| bt.Printf("data: %s\n", hexutil.Bytes(txn.Data)) |
Or even
| bt.Printf("data: %s\n", hexutil.Encode(txn.Data)) | |
| bt.Printf("data: %x\n", txn.Data) |
| func (dp DeployPayload) BytesWithoutSalt() []byte { | ||
| return dp.bytes[:len(dp.bytes)-common.HashSize] | ||
| } |
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.
Isn't Code() enough?
BytesWithoutSalt is even longer than Code().Bytes()
asyncmodifier for functions that initiate cross-shard transactions. It is required to enable gas forwarding.Nil.CreateAddressinternally usesNil.CreateAddressForCreate2, with the Relayer address as the sender.NilBase.nilReceive()method to allow receiving funds even if the contract lacks areceive()function.