Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
apisit committed Jul 20, 2018
1 parent 8265275 commit f21257f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
19 changes: 9 additions & 10 deletions neoutils/ont.go
Original file line number Diff line number Diff line change
@@ -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
}
4 changes: 2 additions & 2 deletions neoutils/ont_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions neoutils/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f21257f

Please sign in to comment.