tx · 5dfTQBUf4mjFaVjbqJe1kzyjKGdqG6DYFe69sUanuYvm

3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua:  -0.01400000 Waves

2021.03.15 17:00 [1438928] smart account 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua > SELF 0.00000000 Waves

{ "type": 13, "id": "5dfTQBUf4mjFaVjbqJe1kzyjKGdqG6DYFe69sUanuYvm", "fee": 1400000, "feeAssetId": null, "timestamp": 1615816808990, "version": 2, "chainId": 84, "sender": "3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua", "senderPublicKey": "CTyHhnVTxf16Z4CmGGneAK8WB5g2QyT4MB8kUn8vPPcu", "proofs": [ "3pmapJVdy1RNo3m8BHEzfFp1SFZf1TGvZMimPsUMuFEGdym8ktbnjaW9Z5eW9xwnkvmpsheH8QH7qC1u9kNHETcA" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAQAAAAxpc1dhdmVzQXNzZXQAAAABAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAABWFzc2V0BQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAAFd2F2ZXMFAAAAByRtYXRjaDAGCQAAAgAAAAECAAAAC01hdGNoIGVycm9yAQAAABBnZXRUcmVhc3VyeVZhbHVlAAAAAQAAAAdhc3NldElkBAAAAAx0cmVhc3VyeU5hbWUEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAABWFzc2V0BQAAAAckbWF0Y2gwCQABLAAAAAICAAAACVRyZWFzdXJ5LQkAAlgAAAABBQAAAAVhc3NldAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAANzdHIFAAAAByRtYXRja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WF0Y2gwAgAAAANJbnQEAAAAA3ZhbAUAAAAHJG1hdGNoMAUAAAADdmFsBAAAAARudWxsBQAAAAckbWF0Y2gwCQAAAgAAAAECAAAAJURhdGEgbWlzc2luZzogJ2dvdmVybm9yQ3JlYXRpb25QcmljZScDCQEAAAACIT0AAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQFAAAAFWdvdmVybm9yQ3JlYXRpb25QcmljZQkAAAIAAAABAgAAABdOb3QgYSB2YWxpZCBhbW91bnQgc2VudAQAAAALZ292Q29udHJhY3QJAARCAAAABQIAAAAQR292ZXJub3JDb250cmFjdAkAAaQAAAABBQAAAAZoZWlnaHQAAAAAAAAAAAEAAAAAAAAAAAAHBAAAAA1nb3ZDb250cmFjdElkCQAEOAAAAAEFAAAAC2dvdkNvbnRyYWN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA5UcmVhc3VyeS1XQVZFUwkAAGQAAAACCQEAAAAQZ2V0VHJlYXN1cnlWYWx1ZQAAAAECAAAABVdBVkVTCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQJAARMAAAAAgUAAAALZ292Q29udHJhY3QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAALZ292Q29udHJhY3QAAAAIcXVhbnRpdHkFAAAADWdvdkNvbnRyYWN0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5s6P4DA==", "height": 1438928, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GUwUBq2f1UWYheHhcuFGKZMR3LU1sNSwJYCae9kNm4tQ Next: UF3eaEgYPUUtwtUxJFMMBP5ZqHADjpHrNqM2WN6VwcC Diff:
OldNewDifferences
5757 else {
5858 let govContract = Issue("GovernorContract", toString(height), 1, 0, false)
5959 let govContractId = calculateAssetId(govContract)
60-[StringEntry("Treasury-WAVES", toString((getTreasuryValue("WAVES") + i.payments[0].amount))), govContract, ScriptTransfer(i.caller, govContract.quantity, govContractId)]
60+[IntegerEntry("Treasury-WAVES", (getTreasuryValue("WAVES") + i.payments[0].amount)), govContract, ScriptTransfer(i.caller, govContract.quantity, govContractId)]
6161 }
6262 }
6363
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func isWavesAsset (assetId) = match assetId {
55 case asset: ByteVector =>
66 false
77 case waves: Unit =>
88 true
99 case _ =>
1010 throw("Match error")
1111 }
1212
1313
1414 func getTreasuryValue (assetId) = {
1515 let treasuryName = match assetId {
1616 case asset: ByteVector =>
1717 ("Treasury-" + toBase58String(asset))
1818 case str: String =>
1919 ("Treasury-" + str)
2020 case _: Unit =>
2121 throw("Unknown treasury")
2222 case _ =>
2323 throw("Match error")
2424 }
2525 match getInteger(this, treasuryName) {
2626 case val: Int =>
2727 val
2828 case null =>
2929 0
3030 }
3131 }
3232
3333
3434 @Callable(i)
3535 func init () = if ((this != i.caller))
3636 then throw("Access denied")
3737 else [IntegerEntry("governorCreationPrice", 1)]
3838
3939
4040
4141 @Callable(i)
4242 func createGovernor () = if ((size(i.payments) != 1))
4343 then throw("No payment attached")
4444 else if ((this == i.caller))
4545 then throw("dApp self sending is denied")
4646 else if ((isWavesAsset(i.payments[0].assetId) == false))
4747 then throw("Payment should be in WAVES")
4848 else {
4949 let governorCreationPrice = match getInteger(this, "governorCreationPrice") {
5050 case val: Int =>
5151 val
5252 case null =>
5353 throw("Data missing: 'governorCreationPrice'")
5454 }
5555 if ((i.payments[0].amount != governorCreationPrice))
5656 then throw("Not a valid amount sent")
5757 else {
5858 let govContract = Issue("GovernorContract", toString(height), 1, 0, false)
5959 let govContractId = calculateAssetId(govContract)
60-[StringEntry("Treasury-WAVES", toString((getTreasuryValue("WAVES") + i.payments[0].amount))), govContract, ScriptTransfer(i.caller, govContract.quantity, govContractId)]
60+[IntegerEntry("Treasury-WAVES", (getTreasuryValue("WAVES") + i.payments[0].amount)), govContract, ScriptTransfer(i.caller, govContract.quantity, govContractId)]
6161 }
6262 }
6363
6464
6565 @Verifier(tx)
6666 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6767

github/deemru/w8io/169f3d6 
37.22 ms