tx · CqJFaBQveL8gV74dKZkUfigd1cer1JE791xV2e9WgfkR

3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4:  -0.01400000 Waves

2020.04.05 19:15 [941159] smart account 3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4 > SELF 0.00000000 Waves

{ "type": 13, "id": "CqJFaBQveL8gV74dKZkUfigd1cer1JE791xV2e9WgfkR", "fee": 1400000, "feeAssetId": null, "timestamp": 1586103297538, "version": 1, "sender": "3MpZuKDPW9Hs8HypbAd7bLxNYULnCYhoXQ4", "senderPublicKey": "Eke9tanjCLXE23D8JJf61cqgdG7TSAH7vUbaiAyymfjT", "proofs": [ "kNsW8QGTexV8B2cePii9mypzFwWfmckUcH8jMdo1FixCJmuaEMGENhn1H7xPySZ8CNywnEpwgPTvHFFwYH3fXTS" ], "script": "base64:AAIDAAAAAAAAABMIARIGCgQICAEIEgcKBQgIAQgIAAAAAAAAAAIAAAABaQEAAAANYXRvbWljRGVwb3NpdAAAAAQAAAAPYXRvbWljUmVjaXBpZW50AAAAEGF0b21pY1dpdGhEcmF3SWQAAAAUYXRvbWljV2l0aGRyYXdBbW91bnQAAAAPYXRvbWljRGVwb3NpdElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgUAAAAPYXRvbWljUmVjaXBpZW50BQAAAA9hdG9taWNEZXBvc2l0SWQFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQA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QAAAANuaWwJAAACAAAAAQIAAAAPTm90IEF0b21pYyBTd2FwAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADdHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADdHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3R0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3N0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3N0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANzdHgAAAAPc2VuZGVyUHVibGljS2V5BvEoBKw=", "chainId": 84, "height": 941159, "spentComplexity": 0 } View: original | compacted Prev: 7s9rjJt3wjBhPvNiPD8nprCRbfVNQeKXgGMfoATB6Zs6 Next: FKhtkDLGboWzmekWVnnv5PiKpuTvuHtRZyQWRm5FwyS8 Diff:
OldNewDifferences
2121
2222
2323 @Callable(i)
24-func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId) = {
24+func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId,atomicWithDrawId2) = {
2525 let currentKey = toBase58String(i.caller.bytes)
26- let assetId = fromBase58String(atomicWithDrawId)
26+ let assetId = fromBase58String(atomicWithDrawId2)
2727 let myDepositAmount = match getInteger(this, ((currentKey + atomicDepositId) + atomicRecipient)) {
2828 case a: Int =>
2929 a
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, ((atomicRecipient + atomicDepositId) + currentKey)) {
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(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), true)])
1919 }
2020
2121
2222
2323 @Callable(i)
24-func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId) = {
24+func atomicWithdraw (atomicRecipient,atomicWithDrawId,atomicWithdrawAmount,atomicDepositId,atomicWithDrawId2) = {
2525 let currentKey = toBase58String(i.caller.bytes)
26- let assetId = fromBase58String(atomicWithDrawId)
26+ 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 recipientDeposit = match getInteger(this, ((atomicRecipient + atomicWithDrawId) + currentKey)) {
4040 case a: Int =>
4141 a
4242 case _ =>
4343 0
4444 }
4545 let recipientRequest = match getInteger(this, ((atomicRecipient + atomicDepositId) + currentKey)) {
4646 case a: Int =>
4747 a
4848 case _ =>
4949 0
5050 }
5151 let atomicFinish = match getBoolean(this, ((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient)) {
5252 case a: Boolean =>
5353 a
5454 case _ =>
5555 false
5656 }
5757 if (if (if (if ((myDepositAmount == recipientRequest))
5858 then (recipientDeposit == myRequestAmount)
5959 else false)
6060 then (atomicFinish == true)
6161 else false)
6262 then (atomicWithDrawId == "WAVES")
6363 else false)
6464 then ScriptResult(WriteSet([DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, unit)]))
6565 else if (if (if (if ((myDepositAmount == recipientRequest))
6666 then (recipientDeposit == myRequestAmount)
6767 else false)
6868 then (atomicFinish == true)
6969 else false)
7070 then (atomicWithDrawId != "WAVES")
7171 else false)
7272 then ScriptResult(WriteSet([DataEntry(((("F_" + currentKey) + atomicWithDrawId) + atomicRecipient), false)]), TransferSet([ScriptTransfer(i.caller, atomicWithdrawAmount, assetId)]))
7373 else throw("Not Atomic Swap")
7474 }
7575
7676
7777 @Verifier(tx)
7878 func verify () = match tx {
7979 case ttx: TransferTransaction =>
8080 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
8181 case stx: SetScriptTransaction =>
8282 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
8383 case _ =>
8484 true
8585 }
8686

github/deemru/w8io/026f985 
47.97 ms