Skip to content

Commit

Permalink
Merge pull request #35 from loveFeynman/feat/split_block_reward
Browse files Browse the repository at this point in the history
Feat/split block reward
  • Loading branch information
dannyboy820 committed Nov 25, 2022
2 parents ff9759d + 465d8df commit c84e110
Show file tree
Hide file tree
Showing 66 changed files with 469 additions and 453 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- (gitpod) [\#564](https://github.com/evmos/evmos/pull/564) Add one-click development environment
- (erc20) [\#556](https://github.com/evmos/evmos/pull/556) Remove deprecated migrations.
- (incentives) [\#551](https://github.com/evmos/evmos/pull/551) Add additional check to only distribute incentives to EOAs.
- (cmd) [\#543](https://github.com/evmos/evmos/pull/543) Update mainnet default `min-gas-price` to `0.0025aevmos`.
- (cmd) [\#543](https://github.com/evmos/evmos/pull/543) Update mainnet default `min-gas-price` to `0.0025uCC`.
- (epochs) [\#539](https://github.com/evmos/evmos/pull/539) Use constants for epoch identifiers.

### Bug Fixes
Expand Down
23 changes: 11 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,20 @@ func NewEvmos(
app.AccountKeeper, app.BankKeeper, &stakingKeeper, govRouter,
)

app.FeedistKeeper = *feedistmodulekeeper.NewKeeper(
appCodec,
keys[feedistmoduletypes.StoreKey],
keys[feedistmoduletypes.MemStoreKey],
app.GetSubspace(feedistmoduletypes.ModuleName),

app.BankKeeper,
app.EvmKeeper,
authtypes.FeeCollectorName,
)
// Evmos Keeper
app.InflationKeeper = inflationkeeper.NewKeeper(
keys[inflationtypes.StoreKey], appCodec, app.GetSubspace(inflationtypes.ModuleName),
app.AccountKeeper, app.BankKeeper, app.DistrKeeper, &stakingKeeper,
app.AccountKeeper, app.BankKeeper, app.DistrKeeper, &stakingKeeper, app.FeedistKeeper,
authtypes.FeeCollectorName,
)

Expand Down Expand Up @@ -485,17 +495,6 @@ func NewEvmos(
authtypes.FeeCollectorName,
)

app.FeedistKeeper = *feedistmodulekeeper.NewKeeper(
appCodec,
keys[feedistmoduletypes.StoreKey],
keys[feedistmoduletypes.MemStoreKey],
app.GetSubspace(feedistmoduletypes.ModuleName),

app.BankKeeper,
app.EvmKeeper,
authtypes.FeeCollectorName,
)

epochsKeeper := epochskeeper.NewKeeper(appCodec, keys[epochstypes.StoreKey])
app.EpochsKeeper = *epochsKeeper.SetHooks(
epochskeeper.NewMultiEpochHooks(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v5/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
)

var (
// MainnetMinGasPrices defines 20B aevmos (or atevmos) as the minimum gas price value on the fee market module.
// MainnetMinGasPrices defines 20B uCC (or atevmos) as the minimum gas price value on the fee market module.
// See https://commonwealth.im/evmos/discussion/5073-global-min-gas-price-value-for-cosmos-sdk-and-evm-transaction-choosing-a-value for reference
MainnetMinGasPrices = sdk.NewDec(20_000_000_000)
// MainnetMinGasMultiplier defines the min gas multiplier value on the fee market module.
Expand Down
8 changes: 4 additions & 4 deletions app/upgrades/v5/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func (suite *UpgradeTestSuite) TestUpdateIBCDenomTraces() {
"native IBC tokens",
ibctransfertypes.Traces{
{
BaseDenom: "aevmos",
BaseDenom: "uCC",
Path: "",
},
{
Expand All @@ -284,7 +284,7 @@ func (suite *UpgradeTestSuite) TestUpdateIBCDenomTraces() {
},
ibctransfertypes.Traces{
{
BaseDenom: "aevmos",
BaseDenom: "uCC",
Path: "",
},
{
Expand All @@ -309,7 +309,7 @@ func (suite *UpgradeTestSuite) TestUpdateIBCDenomTraces() {
"with invalid tokens",
ibctransfertypes.Traces{
{
BaseDenom: "aevmos",
BaseDenom: "uCC",
Path: "",
},
{
Expand All @@ -331,7 +331,7 @@ func (suite *UpgradeTestSuite) TestUpdateIBCDenomTraces() {
},
ibctransfertypes.Traces{
{
BaseDenom: "aevmos",
BaseDenom: "uCC",
Path: "",
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v9/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ReturnFundsFromCommunityPool(ctx sdk.Context, dk distrKeeper.Keeper) error
func ReturnFundsFromCommunityPoolToAccount(ctx sdk.Context, dk distrKeeper.Keeper, account string, amount sdk.Int) error {
to := sdk.MustAccAddressFromBech32(account)
balance := sdk.Coin{
Denom: "aevmos",
Denom: "uCC",
Amount: amount,
}

Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v9/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ func (suite *UpgradeTestSuite) TestReturnFundsFromCommunityPool() {
address := common.BytesToAddress(priv.PubKey().Address().Bytes())
sender := sdk.AccAddress(address.Bytes())
res, _ := sdk.NewIntFromString(v9.MaxRecover)
coins := sdk.NewCoins(sdk.NewCoin("aevmos", res))
coins := sdk.NewCoins(sdk.NewCoin("uCC", res))
suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, coins)
suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, types.ModuleName, sender, coins)
err = suite.app.DistrKeeper.FundCommunityPool(suite.ctx, coins, sender)
suite.Require().NoError(err)

balanceBefore := suite.app.DistrKeeper.GetFeePoolCommunityCoins(suite.ctx)
suite.Require().Equal(balanceBefore.AmountOf("aevmos"), sdk.NewDecFromInt(res))
suite.Require().Equal(balanceBefore.AmountOf("uCC"), sdk.NewDecFromInt(res))

// return funds to accounts affected
err = v9.ReturnFundsFromCommunityPool(suite.ctx, suite.app.DistrKeeper)
Expand All @@ -101,7 +101,7 @@ func (suite *UpgradeTestSuite) TestReturnFundsFromCommunityPool() {
for i := range v9.Accounts {
addr := sdk.MustAccAddressFromBech32(v9.Accounts[i][0])
res, _ := sdk.NewIntFromString(v9.Accounts[i][1])
balance := suite.app.BankKeeper.GetBalance(suite.ctx, addr, "aevmos")
balance := suite.app.BankKeeper.GetBalance(suite.ctx, addr, "uCC")
suite.Require().Equal(balance.Amount, res)
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/cascadiad/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/stretchr/testify/require"

"github.com/evmos/evmos/v9/app"
cascadiad "github.com/evmos/evmos/v9/cmd/evmosd"
evmosd "github.com/evmos/evmos/v9/cmd/cascadiad"
)

func TestInitCmd(t *testing.T) {
rootCmd, _ := cascadiad.NewRootCmd()
rootCmd, _ := evmosd.NewRootCmd()
rootCmd.SetArgs([]string{
"init", // Test the init cmd
"evmos-test", // Moniker
Expand All @@ -27,7 +27,7 @@ func TestInitCmd(t *testing.T) {
}

func TestAddKeyLedgerCmd(t *testing.T) {
rootCmd, _ := cascadiad.NewRootCmd()
rootCmd, _ := evmosd.NewRootCmd()
rootCmd.SetArgs([]string{
"keys",
"add",
Expand Down
2 changes: 1 addition & 1 deletion cmd/cascadiad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
)

const (
EnvPrefix = "EVMOS"
EnvPrefix = "CASCADIA"
)

// NewRootCmd creates a new root command for cascadiad. It is called once in the
Expand Down
6 changes: 3 additions & 3 deletions cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

const (
// Bech32Prefix defines the Bech32 prefix used for EthAccounts
Bech32Prefix = "evmos"
Bech32Prefix = "cascadia"

// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
Bech32PrefixAccAddr = Bech32Prefix
Expand All @@ -26,9 +26,9 @@ const (

const (
// DisplayDenom defines the denomination displayed to users in client applications.
DisplayDenom = "evmos"
DisplayDenom = "CC"
// BaseDenom defines to the default denomination used in Evmos (staking, EVM, governance, etc.)
BaseDenom = "aevmos"
BaseDenom = "uCC"
)

// SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.
Expand Down
18 changes: 9 additions & 9 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
accounts:
- name: alice
coins: ["100000000uatom", "100000000000000000000aevmos"]
coins: ["100000000uatom", "100000000000000000000uCC"]
- name: bob
coins: ["5000000000000aevmos"]
coins: ["5000000000000uCC"]
validator:
name: alice
staked: "100000000000000000000aevmos"
staked: "100000000000000000000uCC"
faucet:
name: bob
coins: ["10aevmos"]
coins: ["10uCC"]
build:
binary: "cascadiad"
init:
Expand All @@ -22,18 +22,18 @@ genesis:
app_state:
staking:
params:
bond_denom: "aevmos"
bond_denom: "uCC"
mint:
params:
mint_denom: "aevmos"
mint_denom: "uCC"
crisis:
constant_fee:
denom: "aevmos"
denom: "uCC"
gov:
deposit_params:
min_deposit:
- amount: "10000000"
denom: "aevmos"
denom: "uCC"
evm:
params:
evm_denom: "aevmos"
evm_denom: "uCC"
2 changes: 1 addition & 1 deletion contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "evmos",
"name": "cascadia",
"version": "1.0.0",
"description": "<!-- parent: order: false -->",
"main": "index.js",
Expand Down
42 changes: 21 additions & 21 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
theme: "cosmos",
title: "Evmos Documentation",
title: "Cascadia Documentation",
locales: {
"/": {
lang: "en-US",
Expand Down Expand Up @@ -71,14 +71,14 @@ module.exports = {
editLinks: true,
custom: true,
project: {
name: "Evmos",
denom: "Evmos",
ticker: "EVMOS",
name: "Cascadia",
denom: "CC",
ticker: "CC",
binary: "cascadiad",
testnet_denom: "tEvmos",
testnet_ticker: "tEVMOS",
rpc_url: "https://eth.bd.evmos.org:8545",
rpc_url_testnet: "https://eth.bd.evmos.dev:8545",
testnet_denom: "tCC",
testnet_ticker: "tCC",
rpc_url: "https://mainnet.cascadia.foundation",
rpc_url_testnet: "https://testnet.cascadia.foundation",
rpc_url_local: "http://localhost:8545/",
chain_id: "9001",
testnet_chain_id: "9000",
Expand All @@ -96,7 +96,7 @@ module.exports = {
algolia: {
id: "K3VQTEW3G5",
key: "bf836a3c934b1d4df091d5c5b69c65d7",
index: "evmos",
index: "cascadia",
},
topbar: {
banner: false,
Expand All @@ -105,19 +105,19 @@ module.exports = {
auto: false,
nav: [
{
title: "About Evmos",
title: "About Cascadia",
children: [
{
title: "Introduction",
directory: true,
path: "/about/intro",
},
{
title: "Evmos Ecosystem",
title: "Cascadia Ecosystem",
path: "https://evmos.space/",
},
{
title: "Awesome Evmos",
title: "Awesome Cascadia",
path: "https://github.com/tharsis/awesome",
},
],
Expand All @@ -141,7 +141,7 @@ module.exports = {
path: "/users/keys",
},
{
title: "Evmos Governance",
title: "Cascadia Governance",
directory: true,
path: "/users/governance",
},
Expand Down Expand Up @@ -229,15 +229,15 @@ module.exports = {
path: "/protocol/ibc",
},
{
title: "Evmos Go API",
title: "Cascadia Go API",
path: "https://pkg.go.dev/github.com/evmos/evmos",
},
{
title: "Ethermint Library Go API",
path: "https://pkg.go.dev/github.com/evmos/ethermint",
},
{
title: "Evmos Protobuf",
title: "Cascadia Protobuf",
directory: false,
path: "/protocol/proto-docs",
},
Expand Down Expand Up @@ -321,13 +321,13 @@ module.exports = {
title: "Help & Support",
chat: {
title: "Discord Channel",
text: "Chat with Evmos users and team on Discord.",
text: "Chat with Cascadia users and team on Discord.",
url: "https://discord.gg/evmos",
bg: "linear-gradient(103.75deg, #1B1E36 0%, #22253F 100%)",
},
forum: {
title: "Commonwealth Forum",
text: "Join the Evmos Commonwealth forum",
text: "Join the Cascadia Commonwealth forum",
url: "https://commonwealth.im/evmos",
bg: "linear-gradient(221.79deg, #3D6B99 -1.08%, #336699 95.88%)",
},
Expand Down Expand Up @@ -388,20 +388,20 @@ module.exports = {
title: "Community",
children: [
{
title: "Evmos Discord Community",
title: "Cascadia Discord Community",
url: "https://discord.gg/evmos",
},
{
title: "Evmos Commonwealth Forum",
title: "Cascadia Commonwealth Forum",
url: "https://commonwealth.im/evmos",
},
],
},
{
title: "Evmos",
title: "Cascadia",
children: [
{
title: "Jobs at Evmos",
title: "Jobs at Cascadia",
url: "https://tharsis.notion.site/",
},
],
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/guides/erc_20_registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ cascadiad tx gov submit-proposal \
--title=<title> \
--description=<description> \
--type="Text" \
--deposit="1000000aevmos" \
--deposit="1000000uCC" \
--from=<mykey> \
--chain-id=<testnet_chain_id>
--node <address>
Expand Down
Loading

0 comments on commit c84e110

Please sign in to comment.