Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Run local node or fork Ethereum-like blockchains from your Kotlin/Java app using Hardhat or Foundry Anvil

License

NotificationsYou must be signed in to change notification settings

ruXlab/localnode

Repository files navigation

build statusLicense: MIT

PokeFork is an open-source library project designed to empowerdevelopers working with Ethereum Virtual Machine (EVM) based networks.It allows to run a local development or forked node of the Ethereum-like networkusingHardhat or Foundry Anvil and interact with it from your Java/Kotlin/Scala code.

Motivation

While Rust and Typescript have well-established ecosystems forEVM network development, the JVM ecosystem has been somewhat lacking.PokeFork aims to bridge this gap by providing a powerful anduser-friendly toolkit for JVM developers, making it easier for themto participate in the EVM network space.

Supported methods

Local node methodHardHat 👷Foundry Anvil ⚒️
mine
setBalance
forkBlock
setNextBlockBaseFeePerGas
setStorageAt
impersonateAccount
stopImpersonatingAccount
chainSnapshot /chainRevert

Goals

Have a neat and simple interface to the local hardhat or anvil node from your Java/Kotlin/Scala code. As simple as:

// start local node in fork modeval node=HardhatNode.fork(config)val node=AnvilNode.fork(config)// initialise local node RPC clientval web3=LocalWeb3jNode.from(node)  web3.forkBlock(blockNumber)  web3.mine(42)  web3.setBalance(MY_WALLET,UNICORN_DOLLARS)  web3.impersonateAccount(HONEYPOT)  . . .  web3.stopImpersonatingAccount(HONEYPOT)

Seriously, Java devs deserve it.

  • Productivity: The primary goal is to enable developers usingKotlin, Scala, or Java to be highly productive when interacting with EVM networks,testing their smart contracts, interacting with external protocols or collecting data.

  • Extensibility: PokeFork works seamlessly withHardhat node and Foundry's Anvil, both are popular development local nodes for the Ethereum developers.

  • Docker Container: PokeFork runs local nodeinside docker container. This removes headache of installingand configuring local node on your machine, greatly improving portability. It also allows concurrent runof multiple nodes without ports conflict.

  • Network Diversity: Ethereum isstill the Mainnet, the old and very important guy.It would be naive to say that in 2023 it's the only blockchain that matters.

Getting Started

Clone and build the PokeFork project:

git clonecd pokefork./gradlewtest build

TBD

Contributing

Feel free to create PR or issues.

Please kindly provide a end-to-end test for the feature you are adding.

Disclaimer

Note: The authors of PokeFork take no responsibility for anyconsequences or issues arising from the use of this library.Please use it responsibly and consider the risks associated withEVM network interactions.

Seriously, it's clear that number of bad actors in blockchainspace is crazy. Trust no one.

Punning Around

We couldn't resist the opportunity for some wordplay with "PokeFork."Just like a fork in the road, we're here to help you choose thepath that leads to success in EVM network development.

Happy forking!

About

Run local node or fork Ethereum-like blockchains from your Kotlin/Java app using Hardhat or Foundry Anvil

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp