diff --git a/neoutils/ont.go b/neoutils/ont.go index d409d03..a02c7e0 100644 --- a/neoutils/ont.go +++ b/neoutils/ont.go @@ -1,22 +1,21 @@ package neoutils import ( - "log" + "fmt" "github.com/o3labs/ont-mobile/ontmobile" ) -func OntologyTransfer(endpoint string, gasPrice uint, gasLimit uint, wif string, asset string, to string, amount float64) (string, error) { - raw, err := ontmobile.Transfer(gasPrice, gasLimit, wif, asset, to, amount) +func OntologyTransfer(endpoint string, gasPrice int, gasLimit int, wif string, asset string, to string, amount float64) (string, error) { + raw, err := ontmobile.Transfer(uint(gasPrice), uint(gasLimit), wif, asset, to, amount) if err != nil { return "", err } - log.Printf("%x", raw.Data) - return "", nil - // txid, err := ontmobile.SendRawTransaction(endpoint, fmt.Sprintf("%x", raw.Data)) - // if err != nil { - // return "", err - // } - // return txid, nil + txid, err := ontmobile.SendRawTransaction(endpoint, fmt.Sprintf("%x", raw.Data)) + if err != nil { + return "", err + } + + return txid, nil } diff --git a/neoutils/ont_test.go b/neoutils/ont_test.go index c5150dc..70b6fe2 100644 --- a/neoutils/ont_test.go +++ b/neoutils/ont_test.go @@ -13,8 +13,8 @@ func TestONTTransfer(t *testing.T) { asset := "ont" to := "AcydXy1MvrzaT8qD3Qe4B8mqEoinTvRy8U" amount := float64(2) - gasPrice := uint(500) - gasLimit := uint(20000) + gasPrice := int(500) + gasLimit := int(20000) txid, err := neoutils.OntologyTransfer(endpoint, gasPrice, gasLimit, wif, asset, to, amount) if err != nil { log.Printf("err %v", err) diff --git a/neoutils/version.go b/neoutils/version.go index c147579..d963a12 100644 --- a/neoutils/version.go +++ b/neoutils/version.go @@ -6,6 +6,10 @@ const ( //RELEASE NOTES +// V.1.2.0 +// - Added generate multisignature address redeem script +// - Added gasPrice and gasLimit to ontology transfer method + // V. 1.1.0 // - Added Ontology asset transfer