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: eth: encode eth tx input as solidity ABI #11402

Merged
merged 9 commits into from
Nov 17, 2023

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Nov 8, 2023

Related Issues

Part of #11355

Proposed Changes

When translating "native" messages to Ethereum transactions, correctly handle parameters:

  1. If the message looks like a valid "create external", treat it as a contract creation.
  2. If it looks like a valid EVM invocation, decode it as such.
  3. Otherwise, ABI-encode the parameters to make them look like a "handle_filecoin_method" call. This will help chain explorers recognize these messages.

Additional Info

Testing TODO:

  • Test native create.
  • Test native invokeevm.
  • Test native with empty params.
  • Test native with non-empty params.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@Stebalien Stebalien requested a review from a team as a code owner November 8, 2023 21:07
Copy link
Contributor

@fridrik01 fridrik01 left a comment

Choose a reason for hiding this comment

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

LGTM

@Stebalien Stebalien force-pushed the steb/fix-native-message-encoding branch 3 times, most recently from 9a494a0 to 88ced30 Compare November 17, 2023 13:17
Base automatically changed from steb/fix-eth-addr-lookup to master November 17, 2023 17:20
@Stebalien Stebalien force-pushed the steb/fix-native-message-encoding branch from 88ced30 to ccb501c Compare November 17, 2023 18:07
@Stebalien Stebalien merged commit d5fd4cd into master Nov 17, 2023
87 checks passed
@Stebalien Stebalien deleted the steb/fix-native-message-encoding branch November 17, 2023 19:46
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.

None yet

2 participants