tx · peBmeVniwLN5sM8pg4iMPqs87GrdRhiTqR42KoMeTfX

3N9HxpGzNtqg7cnyi3YKqNWn3Pg455qhC1v:  -0.01400000 Waves

2019.10.12 11:32 [716436] smart account 3N9HxpGzNtqg7cnyi3YKqNWn3Pg455qhC1v > SELF 0.00000000 Waves

{ "type": 13, "id": "peBmeVniwLN5sM8pg4iMPqs87GrdRhiTqR42KoMeTfX", "fee": 1400000, "feeAssetId": null, "timestamp": 1570865446367, "version": 1, "sender": "3N9HxpGzNtqg7cnyi3YKqNWn3Pg455qhC1v", "senderPublicKey": "BCJkAYn3SnMBve19dS2bsMJvfp9rHcLgFYtZRJJqLVxh", "proofs": [ "29EajiRB3nVJANvqdXDKZPYjcsdPX31RbZLGV9vNgk6naXb4AjUSaYWRDaTRSrHBpRM1TEsgrmjnF6htosbG8cfu" ], "script": "base64:AAIDAAAAAAAAABUIARIFCgMIAQgSBAoCCAgSBAoCCAgAAAAUAAAAAAROT05FAgAAAARub25lAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAABERBUFACAAAAAAAAAAAKTElTVElOR0ZFRQkAAGgAAAACAAAAAAAAAAABAAAAAAAF9eEAAAAAAAVXSEFMRQIAAAAFd2hhbGUAAAAAC1dISVRFTElTVEVEAgAAAApyZWdpc3RlcmVkAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEAAAAEaXRlbQkAASwAAAACAgAAAAlkYXRhanNvbl8FAAAABGl0ZW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2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RhdGUAAAACAAAABGl0ZW0AAAAEZGF0YQQAAAAHYWNjb3VudAkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAAAiE9AAAAAgkBAAAAEmdldFZhbHVlSXRlbUF1dGhvcgAAAAEFAAAABGl0ZW0FAAAAB2FjY291bnQJAAACAAAAAQIAAAARWW91J3JlIG5vdCBhdXRob3IJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEFAAAABGl0ZW0FAAAABGRhdGEFAAAAA25pbAAAAAAb/0Da", "chainId": 84, "height": 716436, "spentComplexity": 0 } View: original | compacted Prev: 5xhCx2LV7jTSBH7pPmABpnstVNhHiBrvnsoWQgX7Xfe6 Next: FPfEfdxu3Ns9RiAcPUVDPUAFEgsKgif3uGqBb4BSy7bh Diff:
OldNewDifferences
9797 }
9898
9999
100+
101+@Callable(i)
102+func taskUpdate (item,data) = {
103+ let account = toBase58String(i.caller.bytes)
104+ if ((getValueItemAuthor(item) != account))
105+ then throw("You're not author")
106+ else WriteSet([DataEntry(getKeyItemData(item), data)])
107+ }
108+
109+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let FEATURED = "featured"
77
88 let DAPP = ""
99
1010 let LISTINGFEE = (1 * 100000000)
1111
1212 let WHALE = "whale"
1313
1414 let WHITELISTED = "registered"
1515
1616 func getKeyItemData (item) = ("datajson_" + item)
1717
1818
1919 func getStrByKey (key) = {
2020 let str = match getString(this, key) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 NONE
2525 }
2626 str
2727 }
2828
2929
3030 func getNumberByKey (key) = {
3131 let num = match getInteger(this, key) {
3232 case a: Int =>
3333 a
3434 case _ =>
3535 0
3636 }
3737 num
3838 }
3939
4040
4141 func getKeyItemAuthor (item) = ("author_" + item)
4242
4343
4444 func getValueItemAuthor (item) = getStrByKey(getKeyItemAuthor(item))
4545
4646
4747 func getKeyItemBlock (item) = ("block_" + item)
4848
4949
5050 func getKeyItemBank (item) = ("bank_" + item)
5151
5252
5353 func getKeyItemStatus (item) = ("status_" + item)
5454
5555
5656 func getKeyItemExpiration (item) = ("expiration_block_" + item)
5757
5858
5959 func getKeyWhitelistBio (account) = ("d1_bio_" + account)
6060
6161
6262 func getKeyWhitelistStatus (account) = ("d1_sts_" + account)
6363
6464
6565 func getValueWhitelistStatus (account) = getStrByKey(getKeyWhitelistStatus(account))
6666
6767
6868 func getKeyWhitelistBlock (account) = ("d1_blk_" + account)
6969
7070
7171 func getValueWhitelistBio (account) = getStrByKey(getKeyWhitelistBio(account))
7272
7373
7474 @Callable(i)
7575 func createTask (item,expiration,data) = {
7676 let account = toBase58String(i.caller.bytes)
7777 let pmt = extract(i.payment)
7878 if (isDefined(pmt.assetId))
7979 then throw("can use waves only at the moment")
8080 else if ((pmt.amount != LISTINGFEE))
8181 then throw(((("Please pay exact amount for the listing: " + toString(LISTINGFEE)) + ", actual payment is: ") + toString(pmt.amount)))
8282 else if ((getValueItemAuthor(item) != NONE))
8383 then throw("Task already exist")
8484 else WriteSet([DataEntry(getKeyItemAuthor(item), account), DataEntry(getKeyItemBlock(item), height), DataEntry(getKeyItemExpiration(item), (height + expiration)), DataEntry(getKeyItemBank(item), LISTINGFEE), DataEntry(getKeyItemStatus(item), FEATURED), DataEntry(getKeyItemData(item), data)])
8585 }
8686
8787
8888
8989 @Callable(i)
9090 func signUp (data,type) = {
9191 let account = toBase58String(i.caller.bytes)
9292 if ((getValueWhitelistBio(account) == NONE))
9393 then WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistBlock(account), height), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE))
9494 then WHALE
9595 else WHITELISTED)])
9696 else throw("User already exist")
9797 }
9898
9999
100+
101+@Callable(i)
102+func taskUpdate (item,data) = {
103+ let account = toBase58String(i.caller.bytes)
104+ if ((getValueItemAuthor(item) != account))
105+ then throw("You're not author")
106+ else WriteSet([DataEntry(getKeyItemData(item), data)])
107+ }
108+
109+

github/deemru/w8io/026f985 
94.89 ms