tx · 8g6cLM8gBeo4CTSUvYNAiDwxFh1SodqncDLQNhyKKsjD

3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF:  -0.01400000 Waves

2020.03.10 03:02 [902288] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves

{ "type": 13, "id": "8g6cLM8gBeo4CTSUvYNAiDwxFh1SodqncDLQNhyKKsjD", "fee": 1400000, "feeAssetId": null, "timestamp": 1583798524284, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "322AxzisuuEz9BnStpRSm8xV6mraUYoNyWqmbBq55WXe29CrH8hA4NVVVVRsbNggNPQCFt6L1zacpyn6zJE2b77U" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAAAwAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAABAAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkAwkAAAAAAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABlVTQ29pbgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAKY3VycmVudEtleQIAAAAHX3VzY29pbgMJAAABAAA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QAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA5vd25lclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgeMfdyW", "chainId": 84, "height": 902288, "spentComplexity": 0 } View: original | compacted Prev: CQZ5DUYy7TYDzQWinGESEPHpUKHiBRoAuMFmzYwzTv8L Next: A6A9x5vkBwtWGJH4chRb8GTtoLHeFDKzLDFB6SFoA2wr Diff:
OldNewDifferences
104104
105105
106106 @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)])
107+func getFaucet (k) = {
108+ let f = toBase58String(d.caller.bytes)
109+ let g = {
110+ let h = getInteger(this, (f + "_faucet"))
111+ if ($isInstanceOf(h, "Int"))
112+ then {
113+ let i = h
114+ i
115+ }
116+ else 0
117+ }
118+ if ((0 > k))
119+ then throw("Can't withdraw negative amount")
120+ else if ((g > 0))
121+ then throw("Faucet already taken")
122+ else ScriptResult(WriteSet([DataEntry((f + "_faucet"), k)]), TransferSet([ScriptTransfer(d.caller, k, a)]))
123+ }
110124
111125
112126 @Verifier(l)
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
105105
106106 @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)])
107+func getFaucet (k) = {
108+ let f = toBase58String(d.caller.bytes)
109+ let g = {
110+ let h = getInteger(this, (f + "_faucet"))
111+ if ($isInstanceOf(h, "Int"))
112+ then {
113+ let i = h
114+ i
115+ }
116+ else 0
117+ }
118+ if ((0 > k))
119+ then throw("Can't withdraw negative amount")
120+ else if ((g > 0))
121+ then throw("Faucet already taken")
122+ else ScriptResult(WriteSet([DataEntry((f + "_faucet"), k)]), TransferSet([ScriptTransfer(d.caller, k, a)]))
123+ }
110124
111125
112126 @Verifier(l)
113127 func m () = {
114128 let h = l
115129 if ($isInstanceOf(h, "SetScriptTransaction"))
116130 then {
117131 let n = h
118132 sigVerify(l.bodyBytes, l.proofs[0], c)
119133 }
120134 else if ($isInstanceOf(h, "DataTransaction"))
121135 then {
122136 let n = h
123137 true
124138 }
125139 else false
126140 }
127141

github/deemru/w8io/169f3d6 
43.57 ms