tx · CvhJBeRQx8WGzuLVVvM41NevcicE5ynTBwUDQVBmZEuZ

3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB:  -0.01400000 Waves

2019.09.26 07:43 [692853] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves

{ "type": 13, "id": "CvhJBeRQx8WGzuLVVvM41NevcicE5ynTBwUDQVBmZEuZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1569473031990, "version": 1, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "2fKm7foVg8yqG8b4ktE4LXHkozpeD11gikUUVv9uLc4jprrwDUvXdSqH1LMZdSLncZw74bsJSby6Ebmxex4a6LiT" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAAAAAAh2ZXJpZmllcgkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAEYmFuawIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAABAAAABmludm9rZQEAAAARZmlsZUNlcnRpZmljYXRpb24AAAAEAAAABGhhc2gAAAAFdGl0bGUAAAAEdXVpZAAAAARkYXRhBAAAAAdwYXltZW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAZpbnZva2UAAAAHcGF5bWVudAQAAAAGYW1vdW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAdwYXltZW50AAAABmFtb3VudAQAAAACaWQJAQAAAAdleHRyYWN0AAAAAQgFAAAABmludm9rZQAAAA10cmFuc2FjdGlvbklkBAAAAAplbnRyeUV4aXN0BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAEaGFzaAUAAAAEdXVpZAMJ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AAABmFtb3VudAgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAUAAAADbmlsAAAAAPjls1Y=", "chainId": 84, "height": 692853, "spentComplexity": 0 } View: original | compacted Prev: 86ji4tcWBbooH8RZUiuiZd6SYpcPt2TwKxHfxWPHZGG8 Next: Gxc41i8LeoENPKXdVEj5f8v1oajjHgKm38V65SpFKbuY Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let verifier = extract(addressFromString("3NCzApG3ka4tvDuKX8HxnJtXe7eJw5PmdVt"))
4+let verifier = extract(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
66 let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
77
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let verifier = extract(addressFromString("3NCzApG3ka4tvDuKX8HxnJtXe7eJw5PmdVt"))
4+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")
3131 else if ((size(title) > 64))
3232 then throw("Title is too long")
3333 else {
3434 let paymentAssetId = if (isDefined(payment.assetId))
3535 then extract(payment.assetId)
3636 else throw("Waves is not accepted as payment")
3737 let acceptedToken = match getString(verifier, ("white_list_token_" + toBase58String(extract(paymentAssetId)))) {
3838 case a: String =>
3939 a
4040 case _ =>
4141 throw("This token is not accepted at the moment")
4242 }
4343 let currentPrice = getIntegerValue(verifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
4444 if ((acceptedToken != "WHITELISTED"))
4545 then throw("This token is not accepted at the moment")
4646 else if ((amount != currentPrice))
4747 then throw("The price is wrong")
4848 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)]))
4949 }
5050 }
5151
5252

github/deemru/w8io/026f985 
515.63 ms