Skip to content

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

} else {
bt.Printf("data_size: %d\n", len(txn.Data))
if len(txn.Data) < 1024 {
bt.Printf("data: %s\n", hexutil.Encode(txn.Data))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bt.Printf("data: %s\n", hexutil.Encode(txn.Data))
bt.Printf("data: %s\n", hexutil.Bytes(txn.Data))

Or even

Suggested change
bt.Printf("data: %s\n", hexutil.Encode(txn.Data))
bt.Printf("data: %x\n", txn.Data)

Comment on lines +25 to +27
func (dp DeployPayload) BytesWithoutSalt() []byte {
return dp.bytes[:len(dp.bytes)-common.HashSize]
}
Copy link
Contributor

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()

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.

4 participants