tx · CyLkH4c3jbnyVwRGhZmoFtvGkAtbY8EKYas28YQBoXhC

3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp:  -0.01400000 Waves

2021.04.28 10:54 [1502031] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves

{ "type": 13, "id": "CyLkH4c3jbnyVwRGhZmoFtvGkAtbY8EKYas28YQBoXhC", "fee": 1400000, "feeAssetId": null, "timestamp": 1619596498497, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "3T8tRpvCcYe28KecZHXSzd1LkU9dLpV6cVMiyqFf1fqC47PRtAmUp9uLxvbEjnQCfrHomdpTHBGApa3xhbHLwgJH" ], "script": "base64:AAIEAAAAAAAAACcIAhIGCgQIAQEIEggKBggBAQEICBIRCg8ICAgIAQgBCAEIAQgBCAEAAAACAAAAAAZwYXI3SWQBAAAAIJedbhD+DwLKhAB/H26DYx4Zv6xpfO57kM3OSOXSB0EjAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAADAAAAAWkBAAAADnNwb25zb3JEZXBvc2l0AAAABAAAAAtjb21wZU51bWJlcgAAABFjb21wZUVuZFRpbWVzdGFtcAAAAAl0aW1lc3RhbXAAAAAMY29tcGVBZGRyZXNzBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACWN1cnJlbnRJZAkBAAAAB2N1cnJlbnQAAAABBQAAAAFpAwkAAGYAAAACBQA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AAMFAAAAC25ldDNhZGRyZXNzBQAAAApuZXQzYW1vdW50BQAAAA5jdXJyZW50QXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxib29ieWFkZHJlc3MFAAAAC2Jvb2J5YW1vdW50BQAAAA5jdXJyZW50QXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAA9uZWFycGluMWFkZHJlc3MFAAAADm5lYXJwaW4xYW1vdW50BQAAAA5jdXJyZW50QXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAA9uZWFycGluMmFkZHJlc3MFAAAADm5lYXJwaW4yYW1vdW50BQAAAA5jdXJyZW50QXNzZXRJZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnhncdh", "height": 1502031, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DKsMTpWbLHD4yz2E1Qg6Lbrq6u53ZJ1reRLvnc9B4BwM Next: D6q5mBJvdjQN97fdRpVX1mKrCfxaGTDD4ti47Nym3HWX Diff:
OldNewDifferences
6565 then throw("Not enough balance")
6666 else if ((0 > compeNewAmount))
6767 then throw("Can't withdraw negative bounty amount")
68- else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), 0), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
68+ else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
6969 }
7070
7171
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let par7Id = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
55
66 func current (i) = {
77 let pmt = i.payments[0]
88 if (isDefined(pmt.assetId))
99 then toBase58String(value(pmt.assetId))
1010 else "WAVES"
1111 }
1212
1313
1414 @Callable(i)
1515 func sponsorDeposit (compeNumber,compeEndTimestamp,timestamp,compeAddress) = {
1616 let pmt = i.payments[0]
1717 let currentId = current(i)
1818 if ((timestamp > compeEndTimestamp))
1919 then throw("Competition is finished")
2020 else {
2121 let currentKey = toBase58String(i.caller.bytes)
2222 let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber)) {
2323 case a: Int =>
2424 a
2525 case _ =>
2626 0
2727 }
2828 let newAmount = (currentAmount + pmt.amount)
2929 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + currentId)) {
3030 case a: Int =>
3131 a
3232 case _ =>
3333 0
3434 }
3535 let compeNewAmount = (compeCurrentAmount + pmt.amount)
3636 [IntegerEntry(((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + currentId), compeNewAmount)]
3737 }
3838 }
3939
4040
4141
4242 @Callable(i)
4343 func sponsorWithdraw (compeNumber,compeEndTimestamp,timestamp,amount,assetId,compeAddress) = {
4444 let currentKey = toBase58String(i.caller.bytes)
4545 let currentAssetId = fromBase58String(assetId)
4646 let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber)) {
4747 case a: Int =>
4848 a
4949 case _ =>
5050 0
5151 }
5252 let newAmount = (currentAmount - amount)
5353 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) {
5454 case a: Int =>
5555 a
5656 case _ =>
5757 0
5858 }
5959 let compeNewAmount = (compeCurrentAmount - amount)
6060 if ((timestamp > compeEndTimestamp))
6161 then throw("Competition is finished")
6262 else if ((0 > amount))
6363 then throw("Can't withdraw negative amount")
6464 else if ((0 > newAmount))
6565 then throw("Not enough balance")
6666 else if ((0 > compeNewAmount))
6767 then throw("Can't withdraw negative bounty amount")
68- else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), 0), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
68+ else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
6969 }
7070
7171
7272
7373 @Callable(i)
7474 func sponsorDistribution (compeNumber,assetId,compeAddress,net1,net1percent,net2,net2percent,net3,net3percent,booby,boobypercent,nearpin1,nearpin1percent,nearpin2,nearpin2percent) = {
7575 let currentAssetId = fromBase58String(assetId)
7676 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) {
7777 case a: Int =>
7878 a
7979 case _ =>
8080 0
8181 }
8282 let net1address = addressFromStringValue(net1)
8383 let net1amount = (compeCurrentAmount * (net1percent / 100))
8484 let net2address = addressFromStringValue(net2)
8585 let net2amount = (compeCurrentAmount * (net2percent / 100))
8686 let net3address = addressFromStringValue(net3)
8787 let net3amount = (compeCurrentAmount * (net3percent / 100))
8888 let boobyaddress = addressFromStringValue(net3)
8989 let boobyamount = (compeCurrentAmount * (net3percent / 100))
9090 let nearpin1address = addressFromStringValue(nearpin1)
9191 let nearpin1amount = (compeCurrentAmount * (nearpin1percent / 100))
9292 let nearpin2address = addressFromStringValue(nearpin2)
9393 let nearpin2amount = (compeCurrentAmount * (nearpin2percent / 100))
9494 if ((compeCurrentAmount == 0))
9595 then throw("Can't distribution negative amount")
9696 else [IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), 0), ScriptTransfer(net1address, net1amount, currentAssetId), ScriptTransfer(net2address, net2amount, currentAssetId), ScriptTransfer(net3address, net3amount, currentAssetId), ScriptTransfer(boobyaddress, boobyamount, currentAssetId), ScriptTransfer(nearpin1address, nearpin1amount, currentAssetId), ScriptTransfer(nearpin2address, nearpin2amount, currentAssetId)]
9797 }
9898
9999
100100 @Verifier(tx)
101101 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
102102

github/deemru/w8io/169f3d6 
32.11 ms