tx · 8vKY3w2CMh4TyrG3KvKJqeyByvJoQ64uZqcv2CV7T9b4

3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB:  -0.01400000 Waves

2019.09.26 14:12 [693243] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves

{ "type": 13, "id": "8vKY3w2CMh4TyrG3KvKJqeyByvJoQ64uZqcv2CV7T9b4", "fee": 1400000, "feeAssetId": null, "timestamp": 1569496364981, "version": 1, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "5HppqxA4n1oU11ssgTWtnYWDT3REKWeXBJeZQ3B2CcbVE9hpuiT2rHi4fmY7ESXXGosSiamQwtfpaFnRxhLsLtQj" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAAAAAAh2ZXJpZmllcgkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAEYmFuawIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAABAAAABmludm9rZQEAAAARZmlsZUNlcnRpZmljYXRpb24AAAAEAAAABGhhc2gAAAAFdGl0bGUAAAAEdXVpZAAAAARkYXRhBAAAAAdwYXltZW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAZpbnZva2UAAAAHcGF5bWVudAQAAAAGYW1vdW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAdwYXltZW50AAAABmFtb3VudAQAAAACaWQJAQAAAAdleHRyYWN0AAAAAQgFAAAABmludm9rZQAAAA10cmFuc2FjdGlvbklkBAAAAAplbnRyeUV4aXN0BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAEaGFzaAUAAAAEd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jcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAARiYW5rBQAAAAZhbW91bnQIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQFAAAAA25pbAAAAAD0t4SJ", "chainId": 84, "height": 693243, "spentComplexity": 0 } View: original | compacted Prev: Gxc41i8LeoENPKXdVEj5f8v1oajjHgKm38V65SpFKbuY Next: CP6SxxxEfg3rDaHarwAMuJU9fE4uf7SPev1soTS3Yqjb Diff:
OldNewDifferences
2828 then throw("This uuid already exist")
2929 else if ((size(uuid) > 36))
3030 then throw("Uuid is too long")
31- else if ((size(title) > 64))
32- then throw("Title is too long")
33- else {
34- let paymentAssetId = if (isDefined(payment.assetId))
35- then extract(payment.assetId)
36- else throw("Waves is not accepted as payment")
37- let acceptedToken = match getString(verifier, ("white_list_token_" + toBase58String(extract(paymentAssetId)))) {
38- case a: String =>
39- a
40- case _ =>
41- throw("This token is not accepted at the moment")
42- }
43- let currentPrice = getIntegerValue(verifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
44- if ((acceptedToken != "WHITELISTED"))
45- then throw("This token is not accepted at the moment")
46- else if ((amount != currentPrice))
47- then throw("The price is wrong")
48- else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
49- }
31+ else if ((size(hash) > 64))
32+ then throw("Hash is too long")
33+ else if ((size(title) > 64))
34+ then throw("Title is too long")
35+ else {
36+ let paymentAssetId = if (isDefined(payment.assetId))
37+ then extract(payment.assetId)
38+ else throw("Waves is not accepted as payment")
39+ let acceptedToken = match getString(verifier, ("white_list_token_" + toBase58String(extract(paymentAssetId)))) {
40+ case a: String =>
41+ a
42+ case _ =>
43+ throw("This token is not accepted at the moment")
44+ }
45+ let currentPrice = getIntegerValue(verifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
46+ if ((acceptedToken != "WHITELISTED"))
47+ then throw("This token is not accepted at the moment")
48+ else if ((amount != currentPrice))
49+ then throw("The price is wrong")
50+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
51+ }
5052 }
5153
5254
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let verifier = extract(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
66 let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
77
88 @Callable(invoke)
99 func fileCertification (hash,title,uuid,data) = {
1010 let payment = extract(invoke.payment)
1111 let amount = extract(payment.amount)
1212 let id = extract(invoke.transactionId)
1313 let entryExist = match getString(this, (hash + uuid)) {
1414 case a: String =>
1515 a
1616 case _ =>
1717 "NONE"
1818 }
1919 let uuidExist = match getString(this, uuid) {
2020 case a: String =>
2121 a
2222 case _ =>
2323 "NONE"
2424 }
2525 if ((entryExist != "NONE"))
2626 then throw("This entry already exist")
2727 else if ((uuidExist != "NONE"))
2828 then throw("This uuid already exist")
2929 else if ((size(uuid) > 36))
3030 then throw("Uuid is too long")
31- else if ((size(title) > 64))
32- then throw("Title is too long")
33- else {
34- let paymentAssetId = if (isDefined(payment.assetId))
35- then extract(payment.assetId)
36- else throw("Waves is not accepted as payment")
37- let acceptedToken = match getString(verifier, ("white_list_token_" + toBase58String(extract(paymentAssetId)))) {
38- case a: String =>
39- a
40- case _ =>
41- throw("This token is not accepted at the moment")
42- }
43- let currentPrice = getIntegerValue(verifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
44- if ((acceptedToken != "WHITELISTED"))
45- then throw("This token is not accepted at the moment")
46- else if ((amount != currentPrice))
47- then throw("The price is wrong")
48- else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
49- }
31+ else if ((size(hash) > 64))
32+ then throw("Hash is too long")
33+ else if ((size(title) > 64))
34+ then throw("Title is too long")
35+ else {
36+ let paymentAssetId = if (isDefined(payment.assetId))
37+ then extract(payment.assetId)
38+ else throw("Waves is not accepted as payment")
39+ let acceptedToken = match getString(verifier, ("white_list_token_" + toBase58String(extract(paymentAssetId)))) {
40+ case a: String =>
41+ a
42+ case _ =>
43+ throw("This token is not accepted at the moment")
44+ }
45+ let currentPrice = getIntegerValue(verifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
46+ if ((acceptedToken != "WHITELISTED"))
47+ then throw("This token is not accepted at the moment")
48+ else if ((amount != currentPrice))
49+ then throw("The price is wrong")
50+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
51+ }
5052 }
5153
5254

github/deemru/w8io/026f985 
37.15 ms