[#338] ir: Drop named named put fee

Named put fee value used only when notary disabled.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-05-17 17:41:28 +03:00 committed by Evgenii Stratonikov
parent 656fd7f376
commit 81718afb39
10 changed files with 9 additions and 125 deletions

View file

@ -56,10 +56,6 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
opts[i](o)
}
if o.feePutNamedSet {
o.staticOpts = append(o.staticOpts, client.WithCustomFee(putNamedMethod, o.feePutNamed))
}
sc, err := client.NewStatic(cli, contract, fee, o.staticOpts...)
if err != nil {
return nil, fmt.Errorf("can't create container static client: %w", err)
@ -83,9 +79,6 @@ func (c Client) ContractAddress() util.Uint160 {
type Option func(*opts)
type opts struct {
feePutNamedSet bool
feePutNamed fixedn.Fixed8
staticOpts []client.StaticClientOption
}
@ -111,11 +104,3 @@ func AsAlphabet() Option {
o.staticOpts = append(o.staticOpts, client.AsAlphabet())
}
}
// WithCustomFeeForNamedPut returns option to specify custom fee for each Put operation with named container.
func WithCustomFeeForNamedPut(fee fixedn.Fixed8) Option {
return func(o *opts) {
o.feePutNamed = fee
o.feePutNamedSet = true
}
}