github.com/mavryk-network/mvgo@v1.19.9/rpc/reveal.go (about)

     1  // Copyright (c) 2020-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 Reveal implements the TypedOperation interface.
     9  var _ TypedOperation = (*Reveal)(nil)
    10  
    11  // Reveal represents a reveal operation
    12  type Reveal struct {
    13  	Manager
    14  	PublicKey mavryk.Key `json:"public_key"`
    15  }
    16  
    17  // Costs returns operation cost to implement TypedOperation interface.
    18  func (r Reveal) Costs() mavryk.Costs {
    19  	return mavryk.Costs{
    20  		Fee:     r.Manager.Fee,
    21  		GasUsed: r.Metadata.Result.Gas(),
    22  	}
    23  }