From ef8a947a04f79ed06bb002ca395ae44b6ba32893 Mon Sep 17 00:00:00 2001 From: yaaarslv Date: Mon, 15 Jan 2024 21:58:53 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20contract.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contract.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/contract.go b/contract.go index 0ef2e5f..dc539b9 100644 --- a/contract.go +++ b/contract.go @@ -24,20 +24,21 @@ func (w Wallet) getTokenBalance(token string) int { var prices map[string]int -// All prices are multiplied by 1e10 and rounded to be represented as fixed point int +// Prices are multiplied by 1e14 and rounded to be represented as fixed point int func init() { - prices = map[string]int{ - "XMR": 1521000000000, - "XRP": 6035000000, - "ADA": 5793000000, - "AVAX": 396900000000, - "BNB": 3083000000000, - "BTC": 466489200000000, - "ETH": 26230000000000, - "SOL": 1011800000000, - } +  prices = map[string]int{ +    "XMR":  152100000, +    "XRP":  603500, +    "ADA":  579300, +    "AVAX": 39690000, +    "BNB":  308300000, +    "BTC":  46648920000, +    "ETH":  2623000000, +    "SOL":  101180000, +  } } + func TopUp(address interop.Hash160, token string, amount int) bool { if !isKnownToken(token) { runtime.Log("Token " + token + " is unkown")