tx · 8SpGJhg2w2nLTCuYgpnMcvzY7Q96p9CZMYeu65JKbp32
3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6: -0.01000000 Waves
2023.03.16 13:50 [2492482] smart account 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6 > SELF 0.00000000 Waves
{
"type": 13,
"id": "8SpGJhg2w2nLTCuYgpnMcvzY7Q96p9CZMYeu65JKbp32",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1678963809045,
"version": 2,
"chainId": 84,
"sender": "3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6",
"senderPublicKey": "3pW4h7e3NAcqGkvc1AyziZLMPSsG2eXvCGU7vLxPXkaq",
"proofs": [
"2uaj2sn9515TVZjYNbxpWAEKU4mHqxQ1eLWuWwYnxzZYKt7pesSB8Fzojs1iWz4VfR6kTw9rm9j3LnxB1Vb7Pv7j"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIFCgMBAQEAAAAAAAAAAQAAAAFpAQAAAARjYWxsAAAAAwAAAAtmaXJzdE51bWJlcgAAAAxzZWNvbmROdW1iZXIAAAAIbXVsdGlwbHkEAAAADGJpZ0ludFJlc3VsdAkAAToAAAACCQABOQAAAAIJAAE2AAAAAQUAAAALZmlyc3ROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkJAAE2AAAAAQUAAAAMc2Vjb25kTnVtYmVyBAAAAA1iaWdJbnRSZXN1bHQyCQABPQAAAAQJAAE2AAAAAQUAAAALZmlyc3ROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkJAAE2AAAAAQUAAAAMc2Vjb25kTnVtYmVyBQAAAAZIQUxGVVAEAAAABnJlc3VsdAkAAaAAAAABBQAAAA1iaWdJbnRSZXN1bHQyBAAAAAliYWNrd2FyZDIJAAE8AAAAAwUAAAANYmlnSW50UmVzdWx0MgkAATYAAAABBQAAAAxzZWNvbmROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkEAAAACGJhY2t3YXJkCQABOgAAAAIJAAE5AAAAAgUAAAANYmlnSW50UmVzdWx0MgkAATYAAAABBQAAAAxzZWNvbmROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABnJlc3VsdAUAAAAGcmVzdWx0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA5iYWNrd2FyZFJlc3VsdAkAAaAAAAABBQAAAAliYWNrd2FyZDIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5UdIj+Q==",
"height": 2492482,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9nZL2VYJXhhWKVCeQVo17YYD9HjGb5b52jSQHk9Lk73U
Next: PQdd2ZaZacPfM4MfmHywRt2mRvL384Z2hF1dih7ZvMf
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func call (firstNumber,secondNumber,multiply) = { |
---|
8 | 8 | | let bigIntResult = ((toBigInt(firstNumber) * toBigInt(multiply)) / toBigInt(secondNumber)) |
---|
9 | | - | let result = toInt(bigIntResult) |
---|
10 | | - | let backward = ((bigIntResult * toBigInt(secondNumber)) / toBigInt(multiply)) |
---|
11 | | - | [IntegerEntry("result", result), IntegerEntry("backwardResult", toInt(backward))] |
---|
| 9 | + | let bigIntResult2 = fraction(toBigInt(firstNumber), toBigInt(multiply), toBigInt(secondNumber), HALFUP) |
---|
| 10 | + | let result = toInt(bigIntResult2) |
---|
| 11 | + | let backward2 = fraction(bigIntResult2, toBigInt(secondNumber), toBigInt(multiply)) |
---|
| 12 | + | let backward = ((bigIntResult2 * toBigInt(secondNumber)) / toBigInt(multiply)) |
---|
| 13 | + | [IntegerEntry("result", result), IntegerEntry("backwardResult", toInt(backward2))] |
---|
12 | 14 | | } |
---|
13 | 15 | | |
---|
14 | 16 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func call (firstNumber,secondNumber,multiply) = { |
---|
8 | 8 | | let bigIntResult = ((toBigInt(firstNumber) * toBigInt(multiply)) / toBigInt(secondNumber)) |
---|
9 | | - | let result = toInt(bigIntResult) |
---|
10 | | - | let backward = ((bigIntResult * toBigInt(secondNumber)) / toBigInt(multiply)) |
---|
11 | | - | [IntegerEntry("result", result), IntegerEntry("backwardResult", toInt(backward))] |
---|
| 9 | + | let bigIntResult2 = fraction(toBigInt(firstNumber), toBigInt(multiply), toBigInt(secondNumber), HALFUP) |
---|
| 10 | + | let result = toInt(bigIntResult2) |
---|
| 11 | + | let backward2 = fraction(bigIntResult2, toBigInt(secondNumber), toBigInt(multiply)) |
---|
| 12 | + | let backward = ((bigIntResult2 * toBigInt(secondNumber)) / toBigInt(multiply)) |
---|
| 13 | + | [IntegerEntry("result", result), IntegerEntry("backwardResult", toInt(backward2))] |
---|
12 | 14 | | } |
---|
13 | 15 | | |
---|
14 | 16 | | |
---|
15 | 17 | | @Verifier(tx) |
---|
16 | 18 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
17 | 19 | | |
---|