tx · 3G2BD8xNHqkUcb21RnbPEREomBjpSYfBCWo467k4Ch4A
3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u: -0.01400000 Waves
2019.11.21 15:11 [774928] smart account 3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u > SELF 0.00000000 Waves
{
"type": 13,
"id": "3G2BD8xNHqkUcb21RnbPEREomBjpSYfBCWo467k4Ch4A",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1574338204097,
"version": 1,
"sender": "3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u",
"senderPublicKey": "3U1CEsDmMXyPp5z1NXtQE4HZiK5JYASFDu1gudjREyM4",
"proofs": [
"azZR1GWAgiz5WbRh4coR53gpWXSVC4cpsxN1o4WBKqRnVPZEpf4LKV7ydMrWYDhJNw81CcvcWcSbLDmKqNJ9VU5"
],
"script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAAAAAAAgAAAAFpAQAAAAdyZXF1ZXN0AAAAAQAAAARuYW1lBAAAAANrZXkFAAAABG5hbWUEAAAADHdhc1JlcXVlc3RlZAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAYHAwUAAAAMd2FzUmVxdWVzdGVkCQAAAgAAAAECAAAAJVRoZSBjZXJ0aWZpY2F0ZSB3YXMgYWxyZWFkeSByZXF1ZXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAA2tleQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAAB2FwcHJvdmUAAAABAAAABG5hbWUEAAAAA2tleQkABLAAAAABCQAB9wAAAAEJAAGbAAAAAQUAAAAEbmFtZQMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwkAAAIAAAABAgAAABdkQXBwIG93bmVyIGFsbG93ZWQgb25seQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAADa2V5AAAAAAAAAAABBQAAAANuaWwAAAAA2kzMZw==",
"chainId": 84,
"height": 774928,
"spentComplexity": 0
}
View: original | compacted
Prev: 3Q71AcxfcmvLCvw3rkHmsSR6YPa2xNBjdhHmueaE7Q3Y
Next: 5eTYrsBaUAjPKd9ty1TLZELE8bnjhFofgzkFz3VTR1AP
Diff:
Old | New | | Differences |
---|
22 | 22 | | @Callable(i) |
---|
23 | 23 | | func approve (name) = { |
---|
24 | 24 | | let key = toUtf8String(sha256(toBytes(name))) |
---|
25 | | - | if (!(isDefined(getIntegerValue(this, key)))) |
---|
26 | | - | then throw("The certificate was not requested") |
---|
| 25 | + | if ((i.caller != this)) |
---|
| 26 | + | then throw("dApp owner allowed only") |
---|
27 | 27 | | else WriteSet([DataEntry(key, 1)]) |
---|
28 | 28 | | } |
---|
29 | 29 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func request (name) = { |
---|
8 | 8 | | let key = name |
---|
9 | 9 | | let wasRequested = match getInteger(this, key) { |
---|
10 | 10 | | case a: Int => |
---|
11 | 11 | | true |
---|
12 | 12 | | case _ => |
---|
13 | 13 | | false |
---|
14 | 14 | | } |
---|
15 | 15 | | if (wasRequested) |
---|
16 | 16 | | then throw("The certificate was already requested") |
---|
17 | 17 | | else WriteSet([DataEntry(key, 0)]) |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(i) |
---|
23 | 23 | | func approve (name) = { |
---|
24 | 24 | | let key = toUtf8String(sha256(toBytes(name))) |
---|
25 | | - | if (!(isDefined(getIntegerValue(this, key)))) |
---|
26 | | - | then throw("The certificate was not requested") |
---|
| 25 | + | if ((i.caller != this)) |
---|
| 26 | + | then throw("dApp owner allowed only") |
---|
27 | 27 | | else WriteSet([DataEntry(key, 1)]) |
---|
28 | 28 | | } |
---|
29 | 29 | | |
---|
30 | 30 | | |
---|