tx · CQZ5DUYy7TYDzQWinGESEPHpUKHiBRoAuMFmzYwzTv8L

3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF:  -0.01400000 Waves

2020.03.09 00:32 [900643] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves

{ "type": 13, "id": "CQZ5DUYy7TYDzQWinGESEPHpUKHiBRoAuMFmzYwzTv8L", "fee": 1400000, "feeAssetId": null, "timestamp": 1583702488792, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "247DpWM5jWHKGnBRWfx4xwjHFVHvKxvvgcGjGKmfJc5SonZCgWhf4PVh6u5PnMX96LitkuyL3bhaVpZtAEUGEbU5" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAAAwAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAABAAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkAwkAAAAAAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABlVTQ29pbgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAKY3VycmVudEtleQIAAAAHX3VzY29pbgMJ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JbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIIBQAAAANwbXQAAAAGYW1vdW50AAAAAAAAAABkBQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAhWW91IENhbiBXaXRoZHJhdyB3aXRoIEVVQ29pbiBvbmx5CQAAAgAAAAECAAAAIVlvdSBDYW4gV2l0aGRyYXcgd2l0aCBFVUNvaW4gb25seQAAAAFpAQAAAAlnZXRGYXVjZXQAAAABAAAABmFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAGRVVDb2luBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA5vd25lclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgeCdcPX", "chainId": 84, "height": 900643, "spentComplexity": 0 } View: original | compacted Prev: CboyMhD6AT5mda17bNrfukxyFGF8ChBkHzA9mt5aQUDw Next: 8g6cLM8gBeo4CTSUvYNAiDwxFh1SodqncDLQNhyKKsjD Diff:
OldNewDifferences
102102 }
103103
104104
105-@Verifier(k)
106-func l () = {
107- let h = k
105+
106+@Callable(d)
107+func getFaucet (k) = if ((0 > k))
108+ then throw("Can't withdraw negative amount")
109+ else TransferSet([ScriptTransfer(d.caller, k, a)])
110+
111+
112+@Verifier(l)
113+func m () = {
114+ let h = l
108115 if ($isInstanceOf(h, "SetScriptTransaction"))
109116 then {
110- let m = h
111- sigVerify(k.bodyBytes, k.proofs[0], c)
117+ let n = h
118+ sigVerify(l.bodyBytes, l.proofs[0], c)
112119 }
113120 else if ($isInstanceOf(h, "DataTransaction"))
114121 then {
115- let m = h
122+ let n = h
116123 true
117124 }
118125 else false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'Ea6CdDfumo8ZFecxUSWKAjZpQXmkRC79WB4ktu3KffPn'
55
66 let b = base58'B957NA5BEM8quCDhe1fUPkqBSdCZdJunNxjGE8FRJkWx'
77
88 let c = base58'9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3'
99
1010 @Callable(d)
1111 func deposit () = {
1212 let e = extract(d.payment)
1313 if (isDefined(e.assetId))
1414 then if ((e.assetId == b))
1515 then {
1616 let f = toBase58String(d.caller.bytes)
1717 let g = {
1818 let h = getInteger(this, (f + "_uscoin"))
1919 if ($isInstanceOf(h, "Int"))
2020 then {
2121 let i = h
2222 i
2323 }
2424 else 0
2525 }
2626 let j = (g + e.amount)
2727 ScriptResult(WriteSet([DataEntry((f + "_uscoin"), j)]), TransferSet([ScriptTransfer(d.caller, e.amount, a)]))
2828 }
2929 else throw("can hodl USCoin only at the moment")
3030 else {
3131 let f = toBase58String(d.caller.bytes)
3232 let g = {
3333 let h = getInteger(this, (f + "_waves"))
3434 if ($isInstanceOf(h, "Int"))
3535 then {
3636 let i = h
3737 i
3838 }
3939 else 0
4040 }
4141 let j = (g + (e.amount / 100))
4242 ScriptResult(WriteSet([DataEntry((f + "_waves"), j)]), TransferSet([ScriptTransfer(d.caller, (e.amount / 100), a)]))
4343 }
4444 }
4545
4646
4747
4848 @Callable(d)
4949 func withdrawUSCoin () = {
5050 let e = extract(d.payment)
5151 if (isDefined(e.assetId))
5252 then if ((e.assetId == a))
5353 then {
5454 let f = toBase58String(d.caller.bytes)
5555 let g = {
5656 let h = getInteger(this, (f + "_uscoin"))
5757 if ($isInstanceOf(h, "Int"))
5858 then {
5959 let i = h
6060 i
6161 }
6262 else 0
6363 }
6464 let j = (g - e.amount)
6565 if ((0 > e.amount))
6666 then throw("Can't withdraw negative amount")
6767 else if ((0 > j))
6868 then throw("Not enough USCoin Deposited")
6969 else ScriptResult(WriteSet([DataEntry((f + "_uscoin"), j)]), TransferSet([ScriptTransfer(d.caller, e.amount, b)]))
7070 }
7171 else throw("You Can Withdraw with EUCoin only")
7272 else throw("You Can Withdraw with EUCoin only")
7373 }
7474
7575
7676
7777 @Callable(d)
7878 func withdrawWaves () = {
7979 let e = extract(d.payment)
8080 if (isDefined(e.assetId))
8181 then if ((e.assetId == a))
8282 then {
8383 let f = toBase58String(d.caller.bytes)
8484 let g = {
8585 let h = getInteger(this, (f + "_waves"))
8686 if ($isInstanceOf(h, "Int"))
8787 then {
8888 let i = h
8989 i
9090 }
9191 else 0
9292 }
9393 let j = (g - e.amount)
9494 if ((0 > e.amount))
9595 then throw("Can't withdraw negative amount")
9696 else if ((0 > j))
9797 then throw("Not enough Waves Deposited")
9898 else ScriptResult(WriteSet([DataEntry((f + "_waves"), j)]), TransferSet([ScriptTransfer(d.caller, (e.amount * 100), unit)]))
9999 }
100100 else throw("You Can Withdraw with EUCoin only")
101101 else throw("You Can Withdraw with EUCoin only")
102102 }
103103
104104
105-@Verifier(k)
106-func l () = {
107- let h = k
105+
106+@Callable(d)
107+func getFaucet (k) = if ((0 > k))
108+ then throw("Can't withdraw negative amount")
109+ else TransferSet([ScriptTransfer(d.caller, k, a)])
110+
111+
112+@Verifier(l)
113+func m () = {
114+ let h = l
108115 if ($isInstanceOf(h, "SetScriptTransaction"))
109116 then {
110- let m = h
111- sigVerify(k.bodyBytes, k.proofs[0], c)
117+ let n = h
118+ sigVerify(l.bodyBytes, l.proofs[0], c)
112119 }
113120 else if ($isInstanceOf(h, "DataTransaction"))
114121 then {
115- let m = h
122+ let n = h
116123 true
117124 }
118125 else false
119126 }
120127

github/deemru/w8io/169f3d6 
66.13 ms