tx · 9chL8PzxEbHtRLArGQhne38Gcxmh2PJgMfCTiDUBariE

3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp:  -0.01400000 Waves

2020.04.06 15:36 [942384] smart account 3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp > SELF 0.00000000 Waves

{ "type": 13, "id": "9chL8PzxEbHtRLArGQhne38Gcxmh2PJgMfCTiDUBariE", "fee": 1400000, "feeAssetId": null, "timestamp": 1586176576542, "version": 1, "sender": "3N1hUxU5uVePa5VEmty9UWoTdzjfMUNekSp", "senderPublicKey": "C9N8puBe7PNPmySZRMUWyTK96uEaNp6AB2w758sEo4PQ", "proofs": [ "woFEbBAW6BnWojuzuCesyMRDCUcD4V3rdB7wu2aVcQECDrSDfWsKrToitrcd8ZMqhHRZvDRFccQ8yYZ4yEaCCJy" ], "script": "base64:AAIDAAAAAAAAABMIARIGCgQICAEIEgcKBQgIAQgIAAAAAAAAAAIAAAABaQEAAAANYXRvbWljRGVwb3NpdAAAAAQAAAAPYXRvbWljUmVjaXBpZW50AAAAEGF0b21pY1dpdGhEcmF3SWQAAAAUYXRvbWljV2l0aGRyYXdBbW91bnQAAAAPYXRvbWljRGVwb3NpdElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgUAAAAKY3VycmVudEtleQUAAAAPYXRvbWljRGVwb3NpdElkBQAAAA9hdG9taWNSZWNpcGllbnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAA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y2gwCQAB9AAAAAMIBQAAAAN0dHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAN0dHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADdHR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADc3R4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADc3R4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3N0eAAAAA9zZW5kZXJQdWJsaWNLZXkGRxW+wg==", "chainId": 84, "height": 942384, "spentComplexity": 0 } View: original | compacted Prev: DZmuwbaS3MFvi6D8w62iADUjRRAuB8T6J2E6Mf6NPm93 Next: FNJfL1FDX6tudsHs33ZiXXSUqXkzAppFJd1WzcRAAehT Diff:
OldNewDifferences
6363 if (if (if (if ((myDepositAmount == recipientRequestAmount))
6464 then (recipientDepositAmount == myRequestAmount)
6565 else false)
66- then (myAtomicFinish == true)
66+ then (recipientAtomicFinish == true)
6767 else false)
6868 then (atomicWithDrawId == "WAVES")
6969 else false)
7171 else if (if (if (if ((myDepositAmount == recipientRequestAmount))
7272 then (recipientDepositAmount == myRequestAmount)
7373 else false)
74- then (myAtomicFinish == true)
74+ then (recipientAtomicFinish == true)
7575 else false)
7676 then (atomicWithDrawId != "WAVES")
7777 else false)
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
1111 let currentAmount = match getInteger(this, ((currentKey + atomicDepositId) + atomicRecipient)) {
1212 case a: Int =>
1313 a
1414 case _ =>
1515 0
1616 }
1717 let newAmount = (currentAmount + pmt.amount)
1818 WriteSet([DataEntry(((currentKey + atomicDepositId) + atomicRecipient), newAmount), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), atomicWithdrawAmount), DataEntry(((("d_" + currentKey) + atomicDepositId) + atomicRecipient), true)])
1919 }
2020
2121
2222
2323 @Callable(i)
2424 func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId,atomicWithDrawId2) = {
2525 let currentKey = toBase58String(i.caller.bytes)
2626 let assetId = fromBase58String(atomicWithDrawId2)
2727 let myDepositAmount = match getInteger(this, ((currentKey + atomicDepositId) + atomicRecipient)) {
2828 case a: Int =>
2929 a
3030 case _ =>
3131 0
3232 }
3333 let myRequestAmount = match getInteger(this, ((currentKey + atomicWithDrawId) + atomicRecipient)) {
3434 case a: Int =>
3535 a
3636 case _ =>
3737 0
3838 }
3939 let recipientDepositAmount = match getInteger(this, ((atomicRecipient + atomicWithDrawId) + currentKey)) {
4040 case a: Int =>
4141 a
4242 case _ =>
4343 0
4444 }
4545 let recipientRequestAmount = match getInteger(this, ((atomicRecipient + atomicDepositId) + currentKey)) {
4646 case a: Int =>
4747 a
4848 case _ =>
4949 0
5050 }
5151 let myAtomicFinish = match getBoolean(this, ((("d_" + currentKey) + atomicDepositId) + atomicRecipient)) {
5252 case a: Boolean =>
5353 a
5454 case _ =>
5555 false
5656 }
5757 let recipientAtomicFinish = match getBoolean(this, ((("d_" + atomicRecipient) + atomicWithDrawId) + currentKey)) {
5858 case a: Boolean =>
5959 a
6060 case _ =>
6161 false
6262 }
6363 if (if (if (if ((myDepositAmount == recipientRequestAmount))
6464 then (recipientDepositAmount == myRequestAmount)
6565 else false)
66- then (myAtomicFinish == true)
66+ then (recipientAtomicFinish == true)
6767 else false)
6868 then (atomicWithDrawId == "WAVES")
6969 else false)
7070 then ScriptResult(WriteSet([DataEntry(((atomicRecipient + atomicWithDrawId) + currentKey), 0), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), 0), DataEntry(((("d_" + atomicRecipient) + atomicWithDrawId) + currentKey), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, unit)]))
7171 else if (if (if (if ((myDepositAmount == recipientRequestAmount))
7272 then (recipientDepositAmount == myRequestAmount)
7373 else false)
74- then (myAtomicFinish == true)
74+ then (recipientAtomicFinish == true)
7575 else false)
7676 then (atomicWithDrawId != "WAVES")
7777 else false)
7878 then ScriptResult(WriteSet([DataEntry(((atomicRecipient + atomicWithDrawId) + currentKey), 0), DataEntry(((currentKey + atomicWithDrawId) + atomicRecipient), 0), DataEntry(((("d_" + atomicRecipient) + atomicWithDrawId) + currentKey), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, unit)]))
7979 else throw("Not Atomic Swap")
8080 }
8181
8282
8383 @Verifier(tx)
8484 func verify () = match tx {
8585 case ttx: TransferTransaction =>
8686 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
8787 case stx: SetScriptTransaction =>
8888 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
8989 case _ =>
9090 true
9191 }
9292

github/deemru/w8io/169f3d6 
51.88 ms