tx · CKbu76XEV1Yp2JoBiNDb51DNiHNmeY7sP4JUWxhZzzmG

3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA:  -0.01000000 Waves

2023.09.09 23:58 [2748363] smart account 3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA > SELF 0.00000000 Waves

{ "type": 13, "id": "CKbu76XEV1Yp2JoBiNDb51DNiHNmeY7sP4JUWxhZzzmG", "fee": 1000000, "feeAssetId": null, "timestamp": 1694293122755, "version": 2, "chainId": 84, "sender": "3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA", "senderPublicKey": "HQQ69Dum2Dp6ikGs7dfYRtTema79wqesthHx1wHmHC5Q", "proofs": [ "5gKMUrzJGXVGd1Uc1HKzTznFbZLC4AcFp6CRQh3kk8aTDRncU3bYjHd4pZjY55fAYAbJDNVa4KpL3SEHUssFyJhu" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIIARIECgIBCAAAAAMAAAAABnVzZG5JZAEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQBAAAAFGdldFdhdmVzQ3VycmVudFByaWNlAAAAAAAAAAAAAB6EgAEAAAAQZ2V0V2F2ZXNOZXdQcmljZQAAAAAAAAAAAAAtxsAAAAACAAAAAWkBAAAAC3N3YXBUb1dhdmVzAAAAAgAAAAhjYWxsZXJJZAAAAAp1c2RuQW1vdW50BAAAAAhBbW91bnRJbgUAAAAKdXNkbkFtb3VudAQAAAAJQW1vdW50T3V0CQAAaQAAAAIJAABoAAAAAgUAAAAIQW1vdW50SW4AAAAAAAX14QAAAAAAAAAehIAJAAUUAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAANQW1vdW50SW5fVVNETgUAAAAIQW1vdW50SW4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAD0Ftb3VudE91dF9XQVZFUwUAAAAJQW1vdW50T3V0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAACGNhbGxlcklkAgAAABVfTGFzdF9BbW91bnRPdXRfV2F2ZXMFAAAACUFtb3VudE91dAUAAAADbmlsBQAAAAlBbW91bnRPdXQAAAABaQEAAAAKc3dhcFRvVVNETgAAAAIAAAALd2F2ZXNBbW91bnQAAAALdXNlckFkZHJlc3MEAAAACUFtb3VudE91dAkAAGgAAAACBQAAAAt3YXZlc0Ftb3VudAkBAAAAEGdldFdhdmVzTmV3UHJpY2UAAAAACQAFFAAAAAIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAALdXNlckFkZHJlc3MFAAAACUFtb3VudE91dAUAAAAGdXNkbklkCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA5BbW91bnRJbl9XYXZlcwUAAAALd2F2ZXNBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADkFtb3VudE91dF9VU0ROBQAAAAlBbW91bnRPdXQFAAAAA25pbAUAAAAJQW1vdW50T3V0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmlp3bN", "height": 2748363, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DpNUDy27jRRNG6js4MBb7funacgJywDtyJdWSvLF9TF6 Next: GeDmPF8YiEr5j1YVzThCm3kFJ8ss75je5TdTdk9VypmL Diff:
OldNewDifferences
1313 func swapToWaves (callerId,usdnAmount) = {
1414 let AmountIn = usdnAmount
1515 let AmountOut = ((AmountIn * 100000000) / 2000000)
16- $Tuple2([ScriptTransfer(i.caller, AmountOut, unit), IntegerEntry("AmountIn_USDN", AmountIn), IntegerEntry("AmountOut_WAVES", AmountOut), IntegerEntry((callerId + "_Last_AmountOut_Waves"), AmountOut)], AmountOut)
16+ $Tuple2([IntegerEntry("AmountIn_USDN", AmountIn), IntegerEntry("AmountOut_WAVES", AmountOut), IntegerEntry((callerId + "_Last_AmountOut_Waves"), AmountOut)], AmountOut)
1717 }
1818
1919
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 func getWavesCurrentPrice () = 2000000
77
88
99 func getWavesNewPrice () = 3000000
1010
1111
1212 @Callable(i)
1313 func swapToWaves (callerId,usdnAmount) = {
1414 let AmountIn = usdnAmount
1515 let AmountOut = ((AmountIn * 100000000) / 2000000)
16- $Tuple2([ScriptTransfer(i.caller, AmountOut, unit), IntegerEntry("AmountIn_USDN", AmountIn), IntegerEntry("AmountOut_WAVES", AmountOut), IntegerEntry((callerId + "_Last_AmountOut_Waves"), AmountOut)], AmountOut)
16+ $Tuple2([IntegerEntry("AmountIn_USDN", AmountIn), IntegerEntry("AmountOut_WAVES", AmountOut), IntegerEntry((callerId + "_Last_AmountOut_Waves"), AmountOut)], AmountOut)
1717 }
1818
1919
2020
2121 @Callable(i)
2222 func swapToUSDN (wavesAmount,userAddress) = {
2323 let AmountOut = (wavesAmount * getWavesNewPrice())
2424 $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), AmountOut, usdnId), IntegerEntry("AmountIn_Waves", wavesAmount), IntegerEntry("AmountOut_USDN", AmountOut)], AmountOut)
2525 }
2626
2727
2828 @Verifier(tx)
2929 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3030

github/deemru/w8io/026f985 
18.98 ms