tx · Ci44FoWG48rxX61F5J7iWnA843EWU7nA19TYde6sXfy 3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi: -0.01000000 Waves 2019.12.16 15:08 [811428] smart account 3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi > SELF 0.00000000 Waves
{ "type": 13, "id": "Ci44FoWG48rxX61F5J7iWnA843EWU7nA19TYde6sXfy", "fee": 1000000, "feeAssetId": null, "timestamp": 1576498110331, "version": 1, "sender": "3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi", "senderPublicKey": "FtFfC9tULuEf2b5WVZhS948Yxi3vRFCiuxLdyrkquPtj", "proofs": [ "47QcddrimdboXLA8zwMPiCByf4C1N9G9KSTufwGepgNhgYzJh59UH4EV8yfMiADKULyAKFhnxTRyV99VhxpajDGw" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAADAAAAAANZGVhbGVyQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVIIvZsveTY8YvUj9QbUNXQSwv3NN2tEbNAAAAAAQd2hpdGVsaXN0QWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVJDHIIUGzZ6WUTT7eDRBXvzmo+8NTa6YKgAAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTjb3DY4EpS1I3pGV9/Mjfqvvd5yJ9vYR8AAAAACXBBZGRyZXNzMQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM05DVkRhVDFBU2JSZDQyaEJTdzRFRzZvakdWUkd0dk1pejEAAAAACXBBZGRyZXNzMgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM01zMmtUQXhkcmNYRHh3ZWRmYk5qU2k2ZXdHQ1VxdDNoZVoAAAAACXBBZGRyZXNzMwkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM042b2dubTd4blFTRmlvd25TMURmMUxhY0p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ckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAAAAAAACBQAAAApkQXBwU3RhdHVzAAAAAAAAAAAACQAAAgAAAAECAAAAGURlYWxlciBkQXBwIGlzIG5vdCBhY3RpdmUEAAAAC2NhbGxlckNoZWNrCQEAAAAMY2hlY2tBZGRyZXNzAAAAAQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA5yZWNpcGllbnRDaGVjawkBAAAADGNoZWNrQWRkcmVzcwAAAAEFAAAACXRvQWRkcmVzcwQAAAAHcGF5bWVudAkBAAAACmdldFBheW1lbnQAAAABBQAAAAFpCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAJdG9BZGRyZXNzCAUAAAAHcGF5bWVudAAAAAZhbW91bnQIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB/zyoRs=", "chainId": 84, "height": 811428, "spentComplexity": 0 } View: original | compacted Prev: none Next: GLLNGG9rSyG7fesMARvVaaUftH2XFJR3AsboDQyGtyxE Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let dealerAddress = Address(base58'3N1nSQNkUmZtgmgsgYSg54cu25jLFWBUAcB') | |
5 | + | ||
6 | + | let whitelistAddress = Address(base58'3N37bd8eggz2AFnEXFFgMMtfYQMgMvXLPaZ') | |
7 | + | ||
8 | + | let dAppWhitelistAddress = Address(base58'3NAeefWVGWNzuSeVij5nJYZHkiimqQv8ysc') | |
9 | + | ||
10 | + | let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1") | |
11 | + | ||
12 | + | let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ") | |
13 | + | ||
14 | + | let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe") | |
15 | + | ||
16 | + | let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC") | |
17 | + | ||
18 | + | let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg") | |
19 | + | ||
20 | + | let ver = "0.0.1-otc-testnet" | |
21 | + | ||
22 | + | let validState = 1000 | |
23 | + | ||
24 | + | func getPayment (i) = match i.payment { | |
25 | + | case p: AttachedPayment => | |
26 | + | p | |
27 | + | case _ => | |
28 | + | throw("Payment must be attached") | |
29 | + | } | |
30 | + | ||
31 | + | ||
32 | + | func checkAddress (account) = { | |
33 | + | let isAccountAllow = match getInteger(whitelistAddress, account) { | |
34 | + | case a: Int => | |
35 | + | a | |
36 | + | case _ => | |
37 | + | -255 | |
38 | + | } | |
39 | + | if ((validState > isAccountAllow)) | |
40 | + | then throw("This account has no right to send/get funds.") | |
41 | + | else true | |
42 | + | } | |
43 | + | ||
44 | + | ||
45 | + | @Callable(i) | |
46 | + | func transfer (toAddress) = { | |
47 | + | let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) { | |
48 | + | case a: Int => | |
49 | + | a | |
50 | + | case _ => | |
51 | + | 0 | |
52 | + | } | |
53 | + | if ((dAppStatus == 0)) | |
54 | + | then throw("Dealer dApp is not active") | |
55 | + | else { | |
56 | + | let callerCheck = checkAddress(toBase58String(i.caller.bytes)) | |
57 | + | let recipientCheck = checkAddress(toAddress) | |
58 | + | let payment = getPayment(i) | |
59 | + | TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)]) | |
60 | + | } | |
61 | + | } | |
62 | + | ||
63 | + | ||
64 | + | @Verifier(tx) | |
65 | + | func verify () = match tx { | |
66 | + | case tx: SetScriptTransaction => | |
67 | + | true | |
68 | + | case _ => | |
69 | + | false | |
70 | + | } | |
71 | + |
github/deemru/w8io/169f3d6 35.34 ms ◑