tx · FKhtkDLGboWzmekWVnnv5PiKpuTvuHtRZyQWRm5FwyS8

3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4:  -0.01400000 Waves

2020.04.05 19:32 [941182] smart account 3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4 > SELF 0.00000000 Waves

{ "type": 13, "id": "FKhtkDLGboWzmekWVnnv5PiKpuTvuHtRZyQWRm5FwyS8", "fee": 1400000, "feeAssetId": null, "timestamp": 1586104353211, "version": 1, "sender": "3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4", "senderPublicKey": "Eke9tanjCLXE23D8JJf61cqgdG7TSAH7vUbaiAyymfjT", "proofs": [ "Yb9KRHZAeRUh3MwiZvkVGtFmyUyHNdPUZjHpaet2PaBAtX7T2gVMFegtyg5b373BnZCbPrGNktxfNf6SPbQVHto" ], "script": "base64:AAIDAAAAAAAAABMIARIGCgQICAEIEgcKBQgIAQgIAAAAAAAAAAIAAAABaQEAAAANYXRvbWljRGVwb3NpdAAAAAQAAAAPYXRvbWljUmVjaXBpZW50AAAAEGF0b21pY1dpdGhEcmF3SWQAAAAUYXRvbWljV2l0aGRyYXdBbW91bnQAAAAPYXRvbWljRGVwb3NpdElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkFAAAAD2F0b21pY0RlcG9zaXRJZAUAAAAPYXRvbWljUmVjaXBpZW50CAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAACmN1cnJlbnR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AAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3N0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3N0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANzdHgAAAAPc2VuZGVyUHVibGljS2V5Brjixh8=", "chainId": 84, "height": 941182, "spentComplexity": 0 } View: original | compacted Prev: CqJFaBQveL8gV74dKZkUfigd1cer1JE791xV2e9WgfkR Next: none Diff:
OldNewDifferences
88 let currentKey = toBase58String(i.caller.bytes)
99 let pmt = extract(i.payment)
1010 let paymentId = pmt.assetId
11- let currentAmount = match getInteger(this, ((atomicRecipient + atomicDepositId) + currentKey)) {
12- case a: Int =>
13- a
14- case _ =>
15- 0
16- }
17- let newAmount = (currentAmount + pmt.amount)
18- WriteSet([DataEntry(((currentKey + atomicDepositId) + atomicRecipient), newAmount), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), atomicWithdrawAmount), DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), true)])
11+ WriteSet([DataEntry(((currentKey + atomicDepositId) + atomicRecipient), pmt.amount), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), atomicWithdrawAmount), DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), true)])
1912 }
2013
2114
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func atomicDeposit (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId) = {
88 let currentKey = toBase58String(i.caller.bytes)
99 let pmt = extract(i.payment)
1010 let paymentId = pmt.assetId
11- let currentAmount = match getInteger(this, ((atomicRecipient + atomicDepositId) + currentKey)) {
12- case a: Int =>
13- a
14- case _ =>
15- 0
16- }
17- let newAmount = (currentAmount + pmt.amount)
18- WriteSet([DataEntry(((currentKey + atomicDepositId) + atomicRecipient), newAmount), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), atomicWithdrawAmount), DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), true)])
11+ WriteSet([DataEntry(((currentKey + atomicDepositId) + atomicRecipient), pmt.amount), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), atomicWithdrawAmount), DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), true)])
1912 }
2013
2114
2215
2316 @Callable(i)
2417 func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId,atomicWithDrawId2) = {
2518 let currentKey = toBase58String(i.caller.bytes)
2619 let assetId = fromBase58String(atomicWithDrawId2)
2720 let myDepositAmount = match getInteger(this, ((currentKey + atomicDepositId) + atomicRecipient)) {
2821 case a: Int =>
2922 a
3023 case _ =>
3124 0
3225 }
3326 let myRequestAmount = match getInteger(this, ((currentKey + atomicWithDrawId) + atomicRecipient)) {
3427 case a: Int =>
3528 a
3629 case _ =>
3730 0
3831 }
3932 let recipientDeposit = match getInteger(this, ((atomicRecipient + atomicWithDrawId) + currentKey)) {
4033 case a: Int =>
4134 a
4235 case _ =>
4336 0
4437 }
4538 let recipientRequest = match getInteger(this, ((atomicRecipient + atomicDepositId) + currentKey)) {
4639 case a: Int =>
4740 a
4841 case _ =>
4942 0
5043 }
5144 let atomicFinish = match getBoolean(this, ((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient)) {
5245 case a: Boolean =>
5346 a
5447 case _ =>
5548 false
5649 }
5750 if (if (if (if ((myDepositAmount == recipientRequest))
5851 then (recipientDeposit == myRequestAmount)
5952 else false)
6053 then (atomicFinish == true)
6154 else false)
6255 then (atomicWithDrawId == "WAVES")
6356 else false)
6457 then ScriptResult(WriteSet([DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, unit)]))
6558 else if (if (if (if ((myDepositAmount == recipientRequest))
6659 then (recipientDeposit == myRequestAmount)
6760 else false)
6861 then (atomicFinish == true)
6962 else false)
7063 then (atomicWithDrawId != "WAVES")
7164 else false)
7265 then ScriptResult(WriteSet([DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, assetId)]))
7366 else throw("Not Atomic Swap")
7467 }
7568
7669
7770 @Verifier(tx)
7871 func verify () = match tx {
7972 case ttx: TransferTransaction =>
8073 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
8174 case stx: SetScriptTransaction =>
8275 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
8376 case _ =>
8477 true
8578 }
8679

github/deemru/w8io/026f985 
44.75 ms