Skip to content

Commit

Permalink
chore: standardize on returning pointers for Transaction structs
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Sep 11, 2019
1 parent 2d85818 commit b5e6c1c
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 91 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if err != nil {
}
// transform the tx into a tx_base64encodedstring so you can HTTP POST it
signedTxStr, err := aeternity.SerializeTx(&signedTx)
signedTxStr, err := aeternity.SerializeTx(signedTx)
if err != nil {
t.Error(err)
}
Expand Down
43 changes: 20 additions & 23 deletions aeternity/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func NewContextFromURL(url string, address string, debug bool) Context {
}

// SpendTx creates a spend transaction
func (c *Context) SpendTx(senderID string, recipientID string, amount, fee big.Int, payload []byte) (tx SpendTx, err error) {
func (c *Context) SpendTx(senderID string, recipientID string, amount, fee big.Int, payload []byte) (tx *SpendTx, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -140,7 +140,7 @@ func (c *Context) SpendTx(senderID string, recipientID string, amount, fee big.I

// NamePreclaimTx creates a name preclaim transaction and salt (required for claiming)
// It should return the Tx struct, not the base64 encoded RLP, to ease subsequent inspection.
func (c *Context) NamePreclaimTx(name string, fee big.Int) (tx NamePreclaimTx, nameSalt *big.Int, err error) {
func (c *Context) NamePreclaimTx(name string, fee big.Int) (tx *NamePreclaimTx, nameSalt *big.Int, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -155,15 +155,12 @@ func (c *Context) NamePreclaimTx(name string, fee big.Int) (tx NamePreclaimTx, n

// build the transaction
tx = NewNamePreclaimTx(c.Address, cm, fee, txTTL, accountNonce)
if err != nil {
return
}

return
}

// NameClaimTx creates a claim transaction
func (c *Context) NameClaimTx(name string, nameSalt big.Int, fee big.Int) (tx NameClaimTx, err error) {
func (c *Context) NameClaimTx(name string, nameSalt big.Int, fee big.Int) (tx *NameClaimTx, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -176,7 +173,7 @@ func (c *Context) NameClaimTx(name string, nameSalt big.Int, fee big.Int) (tx Na
}

// NameUpdateTx perform a name update
func (c *Context) NameUpdateTx(name string, targetAddress string) (tx NameUpdateTx, err error) {
func (c *Context) NameUpdateTx(name string, targetAddress string) (tx *NameUpdateTx, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -185,7 +182,7 @@ func (c *Context) NameUpdateTx(name string, targetAddress string) (tx NameUpdate
encodedNameHash := Encode(PrefixName, Namehash(name))
absNameTTL, err := c.Helpers.GetTTL(Config.Client.Names.NameTTL)
if err != nil {
return NameUpdateTx{}, err
return
}
// create the transaction
tx = NewNameUpdateTx(c.Address, encodedNameHash, []string{targetAddress}, absNameTTL, Config.Client.Names.ClientTTL, Config.Client.Names.UpdateFee, txTTL, accountNonce)
Expand All @@ -194,7 +191,7 @@ func (c *Context) NameUpdateTx(name string, targetAddress string) (tx NameUpdate
}

// NameTransferTx transfer a name to another owner
func (c *Context) NameTransferTx(name string, recipientAddress string) (tx NameTransferTx, err error) {
func (c *Context) NameTransferTx(name string, recipientAddress string) (tx *NameTransferTx, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -207,7 +204,7 @@ func (c *Context) NameTransferTx(name string, recipientAddress string) (tx NameT
}

// NameRevokeTx revoke a name
func (c *Context) NameRevokeTx(name string) (tx NameRevokeTx, err error) {
func (c *Context) NameRevokeTx(name string) (tx *NameRevokeTx, err error) {
txTTL, accountNonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return
Expand All @@ -220,65 +217,65 @@ func (c *Context) NameRevokeTx(name string) (tx NameRevokeTx, err error) {
}

// OracleRegisterTx create a new oracle
func (c *Context) OracleRegisterTx(querySpec, responseSpec string, queryFee big.Int, oracleTTLType, oracleTTLValue uint64, VMVersion uint16) (tx OracleRegisterTx, err error) {
func (c *Context) OracleRegisterTx(querySpec, responseSpec string, queryFee big.Int, oracleTTLType, oracleTTLValue uint64, VMVersion uint16) (tx *OracleRegisterTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return OracleRegisterTx{}, err
return
}

tx = NewOracleRegisterTx(c.Address, nonce, querySpec, responseSpec, queryFee, oracleTTLType, oracleTTLValue, VMVersion, Config.Client.Fee, ttl)
return tx, nil
}

// OracleExtendTx extend the lifetime of an existing oracle
func (c *Context) OracleExtendTx(oracleID string, ttlType, ttlValue uint64) (tx OracleExtendTx, err error) {
func (c *Context) OracleExtendTx(oracleID string, ttlType, ttlValue uint64) (tx *OracleExtendTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return OracleExtendTx{}, err
return
}

tx = NewOracleExtendTx(oracleID, nonce, ttlType, ttlValue, Config.Client.Fee, ttl)
return tx, nil
}

// OracleQueryTx ask something of an oracle
func (c *Context) OracleQueryTx(OracleID, Query string, QueryFee big.Int, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue uint64) (tx OracleQueryTx, err error) {
func (c *Context) OracleQueryTx(OracleID, Query string, QueryFee big.Int, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue uint64) (tx *OracleQueryTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return OracleQueryTx{}, err
return
}

tx = NewOracleQueryTx(c.Address, nonce, OracleID, Query, QueryFee, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue, Config.Client.Fee, ttl)
return tx, nil
}

// OracleRespondTx the oracle responds by sending this transaction
func (c *Context) OracleRespondTx(OracleID string, QueryID string, Response string, TTLType uint64, TTLValue uint64) (tx OracleRespondTx, err error) {
func (c *Context) OracleRespondTx(OracleID string, QueryID string, Response string, TTLType uint64, TTLValue uint64) (tx *OracleRespondTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return OracleRespondTx{}, err
return
}

tx = NewOracleRespondTx(OracleID, nonce, QueryID, Response, TTLType, TTLValue, Config.Client.Fee, ttl)
return tx, nil
}

// ContractCreateTx returns a transaction for creating a contract on the chain
func (c *Context) ContractCreateTx(Code string, CallData string, VMVersion, AbiVersion uint16, Deposit, Amount, Gas, GasPrice, Fee big.Int) (tx ContractCreateTx, err error) {
func (c *Context) ContractCreateTx(Code string, CallData string, VMVersion, AbiVersion uint16, Deposit, Amount, Gas, GasPrice, Fee big.Int) (tx *ContractCreateTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return ContractCreateTx{}, err
return
}

tx = NewContractCreateTx(c.Address, nonce, Code, VMVersion, AbiVersion, Deposit, Amount, Gas, GasPrice, Fee, ttl, CallData)
return tx, nil
}

// ContractCallTx returns a transaction for calling a contract on the chain
func (c *Context) ContractCallTx(ContractID, CallData string, AbiVersion uint16, Amount, Gas, GasPrice, Fee big.Int) (tx ContractCallTx, err error) {
func (c *Context) ContractCallTx(ContractID, CallData string, AbiVersion uint16, Amount, Gas, GasPrice, Fee big.Int) (tx *ContractCallTx, err error) {
ttl, nonce, err := c.Helpers.GetTTLNonce(c.Address, Config.Client.TTL)
if err != nil {
return ContractCallTx{}, err
return
}

tx = NewContractCallTx(c.Address, nonce, ContractID, Amount, Gas, GasPrice, AbiVersion, CallData, Fee, ttl)
Expand Down Expand Up @@ -406,7 +403,7 @@ func SignBroadcastTransaction(tx rlp.Encoder, signingAccount *Account, n *Node,
return
}

signedTxStr, err = SerializeTx(&signedTx)
signedTxStr, err = SerializeTx(signedTx)
if err != nil {
return
}
Expand Down
10 changes: 5 additions & 5 deletions aeternity/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func Hash(tx *SignedTx) (txhash string, err error) {

// SignHashTx wraps a *Tx struct in a SignedTx, then returns its signature and
// hash.
func SignHashTx(kp *Account, tx Transaction, networkID string) (signedTx SignedTx, txhash, signature string, err error) {
func SignHashTx(kp *Account, tx Transaction, networkID string) (signedTx *SignedTx, txhash, signature string, err error) {
signedTx = NewSignedTx([][]byte{}, tx)
var signatureBytes []byte

if _, ok := tx.(*GAMetaTx); !ok {
signatureBytes, err = Sign(kp, &signedTx, networkID)
signatureBytes, err = Sign(kp, signedTx, networkID)
if err != nil {
return
}
Expand All @@ -63,7 +63,7 @@ func SignHashTx(kp *Account, tx Transaction, networkID string) (signedTx SignedT

}

txhash, err = Hash(&signedTx)
txhash, err = Hash(signedTx)
if err != nil {
return
}
Expand Down Expand Up @@ -288,8 +288,8 @@ func (tx *SignedTx) DecodeRLP(s *rlp.Stream) (err error) {
}

// NewSignedTx ensures that all fields of SignedTx are filled out.
func NewSignedTx(Signatures [][]byte, tx rlp.Encoder) (s SignedTx) {
return SignedTx{
func NewSignedTx(Signatures [][]byte, tx rlp.Encoder) (s *SignedTx) {
return &SignedTx{
Signatures: Signatures,
Tx: tx,
}
Expand Down
20 changes: 10 additions & 10 deletions aeternity/tx_aens.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func (tx *NamePreclaimTx) FeeEstimate() (*big.Int, error) {
}

// NewNamePreclaimTx is a constructor for a NamePreclaimTx struct
func NewNamePreclaimTx(accountID, commitmentID string, fee big.Int, ttl, accountNonce uint64) NamePreclaimTx {
return NamePreclaimTx{accountID, commitmentID, fee, ttl, accountNonce}
func NewNamePreclaimTx(accountID, commitmentID string, fee big.Int, ttl, accountNonce uint64) *NamePreclaimTx {
return &NamePreclaimTx{accountID, commitmentID, fee, ttl, accountNonce}
}

// NameClaimTx represents a transaction where one claims a previously reserved name on AENS
Expand Down Expand Up @@ -237,8 +237,8 @@ func (tx *NameClaimTx) FeeEstimate() (*big.Int, error) {
}

// NewNameClaimTx is a constructor for a NameClaimTx struct
func NewNameClaimTx(accountID, name string, nameSalt big.Int, fee big.Int, ttl, accountNonce uint64) NameClaimTx {
return NameClaimTx{accountID, name, nameSalt, fee, ttl, accountNonce}
func NewNameClaimTx(accountID, name string, nameSalt big.Int, fee big.Int, ttl, accountNonce uint64) *NameClaimTx {
return &NameClaimTx{accountID, name, nameSalt, fee, ttl, accountNonce}
}

// NamePointer is a go-native representation of swagger generated
Expand Down Expand Up @@ -454,12 +454,12 @@ func (tx *NameUpdateTx) FeeEstimate() (*big.Int, error) {
}

// NewNameUpdateTx is a constructor for a NameUpdateTx struct
func NewNameUpdateTx(accountID, nameID string, pointers []string, nameTTL, clientTTL uint64, fee big.Int, ttl, accountNonce uint64) NameUpdateTx {
func NewNameUpdateTx(accountID, nameID string, pointers []string, nameTTL, clientTTL uint64, fee big.Int, ttl, accountNonce uint64) *NameUpdateTx {
parsedPointers, err := buildPointers(pointers)
if err != nil {
panic(err)
}
return NameUpdateTx{accountID, nameID, parsedPointers, nameTTL, clientTTL, fee, ttl, accountNonce}
return &NameUpdateTx{accountID, nameID, parsedPointers, nameTTL, clientTTL, fee, ttl, accountNonce}
}

// NameRevokeTx represents a transaction that revokes the name, i.e. has the same effect as waiting for the Name's TTL to expire.
Expand Down Expand Up @@ -576,8 +576,8 @@ func (tx *NameRevokeTx) FeeEstimate() (*big.Int, error) {
}

// NewNameRevokeTx is a constructor for a NameRevokeTx struct
func NewNameRevokeTx(accountID, name string, fee big.Int, ttl, accountNonce uint64) NameRevokeTx {
return NameRevokeTx{accountID, name, fee, ttl, accountNonce}
func NewNameRevokeTx(accountID, name string, fee big.Int, ttl, accountNonce uint64) *NameRevokeTx {
return &NameRevokeTx{accountID, name, fee, ttl, accountNonce}
}

// NameTransferTx represents a transaction that transfers ownership of one name to another account.
Expand Down Expand Up @@ -711,6 +711,6 @@ func (tx *NameTransferTx) FeeEstimate() (*big.Int, error) {
}

// NewNameTransferTx is a constructor for a NameTransferTx struct
func NewNameTransferTx(AccountID, NameID, RecipientID string, Fee big.Int, TTL, AccountNonce uint64) NameTransferTx {
return NameTransferTx{AccountID, NameID, RecipientID, Fee, TTL, AccountNonce}
func NewNameTransferTx(AccountID, NameID, RecipientID string, Fee big.Int, TTL, AccountNonce uint64) *NameTransferTx {
return &NameTransferTx{AccountID, NameID, RecipientID, Fee, TTL, AccountNonce}
}
8 changes: 4 additions & 4 deletions aeternity/tx_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ func (tx *ContractCreateTx) ContractID() (string, error) {
}

// NewContractCreateTx is a constructor for a ContractCreateTx struct
func NewContractCreateTx(OwnerID string, AccountNonce uint64, Code string, VMVersion, AbiVersion uint16, Deposit, Amount, Gas, GasPrice, Fee big.Int, TTL uint64, CallData string) ContractCreateTx {
return ContractCreateTx{
func NewContractCreateTx(OwnerID string, AccountNonce uint64, Code string, VMVersion, AbiVersion uint16, Deposit, Amount, Gas, GasPrice, Fee big.Int, TTL uint64, CallData string) *ContractCreateTx {
return &ContractCreateTx{
OwnerID: OwnerID,
AccountNonce: AccountNonce,
Code: Code,
Expand Down Expand Up @@ -352,8 +352,8 @@ func (tx *ContractCallTx) FeeEstimate() (*big.Int, error) {
}

// NewContractCallTx is a constructor for a ContractCallTx struct
func NewContractCallTx(CallerID string, AccountNonce uint64, ContractID string, Amount, Gas, GasPrice big.Int, AbiVersion uint16, CallData string, Fee big.Int, TTL uint64) ContractCallTx {
return ContractCallTx{
func NewContractCallTx(CallerID string, AccountNonce uint64, ContractID string, Amount, Gas, GasPrice big.Int, AbiVersion uint16, CallData string, Fee big.Int, TTL uint64) *ContractCallTx {
return &ContractCallTx{
CallerID: CallerID,
AccountNonce: AccountNonce,
ContractID: ContractID,
Expand Down
8 changes: 4 additions & 4 deletions aeternity/tx_ga.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func (tx *GAAttachTx) DecodeRLP(s *rlp.Stream) (err error) {
}

// NewGAAttachTx creates a GAAttachTx
func NewGAAttachTx(OwnerID string, AccountNonce uint64, Code string, AuthFunc []byte, VMVersion uint16, AbiVersion uint16, Gas big.Int, GasPrice big.Int, Fee big.Int, TTL uint64, CallData string) GAAttachTx {
return GAAttachTx{
func NewGAAttachTx(OwnerID string, AccountNonce uint64, Code string, AuthFunc []byte, VMVersion uint16, AbiVersion uint16, Gas big.Int, GasPrice big.Int, Fee big.Int, TTL uint64, CallData string) *GAAttachTx {
return &GAAttachTx{
OwnerID: OwnerID,
AccountNonce: AccountNonce,
Code: Code,
Expand Down Expand Up @@ -240,8 +240,8 @@ func (tx *GAMetaTx) DecodeRLP(s *rlp.Stream) (err error) {
}

// NewGAMetaTx creates a GAMetaTx
func NewGAMetaTx(AccountID string, AuthData string, AbiVersion uint16, Gas big.Int, GasPrice big.Int, Fee big.Int, TTL uint64, Tx rlp.Encoder) GAMetaTx {
return GAMetaTx{
func NewGAMetaTx(AccountID string, AuthData string, AbiVersion uint16, Gas big.Int, GasPrice big.Int, Fee big.Int, TTL uint64, Tx rlp.Encoder) *GAMetaTx {
return &GAMetaTx{
AccountID: AccountID,
AuthData: AuthData,
AbiVersion: AbiVersion,
Expand Down
16 changes: 8 additions & 8 deletions aeternity/tx_oracles.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func (tx *OracleRegisterTx) JSON() (string, error) {
}

// NewOracleRegisterTx is a constructor for a OracleRegisterTx struct
func NewOracleRegisterTx(accountID string, accountNonce uint64, querySpec, responseSpec string, queryFee big.Int, oracleTTLType, oracleTTLValue uint64, abiVersion uint16, txFee big.Int, txTTL uint64) OracleRegisterTx {
return OracleRegisterTx{accountID, accountNonce, querySpec, responseSpec, queryFee, oracleTTLType, oracleTTLValue, abiVersion, txFee, txTTL}
func NewOracleRegisterTx(accountID string, accountNonce uint64, querySpec, responseSpec string, queryFee big.Int, oracleTTLType, oracleTTLValue uint64, abiVersion uint16, txFee big.Int, txTTL uint64) *OracleRegisterTx {
return &OracleRegisterTx{accountID, accountNonce, querySpec, responseSpec, queryFee, oracleTTLType, oracleTTLValue, abiVersion, txFee, txTTL}
}

// OracleExtendTx represents a transaction that extends the lifetime of an oracle
Expand Down Expand Up @@ -244,8 +244,8 @@ func (tx *OracleExtendTx) JSON() (string, error) {
}

// NewOracleExtendTx is a constructor for a OracleExtendTx struct
func NewOracleExtendTx(oracleID string, accountNonce, oracleTTLType, oracleTTLValue uint64, Fee big.Int, TTL uint64) OracleExtendTx {
return OracleExtendTx{oracleID, accountNonce, oracleTTLType, oracleTTLValue, Fee, TTL}
func NewOracleExtendTx(oracleID string, accountNonce, oracleTTLType, oracleTTLValue uint64, Fee big.Int, TTL uint64) *OracleExtendTx {
return &OracleExtendTx{oracleID, accountNonce, oracleTTLType, oracleTTLValue, Fee, TTL}
}

// OracleQueryTx represents a transaction that a program sends to query an oracle
Expand Down Expand Up @@ -381,8 +381,8 @@ func (tx *OracleQueryTx) JSON() (string, error) {
}

// NewOracleQueryTx is a constructor for a OracleQueryTx struct
func NewOracleQueryTx(SenderID string, AccountNonce uint64, OracleID, Query string, QueryFee big.Int, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue uint64, Fee big.Int, TTL uint64) OracleQueryTx {
return OracleQueryTx{SenderID, AccountNonce, OracleID, Query, QueryFee, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue, Fee, TTL}
func NewOracleQueryTx(SenderID string, AccountNonce uint64, OracleID, Query string, QueryFee big.Int, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue uint64, Fee big.Int, TTL uint64) *OracleQueryTx {
return &OracleQueryTx{SenderID, AccountNonce, OracleID, Query, QueryFee, QueryTTLType, QueryTTLValue, ResponseTTLType, ResponseTTLValue, Fee, TTL}
}

// OracleRespondTx represents a transaction that an oracle sends to respond to an incoming query
Expand Down Expand Up @@ -499,6 +499,6 @@ func (tx *OracleRespondTx) JSON() (string, error) {
}

// NewOracleRespondTx is a constructor for a OracleRespondTx struct
func NewOracleRespondTx(OracleID string, AccountNonce uint64, QueryID string, Response string, TTLType uint64, TTLValue uint64, Fee big.Int, TTL uint64) OracleRespondTx {
return OracleRespondTx{OracleID, AccountNonce, QueryID, Response, TTLType, TTLValue, Fee, TTL}
func NewOracleRespondTx(OracleID string, AccountNonce uint64, QueryID string, Response string, TTLType uint64, TTLValue uint64, Fee big.Int, TTL uint64) *OracleRespondTx {
return &OracleRespondTx{OracleID, AccountNonce, QueryID, Response, TTLType, TTLValue, Fee, TTL}
}
4 changes: 2 additions & 2 deletions aeternity/tx_spend.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ func (tx *SpendTx) FeeEstimate() (*big.Int, error) {
}

// NewSpendTx is a constructor for a SpendTx struct
func NewSpendTx(senderID, recipientID string, amount, fee big.Int, payload []byte, ttl, nonce uint64) SpendTx {
return SpendTx{senderID, recipientID, amount, fee, payload, ttl, nonce}
func NewSpendTx(senderID, recipientID string, amount, fee big.Int, payload []byte, ttl, nonce uint64) *SpendTx {
return &SpendTx{senderID, recipientID, amount, fee, payload, ttl, nonce}
}
2 changes: 1 addition & 1 deletion aeternity/tx_spend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestSpendTx_EncodeRLP(t *testing.T) {

fmt.Println(rlp.EncodeToBytes(&tx))

gotTx, err := SerializeTx(&tx)
gotTx, err := SerializeTx(tx)
if (err != nil) != tt.wantErr {
t.Errorf("SpendTx.RLP() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down
4 changes: 2 additions & 2 deletions cmd/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func txSpendFunc(helpers aeternity.HelpersInterface, args []string) (err error)
}

tx := aeternity.NewSpendTx(sender, recipient, *amount, *feeBigInt, []byte(spendTxPayload), ttl, nonce)
base64Tx, err := aeternity.SerializeTx(&tx)
base64Tx, err := aeternity.SerializeTx(tx)
if err != nil {
return err
}
Expand Down Expand Up @@ -135,7 +135,7 @@ func txContractCreateFunc(h aeternity.HelpersInterface, args []string) (err erro
if err != nil {
return err
}
txStr, err := aeternity.SerializeTx(&tx)
txStr, err := aeternity.SerializeTx(tx)
if err != nil {
return err
}
Expand Down

0 comments on commit b5e6c1c

Please sign in to comment.