Giter Site home page Giter Site logo

Update transact cheatcode example about book HOT 3 OPEN

mattsse avatar mattsse commented on June 10, 2024
Update transact cheatcode example

from book.

Comments (3)

Sabnock01 avatar Sabnock01 commented on June 10, 2024 1

Will take this one.

from book.

mattsse avatar mattsse commented on June 10, 2024

wb!

from book.

kamuik16 avatar kamuik16 commented on June 10, 2024

ref foundry-rs/foundry#5985

TODO

  • add additional working example
  • make existing example work in the same block by manually setting the nonce
  • make existing example work on the parent block by manually decreasing the block's basefee

Hey @mattsse! I noticed something interesting in this. If we see the transaction specified in the example. We can see the state changes here.

image

We can see the nonce of the sender changes from 1 to 2. Now if I set the nonce manually in the example like this vm.setNonce(sender, 1); but I get an error like this [FAIL. Reason: new nonce (1) must be strictly equal to or higher than the account's current nonce (2)] and if I set the nonce greater than or equal to 2 it says [FAIL. Reason: backend: failed committing transaction] so there's no way to pass this test? Or am I doing something wrong?

from book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.