tx · 7x9UKojSHUNaCMr7ogYLG8RaMfVCsfaAyaaPtfpr11qd

3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL:  -0.01400000 Waves

2020.01.31 11:45 [878294] smart account 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL > SELF 0.00000000 Waves

{ "type": 13, "id": "7x9UKojSHUNaCMr7ogYLG8RaMfVCsfaAyaaPtfpr11qd", "fee": 1400000, "feeAssetId": null, "timestamp": 1580460331967, "version": 1, "sender": "3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL", "senderPublicKey": "f1NbgbpkRpbigsrHaDkWZAkPgcqd8GM5G5eNmqnTD6z", "proofs": [ "2vfoszAFRihmEt7wF6ZonPpXkGAkRRoC4774mnaMayXdcA8KW49hiKdipXCGs1z98b4MsTuCLAfj7hoq8hRPXGdo" ], "script": "base64:AAIDAAAAAAAAAA8IARIFCgMICAgSBAoCCAgAAAAHAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAAAO5rKAAAAAAARiYW5rAgAAACMzTXpZTGtRNnFDd3RieGFZUTJ5azFrZFV1ZHpiTmc0SmlURwEAAAAIaXNBZHJlc3MAAAABAAAABGFkZHIDCQAAAAAAAAIJAAExAAAAAQUAAAAEYWRkcgAAAAAAAAAAIwkAAAAAAAACCQABLwAAAAIFAAAABGFkZHIAAAAAAAAAAAICAAAAAjNOBwEAAAAMY291bnRQYXJ0aWVzAAAAAgAAAAthY2N1bXVsYXRvcgAAAARhZGRyAwkBAAAACGlzQWRyZXNzAAAAAQUAAAAEYWRkcgkAAGQAAAACBQAAAAthY2N1bXVsYXRvcgAAAAAAAAAAAQkAAGQAAAACBQAAAAthY2N1bXVsYXRvcgAAAAAAAAAAAAEAAAAOZ2V0VmFsdWVTdHJpbmcAAAABAAAABGpzb24JAAEvAAAAAgkAATAAAAACBQAAAARqc29uAAAAAAAAA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BAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAARiYW5rBQAAAAZhbW91bnQFAAAADWFjY2VwdGVkVG9rZW4FAAAAA25pbAAAAAAkmHUx", "chainId": 84, "height": 878294, "spentComplexity": 0 } View: original | compacted Prev: 3X9EQJNFVy1EM1QVv4JjLL4pBRBSVckkknU5HyYs5DL1 Next: 91ZxfUu29HHB8svjmzJZkRsWrEqRvzuMTTEUSFERjZeS Diff:
OldNewDifferences
3434 let amount = extract(payment.amount)
3535 let id = extract(invoke.transactionId)
3636 let addressesArray = [getValue(addresses, "address1"), getValue(addresses, "address2"), getValue(addresses, "address3"), getValue(addresses, "address4"), getValue(addresses, "address5"), getValue(addresses, "address6")]
37- let combine = (addressesArray[0] + addressesArray[1])
38- if ((size(combine) > 0))
39- then throw(("hihi = " + combine))
40- else {
41- let totalAddresses = {
42- let $list14131453 = addressesArray
43- let $size14131453 = size($list14131453)
44- let $acc014131453 = 0
45- if (($size14131453 == 0))
46- then $acc014131453
37+ let totalAddresses = {
38+ let $list14171457 = addressesArray
39+ let $size14171457 = size($list14171457)
40+ let $acc014171457 = 0
41+ if (($size14171457 == 0))
42+ then $acc014171457
43+ else {
44+ let $acc114171457 = countParties($acc014171457, $list14171457[0])
45+ if (($size14171457 == 1))
46+ then $acc114171457
4747 else {
48- let $acc114131453 = countParties($acc014131453, $list14131453[0])
49- if (($size14131453 == 1))
50- then $acc114131453
48+ let $acc214171457 = countParties($acc114171457, $list14171457[1])
49+ if (($size14171457 == 2))
50+ then $acc214171457
5151 else {
52- let $acc214131453 = countParties($acc114131453, $list14131453[1])
53- if (($size14131453 == 2))
54- then $acc214131453
52+ let $acc314171457 = countParties($acc214171457, $list14171457[2])
53+ if (($size14171457 == 3))
54+ then $acc314171457
5555 else {
56- let $acc314131453 = countParties($acc214131453, $list14131453[2])
57- if (($size14131453 == 3))
58- then $acc314131453
56+ let $acc414171457 = countParties($acc314171457, $list14171457[3])
57+ if (($size14171457 == 4))
58+ then $acc414171457
5959 else {
60- let $acc414131453 = countParties($acc314131453, $list14131453[3])
61- if (($size14131453 == 4))
62- then $acc414131453
60+ let $acc514171457 = countParties($acc414171457, $list14171457[4])
61+ if (($size14171457 == 5))
62+ then $acc514171457
6363 else {
64- let $acc514131453 = countParties($acc414131453, $list14131453[4])
65- if (($size14131453 == 5))
66- then $acc514131453
64+ let $acc614171457 = countParties($acc514171457, $list14171457[5])
65+ if (($size14171457 == 6))
66+ then $acc614171457
6767 else {
68- let $acc614131453 = countParties($acc514131453, $list14131453[5])
69- if (($size14131453 == 6))
70- then $acc614131453
71- else {
72- let $acc714131453 = countParties($acc614131453, $list14131453[6])
73- throw("List size exceed 6")
74- }
68+ let $acc714171457 = countParties($acc614171457, $list14171457[6])
69+ throw("List size exceed 6")
7570 }
7671 }
7772 }
7974 }
8075 }
8176 }
82- 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]) + "'}")
83- let paymentAssetId = if (isDefined(payment.assetId))
84- then extract(payment.assetId)
85- else throw("Waves is not accepted as payment")
86- if ((paymentAssetId != acceptedToken))
87- then throw("Only payments in SIGN are allowed at the moment")
88- else if (((currentPrice * totalAddresses) > amount))
89- then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
90- else if ((totalAddresses == 6))
91- 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)]))
92- else if ((totalAddresses == 5))
93- 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)]))
94- else if ((totalAddresses == 4))
95- 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)]))
96- else if ((totalAddresses == 3))
97- 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)]))
98- else if ((totalAddresses == 2))
99- 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)]))
100- else throw("Needs 2 to 6 parties addresses")
101- }
77+ }
78+ 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]) + "'}")
79+ let paymentAssetId = if (isDefined(payment.assetId))
80+ then extract(payment.assetId)
81+ else throw("Waves is not accepted as payment")
82+ if ((paymentAssetId != acceptedToken))
83+ then throw("Only payments in SIGN are allowed at the moment")
84+ else if (((currentPrice * totalAddresses) > amount))
85+ then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
86+ else if ((totalAddresses == 6))
87+ 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)]))
88+ else if ((totalAddresses == 5))
89+ 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)]))
90+ else if ((totalAddresses == 4))
91+ 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)]))
92+ else if ((totalAddresses == 3))
93+ 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)]))
94+ else if ((totalAddresses == 2))
95+ 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)]))
96+ else throw("Needs 2 to 6 parties addresses")
10297 }
10398
10499
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
1010 func isAdress (addr) = if ((size(addr) == 35))
1111 then (take(addr, 2) == "3N")
1212 else false
1313
1414
1515 func countParties (accumulator,addr) = if (isAdress(addr))
1616 then (accumulator + 1)
1717 else (accumulator + 0)
1818
1919
2020 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
2121
2222
2323 func getValue (json,key) = {
2424 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
2525 let data = drop(json, ((keyIndex + size(key)) + 3))
2626 let jsonValue = getValueString(data)
2727 jsonValue
2828 }
2929
3030
3131 @Callable(invoke)
3232 func createAgreement (hash,title,addresses) = {
3333 let payment = extract(invoke.payment)
3434 let amount = extract(payment.amount)
3535 let id = extract(invoke.transactionId)
3636 let addressesArray = [getValue(addresses, "address1"), getValue(addresses, "address2"), getValue(addresses, "address3"), getValue(addresses, "address4"), getValue(addresses, "address5"), getValue(addresses, "address6")]
37- let combine = (addressesArray[0] + addressesArray[1])
38- if ((size(combine) > 0))
39- then throw(("hihi = " + combine))
40- else {
41- let totalAddresses = {
42- let $list14131453 = addressesArray
43- let $size14131453 = size($list14131453)
44- let $acc014131453 = 0
45- if (($size14131453 == 0))
46- then $acc014131453
37+ let totalAddresses = {
38+ let $list14171457 = addressesArray
39+ let $size14171457 = size($list14171457)
40+ let $acc014171457 = 0
41+ if (($size14171457 == 0))
42+ then $acc014171457
43+ else {
44+ let $acc114171457 = countParties($acc014171457, $list14171457[0])
45+ if (($size14171457 == 1))
46+ then $acc114171457
4747 else {
48- let $acc114131453 = countParties($acc014131453, $list14131453[0])
49- if (($size14131453 == 1))
50- then $acc114131453
48+ let $acc214171457 = countParties($acc114171457, $list14171457[1])
49+ if (($size14171457 == 2))
50+ then $acc214171457
5151 else {
52- let $acc214131453 = countParties($acc114131453, $list14131453[1])
53- if (($size14131453 == 2))
54- then $acc214131453
52+ let $acc314171457 = countParties($acc214171457, $list14171457[2])
53+ if (($size14171457 == 3))
54+ then $acc314171457
5555 else {
56- let $acc314131453 = countParties($acc214131453, $list14131453[2])
57- if (($size14131453 == 3))
58- then $acc314131453
56+ let $acc414171457 = countParties($acc314171457, $list14171457[3])
57+ if (($size14171457 == 4))
58+ then $acc414171457
5959 else {
60- let $acc414131453 = countParties($acc314131453, $list14131453[3])
61- if (($size14131453 == 4))
62- then $acc414131453
60+ let $acc514171457 = countParties($acc414171457, $list14171457[4])
61+ if (($size14171457 == 5))
62+ then $acc514171457
6363 else {
64- let $acc514131453 = countParties($acc414131453, $list14131453[4])
65- if (($size14131453 == 5))
66- then $acc514131453
64+ let $acc614171457 = countParties($acc514171457, $list14171457[5])
65+ if (($size14171457 == 6))
66+ then $acc614171457
6767 else {
68- let $acc614131453 = countParties($acc514131453, $list14131453[5])
69- if (($size14131453 == 6))
70- then $acc614131453
71- else {
72- let $acc714131453 = countParties($acc614131453, $list14131453[6])
73- throw("List size exceed 6")
74- }
68+ let $acc714171457 = countParties($acc614171457, $list14171457[6])
69+ throw("List size exceed 6")
7570 }
7671 }
7772 }
7873 }
7974 }
8075 }
8176 }
82- 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]) + "'}")
83- let paymentAssetId = if (isDefined(payment.assetId))
84- then extract(payment.assetId)
85- else throw("Waves is not accepted as payment")
86- if ((paymentAssetId != acceptedToken))
87- then throw("Only payments in SIGN are allowed at the moment")
88- else if (((currentPrice * totalAddresses) > amount))
89- then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
90- else if ((totalAddresses == 6))
91- 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)]))
92- else if ((totalAddresses == 5))
93- 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)]))
94- else if ((totalAddresses == 4))
95- 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)]))
96- else if ((totalAddresses == 3))
97- 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)]))
98- else if ((totalAddresses == 2))
99- 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)]))
100- else throw("Needs 2 to 6 parties addresses")
101- }
77+ }
78+ 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]) + "'}")
79+ let paymentAssetId = if (isDefined(payment.assetId))
80+ then extract(payment.assetId)
81+ else throw("Waves is not accepted as payment")
82+ if ((paymentAssetId != acceptedToken))
83+ then throw("Only payments in SIGN are allowed at the moment")
84+ else if (((currentPrice * totalAddresses) > amount))
85+ then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses))))
86+ else if ((totalAddresses == 6))
87+ 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)]))
88+ else if ((totalAddresses == 5))
89+ 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)]))
90+ else if ((totalAddresses == 4))
91+ 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)]))
92+ else if ((totalAddresses == 3))
93+ 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)]))
94+ else if ((totalAddresses == 2))
95+ 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)]))
96+ else throw("Needs 2 to 6 parties addresses")
10297 }
10398
10499
105100
106101 @Callable(invoke)
107102 func signAgreement (hash,agreementId) = {
108103 let payment = extract(invoke.payment)
109104 let amount = extract(payment.amount)
110105 let id = extract(invoke.transactionId)
111106 let signer = toBase58String(invoke.caller.bytes)
112107 let signingRequestExist = match getString(this, ((signer + "_MA_") + toBase58String(id))) {
113108 case s: String =>
114109 s
115110 case _ =>
116111 throw("There is no corresponding signing request")
117112 }
118113 let paymentAssetId = if (isDefined(payment.assetId))
119114 then extract(payment.assetId)
120115 else throw("Waves is not accepted as payment")
121116 if ((paymentAssetId != acceptedToken))
122117 then throw("Only payments in SIGN are allowed at the moment")
123118 else if ((amount != currentPrice))
124119 then throw("The price is wrong")
125120 else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + toBase58String(id)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)]))
126121 }
127122
128123

github/deemru/w8io/026f985 
87.44 ms