Skip to content

Commit

Permalink
feat(all): rename treasure to treasury (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored May 18, 2023
1 parent 68c6863 commit 27295e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
fee := new(big.Int).SetUint64(st.gasUsed())
fee.Mul(fee, effectiveTip)
st.state.AddBalance(st.evm.Context.Coinbase, fee)
// CHANGE(taiko): basefee is not burnt, but sent to a treasure instead.
// CHANGE(taiko): basefee is not burnt, but sent to a treasury instead.
if st.evm.ChainConfig().Taiko && st.evm.Context.BaseFee != nil {
st.state.AddBalance(
st.evm.ChainConfig().Treasure,
st.evm.ChainConfig().Treasury,
new(big.Int).Mul(st.evm.Context.BaseFee, new(big.Int).SetUint64(st.gasUsed())),
)
}
Expand Down
2 changes: 0 additions & 2 deletions core/taiko_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ func TaikoGenesisBlock(networkID uint64) *Genesis {
switch networkID {
case params.TaikoInternal1NetworkID.Uint64():
chainConfig.ChainID = params.TaikoInternal1NetworkID
chainConfig.Treasure = common.HexToAddress("0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f")
allocJSON = taikoGenesis.Internal1GenesisAllocJSON
case params.TaikoInternal2NetworkID.Uint64():
chainConfig.ChainID = params.TaikoInternal2NetworkID
chainConfig.Treasure = common.HexToAddress("0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f")
allocJSON = taikoGenesis.Internal2GenesisAllocJSON
case params.SnæfellsjökullNetworkID.Uint64():
chainConfig.ChainID = params.SnæfellsjökullNetworkID
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ type ChainConfig struct {

// CHANGE(taiko): Taiko network flag.
Taiko bool `json:"taiko"`
Treasure common.Address `json:"treasure"`
Treasury common.Address `json:"treasury"`
}

// EthashConfig is the consensus engine configs for proof-of-work based sealing.
Expand Down
1 change: 1 addition & 0 deletions params/taiko_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ var TaikoChainConfig = &ChainConfig{
TerminalTotalDifficulty: common.Big0,
TerminalTotalDifficultyPassed: true,
Taiko: true,
Treasury: common.HexToAddress("0x1000777700000000000000000000000000000001"), // TODO: update this value
}

0 comments on commit 27295e9

Please sign in to comment.