This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters