diff --git a/contract.go b/contract.go index 75d9f68..1c3a1a7 100644 --- a/contract.go +++ b/contract.go @@ -6,7 +6,6 @@ import ( "github.com/go-resty/resty/v2" "github.com/nspcc-dev/neo-go/pkg/interop" "github.com/nspcc-dev/neo-go/pkg/interop/native/gas" - "github.com/nspcc-dev/neo-go/pkg/interop/native/std" "github.com/nspcc-dev/neo-go/pkg/interop/runtime" "github.com/nspcc-dev/neo-go/pkg/interop/storage" "strconv" @@ -119,8 +118,19 @@ func Transfer(address interop.Hash160, amount int, fromToken string, toToken str UpdateWallet(address, wallet) - runtime.Log("Exchange successful: " + std.Itoa10(amount) + " " + fromToken + - " exchanged for " + std.Itoa10(int(convertedAmount)) + " " + toToken) + runtime.Log("Exchange successful: " + strconv.Itoa(amount) + " " + fromToken + + " exchanged for " + strconv.Itoa(int(convertedAmount)) + " " + toToken) + + return true +} + +func printBalance(address interop.Hash160) bool { + wallet := GetWallet(address) + runtime.Log("Balance: ") + + for key, value := range wallet.Tokens { + runtime.Log(key + ": " + strconv.Itoa(value)) + } return true }