Skip to content

Add test cases around new EXTCODEHASH behavior #235

@fulldecent

Description

@fulldecent

The behavior of this implementation was changed slightly with the switch to EXTCODEHASH. Let's document this using test cases.

Mocks:

  • Contract R
    • Has a token receive function which emits an event Received
  • Contract A is R
    • Has constructor
      1. Deploys NFToken
      2. Mints token id=1
      3. Transfers token id=1 to self
  • Contract B
    • Has constructor
      1. Deploys NFToken
      2. Deploys R
      3. Transfers token id=1 to R

Tests:

  1. Test 1
    1. Transaction 1 -- Deploy NFToken
    2. Transaction 2 -- Mint token id=1
    3. Transaction 3 -- Deploy Contract R
    4. Transaction 4 -- Transfer token id=1 to R
    5. Expect NO event on Constantinople
  2. Test 2
    1. Transaction 1 -- Deploy NFToken
    2. Transaction 2 -- Mint token id=1
    3. Transaction 3 -- Deploy Contract R
    4. Expect NO event on Constantinople
  3. Test 3
    1. Transaction 1 -- Deploy Contract B
    2. Expect event on Constantinople (but no event with same test using old version of implementation)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions