Commit 7767b7b4 authored by liuyuhang's avatar liuyuhang

modify token fork

parent 4d9f49bd
...@@ -61,7 +61,6 @@ func init() { ...@@ -61,7 +61,6 @@ func init() {
types.RegisterDappFork(TicketX, "Enable", 0) types.RegisterDappFork(TicketX, "Enable", 0)
types.RegisterDappFork(TicketX, "ForkTicketId", 1062000) types.RegisterDappFork(TicketX, "ForkTicketId", 1062000)
types.RegisterDappFork(TicketX, "ForkTicketVrf", 1770000) types.RegisterDappFork(TicketX, "ForkTicketVrf", 1770000)
types.RegisterDappFork(TicketX, "ForkTicketFundAddrV1", 500 * 10000)
} }
// TicketType ticket exec type // TicketType ticket exec type
......
...@@ -46,7 +46,13 @@ func (t *token) Exec_TokenPreCreate(payload *tokenty.TokenPreCreate, tx *types.T ...@@ -46,7 +46,13 @@ func (t *token) Exec_TokenPreCreate(payload *tokenty.TokenPreCreate, tx *types.T
} }
func (t *token) Exec_TokenFinishCreate(payload *tokenty.TokenFinishCreate, tx *types.Transaction, index int) (*types.Receipt, error) { func (t *token) Exec_TokenFinishCreate(payload *tokenty.TokenFinishCreate, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newTokenAction(t, types.GetFundAddr(), tx) fundAddr := ""
if types.IsFork(t.GetHeight(), "ForkTicketFundAddrV1") {
fundAddr = types.MGStr("mver.consensus.autonomyFundAddr", 0)
} else {
fundAddr = types.GetFundAddr()
}
action := newTokenAction(t, fundAddr, tx)
return action.finishCreate(payload) return action.finishCreate(payload)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment