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

evm: Add tests for proxy #2396

Merged
merged 5 commits into from
Sep 6, 2023
Merged

evm: Add tests for proxy #2396

merged 5 commits into from
Sep 6, 2023

Conversation

cuongquangnam
Copy link
Contributor

@cuongquangnam cuongquangnam commented Aug 31, 2023

Summary

  • Add functional tests related to proxy smart contracts

Implications

  • Storage

    • None
  • Consensus

    • None

@cuongquangnam cuongquangnam marked this pull request as ready for review September 5, 2023 02:37
@canonbrother
Copy link
Contributor

Looks good overall

current: proxy -> implementation

expect to see
request: caller -> proxy -> implementtion

@cuongquangnam
Copy link
Contributor Author

cuongquangnam commented Sep 5, 2023

what do you mean by caller -> proxy -> implementation? @canonbrother
the current way is Externally Owned address -> proxy contract -> implementation contract

@canonbrother
Copy link
Contributor

canonbrother commented Sep 5, 2023

what do you mean by caller -> proxy -> implementation? @canonbrother

a NIT since we don't have this kind of interaction test

another caller contract to call proxy to call implementation

contract ProxyCaller {

    ProxyContract proxy;

    function Caller(address _proxyAdr) public {
        proxy = ProxyContract(_proxyAdr);
    }

    function doSomething() public {
       proxy.<method>();
    }
}

@cuongquangnam
Copy link
Contributor Author

What do you mean by NIT?
And IMO, we don't need this kind of contract -> proxy -> implementation test when we already have EOA -> proxy -> implementation test

@canonbrother
Copy link
Contributor

What do you mean by NIT?

NIT: not important

@shohamc1
Copy link
Contributor

shohamc1 commented Sep 6, 2023

What do you mean by NIT?
And IMO, we don't need this kind of contract -> proxy -> implementation test when we already have EOA -> proxy -> implementation test

I think there is some value in having a test that checks functionality for different levels of internal calls.

@prasannavl prasannavl added the v/next-release Items ready or targeted for upcoming release(s) label Sep 6, 2023
@prasannavl prasannavl merged commit 4a043c2 into master Sep 6, 2023
@prasannavl prasannavl deleted the cuong/proxy_test branch September 6, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v/next-release Items ready or targeted for upcoming release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants