@therealbytes/ticking-wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

Ticking wrapper

Wrap an ethereum devnet node to emulate a ticking chain.

Install

yarn add --dev @therealbytes/ticking-wrapper

Start chain

npx ticking --tick-gas-limit=<tick gas limit> anvil <anvil command line parameters>

Make sure to set the values of ticking command line parameters with equals signs, not a space. --tick-gas-limit=X, not --tick-gas-limit X.

Set the tick target (must follow the tick interface)

cast send \
    --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
    0x42000000000000000000000000000000000000A0 \
    'setTarget(address)' \
    <CONTRACT_ADDRESS>

Every block will include a transaction calling tick() in the tick pre-deploy, which will call tick() in the target contract if it is set.

Supported nodes:

  • Anvil
  • Hardhat (coming soon)

More

Tick interface

interface ITick {
  function tick() external;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @therealbytes/ticking-wrapper

Weekly Downloads

1

Version

0.0.12

License

MIT

Unpacked Size

97.8 kB

Total Files

30

Last publish

Collaborators

  • therealbytes