tx · 3Q71AcxfcmvLCvw3rkHmsSR6YPa2xNBjdhHmueaE7Q3Y
3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u: -0.01400000 Waves
2019.11.21 15:08 [774925] smart account 3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u > SELF 0.00000000 Waves
{
"type": 13,
"id": "3Q71AcxfcmvLCvw3rkHmsSR6YPa2xNBjdhHmueaE7Q3Y",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1574338061741,
"version": 1,
"sender": "3MtCvj6PXRMffirQTPHjBL5u7fhoUrn7q3u",
"senderPublicKey": "3U1CEsDmMXyPp5z1NXtQE4HZiK5JYASFDu1gudjREyM4",
"proofs": [
"3A6Cmp5GAWN28T7omSfgopjitxtJuLNtPB3eo13LULwC2wKh5Da8qetgbBoF8iaSekxpQjD3M4bSMGYRKvCgjRPG"
],
"script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAAAAAAAgAAAAFpAQAAAAdyZXF1ZXN0AAAAAQAAAARuYW1lBAAAAANrZXkFAAAABG5hbWUEAAAADHdhc1JlcXVlc3RlZAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAYHAwUAAAAMd2FzUmVxdWVzdGVkCQAAAgAAAAECAAAAJVRoZSBjZXJ0aWZpY2F0ZSB3YXMgYWxyZWFkeSByZXF1ZXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAA2tleQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAAB2FwcHJvdmUAAAABAAAABG5hbWUEAAAAA2tleQkABLAAAAABCQAB9wAAAAEJAAGbAAAAAQUAAAAEbmFtZQMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMFAAAAA2tleQkAAAIAAAABAgAAACFUaGUgY2VydGlmaWNhdGUgd2FzIG5vdCByZXF1ZXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAA2tleQAAAAAAAAAAAQUAAAADbmlsAAAAAAXa9Mk=",
"chainId": 84,
"height": 774925,
"spentComplexity": 0
}
View: original | compacted
Prev: Q5ExqesRRsEEgUmTvzktVTP2VLyMHh3AewWb897v72a
Next: 3G2BD8xNHqkUcb21RnbPEREomBjpSYfBCWo467k4Ch4A
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func request (name) = { |
---|
8 | 8 | | let key = name |
---|
9 | | - | if (false) |
---|
| 9 | + | let wasRequested = match getInteger(this, key) { |
---|
| 10 | + | case a: Int => |
---|
| 11 | + | true |
---|
| 12 | + | case _ => |
---|
| 13 | + | false |
---|
| 14 | + | } |
---|
| 15 | + | if (wasRequested) |
---|
10 | 16 | | then throw("The certificate was already requested") |
---|
11 | 17 | | else WriteSet([DataEntry(key, 0)]) |
---|
12 | 18 | | } |
---|
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 | | - | if (false) |
---|
| 9 | + | let wasRequested = match getInteger(this, key) { |
---|
| 10 | + | case a: Int => |
---|
| 11 | + | true |
---|
| 12 | + | case _ => |
---|
| 13 | + | false |
---|
| 14 | + | } |
---|
| 15 | + | if (wasRequested) |
---|
10 | 16 | | then throw("The certificate was already requested") |
---|
11 | 17 | | else WriteSet([DataEntry(key, 0)]) |
---|
12 | 18 | | } |
---|
13 | 19 | | |
---|
14 | 20 | | |
---|
15 | 21 | | |
---|
16 | 22 | | @Callable(i) |
---|
17 | 23 | | func approve (name) = { |
---|
18 | 24 | | let key = toUtf8String(sha256(toBytes(name))) |
---|
19 | 25 | | if (!(isDefined(getIntegerValue(this, key)))) |
---|
20 | 26 | | then throw("The certificate was not requested") |
---|
21 | 27 | | else WriteSet([DataEntry(key, 1)]) |
---|
22 | 28 | | } |
---|
23 | 29 | | |
---|
24 | 30 | | |
---|