Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.72 KB

File metadata and controls

56 lines (37 loc) · 1.72 KB

Front-running

On-chain front-running refers to searchers or miners inserting their own transactions ahead of others by increasing gas or using other methods to capture value. In blockchain, miners can profit by packaging, excluding, or reordering transactions in the blocks they generate, and MEV is the measure of this profit.

solidity foundry ethers remix

Features ⚡

  • Demo contract
  • Front-running script

Front-running


How to use 🤔

To get started with this boilerplate, you just need to follow these simple steps:

  1. Start the Foundry local test chain:

    anvil --chain-id 12345 -b 20
    

    Anvil local chain

  2. Connect to Foundry provider:

    Foundry Provider

  3. Deploy demo contract with first account

  4. Run locally by last account private key

    node scripts/frontrunning/frontrunning.js
    
  5. Mint by first account

    Then you will find that the currently mined NFT belongs to last account

License

By MIT licensed.