tx · BwtNn43nLxo8Qgtn6Y7QYARb5SvyiNYHtHBN3jCD5q59

3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL:  -0.01400000 Waves

2020.01.31 12:00 [878311] smart account 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL > SELF 0.00000000 Waves

{ "type": 13, "id": "BwtNn43nLxo8Qgtn6Y7QYARb5SvyiNYHtHBN3jCD5q59", "fee": 1400000, "feeAssetId": null, "timestamp": 1580461242703, "version": 1, "sender": "3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL", "senderPublicKey": "f1NbgbpkRpbigsrHaDkWZAkPgcqd8GM5G5eNmqnTD6z", "proofs": [ "3nSw7BGtNNBhawpFjWanRgBFdhT7NVFGifLWQwACSYzE15MiWmH3agCG8dFLvpvAY96eh6bnA3jjmAs7kSj9vAqM" ], "script": "base64:AAIDAAAAAAAAAA8IARIFCgMICAgSBAoCCAgAAAAGAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAAAO5rKAAAAAAARiYW5rAgAAACMzTXpZTGtRNnFDd3RieGFZUTJ5azFrZFV1ZHpiTmc0SmlURwEAAAAMY291bnRQYXJ0aWVzAAAAAgAAAAthY2N1bXVsYXRvcgAAAARhZGRyAwkAAAAAAAACCQABMQAAAAEFAAAABGFkZHIAAAAAAAAAACMJAABkAAAAAgUAAAALYWNjdW11bGF0b3IAAAAAAAAAAAEJAABkAAAAAgUAAAALYWNjdW11bGF0b3IAAAAAAAAAAAABAAAADmdldFZhbHVlU3RyaW5nAAAAAQAAAARqc29uCQABLwAAAAIJAAEwAAAAAgUAAAAEanNvbgAAAAAAAAAAAQkBAAAABXZhbHVlAAAAAQkABLMAAAACCQABMAAAAAIFAAAABGpzb24AAAAAAAAAAAECAAAAASIBAAAACGdldFZhbHVlAAAAAgAAAARqc29uAAAAA2tleQQAAAAIa2V5SW5kZXg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AACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABnNpZ25lcgIAAAAEX01BXwkAAlgAAAABBQAAAAJpZAIAAAAGU0lHTkVEBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAARiYW5rBQAAAAZhbW91bnQFAAAADWFjY2VwdGVkVG9rZW4FAAAAA25pbAAAAADhZHW0", "chainId": 84, "height": 878311, "spentComplexity": 0 } View: original | compacted Prev: 3sR8iQMM7K8rw9W1bhMEUjgCNFhaHwseTPiBTtRQnuHr Next: 6NZgQj1w47GjxNBB8NuCDG4XDCj6RqxHVDriZQavcGhT Diff:
OldNewDifferences
77
88 let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG"
99
10-func countParties (accumulator,addr) = if (if ((size(addr) == 35))
11- then (take(addr, 2) == "3N")
12- else false)
10+func countParties (accumulator,addr) = if ((size(addr) == 35))
1311 then (accumulator + 1)
1412 else (accumulator + 0)
1513
3836 let address6 = getValue(addresses, "address6")
3937 let addressesArray = [address1, address2, address3, address4, address5, address6]
4038 let totalAddresses = {
41- let $list15171557 = addressesArray
42- let $size15171557 = size($list15171557)
43- let $acc015171557 = 0
44- if (($size15171557 == 0))
45- then $acc015171557
39+ let $list14931533 = addressesArray
40+ let $size14931533 = size($list14931533)
41+ let $acc014931533 = 0
42+ if (($size14931533 == 0))
43+ then $acc014931533
4644 else {
47- let $acc115171557 = countParties($acc015171557, $list15171557[0])
48- if (($size15171557 == 1))
49- then $acc115171557
45+ let $acc114931533 = countParties($acc014931533, $list14931533[0])
46+ if (($size14931533 == 1))
47+ then $acc114931533
5048 else {
51- let $acc215171557 = countParties($acc115171557, $list15171557[1])
52- if (($size15171557 == 2))
53- then $acc215171557
49+ let $acc214931533 = countParties($acc114931533, $list14931533[1])
50+ if (($size14931533 == 2))
51+ then $acc214931533
5452 else {
55- let $acc315171557 = countParties($acc215171557, $list15171557[2])
56- if (($size15171557 == 3))
57- then $acc315171557
53+ let $acc314931533 = countParties($acc214931533, $list14931533[2])
54+ if (($size14931533 == 3))
55+ then $acc314931533
5856 else {
59- let $acc415171557 = countParties($acc315171557, $list15171557[3])
60- if (($size15171557 == 4))
61- then $acc415171557
57+ let $acc414931533 = countParties($acc314931533, $list14931533[3])
58+ if (($size14931533 == 4))
59+ then $acc414931533
6260 else {
63- let $acc515171557 = countParties($acc415171557, $list15171557[4])
64- if (($size15171557 == 5))
65- then $acc515171557
61+ let $acc514931533 = countParties($acc414931533, $list14931533[4])
62+ if (($size14931533 == 5))
63+ then $acc514931533
6664 else {
67- let $acc615171557 = countParties($acc515171557, $list15171557[5])
68- if (($size15171557 == 6))
69- then $acc615171557
65+ let $acc614931533 = countParties($acc514931533, $list14931533[5])
66+ if (($size14931533 == 6))
67+ then $acc614931533
7068 else {
71- let $acc715171557 = countParties($acc615171557, $list15171557[6])
69+ let $acc714931533 = countParties($acc614931533, $list14931533[6])
7270 throw("List size exceed 6")
7371 }
7472 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
55
66 let currentPrice = 250000000
77
88 let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG"
99
10-func countParties (accumulator,addr) = if (if ((size(addr) == 35))
11- then (take(addr, 2) == "3N")
12- else false)
10+func countParties (accumulator,addr) = if ((size(addr) == 35))
1311 then (accumulator + 1)
1412 else (accumulator + 0)
1513
1614
1715 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
1816
1917
2018 func getValue (json,key) = {
2119 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
2220 let data = drop(json, ((keyIndex + size(key)) + 3))
2321 let jsonValue = getValueString(data)
2422 jsonValue
2523 }
2624
2725
2826 @Callable(invoke)
2927 func createAgreement (hash,title,addresses) = {
3028 let payment = extract(invoke.payment)
3129 let amount = extract(payment.amount)
3230 let id = extract(invoke.transactionId)
3331 let address1 = getValue(addresses, "address1")
3432 let address2 = getValue(addresses, "address2")
3533 let address3 = getValue(addresses, "address3")
3634 let address4 = getValue(addresses, "address4")
3735 let address5 = getValue(addresses, "address5")
3836 let address6 = getValue(addresses, "address6")
3937 let addressesArray = [address1, address2, address3, address4, address5, address6]
4038 let totalAddresses = {
41- let $list15171557 = addressesArray
42- let $size15171557 = size($list15171557)
43- let $acc015171557 = 0
44- if (($size15171557 == 0))
45- then $acc015171557
39+ let $list14931533 = addressesArray
40+ let $size14931533 = size($list14931533)
41+ let $acc014931533 = 0
42+ if (($size14931533 == 0))
43+ then $acc014931533
4644 else {
47- let $acc115171557 = countParties($acc015171557, $list15171557[0])
48- if (($size15171557 == 1))
49- then $acc115171557
45+ let $acc114931533 = countParties($acc014931533, $list14931533[0])
46+ if (($size14931533 == 1))
47+ then $acc114931533
5048 else {
51- let $acc215171557 = countParties($acc115171557, $list15171557[1])
52- if (($size15171557 == 2))
53- then $acc215171557
49+ let $acc214931533 = countParties($acc114931533, $list14931533[1])
50+ if (($size14931533 == 2))
51+ then $acc214931533
5452 else {
55- let $acc315171557 = countParties($acc215171557, $list15171557[2])
56- if (($size15171557 == 3))
57- then $acc315171557
53+ let $acc314931533 = countParties($acc214931533, $list14931533[2])
54+ if (($size14931533 == 3))
55+ then $acc314931533
5856 else {
59- let $acc415171557 = countParties($acc315171557, $list15171557[3])
60- if (($size15171557 == 4))
61- then $acc415171557
57+ let $acc414931533 = countParties($acc314931533, $list14931533[3])
58+ if (($size14931533 == 4))
59+ then $acc414931533
6260 else {
63- let $acc515171557 = countParties($acc415171557, $list15171557[4])
64- if (($size15171557 == 5))
65- then $acc515171557
61+ let $acc514931533 = countParties($acc414931533, $list14931533[4])
62+ if (($size14931533 == 5))
63+ then $acc514931533
6664 else {
67- let $acc615171557 = countParties($acc515171557, $list15171557[5])
68- if (($size15171557 == 6))
69- then $acc615171557
65+ let $acc614931533 = countParties($acc514931533, $list14931533[5])
66+ if (($size14931533 == 6))
67+ then $acc614931533
7068 else {
71- let $acc715171557 = countParties($acc615171557, $list15171557[6])
69+ let $acc714931533 = countParties($acc614931533, $list14931533[6])
7270 throw("List size exceed 6")
7371 }
7472 }
7573 }
7674 }
7775 }
7876 }
7977 }
8078 }
8179 let agreementDataObject = (((((((((((((((((("{id: '" + toBase58String(id)) + "', title: '") + title) + "' hash: '") + hash) + "', address1: '") + addressesArray[0]) + "', address2: '") + addressesArray[1]) + "', address3: '") + addressesArray[2]) + "', address4: '") + addressesArray[3]) + "', address5: '") + addressesArray[4]) + "', address6: '") + addressesArray[5]) + "'}")
8280 let paymentAssetId = if (isDefined(payment.assetId))
8381 then extract(payment.assetId)
8482 else throw("Waves is not accepted as payment")
8583 if ((paymentAssetId != acceptedToken))
8684 then throw("Only payments in SIGN are allowed at the moment")
8785 else if (((currentPrice * totalAddresses) > amount))
8886 then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
8987 else if ((totalAddresses == 6))
9088 then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[5]), 0, acceptedToken)]))
9189 else if ((totalAddresses == 5))
9290 then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken)]))
9391 else if ((totalAddresses == 4))
9492 then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken)]))
9593 else if ((totalAddresses == 3))
9694 then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]))
9795 else if ((totalAddresses == 2))
9896 then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]))
9997 else throw(("Needs 2 to 6 parties addresses" + toString(totalAddresses)))
10098 }
10199
102100
103101
104102 @Callable(invoke)
105103 func signAgreement (hash,agreementId) = {
106104 let payment = extract(invoke.payment)
107105 let amount = extract(payment.amount)
108106 let id = extract(invoke.transactionId)
109107 let signer = toBase58String(invoke.caller.bytes)
110108 let signingRequestExist = match getString(this, ((signer + "_MA_") + toBase58String(id))) {
111109 case s: String =>
112110 s
113111 case _ =>
114112 throw("There is no corresponding signing request")
115113 }
116114 let paymentAssetId = if (isDefined(payment.assetId))
117115 then extract(payment.assetId)
118116 else throw("Waves is not accepted as payment")
119117 if ((paymentAssetId != acceptedToken))
120118 then throw("Only payments in SIGN are allowed at the moment")
121119 else if ((amount != currentPrice))
122120 then throw("The price is wrong")
123121 else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + toBase58String(id)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)]))
124122 }
125123
126124

github/deemru/w8io/169f3d6 
55.33 ms