Skip to content

Commit

Permalink
feat: app params
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Dec 24, 2024
1 parent 7abfd45 commit 6620f6e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(APPNAME) \
BUILD_FLAGS := -ldflags '$(ldflags)'

build: out .git/hooks/pre-commit
@echo "--> ensure dependencies have not been modified"
@go mod verify
# @echo "--> ensure dependencies have not been modified"
# @go mod verify
# go build -o ./out ./cmd/*
go build $(BUILD_FLAGS) -mod=readonly -o ./out

Expand Down
2 changes: 2 additions & 0 deletions app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package app
import (
"time"

_ "github.com/gonative-cc/gonative/app/appparams" // used to set default sdk globals

"google.golang.org/protobuf/types/known/durationpb"

accountsmodulev1 "cosmossdk.io/api/cosmos/accounts/module/v1"
Expand Down
18 changes: 18 additions & 0 deletions app/appparams/params.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package appparams

import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

const (
// Name defines the application name.
Name = "gonative"

// BondDenom defines the native staking token denomination.
// NOTE: it is used by IBC, and must not change to avoid token migration in all IBC chains.
BondDenom = "untiv"
)

func init() {
sdk.DefaultBondDenom = BondDenom
}
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"fmt"
"os"

_ "github.com/gonative-cc/gonative/app/appparams" // used to set default sdk globals

"cosmossdk.io/core/transaction"

"github.com/gonative-cc/gonative/cmd"
Expand Down

0 comments on commit 6620f6e

Please sign in to comment.