Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

chore: Fix Module Accounts for Precompile Contracts #653

Closed

Conversation

calbera
Copy link
Contributor

@calbera calbera commented May 5, 2023

No description provided.

@linear
Copy link

linear bot commented May 5, 2023

@calbera calbera requested a review from itsdevbear May 5, 2023 17:04
@calbera calbera linked an issue May 5, 2023 that may be closed by this pull request
Copy link
Contributor

@itsdevbear itsdevbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but remove println's and fix linter.

@itsdevbear
Copy link
Contributor

@itsdevbear
Copy link
Contributor

nvm, these are going to be set as EOAs not module accounts.

@calbera
Copy link
Contributor Author

calbera commented May 5, 2023

after applying the diff of cosmos/cosmos-sdk#16046 to my local cosmos-sdk dependency, get this error

6:59PM ERR failure when running app err="failed to get address from Keyring: staking.info: key not found [cosmos/[email protected]/crypto/keyring/keyring.go:514]"
Error: running "./cosmos/runtime/localnode/init.sh " failed with exit code 1

@calbera
Copy link
Contributor Author

calbera commented May 5, 2023

init.sh changes

PRECOMPILES[0]="staking" # "polar1mx5e3jkxvzf8frl7cl8m69264ctn0shlz6zxjx" # staking
PRECOMPILES[1]="bank" # "polar1gwqac243g2z3vryqsev6acq965f9ttwhjgk226" # bank
PRECOMPILES[2]="gov" # "polar10d07y265gmmuvt4z0w9aw880jnsr700j33u8zp" # governance
PRECOMPILES[3]="auth" # "polar1hh6fc0pcsggzlsqhl7mxzyyvvw5rd5r9vff2ea" # auth
PRECOMPILES[4]="distribution" # "polar1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8vvt7ad" # distribution
PRECOMPILES[5]="erc20" # "polar1glht96kr2rseywuvhhay894qw7ekuc4qphuca5" # erc20

	## Fund all precompile addresses with 1abera (https://ethereum.stackexchange.com/questions/68056/puppeth-precompile-addresses)
	for PRECOMPILE in "${PRECOMPILES[@]}"; do
		./bin/polard genesis add-genesis-account $PRECOMPILE 1abera --keyring-backend $KEYRING --home "$HOMEDIR" --module-name $PRECOMPILE
	done

@itsdevbear itsdevbear closed this May 11, 2023
@github-actions github-actions bot deleted the calbera/beng-262-fix-module-accounts-for-precompile branch August 7, 2023 06:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: Check for precompile module account on startup
2 participants