Skip to content

Commit

Permalink
Merge pull request #35 from joeqian10/dev
Browse files Browse the repository at this point in the history
Update go.yml and dependencies
  • Loading branch information
joeqian10 authored Sep 10, 2024
2 parents 5f77925 + 1fb1e78 commit 7ec5de8
Show file tree
Hide file tree
Showing 23 changed files with 105 additions and 119 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.18
id: go

- name: Check out code into the Go module directory
Expand Down
15 changes: 11 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
module github.com/joeqian10/neo-gogogo

go 1.12
go 1.18

require (
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.23.0
golang.org/x/text v0.15.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.27.0
golang.org/x/text v0.18.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
68 changes: 12 additions & 56 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,60 +1,16 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion nep5/nep5Helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/joeqian10/neo-gogogo/sc"
)

// nep5 wrapper class, api reference: https://github.com/neo-project/proposals/blob/master/nep-5.mediawiki#name
// Nep5Helper wrapper class, api reference: https://github.com/neo-project/proposals/blob/master/nep-5.mediawiki#name
type Nep5Helper struct {
scriptHash helper.UInt160 // the script hash of the nep5 token
EndPoint string
Expand Down
1 change: 1 addition & 0 deletions tx/claimTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tx

import (
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand Down
6 changes: 4 additions & 2 deletions tx/claimTransaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package tx

import (
"encoding/hex"
"testing"

"github.com/stretchr/testify/assert"

"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/stretchr/testify/assert"
"testing"
)

func TestClaimTransaction(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion tx/contractTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tx

import (
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand Down Expand Up @@ -94,7 +95,7 @@ func (tx *ContractTransaction) Serialize(bw *io.BinaryWriter) {
tx.SerializeWitnesses(bw)
}

func (tx *ContractTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
func (tx *ContractTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
tx.SerializeUnsigned1(bw)
tx.SerializeExclusiveData(bw)
tx.SerializeUnsigned2(bw)
Expand Down
6 changes: 4 additions & 2 deletions tx/contractTransaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package tx

import (
"encoding/hex"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"

"github.com/joeqian10/neo-gogogo/helper/io"
)

func TestContractTransaction(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions tx/invocationTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package tx
import (
"crypto/rand"
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand Down
6 changes: 4 additions & 2 deletions tx/invocationTransaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package tx

import (
"encoding/hex"
"testing"

"github.com/stretchr/testify/assert"

"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/stretchr/testify/assert"
"testing"
)

func TestInvocationTransaction(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions tx/issueTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tx

import (
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand All @@ -15,7 +16,7 @@ type IssueTransaction struct {
// NewIssueTransaction creates an IssueTransaction
func NewIssueTransaction(script []byte) *IssueTransaction {
tx := &IssueTransaction{
Transaction:NewTransaction(),
Transaction: NewTransaction(),
}
tx.Type = Issue_Transaction
return tx
Expand Down Expand Up @@ -85,12 +86,11 @@ func (tx *IssueTransaction) Serialize(bw *io.BinaryWriter) {
tx.SerializeWitnesses(bw)
}

func (tx *IssueTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
func (tx *IssueTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
tx.Transaction.SerializeUnsigned1(bw)
tx.SerializeExclusiveData(bw)
tx.SerializeUnsigned2(bw)
}

func (tx *IssueTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
func (tx *IssueTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
}

6 changes: 3 additions & 3 deletions tx/minerTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tx

import (
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand Down Expand Up @@ -88,13 +89,12 @@ func (mtx *MinerTransaction) Serialize(bw *io.BinaryWriter) {
mtx.SerializeWitnesses(bw)
}

func (mtx *MinerTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
func (mtx *MinerTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
mtx.Transaction.SerializeUnsigned1(bw)
mtx.SerializeExclusiveData(bw)
mtx.SerializeUnsigned2(bw)
}

func (mtx *MinerTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
func (mtx *MinerTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
bw.WriteLE(mtx.Nonce)
}

8 changes: 5 additions & 3 deletions tx/minerTransaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ package tx

import (
"encoding/hex"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"

"github.com/joeqian10/neo-gogogo/helper/io"
)

func TestMinerTransaction(t *testing.T) {
rawTx := "0000fcd30e22000001e72d286979ee6cb1b7e65dfddfb2e384100b8d148e7758de42e4168b71792c60c8000000000000001f72e68b4e39602912106d53b229378a082784b200"
mtx := &MinerTransaction{
Transaction:NewTransaction(),
Transaction: NewTransaction(),
}
// Deserialize
mtx, err := mtx.FromHexString(rawTx)
Expand Down
8 changes: 4 additions & 4 deletions tx/stateTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tx

import (
"encoding/hex"

"github.com/joeqian10/neo-gogogo/crypto"
"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
Expand All @@ -16,7 +17,7 @@ type StateTransaction struct {
// NewStateTransaction creates a StateTransaction
func NewStateTransaction(script []byte) *StateTransaction {
tx := &StateTransaction{
Transaction:NewTransaction(),
Transaction: NewTransaction(),
}
tx.Type = State_Transaction
return tx
Expand Down Expand Up @@ -92,16 +93,15 @@ func (tx *StateTransaction) Serialize(bw *io.BinaryWriter) {
tx.SerializeWitnesses(bw)
}

func (tx *StateTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
func (tx *StateTransaction) SerializeUnsigned(bw *io.BinaryWriter) {
tx.Transaction.SerializeUnsigned1(bw)
tx.SerializeExclusiveData(bw)
tx.SerializeUnsigned2(bw)
}

func (tx *StateTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
func (tx *StateTransaction) SerializeExclusiveData(bw *io.BinaryWriter) {
bw.WriteVarUint(uint64(len(tx.Descriptors)))
for _, desc := range tx.Descriptors {
desc.Serialize(bw)
}
}

6 changes: 4 additions & 2 deletions tx/stateTransaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package tx

import (
"encoding/hex"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"

"github.com/joeqian10/neo-gogogo/helper/io"
)

func TestStateTransaction(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions tx/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package tx

import (
"bytes"
"sort"

"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/joeqian10/neo-gogogo/wallet/keys"
"sort"
)

const (
Expand Down Expand Up @@ -35,7 +36,7 @@ func NewTransaction() *Transaction {
}
}

func NewTransactionFromRPC() {
func NewTransactionFromRPC() {

}

Expand Down
5 changes: 3 additions & 2 deletions tx/transactionAttribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"unsafe"

"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/helper/io"
"github.com/joeqian10/neo-gogogo/rpc/models"
"unsafe"
)

type TransactionAttribute struct {
Expand Down Expand Up @@ -90,4 +91,4 @@ func (attr *TransactionAttribute) MarshalJSON() ([]byte, error) {
"usage": attr.Usage.String(),
"data": hex.EncodeToString(attr.Data),
})
}
}
7 changes: 4 additions & 3 deletions tx/transactionBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package tx

import (
"fmt"
"math/big"
"sort"

"github.com/joeqian10/neo-gogogo/helper"
"github.com/joeqian10/neo-gogogo/rpc"
"github.com/joeqian10/neo-gogogo/rpc/models"
"github.com/joeqian10/neo-gogogo/sc"
"math/big"
"sort"
)

const NeoTokenId = "c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b"
Expand Down Expand Up @@ -164,7 +165,7 @@ func (tb *TransactionBuilder) MakeInvocationTransaction(script []byte, from help
itx.Attributes = attributes
}
itx.Gas = gasConsumed.Add(sysFee) // add sys fee
fee := itx.Gas.Add(netFee) // add net fee
fee := itx.Gas.Add(netFee) // add net fee
if itx.Size() > 1024 {
fee = fee.Add(helper.Fixed8FromFloat64(0.001))
fee = fee.Add(helper.Fixed8FromFloat64(float64(itx.Size()) * 0.00001))
Expand Down
Loading

0 comments on commit 7ec5de8

Please sign in to comment.