ethpandaops / ethereum-package

A Kurtosis package that deploys a private, portable, and modular Ethereum devnet
MIT License
249 stars 143 forks source link

How to deploy custom contracts and add custom pre-funded address? #723

Closed Unded closed 1 month ago

Unded commented 3 months ago

Hi, I am testing an application to send and track transactions. Previously, before the ethereum-go version 1.4.X, I used a custom docker image with deployed ERC20, ERC721, other custom contracts and a pre-funded address that holds all of the tokens.

However, the Private Networks guide is now marked as outdated, so I need to move all pre-defined contracts to the ethereum-package and I have several questions.

  1. Is it possible to use the network_params.yaml config to specify the pre-funded address instead of the genesis_constants.star?
  2. Is there any additional information how to deploy a contract (let's say ERC20 contract) from the specific pre-funded address?
barnabasbusa commented 3 months ago
  1. You can use your own custom mnemonic, and it will automatically generate the first 20 addresses of that mnemonic to be prefunded.
  2. Deploying a contract would be exactly the same method as you have done it previously. You will have to interact with one of your rpc participants.