Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/aws-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . -f ./contrib/images/evmd-env/Dockerfile
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . -f ./contrib/images/ogd-env/Dockerfile
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "Image pushed: $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COMMIT := $(shell git log -1 --format='%H')

BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
EXAMPLE_BINARY := evmd
EXAMPLE_BINARY := ogd

###############################################################################
### Repo Info ###
Expand All @@ -31,10 +31,10 @@ export GO111MODULE = on

# evmd is a separate module under ./evmd
EVMD_DIR := evmd
EVMD_MAIN_PKG := ./cmd/evmd
EVMD_MAIN_PKG := ./cmd/ogd

Comment on lines 32 to 35
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

PR description mentions updating localnet/docker targets for the renamed binary/image, but the top-level Makefile still has localnet targets that reference contrib/images evmd-env and cosmos/evmd (see Makefile lines ~364-370). This looks like an incomplete rename and will prevent make localnet-build-env / make localnet-start from producing/using the cosmos/ogd image as intended.

Copilot uses AI. Check for mistakes.
###############################################################################
### Build & Install evmd ###
### Build & Install ogd ###
###############################################################################

# process build tags
Expand Down Expand Up @@ -96,7 +96,7 @@ endif

# Build into $(BUILDDIR)
build: go.sum $(BUILDDIR)/
@echo "πŸ—οΈ Building evmd to $(BUILDDIR)/$(EXAMPLE_BINARY) ..."
@echo "πŸ—οΈ Building ogd to $(BUILDDIR)/$(EXAMPLE_BINARY) ..."
@echo "BUILD_FLAGS: $(BUILD_FLAGS)"
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY) $(EVMD_MAIN_PKG)
Expand All @@ -107,7 +107,7 @@ build-linux:

# Install into $(BINDIR)
install: go.sum
@echo "🚚 Installing evmd to $(BINDIR) ..."
@echo "🚚 Installing ogd to $(BINDIR) ..."
@echo "BUILD_FLAGS: $(BUILD_FLAGS)"
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
go install $(BUILD_FLAGS) $(EVMD_MAIN_PKG)
Expand Down Expand Up @@ -362,10 +362,10 @@ contracts-add:
###############################################################################

localnet-build-env:
$(MAKE) -C contrib/images evmd-env
$(MAKE) -C contrib/images ogd-env

localnet-build-nodes:
$(DOCKER) run --rm -v $(CURDIR)/.testnets:/data cosmos/evmd \
$(DOCKER) run --rm -v $(CURDIR)/.testnets:/data cosmos/ogd \
testnet init-files --validator-count 4 -o /data --starting-ip-address 192.168.10.2 --keyring-backend=test --chain-id=local-4221 --use-docker=true
docker compose up -d

Expand All @@ -387,7 +387,7 @@ test-rpc-compat-stop:

test-system: build-v05 build
mkdir -p ./tests/systemtests/binaries/
cp $(BUILDDIR)/evmd ./tests/systemtests/binaries/
cp $(BUILDDIR)/$(EXAMPLE_BINARY) ./tests/systemtests/binaries/
cd tests/systemtests/Counter && forge build
$(MAKE) -C tests/systemtests test

Expand Down Expand Up @@ -472,4 +472,4 @@ d2gen-all: d2check
printf "πŸ“Š generating $$svgfile from $$d2file... "; \
$(D2_ENV_VARS) d2 "$$d2file" "$$svgfile" > /dev/null 2>&1 && echo "done βœ…" || echo "failed ❌"; \
done
@echo "βœ… svg files generated for all d2 diagrams"
@echo "βœ… svg files generated for all d2 diagrams"
2 changes: 1 addition & 1 deletion client/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func LegacyEIP712Cmd() *cobra.Command {
return &cobra.Command{
Use: "legacy-eip712 [file] [evm-chain-id]",
Short: "Output types of legacy eip712 typed data according to the given transaction",
Example: fmt.Sprintf(`$ %s debug legacy-eip712 tx.json 4221 --chain-id evmd-1`, version.AppName),
Example: fmt.Sprintf(`$ %s debug legacy-eip712 tx.json 4221 --chain-id ogd-1`, version.AppName),
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
Expand Down
1 change: 1 addition & 0 deletions contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export default {
},
paths: {
sources: "./solidity",
exclude: ["**/lib/**"]
},
};
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0",
"description": "A collection of smart contracts used in the development of the Cosmos EVM blockchain.",
"devDependencies": {
"@openzeppelin/contracts": "^5.4.0",
"@openzeppelin/contracts": "4.9.6",
"hardhat": "^3.0.15"
},
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions contrib/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all: evmd-env
all: ogd-env

evmd-env: evmd-rmi
docker build --tag cosmos/evmd -f evmd-env/Dockerfile \
ogd-env: ogd-rmi
docker build --tag cosmos/ogd -f ogd-env/Dockerfile \
$(shell git rev-parse --show-toplevel)

evmd-rmi:
docker rmi cosmos/evmd 2>/dev/null; true
ogd-rmi:
docker rmi cosmos/ogd 2>/dev/null; true

.PHONY: all evmd-env evmd-rmi
.PHONY: all ogd-env ogd-rmi
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ RUN adduser -D nonroot -u 1025 -G nonroot
EXPOSE 26656 26657 1317 9090 26660 8545 8100
STOPSIGNAL SIGTERM
VOLUME /evmd
WORKDIR /evmd
WORKDIR /ogd

# Copy the wrapper script and binary to expected locations
COPY contrib/images/evmd-env/wrapper.sh /usr/bin/wrapper.sh
COPY contrib/images/ogd-env/wrapper.sh /usr/bin/wrapper.sh
COPY test_deployment.sh /usr/bin/test_deployment.sh
COPY multi_node_startup.sh /usr/bin/multi_node_startup.sh
COPY --from=evmd-builder /work/build/evmd /evmd/
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be an issue due to workdir diff

Expand Down
2 changes: 1 addition & 1 deletion evmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ By default, this chain has the following configuration:

| Option | Value |
|---------------------|------------------------|
| Binary | `evmd` |
| Binary | `ogd` |
| Chain ID | `cosmos_262144-1` |
| Custom Opcodes | - |
| Default Token Pairs | 1 for the native token |
Expand Down
2 changes: 1 addition & 1 deletion evmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func init() {
defaultNodeHome = evmconfig.MustGetDefaultNodeHome()
}

const appName = "evmd"
const appName = "ogd"

// defaultNodeHome default home directories for the application daemon
var defaultNodeHome string
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion evmd/cmd/evmd/cmd/root.go β†’ evmd/cmd/ogd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewRootCmd() *cobra.Command {
WithLedgerHasProtobuf(true)

rootCmd := &cobra.Command{
Use: "evmd",
Use: "ogd",
Short: "exemplary Cosmos EVM app",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ or a similar setup where each node has a manually configurable IP address.
Note, strict routability for addresses is turned off in the config file.

Example:
evmd testnet init-files --v 4 --output-dir ./.testnets --starting-ip-address 192.168.10.2
ogd testnet init-files --v 4 --output-dir ./.testnets --starting-ip-address 192.168.10.2
`,
RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
Expand Down Expand Up @@ -215,7 +215,7 @@ Example:
cmd.Flags().Duration(flagCommitTimeout, 5*time.Second, "Time to wait after a block commit before starting on the new height")
cmd.Flags().Bool(flagSingleHost, false, "Cluster runs on a single host machine with different ports")
cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)")
cmd.Flags().String(flagNodeDaemonHome, "evmd", "Home directory of the node's daemon configuration")
cmd.Flags().String(flagNodeDaemonHome, "ogd", "Home directory of the node's daemon configuration")
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)")
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)")
cmd.Flags().Bool(flagsUseDocker, false, "test network via docker")
Expand All @@ -234,7 +234,7 @@ and generate "v" directories, populated with necessary validator configuration f
(private validator, genesis, config, etc.).

Example:
evmd testnet --v 4 --output-dir ./.testnets
ogd testnet --v 4 --output-dir ./.testnets
`,
RunE: func(cmd *cobra.Command, _ []string) error {
args := startArgs{}
Expand Down Expand Up @@ -748,7 +748,7 @@ func startTestnet(cmd *cobra.Command, args startArgs) error {
return nil
}

// NewTestNetworkFixture returns a new evmd AppConstructor for network simulation tests
// NewTestNetworkFixture returns a new ogd AppConstructor for network simulation tests
func NewTestNetworkFixture() sdknetwork.TestFixture {
dir, err := os.MkdirTemp("", "evm")
if err != nil {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions evmd/cmd/evmd/main.go β†’ evmd/cmd/ogd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/evm/evmd/cmd/evmd/cmd"
"github.com/cosmos/evm/evmd/cmd/ogd/cmd"
"github.com/cosmos/evm/evmd/config"
)

func main() {
setupSDKConfig()

rootCmd := cmd.NewRootCmd()
if err := svrcmd.Execute(rootCmd, "evmd", config.MustGetDefaultNodeHome()); err != nil {
if err := svrcmd.Execute(rootCmd, "ogd", config.MustGetDefaultNodeHome()); err != nil {
fmt.Fprintln(rootCmd.OutOrStderr(), err)
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion evmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func MustGetDefaultNodeHome() string {
defaultNodeHome, err := clienthelpers.GetNodeHomeDirectory(".evmd")
defaultNodeHome, err := clienthelpers.GetNodeHomeDirectory(".ogd")
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion evmd/tests/network/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error {
for i := 0; i < cfg.NumValidators; i++ {
cmtCfg := vals[i].Ctx.Config

nodeDir := filepath.Join(outputDir, vals[i].Moniker, "evmd")
nodeDir := filepath.Join(outputDir, vals[i].Moniker, "ogd")
gentxsDir := filepath.Join(outputDir, "gentxs")

cmtCfg.Moniker = vals[i].Moniker
Expand Down
32 changes: 16 additions & 16 deletions local_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ KEYRING="test"
KEYALGO="eth_secp256k1"

LOGLEVEL="info"
# Set dedicated home directory for the evmd instance
# Set dedicated home directory for the ogd instance
CHAINDIR="$HOME/.og-evm-devnet"

BASEFEE=10000000
Expand Down Expand Up @@ -47,7 +47,7 @@ Options:
--no-install Skip 'make install'
--remote-debugging Build with nooptimization,nostrip
--additional-users N Create N extra users: dev4, dev5, ...
--mnemonic-file PATH Where to write mnemonics YAML (default: \$HOME/.evmd/mnemonics.yaml)
--mnemonic-file PATH Where to write mnemonics YAML (default: \$HOME/.ogd/mnemonics.yaml)
--mnemonics-input PATH Read dev mnemonics from a yaml file (key: mnemonics:)
EOF
}
Expand All @@ -64,7 +64,7 @@ while [[ $# -gt 0 ]]; do
overwrite="n"; shift
;;
--no-install)
echo "Flag --no-install passed -> Skipping installation of the evmd binary."
echo "Flag --no-install passed -> Skipping installation of the ogd binary."
install=false; shift
;;
--remote-debugging)
Expand Down Expand Up @@ -164,20 +164,20 @@ write_mnemonics_yaml() {
# ---------- Add funded account ----------
add_genesis_funds() {
local keyname="$1"
evmd genesis add-genesis-account "$keyname" 10000000000000000000000ogwei --keyring-backend "$KEYRING" --home "$CHAINDIR"
ogd genesis add-genesis-account "$keyname" 10000000000000000000000ogwei --keyring-backend "$KEYRING" --home "$CHAINDIR"
}

# Setup local node if overwrite is set to Yes, otherwise skip setup
if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
rm -rf "$CHAINDIR"

evmd config set client chain-id "$CHAINID" --home "$CHAINDIR"
evmd config set client keyring-backend "$KEYRING" --home "$CHAINDIR"
ogd config set client chain-id "$CHAINID" --home "$CHAINDIR"
ogd config set client keyring-backend "$KEYRING" --home "$CHAINDIR"

# ---------------- Validator key ----------------
VAL_KEY="mykey"
VAL_MNEMONIC="gesture inject test cycle original hollow east ridge hen combine junk child bacon zero hope comfort vacuum milk pitch cage oppose unhappy lunar seat"
echo "$VAL_MNEMONIC" | evmd keys add "$VAL_KEY" --recover --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR"
echo "$VAL_MNEMONIC" | ogd keys add "$VAL_KEY" --recover --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR"

# ---------------- dev mnemonics source ----------------
# dev0 address 0xC6Fe5D33615a1C52c08018c47E8Bc53646A0E101 | og1cml96vmptgw99syqrrz8az79xer2pcgpum8mp7
Expand Down Expand Up @@ -228,7 +228,7 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
fi

# init chain w/ validator mnemonic
echo "$VAL_MNEMONIC" | evmd init $MONIKER -o --chain-id "$CHAINID" --home "$CHAINDIR" --recover
echo "$VAL_MNEMONIC" | ogd init $MONIKER -o --chain-id "$CHAINID" --home "$CHAINDIR" --recover

# ---------- Genesis customizations ----------
jq '.app_state["staking"]["params"]["bond_denom"]="ogwei"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
Expand All @@ -238,7 +238,7 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
jq '.app_state["evm"]["params"]["evm_denom"]="ogwei"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state["mint"]["params"]["mint_denom"]="ogwei"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"

jq '.app_state["bank"]["denom_metadata"]=[{"description":"The native staking token for evmd.","denom_units":[{"denom":"ogwei","exponent":0,"aliases":[]},{"denom":"OPG","exponent":18,"aliases":[]}],"base":"ogwei","display":"OPG","name":"OpenGradient Token","symbol":"OPG","uri":"","uri_hash":""}]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state["bank"]["denom_metadata"]=[{"description":"The native staking token for ogd.","denom_units":[{"denom":"ogwei","exponent":0,"aliases":[]},{"denom":"OPG","exponent":18,"aliases":[]}],"base":"ogwei","display":"OPG","name":"OpenGradient Token","symbol":"OPG","uri":"","uri_hash":""}]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"

jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x0000000000000000000000000000000000000100","0x0000000000000000000000000000000000000400","0x0000000000000000000000000000000000000800","0x0000000000000000000000000000000000000801","0x0000000000000000000000000000000000000802","0x0000000000000000000000000000000000000803","0x0000000000000000000000000000000000000804","0x0000000000000000000000000000000000000805", "0x0000000000000000000000000000000000000806", "0x0000000000000000000000000000000000000807", "0x0000000000000000000000000000000000000900"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state["evm"]["params"]["evm_denom"]="ogwei"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
Expand All @@ -254,7 +254,7 @@ jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x000000000000000
sed -i.bak 's/"expedited_voting_period": "86400s"/"expedited_voting_period": "15s"/g' "$GENESIS"

# fund validator (devs already funded in the loop)
evmd genesis add-genesis-account "$VAL_KEY" 100000000000000000000000000ogwei --keyring-backend "$KEYRING" --home "$CHAINDIR"
ogd genesis add-genesis-account "$VAL_KEY" 100000000000000000000000000ogwei --keyring-backend "$KEYRING" --home "$CHAINDIR"

# ---------- Config customizations ----------
sed -i.bak 's/timeout_propose = "3s"/timeout_propose = "2s"/g' "$CONFIG_TOML"
Expand Down Expand Up @@ -291,7 +291,7 @@ jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x000000000000000
echo "adding key for $keyname"

# Add key to keyring using the mnemonic
echo "$mnemonic" | evmd keys add "$keyname" --recover --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR"
echo "$mnemonic" | ogd keys add "$keyname" --recover --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR"

# Fund the account in genesis
add_genesis_funds "$keyname"
Expand All @@ -304,7 +304,7 @@ jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x000000000000000
keyname="dev${idx}"

# create key and capture mnemonic
mnemonic_out="$(evmd keys add "$keyname" --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR" 2>&1)"
mnemonic_out="$(ogd keys add "$keyname" --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$CHAINDIR" 2>&1)"
# try to grab a line that looks like a seed phrase (>=12 words), else last line
user_mnemonic="$(echo "$mnemonic_out" | grep -E '([[:alpha:]]+[[:space:]]+){11,}[[:alpha:]]+$' | tail -1)"
if [[ -z "$user_mnemonic" ]]; then
Expand All @@ -323,9 +323,9 @@ jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x000000000000000
fi

# --------- Finalize genesis ---------
evmd genesis gentx "$VAL_KEY" 10000000000000000000000ogwei --gas-prices ${BASEFEE}ogwei --keyring-backend "$KEYRING" --chain-id "$CHAINID" --home "$CHAINDIR"
evmd genesis collect-gentxs --home "$CHAINDIR"
evmd genesis validate-genesis --home "$CHAINDIR"
ogd genesis gentx "$VAL_KEY" 10000000000000000000000ogwei --gas-prices ${BASEFEE}ogwei --keyring-backend "$KEYRING" --chain-id "$CHAINID" --home "$CHAINDIR"
ogd genesis collect-gentxs --home "$CHAINDIR"
ogd genesis validate-genesis --home "$CHAINDIR"

# --------- Write YAML with mnemonics if the user specified more ---------
if [[ "$ADDITIONAL_USERS" -gt 0 ]]; then
Expand All @@ -338,7 +338,7 @@ jq '.app_state["evm"]["params"]["active_static_precompiles"]=["0x000000000000000
fi

# Start the node
evmd start "$TRACE" \
ogd start "$TRACE" \
--pruning nothing \
--log_level $LOGLEVEL \
--minimum-gas-prices=0ogwei \
Expand Down
Loading