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

Implement the eth_sendRawTransaction JSON-RPC endpoint #26

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

m-Peter
Copy link
Collaborator

@m-Peter m-Peter commented Jan 23, 2024

Closes: #2

Description

Functionality to send raw EVM transactions.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@m-Peter m-Peter added this to the Flow-EVM-M2 milestone Jan 23, 2024
@m-Peter m-Peter self-assigned this Jan 23, 2024
@m-Peter m-Peter force-pushed the eth-send-raw-transaction-endpoint branch from 414228a to fb99ac8 Compare January 31, 2024 14:24
@m-Peter m-Peter force-pushed the eth-send-raw-transaction-endpoint branch from fb99ac8 to 6f97c77 Compare January 31, 2024 15:30
@m-Peter m-Peter marked this pull request as ready for review January 31, 2024 15:31
return common.Hash{}, err
}

privateKey, err := sdkCrypto.DecodePrivateKeyHex(sdkCrypto.ECDSA_P256, strings.Replace("2619878f0e2ff438d17835c2a4561cb87b4d24d72d12ec34569acd0dd4af7c21", "0x", "", 1))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you get this from ENV configuration

Copy link
Collaborator Author

@m-Peter m-Peter Jan 31, 2024

Choose a reason for hiding this comment

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

I am planning to add a flow.json config file, to hold the account and private key that will be used for the gateway. Though I didn't get to it in this PR, to avoid cluttering things. Should we add it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Just add a todo then maybe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure thing 👍 I also want to add the networks in there, where the indexer will connect to. And we'll see what other config makes sense to have in there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added comments in 4ad8061

return common.Hash{}, err
}

account, err := api.FlowClient.GetAccount(context.Background(), flow.HexToAddress("0xf8d6e0586b0a20c7"))
Copy link
Contributor

Choose a reason for hiding this comment

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

This as well

@sideninja sideninja self-requested a review January 31, 2024 16:43
@m-Peter m-Peter merged commit 0ef8dd5 into onflow:main Jan 31, 2024
1 check passed
@m-Peter m-Peter deleted the eth-send-raw-transaction-endpoint branch January 31, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Implement API functionality to support transactions
2 participants