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: support EvmAddress #995

Merged
merged 41 commits into from
May 29, 2023
Merged

feat: support EvmAddress #995

merged 41 commits into from
May 29, 2023

Conversation

danielbate
Copy link
Member

@danielbate danielbate commented May 10, 2023

Closes #921

This PR includes the following:

  • The EvmAddress interface
  • Extension of Address to include conversion to EvmAddress
  • Typegen support for EvmAddress so that the type itself can be passed to contract functions rather than the struct input/out types generated by the StructType
  • Documentation

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
95.52% (+0.03% 🔼)
5305/5554
🟢 Branches
84.89% (+0.01% 🔼)
871/1026
🟢 Functions
87.24% (+0.07% 🔼)
964/1105
🟢 Lines
95.52% (+0.02% 🔼)
5074/5312
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / EvmAddressType.ts
100% 100% 100% 100%

Test suite run success

972 tests passing in 172 suites.

Report generated by 🧪jest coverage report action from 6effbfa

@danielbate danielbate changed the title feat: support EVM Address feat: support EvmAddress May 10, 2023
@arboleya
Copy link
Member

I know this is still a draft, but let me tell you something — you must add your echo-evm-address project to the workspace member's array (see below). This will ensure the project is compiled with the rest and fix the ENOENT: no such file or directory errors om the tests.

members = [
"counter",
"echo-enum",
"log-values",
"sum-script",
"echo-values",
"simple-token",
"sum-option-u8",
"employee-data",
"echo-u64-array",
"return-context",
"token-depositor",
"simple-token-abi",
"echo-configurables",
"transfer-to-address",
"echo-employee-data-vector",
"whitelisted-address-predicate",
]

Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

Awesome 🚀

…orc.toml

Co-authored-by: Sérgio Torres <30977845+Torres-ssf@users.noreply.github.com>
@danielbate danielbate requested a review from Torres-ssf May 23, 2023 11:01
Torres-ssf
Torres-ssf previously approved these changes May 23, 2023
@danielbate danielbate requested a review from nedsalk as a code owner May 24, 2023 19:08
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Great work!

I left some minor observations.

packages/abi-typegen/src/abi/types/EvmAddressType.ts Outdated Show resolved Hide resolved
packages/address/src/utils.ts Outdated Show resolved Hide resolved
@danielbate danielbate requested review from arboleya and Torres-ssf May 29, 2023 09:29
@danielbate danielbate enabled auto-merge (squash) May 29, 2023 10:01
@danielbate danielbate merged commit ac9362c into master May 29, 2023
@danielbate danielbate deleted the db/feat/support-evm-address branch May 29, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the EvmAddress
3 participants