Загрузить файлы в «/»

This commit is contained in:
yaaarslv 2023-12-28 18:16:57 +00:00
parent a5e739d1d0
commit 8cf5528c0c

View file

@ -6,7 +6,6 @@ import (
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/nspcc-dev/neo-go/pkg/interop" "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/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/runtime"
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
"strconv" "strconv"
@ -119,8 +118,19 @@ func Transfer(address interop.Hash160, amount int, fromToken string, toToken str
UpdateWallet(address, wallet) UpdateWallet(address, wallet)
runtime.Log("Exchange successful: " + std.Itoa10(amount) + " " + fromToken + runtime.Log("Exchange successful: " + strconv.Itoa(amount) + " " + fromToken +
" exchanged for " + std.Itoa10(int(convertedAmount)) + " " + toToken) " 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 return true
} }