tx · FaBe7QTB4uoDnzyv72TFsmdBzbFq1KTbbSnVDec1Jrmn

3NAjrUCA7omNC3y1cXqDzVPzLo3jZzmnoFv:  -0.02400000 Waves

2020.12.13 13:24 [1306782] smart account 3NAjrUCA7omNC3y1cXqDzVPzLo3jZzmnoFv > SELF 0.00000000 Waves

{ "type": 13, "id": "FaBe7QTB4uoDnzyv72TFsmdBzbFq1KTbbSnVDec1Jrmn", "fee": 2400000, "feeAssetId": null, "timestamp": 1607855084433, "version": 2, "chainId": 84, "sender": "3NAjrUCA7omNC3y1cXqDzVPzLo3jZzmnoFv", "senderPublicKey": "EaamFvaPraibaDDDU4ecgVgQtFAtaUTei3QszfF91cNd", "proofs": [ "DN3uQSDLMtCfK4weLteATUqQk2CBHySPiTKCvrRXQNs2t2cQcceAKAybpujhM1GzjeUoubrXjfJCgXKJz61RWna" ], "script": "base64:AAIEAAAAAAAAABIIAhIECgIICBIDCgEIEgMKAQgAAAAJAAAAAAthZG1pblB1YktleQIAAAAjM05BanJVQ0E3b21OQzN5MWNYcUR6VlB6TG8zalp6bW5vRnYBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAHYWRkcmVzcwUAAAADa2V5AAAAAAAAAAAAAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAB2FkZHJlc3MFAAAAA2tleQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACCQEAAAARQGV4dHJOYXRpdm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tTdHJpbmdFbnRyeQAAAAIJAQAAABdnZXRLZXlDdXN0b21lclJlcXVpc2l0cwAAAAEFAAAACWNhbGxlclN0cgUAAAAKcmVxdWlzaXRlcwUAAAADbmlsAAAAAWkBAAAAFmFkZEVhcmx5UGF5bWVudFJlcXVlc3QAAAABAAAAD2N1c3RvbWVyQWRkcmVzcwQAAAAJY2FsbGVyU3RyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAF2dldEtleUN1c3RvbWVyUmVxdWlzaXRzAAAAAQUAAAAJY2FsbGVyU3RyBQAAAA9jdXN0b21lckFkZHJlc3MFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Soncdg==", "height": 1306782, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 77gkGz9eQby4KK1HmidgJZ3ufZtU11zHxLa4pBAGwQym Next: 2fgkyEG9RbzKSHkXs7wUdhXhGZiW3s2ovViX6TExN5Ao Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getNumberByKey (key) = {
5- let num = match getInteger(this, key) {
6- case a: Int =>
7- a
8- case _ =>
9- 0
10- }
11- num
12- }
4+let adminPubKey = "3NAjrUCA7omNC3y1cXqDzVPzLo3jZzmnoFv"
5+
6+func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
137
148
15-let NONE = "none"
9+func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
1610
17-func getStrByKey (key) = {
18- let str = match getString(this, key) {
19- case a: String =>
20- a
21- case _ =>
22- NONE
23- }
24- str
25- }
11+
12+func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false)
13+
14+
15+func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
16+
17+
18+func getStringByKey (key) = valueOrElse(getString(this, key), "")
19+
20+
21+func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
2622
2723
2824 func getKeyCustomerName (key) = (key + "_customerName")
3127 func getKeyCustomerRequisits (key) = (key + "_customerReq")
3228
3329
34-func getValueCustomerName (address) = getStrByKey(getKeyCustomerName(address))
30+@Callable(i)
31+func addCustomer (name,requisites) = {
32+ let callerStr = toBase58String(i.caller.bytes)
33+[StringEntry(getKeyCustomerName(callerStr), name), StringEntry(getKeyCustomerRequisits(callerStr), requisites)]
34+ }
35+
3536
3637
3738 @Callable(i)
38-func addCustomerName (name) = {
39+func updateRequisites (requisites) = {
3940 let callerStr = toBase58String(i.caller.bytes)
40-[StringEntry(getKeyCustomerName(callerStr), name)]
41+[StringEntry(getKeyCustomerRequisits(callerStr), requisites)]
42+ }
43+
44+
45+
46+@Callable(i)
47+func addEarlyPaymentRequest (customerAddress) = {
48+ let callerStr = toBase58String(i.caller.bytes)
49+[StringEntry(getKeyCustomerRequisits(callerStr), customerAddress)]
4150 }
4251
4352
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getNumberByKey (key) = {
5- let num = match getInteger(this, key) {
6- case a: Int =>
7- a
8- case _ =>
9- 0
10- }
11- num
12- }
4+let adminPubKey = "3NAjrUCA7omNC3y1cXqDzVPzLo3jZzmnoFv"
5+
6+func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
137
148
15-let NONE = "none"
9+func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
1610
17-func getStrByKey (key) = {
18- let str = match getString(this, key) {
19- case a: String =>
20- a
21- case _ =>
22- NONE
23- }
24- str
25- }
11+
12+func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false)
13+
14+
15+func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
16+
17+
18+func getStringByKey (key) = valueOrElse(getString(this, key), "")
19+
20+
21+func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
2622
2723
2824 func getKeyCustomerName (key) = (key + "_customerName")
2925
3026
3127 func getKeyCustomerRequisits (key) = (key + "_customerReq")
3228
3329
34-func getValueCustomerName (address) = getStrByKey(getKeyCustomerName(address))
30+@Callable(i)
31+func addCustomer (name,requisites) = {
32+ let callerStr = toBase58String(i.caller.bytes)
33+[StringEntry(getKeyCustomerName(callerStr), name), StringEntry(getKeyCustomerRequisits(callerStr), requisites)]
34+ }
35+
3536
3637
3738 @Callable(i)
38-func addCustomerName (name) = {
39+func updateRequisites (requisites) = {
3940 let callerStr = toBase58String(i.caller.bytes)
40-[StringEntry(getKeyCustomerName(callerStr), name)]
41+[StringEntry(getKeyCustomerRequisits(callerStr), requisites)]
42+ }
43+
44+
45+
46+@Callable(i)
47+func addEarlyPaymentRequest (customerAddress) = {
48+ let callerStr = toBase58String(i.caller.bytes)
49+[StringEntry(getKeyCustomerRequisits(callerStr), customerAddress)]
4150 }
4251
4352
4453 @Verifier(tx)
4554 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4655

github/deemru/w8io/026f985 
38.26 ms