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

Add scripts, transactions and a test example on how to interact with Solidty contracts through Flow EVM #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

m-Peter
Copy link
Owner

@m-Peter m-Peter commented Mar 13, 2024

@m-Peter m-Peter added the enhancement New feature or request label Mar 13, 2024
@m-Peter m-Peter self-assigned this Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.16%. Comparing base (23387e3) to head (9a17ae7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
+ Coverage   99.14%   99.16%   +0.02%     
==========================================
  Files           4        5       +1     
  Lines         117      120       +3     
==========================================
+ Hits          116      119       +3     
  Misses          1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// }
// }
// ABI for the above Solidity contract
let contractCode = "6060604052341561000f57600080fd5b60eb8061001d6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c6888fa1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506078565b6040518082815260200191505060405180910390f35b60007f24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da600783026040518082815260200191505060405180910390a16007820290509190505600a165627a7a7230582040383f19d9f65246752244189b02f56e8d0980ed44e7a56c0b200458caad20bb0029"

Choose a reason for hiding this comment

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

Is there a way to pull this value from a local JSON file containing Cadence JSON args?

let account <- EVM.createCadenceOwnedAccount()
account.deposit(from: <-self.sentVault)

self.auth.storage.save<@EVM.CadenceOwnedAccount>(

Choose a reason for hiding this comment

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

I think we'd also want to issue an un-entitled COA Capability at /public/evm so things like the COA ownership proof and public deposits are accessible

@@ -0,0 +1,16 @@
access(all) contract SolidityContractsRegistry {

access(all) let contractRegistry: {String: [UInt8; 20]}
Copy link

@sisyphusSmiling sisyphusSmiling Mar 13, 2024

Choose a reason for hiding this comment

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

Interesting idea...I wonder if something like a Cadence-native diamond pattern (ERC-2535) would be a useful example

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

Successfully merging this pull request may close these issues.

2 participants