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

Enable evm #71

Merged
merged 31 commits into from
Feb 22, 2024
Merged

Enable evm #71

merged 31 commits into from
Feb 22, 2024

Conversation

sisyphusSmiling
Copy link
Contributor

@sisyphusSmiling sisyphusSmiling commented Feb 14, 2024

Related: #69

Description

This PR establishes a working branch on which to enable the faucet with EVM functionality. To avoid blocking progress on test suite availability, this PR is being marked as review with the intention of adding test suites in future PRs.

  • Updates existing Cadence code to 1.0 & v2 standard compatibility.
  • Adds EVM paths:
    • Creation of COAs
    • Transfers from Cadence to EVM COA & EOA addresses
    • Queries EVM balances
    • Queries EVM address for COA stored in a given Flow account address
  • Targets feature branch evm-enabled for ongoing evm-related work

  • Targeted PR against main 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

Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flow-faucet-crescendo ❌ Failed (Inspect) Feb 21, 2024 4:57pm
flow-faucet-testnet ❌ Failed (Inspect) Feb 21, 2024 4:57pm

//
// This will allow you to obtain information about a contract without necessarily knowing anything about it.
// All you need is its address and name and you're good to go!
access(all) contract interface ViewResolver {
Copy link
Member

Choose a reason for hiding this comment

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

Is the Cadence 1.0 version of this not and other core contracts not yet deployed to the emulator and testnet? I see an address listed for testnet below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet on testnet, but the migrated addresses should be the same AFAIK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll spin up a feature branch from main and target this PR against that so merging doesn't break anything


account.addPublicKey(publicKey.decodeHex())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method was deprecated, so sigAlgorithm & hashAlgorithm were added as transaction parameters to better match the preceding call to encodeKey which took number values to define each algo. This allows createAccount interface (defined below) to remain the same.

@sisyphusSmiling
Copy link
Contributor Author

Quick update: I think we'll need a docker image that includes Cadence 1.0 + EVM. I've been deving on the pre-release CLI v1.8.0-evm-preview-3 and validating the updated Cadence manually, but CI will need an image with the same emulator environment. Locally, I tried running an image with 0.59.0, but it looks like that's running Cadence 0.42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request EVM
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Make Faucet Smart (send test Flow to the correct account EVM/Cadence)
2 participants