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

Commit

Permalink
updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
apisit committed Apr 21, 2018
1 parent 6067b78 commit 94637f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
14 changes: 9 additions & 5 deletions neoutils/mobile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/o3labs/neo-utils/neoutils"
"github.com/o3labs/neo-utils/neoutils/smartcontract"
)

func TestMintTokensFromMobile(t *testing.T) {
Expand All @@ -15,17 +16,20 @@ func TestMintTokensFromMobile(t *testing.T) {
//ALL PRIVATE NET TEST ADDRESSES
// wif := "KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr" // contract owner AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y
// wif := "Kz3dZoCXU8SsmE67GLoGZKaghD1bG1kbePY72LVKpuchMqmRwKer" // Adm9ER3UwdJfimFtFhHq1L5MQ5gxLLTUes
wif := "L5h6cTh45egotcxFZ2rkF1gv7rLxx9rScfuja9kEVEE9mEj9Uwtv" //AQaZPqcv9Kg2x1eSrF8UBYXLK4WQoTSLH5
// wif := "L5h6cTh45egotcxFZ2rkF1gv7rLxx9rScfuja9kEVEE9mEj9Uwtv" //AQaZPqcv9Kg2x1eSrF8UBYXLK4WQoTSLH5
//this addresss is not whitelisted
wif := "L5gmcoaetU6YGSzg4wNqvKBEEAfwCAxWseuL3pxvLvEMZB9WyUYp"
wallet, _ := neoutils.GenerateFromWIF(wif)
log.Printf("address = %v\n address hash = %v %x", wallet.Address, neoutils.NEOAddressToScriptHash(wallet.Address), wallet.HashedSignature)

sendingAssetID := "c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b" //NEO
amount := float64(1)
neo := string(smartcontract.NEO)
// gas := string(smartcontract.GAS)
amount := float64(2)
remark := "o3x"
utxoEndpoint := "http://localhost:5000/"
networkFeeAmountInGAS := float64(0.0011)
networkFeeAmountInGAS := float64(0.001)

tx, err := neoutils.MintTokensRawTransactionMobile(utxoEndpoint, scriptHash, wif, sendingAssetID, amount, remark, networkFeeAmountInGAS)
tx, err := neoutils.MintTokensRawTransactionMobile(utxoEndpoint, scriptHash, wif, neo, amount, remark, networkFeeAmountInGAS)
if err != nil {
log.Printf("%v", err)
t.Fail()
Expand Down
2 changes: 1 addition & 1 deletion neoutils/smartcontract/scriptbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func (s *ScriptBuilder) GenerateTransactionOutput(sender NEOAddress, receiver NE
Address: receiver,
}
list = append(list, out)
//if the uxid

}

//if set network fee is more than 0
Expand Down
5 changes: 4 additions & 1 deletion neoutils/version.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package neoutils

const (
VERSION = "1.0.2"
VERSION = "1.0.3"
)

//RELEASE NOTES
//V. 1.0.3
//mintTokens now triggers Verification

//V. 1.0.2
//- added txid in return
//MintTokensRawTransaction(wallet Wallet, assetToSend smartcontract.NativeAsset, amount float64, unspent smartcontract.Unspent, remark string) ([]byte, string, error)
Expand Down

0 comments on commit 94637f4

Please sign in to comment.