Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all): rename treasure to treasury #75

Merged
merged 1 commit into from
May 18, 2023
Merged
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
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
}