Skip to content

Commit

Permalink
Merge pull request #248 from binance-chain/owner_transfer
Browse files Browse the repository at this point in the history
owner transfer
  • Loading branch information
fletcher142 authored Dec 31, 2020
2 parents 8ac3eab + b57c1ae commit cf24678
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions types/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const (
BEP3 = "BEP3" // https://github.com/binance-chain/BEPs/pull/30
BEP8 = "BEP8" // Mini-BEP2 token
LaunchBscUpgrade = "LaunchBscUpgrade"
BEP82 = "BEP82" // https://github.com/binance-chain/BEPs/pull/82
)

var MainNetConfig = UpgradeConfig{
Expand Down
27 changes: 14 additions & 13 deletions x/paramHub/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ import (

const (
// Operate fee
ProposeFee = 10e8
DepositFee = 125e3
SideProposeFee = 10e8
SideDepositFee = 125e3
SideVoteFee = 1e8
ListingFee = 2000e8
IssueFee = 1000e8
MintFee = 200e8
BurnFee = 1e8
FreezeFee = 1e6
TimeLockFee = 1e6
TimeUnlockFee = 1e6
TimeRelockFee = 1e6
ProposeFee = 10e8
DepositFee = 125e3
SideProposeFee = 10e8
SideDepositFee = 125e3
SideVoteFee = 1e8
ListingFee = 2000e8
IssueFee = 1000e8
MintFee = 200e8
BurnFee = 1e8
FreezeFee = 1e6
TimeLockFee = 1e6
TimeUnlockFee = 1e6
TimeRelockFee = 1e6
TransferOwnershipFee = 1e6 // TODO

SetAccountFlagsFee = 1e8

Expand Down
7 changes: 7 additions & 0 deletions x/paramHub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func RegisterUpgradeBeginBlocker(paramHub *ParamHub) {
}
paramHub.UpdateFeeParams(ctx, miniTokenFeeParams)
})
sdk.UpgradeMgr.RegisterBeginBlocker(sdk.BEP82, func(ctx sdk.Context) {
updateFeeParams := []param.FeeParam{
&param.FixedFeeParams{MsgType: "transferOwnership", Fee: TransferOwnershipFee, FeeFor: sdk.FeeForProposer},
}
paramHub.UpdateFeeParams(ctx, updateFeeParams)
})
}

func EndBreatheBlock(ctx sdk.Context, paramHub *ParamHub) {
Expand Down Expand Up @@ -112,6 +118,7 @@ func init() {
"timeLock": fees.FixedFeeCalculatorGen,
"timeUnlock": fees.FixedFeeCalculatorGen,
"timeRelock": fees.FixedFeeCalculatorGen,
"transferOwnership": fees.FixedFeeCalculatorGen,
"send": bank.TransferFeeCalculatorGen,
"HTLT": fees.FixedFeeCalculatorGen,
"depositHTLT": fees.FixedFeeCalculatorGen,
Expand Down
1 change: 1 addition & 0 deletions x/paramHub/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var (
"tokensBurn": {},
"setAccountFlags": {},
"tokensFreeze": {},
"transferOwnership": {},
"create_validator": {},
"remove_validator": {},
"timeLock": {},
Expand Down

0 comments on commit cf24678

Please sign in to comment.