[#69] frostfsid: Add new client init function
DCO action / DCO (pull_request) Successful in 1m7s Details
Tests / Tests (1.20) (pull_request) Successful in 1m29s Details
Tests / Tests (1.19) (pull_request) Successful in 1m35s Details

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
pull/69/head
Denis Kirillov 2024-01-12 16:17:31 +03:00
parent a7c45fdd0d
commit f2a82aa635
1 changed files with 8 additions and 2 deletions

View File

@ -22,7 +22,6 @@ import (
type ( type (
Client struct { Client struct {
act *actor.Actor act *actor.Actor
acc *wallet.Account
contract util.Uint160 contract util.Uint160
} }
@ -153,11 +152,18 @@ func New(ra actor.RPCActor, acc *wallet.Account, contract util.Uint160, opt Opti
return &Client{ return &Client{
act: act, act: act,
acc: acc,
contract: contract, contract: contract,
}, nil }, nil
} }
// NewSimple creates a new Client using exising actor.Actor.
func NewSimple(act *actor.Actor, contract util.Uint160) *Client {
return &Client{
act: act,
contract: contract,
}
}
// StartTx inits transaction. // StartTx inits transaction.
func (c Client) StartTx() *commonclient.Transaction { func (c Client) StartTx() *commonclient.Transaction {
return commonclient.NewTransaction(c.contract) return commonclient.NewTransaction(c.contract)