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

Misleading documentation about caller addresses #74

Closed
Silur opened this issue Nov 10, 2021 · 1 comment
Closed

Misleading documentation about caller addresses #74

Silur opened this issue Nov 10, 2021 · 1 comment

Comments

@Silur
Copy link

Silur commented Nov 10, 2021

https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/how-to-test-a-property.md#initiate-a-contract claims that:

  • 0x00a329c0648769A73afAc7F9381E08FB43dBEA72 is the caller of the constructor
  • 0x00a329C0648769a73afAC7F9381e08fb43DBEA70 is the caller of other functions

However, it's just the opposite if you test it with an Ownable contract:

contract TestToken is Ownable {
    address echidna_caller = 0x00a329c0648769a73afac7f9381e08fb43dbea70;
    // address echidna_caller = 0x00a329c0648769a73afac7f9381e08fb43dbea72; <- this works
    constructor() public{
      balances[echidna_caller] = 10;
      // owner becomes 0x00a329c0648769a73afac7f9381e08fb43dbea70 here
    }
    function echidna_no_ownership() public view returns (bool) {
      return owner != echidna_caller; //fails
    }
  }
@montyly montyly mentioned this issue Feb 1, 2022
@ggrieco-tob
Copy link
Member

This was fixed.

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

No branches or pull requests

2 participants