tx · epVcQybkxkVmEzmeCyd9ZzbtNjFrtQH3i4mUbyNEFFD 3MsAdR9GzaBRgjCNPXtPtGGMz7mKffHFSd8: -0.04000000 Waves 2021.09.01 01:29 [1683116] smart account 3MsAdR9GzaBRgjCNPXtPtGGMz7mKffHFSd8 > SELF 0.00000000 Waves
{ "type": 13, "id": "epVcQybkxkVmEzmeCyd9ZzbtNjFrtQH3i4mUbyNEFFD", "fee": 4000000, "feeAssetId": null, "timestamp": 1630449054406, "version": 2, "chainId": 84, "sender": "3MsAdR9GzaBRgjCNPXtPtGGMz7mKffHFSd8", "senderPublicKey": "EUGSRsTjwWnuaJunshvtppK95VtPd811FAgEzJraTzXC", "proofs": [ "4GtEPzvszuEGPjRfYadyGprRVgAzMDqoQJHJnBg1wPpVwWnDXuDUjQimEbyM7fiAui1T9CWDhs2ay7EqCZcdLucp" ], "script": "base64:AAIFAAAAAAAAACgIAhIFCgMICAgSDAoKCAEBAQEBAQEBARIECgIICBIECgIIARIDCgEIAAAABAAAAAAMYWRtaW5BZGRyZXNzCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAABWFkbWluAgAAAAABAAAAC3dyaXRlU3RyaW5nAAAAAgAAAANrZXkAAAALc3RyaW5nVmFsdWUJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAA2tleQUAAAALc3RyaW5nVmFsdWUBAAAADHdyaXRlSW50ZWdlcgAAAAIAAAADa2V5AAAADGludGVnZXJWYWx1ZQkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAA2tleQUAAAAMaW50ZWdlclZhbHVlAQAAAAdpc0FkbWluAAAAAQAAAA1jYWxsZXJBZGRyZXNzAwkAAAAAAAACBQAAAA1jYWxsZXJBZGRyZXNzCQACWQAAAAEFAAAADGFkbWluQWRkcmVzcwYHAAAABQAAAAFpAQAAABBzZXR1cERBcHBBZGRyZXNzAAAAAwAAAAVhZG1pbgAAAAt3YXZldHJvbGxlcgAAAApsaXF1aWR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JbnRlZ2VyAAAAAgUAAAADa2V5BQAAAAxpbnRlZ2VyVmFsdWUFAAAAA25pbAkAAAIAAAABAgAAACpBZGRyZXNzIGRvZXMgbm90IG1hdGNoIHdpdGggYWRtaW4gYWRkcmVzcyEAAAABaQEAAAASZGVsZXRlU3RvcmFnZUVudHJ5AAAAAQAAAANrZXkDCQEAAAAHaXNBZG1pbgAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwJAAACAAAAAQIAAAAqQWRkcmVzcyBkb2VzIG5vdCBtYXRjaCB3aXRoIGFkbWluIGFkZHJlc3MhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmPbqLw", "height": 1683116, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BcDC4KxvBSGZzGJ8Sq4WE22MtHt1KRWNu7HkXjWHB4Cq Next: CVeKDouLj3SmzWcSQpEDUvf6ad8Zj724m2d2MZ8yrun4 Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | - | func setupDAppAddress (admin,wavetroller,liquidator) = if (( | |
18 | + | func setupDAppAddress (admin,wavetroller,liquidator) = if (!(isDefined("admin"))) | |
19 | 19 | then [writeString("admin", admin), writeString("wavetroller", wavetroller), writeString("liquidator", liquidator)] | |
20 | - | else if ((i.caller.bytes == fromBase58String(adminAddress))) | |
21 | - | then [writeString("admin", admin), writeString("wavetroller", wavetroller), writeString("liquidator", liquidator)] | |
22 | - | else throw("Address does not match with admin address!") | |
20 | + | else throw("Address does not match with admin address!") | |
23 | 21 | ||
24 | 22 | ||
25 | 23 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminAddress = valueOrElse(getString(this, "admin"), "") | |
5 | 5 | ||
6 | 6 | func writeString (key,stringValue) = StringEntry(key, stringValue) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func writeInteger (key,integerValue) = IntegerEntry(key, integerValue) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func isAdmin (callerAddress) = if ((callerAddress == fromBase58String(adminAddress))) | |
13 | 13 | then true | |
14 | 14 | else false | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | - | func setupDAppAddress (admin,wavetroller,liquidator) = if (( | |
18 | + | func setupDAppAddress (admin,wavetroller,liquidator) = if (!(isDefined("admin"))) | |
19 | 19 | then [writeString("admin", admin), writeString("wavetroller", wavetroller), writeString("liquidator", liquidator)] | |
20 | - | else if ((i.caller.bytes == fromBase58String(adminAddress))) | |
21 | - | then [writeString("admin", admin), writeString("wavetroller", wavetroller), writeString("liquidator", liquidator)] | |
22 | - | else throw("Address does not match with admin address!") | |
20 | + | else throw("Address does not match with admin address!") | |
23 | 21 | ||
24 | 22 | ||
25 | 23 | ||
26 | 24 | @Callable(i) | |
27 | 25 | func setupAssetParameter (assetId,decimals,collateralFactor,threshold,penalty,reserveFactor,multiplier,kink,jumpMultiplier,baseRate) = if (isAdmin(i.caller.bytes)) | |
28 | 26 | then [writeInteger((assetId + "_Decimals"), decimals), writeInteger((assetId + "_CollateralFactor"), collateralFactor), writeInteger((assetId + "_Threshold"), threshold), writeInteger((assetId + "_Penalty"), penalty), writeInteger((assetId + "_ReserveFactor"), reserveFactor), writeInteger((assetId + "_Multiplier"), multiplier), writeInteger((assetId + "_Kink"), kink), writeInteger((assetId + "_JumpMultiplier"), jumpMultiplier), writeInteger((assetId + "_BaseRate"), baseRate)] | |
29 | 27 | else throw("Address does not match with admin address!") | |
30 | 28 | ||
31 | 29 | ||
32 | 30 | ||
33 | 31 | @Callable(i) | |
34 | 32 | func updateStringEntry (key,stringValue) = if (isAdmin(i.caller.bytes)) | |
35 | 33 | then [writeString(key, stringValue)] | |
36 | 34 | else throw("Address does not match with admin address!") | |
37 | 35 | ||
38 | 36 | ||
39 | 37 | ||
40 | 38 | @Callable(i) | |
41 | 39 | func updateIntegerEntry (key,integerValue) = if (isAdmin(i.caller.bytes)) | |
42 | 40 | then [writeInteger(key, integerValue)] | |
43 | 41 | else throw("Address does not match with admin address!") | |
44 | 42 | ||
45 | 43 | ||
46 | 44 | ||
47 | 45 | @Callable(i) | |
48 | 46 | func deleteStorageEntry (key) = if (isAdmin(i.caller.bytes)) | |
49 | 47 | then [DeleteEntry(key)] | |
50 | 48 | else throw("Address does not match with admin address!") | |
51 | 49 | ||
52 | 50 | ||
53 | 51 | @Verifier(tx) | |
54 | 52 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
55 | 53 |
github/deemru/w8io/169f3d6 58.11 ms ◑