Code Monkey home page Code Monkey logo

3074-invokers's Introduction

EIP-3074 Invokers

Generalized EIP-3074 Invokers.

  • BaseInvoker - Invoker template for building arbitrary Invoker logic.
  • BatchInvoker - Invoker with batch transaction support.

Warning

WIP. Very experimental, not audited, use with caution.

Development

Developing with these contracts currently requires foundry-alphanet โ€“ a repository containing patches for Foundry to support EIP-3074 opcodes.

We have abstracted foundry-alphanet docker image execution into a set of Makefile scripts listed below.

Installation

First, we will need to set up the submodules for the repository.

make install

Building Contracts

We can build the contracts using forge build via foundry-alphanet:

make cmd="forge build"

Running Tests

We can run tests using forge test via foundry-alphanet:

make cmd="forge test"

Launch a Local Network

We can launch an Anvil instance using anvil via foundry-alphanet:

make cmd="anvil"

Deploying Invoker Contracts

Below, we will deploy the BatchInvoker contract to a local Anvil network.

1. Launch Anvil

First, we will need to launch an Anvil instance. If you are deploying to a launched network, you can skip this step.

make cmd="anvil"

2. Deploy Invoker

Deploy the BatchInvoker contract to the network.

make cmd="forge script Deploy --sig 'deploy()' --rpc-url $RPC_URL --private-key $EXECUTOR_PRIVATE_KEY --broadcast"

3. Test Invoker

We can test the BatchInvoker by sending a transaction via the contract.

make cmd="forge script Executor --sig 'sendEth(address,address,uint256)' $INVOKER_ADDRESS 0x3074ca113074ca113074ca113074ca113074ca11 0.01ether --rpc-url $RPC_URL --broadcast"

3074-Compatible Networks

Otim Hosted Devnet

Powered by Reth AlphaNet, check out Otim's 3074 devnet docs for detailed information on how to set up the network, get devnet ETH, use the deployed BatchInvoker, and more.

3074-invokers's People

Contributors

anna-carroll avatar clabby avatar jrachman avatar jxom avatar

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.