[#69] frostfsid: Add new client init function #69
1 changed files with 8 additions and 2 deletions
|
@ -22,7 +22,6 @@ import (
|
|||
type (
|
||||
Client struct {
|
||||
act *actor.Actor
|
||||
acc *wallet.Account
|
||||
contract util.Uint160
|
||||
}
|
||||
|
||||
|
@ -153,11 +152,18 @@ func New(ra actor.RPCActor, acc *wallet.Account, contract util.Uint160, opt Opti
|
|||
|
||||
return &Client{
|
||||
act: act,
|
||||
acc: acc,
|
||||
contract: contract,
|
||||
}, 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.
|
||||
func (c Client) StartTx() *commonclient.Transaction {
|
||||
return commonclient.NewTransaction(c.contract)
|
||||
|
|
Loading…
Reference in a new issue