github.com/mavryk-network/mvgo@v1.19.9/rpc/update_consensus_key.go (about) 1 // Copyright (c) 2022 Blockwatch Data Inc. 2 // Author: alex@blockwatch.cc 3 4 package rpc 5 6 import "github.com/mavryk-network/mvgo/mavryk" 7 8 // Ensure UpdateConsensusKey implements the TypedOperation interface. 9 var _ TypedOperation = (*UpdateConsensusKey)(nil) 10 11 // UpdateConsensusKey represents a transaction operation 12 type UpdateConsensusKey struct { 13 Manager 14 Pk mavryk.Key `json:"pk"` 15 } 16 17 // Costs returns operation cost to implement TypedOperation interface. 18 func (t UpdateConsensusKey) Costs() mavryk.Costs { 19 return mavryk.Costs{ 20 Fee: t.Manager.Fee, 21 GasUsed: t.Metadata.Result.Gas(), 22 } 23 }