tx · 3sR8iQMM7K8rw9W1bhMEUjgCNFhaHwseTPiBTtRQnuHr

3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL:  -0.01400000 Waves

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

{ "type": 13, "id": "3sR8iQMM7K8rw9W1bhMEUjgCNFhaHwseTPiBTtRQnuHr", "fee": 1400000, "feeAssetId": null, "timestamp": 1580461219614, "version": 1, "sender": "3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL", "senderPublicKey": "f1NbgbpkRpbigsrHaDkWZAkPgcqd8GM5G5eNmqnTD6z", "proofs": [ "5gVABDHc82W1HqWuc2QDj7FGvgwqjo11hfC1dZvqk4dJAiY9PuFJzTaMaxD3TMU4gKChojoqvJZvsoZy3ckMwQ38" ], "script": "base64:AAIDAAAAAAAAAA8IARIFCgMICAgSBAoCCAgAAAAGAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAAAO5rKAAAAAAARiYW5rAgAAACMzTXpZTGtRNnFDd3RieGFZUTJ5azFrZFV1ZHpiTmc0SmlURwEAAAAMY291bnRQYXJ0aWVzAAAAAgAAAAthY2N1bXVsYXRvcgAAAARhZGRyAwMJAAAAAAAAAgkAATEAAAABBQAAAARhZGRyAAAAAAAAAAAjCQAAAAAAAAIJAAEvAAAAAgUAAAAEYWRkcgAAAAAAAAAAAgIAAAACM04HCQAAZAAAAAIFAAAAC2FjY3VtdWxhdG9yAAAAAAAAAAABCQAAZAAAAAIFAAAAC2FjY3VtdWxhdG9yAAAAAAAAAAAAAQAAAA5nZXRWYWx1ZVN0cmluZwAAAAEAAAAEanNvbgkAAS8AAAACCQABMAAAAAIFAAAABGpzb24AAAAAAAAAAAEJAQAAAAV2YWx1ZQAAAAEJAASzAAAAAgkAATAAAAACBQAAAARqc29uAAAAA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AAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZzaWduZXICAAAABF9NQV8JAAJYAAAAAQUAAAACaWQCAAAABlNJR05FRAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAEYmFuawUAAAAGYW1vdW50BQAAAA1hY2NlcHRlZFRva2VuBQAAAANuaWwAAAAAA86W5A==", "chainId": 84, "height": 878310, "spentComplexity": 0 } View: original | compacted Prev: Mjpu4pTHLnNZizpN82eEAj1SfJ1QxwcirH3NDbJTzag Next: BwtNn43nLxo8Qgtn6Y7QYARb5SvyiNYHtHBN3jCD5q59 Diff:
OldNewDifferences
77
88 let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG"
99
10-func isAdress (addr) = if ((size(addr) == 35))
10+func countParties (accumulator,addr) = if (if ((size(addr) == 35))
1111 then (take(addr, 2) == "3N")
12- else false
13-
14-
15-func countParties (accumulator,addr) = if ((size(addr) > 0))
12+ else false)
1613 then (accumulator + 1)
1714 else (accumulator + 0)
1815
4138 let address6 = getValue(addresses, "address6")
4239 let addressesArray = [address1, address2, address3, address4, address5, address6]
4340 let totalAddresses = {
44- let $list15861626 = addressesArray
45- let $size15861626 = size($list15861626)
46- let $acc015861626 = 0
47- if (($size15861626 == 0))
48- then $acc015861626
41+ let $list15171557 = addressesArray
42+ let $size15171557 = size($list15171557)
43+ let $acc015171557 = 0
44+ if (($size15171557 == 0))
45+ then $acc015171557
4946 else {
50- let $acc115861626 = countParties($acc015861626, $list15861626[0])
51- if (($size15861626 == 1))
52- then $acc115861626
47+ let $acc115171557 = countParties($acc015171557, $list15171557[0])
48+ if (($size15171557 == 1))
49+ then $acc115171557
5350 else {
54- let $acc215861626 = countParties($acc115861626, $list15861626[1])
55- if (($size15861626 == 2))
56- then $acc215861626
51+ let $acc215171557 = countParties($acc115171557, $list15171557[1])
52+ if (($size15171557 == 2))
53+ then $acc215171557
5754 else {
58- let $acc315861626 = countParties($acc215861626, $list15861626[2])
59- if (($size15861626 == 3))
60- then $acc315861626
55+ let $acc315171557 = countParties($acc215171557, $list15171557[2])
56+ if (($size15171557 == 3))
57+ then $acc315171557
6158 else {
62- let $acc415861626 = countParties($acc315861626, $list15861626[3])
63- if (($size15861626 == 4))
64- then $acc415861626
59+ let $acc415171557 = countParties($acc315171557, $list15171557[3])
60+ if (($size15171557 == 4))
61+ then $acc415171557
6562 else {
66- let $acc515861626 = countParties($acc415861626, $list15861626[4])
67- if (($size15861626 == 5))
68- then $acc515861626
63+ let $acc515171557 = countParties($acc415171557, $list15171557[4])
64+ if (($size15171557 == 5))
65+ then $acc515171557
6966 else {
70- let $acc615861626 = countParties($acc515861626, $list15861626[5])
71- if (($size15861626 == 6))
72- then $acc615861626
67+ let $acc615171557 = countParties($acc515171557, $list15171557[5])
68+ if (($size15171557 == 6))
69+ then $acc615171557
7370 else {
74- let $acc715861626 = countParties($acc615861626, $list15861626[6])
71+ let $acc715171557 = countParties($acc615171557, $list15171557[6])
7572 throw("List size exceed 6")
7673 }
7774 }
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 isAdress (addr) = if ((size(addr) == 35))
10+func countParties (accumulator,addr) = if (if ((size(addr) == 35))
1111 then (take(addr, 2) == "3N")
12- else false
13-
14-
15-func countParties (accumulator,addr) = if ((size(addr) > 0))
12+ else false)
1613 then (accumulator + 1)
1714 else (accumulator + 0)
1815
1916
2017 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
2118
2219
2320 func getValue (json,key) = {
2421 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
2522 let data = drop(json, ((keyIndex + size(key)) + 3))
2623 let jsonValue = getValueString(data)
2724 jsonValue
2825 }
2926
3027
3128 @Callable(invoke)
3229 func createAgreement (hash,title,addresses) = {
3330 let payment = extract(invoke.payment)
3431 let amount = extract(payment.amount)
3532 let id = extract(invoke.transactionId)
3633 let address1 = getValue(addresses, "address1")
3734 let address2 = getValue(addresses, "address2")
3835 let address3 = getValue(addresses, "address3")
3936 let address4 = getValue(addresses, "address4")
4037 let address5 = getValue(addresses, "address5")
4138 let address6 = getValue(addresses, "address6")
4239 let addressesArray = [address1, address2, address3, address4, address5, address6]
4340 let totalAddresses = {
44- let $list15861626 = addressesArray
45- let $size15861626 = size($list15861626)
46- let $acc015861626 = 0
47- if (($size15861626 == 0))
48- then $acc015861626
41+ let $list15171557 = addressesArray
42+ let $size15171557 = size($list15171557)
43+ let $acc015171557 = 0
44+ if (($size15171557 == 0))
45+ then $acc015171557
4946 else {
50- let $acc115861626 = countParties($acc015861626, $list15861626[0])
51- if (($size15861626 == 1))
52- then $acc115861626
47+ let $acc115171557 = countParties($acc015171557, $list15171557[0])
48+ if (($size15171557 == 1))
49+ then $acc115171557
5350 else {
54- let $acc215861626 = countParties($acc115861626, $list15861626[1])
55- if (($size15861626 == 2))
56- then $acc215861626
51+ let $acc215171557 = countParties($acc115171557, $list15171557[1])
52+ if (($size15171557 == 2))
53+ then $acc215171557
5754 else {
58- let $acc315861626 = countParties($acc215861626, $list15861626[2])
59- if (($size15861626 == 3))
60- then $acc315861626
55+ let $acc315171557 = countParties($acc215171557, $list15171557[2])
56+ if (($size15171557 == 3))
57+ then $acc315171557
6158 else {
62- let $acc415861626 = countParties($acc315861626, $list15861626[3])
63- if (($size15861626 == 4))
64- then $acc415861626
59+ let $acc415171557 = countParties($acc315171557, $list15171557[3])
60+ if (($size15171557 == 4))
61+ then $acc415171557
6562 else {
66- let $acc515861626 = countParties($acc415861626, $list15861626[4])
67- if (($size15861626 == 5))
68- then $acc515861626
63+ let $acc515171557 = countParties($acc415171557, $list15171557[4])
64+ if (($size15171557 == 5))
65+ then $acc515171557
6966 else {
70- let $acc615861626 = countParties($acc515861626, $list15861626[5])
71- if (($size15861626 == 6))
72- then $acc615861626
67+ let $acc615171557 = countParties($acc515171557, $list15171557[5])
68+ if (($size15171557 == 6))
69+ then $acc615171557
7370 else {
74- let $acc715861626 = countParties($acc615861626, $list15861626[6])
71+ let $acc715171557 = countParties($acc615171557, $list15171557[6])
7572 throw("List size exceed 6")
7673 }
7774 }
7875 }
7976 }
8077 }
8178 }
8279 }
8380 }
8481 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]) + "'}")
8582 let paymentAssetId = if (isDefined(payment.assetId))
8683 then extract(payment.assetId)
8784 else throw("Waves is not accepted as payment")
8885 if ((paymentAssetId != acceptedToken))
8986 then throw("Only payments in SIGN are allowed at the moment")
9087 else if (((currentPrice * totalAddresses) > amount))
9188 then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
9289 else if ((totalAddresses == 6))
9390 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)]))
9491 else if ((totalAddresses == 5))
9592 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)]))
9693 else if ((totalAddresses == 4))
9794 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)]))
9895 else if ((totalAddresses == 3))
9996 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)]))
10097 else if ((totalAddresses == 2))
10198 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)]))
10299 else throw(("Needs 2 to 6 parties addresses" + toString(totalAddresses)))
103100 }
104101
105102
106103
107104 @Callable(invoke)
108105 func signAgreement (hash,agreementId) = {
109106 let payment = extract(invoke.payment)
110107 let amount = extract(payment.amount)
111108 let id = extract(invoke.transactionId)
112109 let signer = toBase58String(invoke.caller.bytes)
113110 let signingRequestExist = match getString(this, ((signer + "_MA_") + toBase58String(id))) {
114111 case s: String =>
115112 s
116113 case _ =>
117114 throw("There is no corresponding signing request")
118115 }
119116 let paymentAssetId = if (isDefined(payment.assetId))
120117 then extract(payment.assetId)
121118 else throw("Waves is not accepted as payment")
122119 if ((paymentAssetId != acceptedToken))
123120 then throw("Only payments in SIGN are allowed at the moment")
124121 else if ((amount != currentPrice))
125122 then throw("The price is wrong")
126123 else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + toBase58String(id)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)]))
127124 }
128125
129126

github/deemru/w8io/169f3d6 
61.41 ms