tx · 5ZT5J4V9ucNXGjov53aqzcathye4WEp4u3FP5LjJs12o

3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT:  -0.01400000 Waves

2019.06.22 15:05 [553225] smart account 3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT > SELF 0.00000000 Waves

{ "type": 13, "id": "5ZT5J4V9ucNXGjov53aqzcathye4WEp4u3FP5LjJs12o", "fee": 1400000, "feeAssetId": null, "timestamp": 1561205090894, "version": 1, "sender": "3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT", "senderPublicKey": "Bhyvkx4xdbEi4KPJNZSzx9gZgzgyLEsavuj2kYSt7SST", "proofs": [ "4jLA1zqFNoDp2j51nvhmzRTJokB2Ra8H9AXVMY2vCyVMV6yNfeqtV1NYhQ197Q9hchKDHmb9mCbqYM4CCopjyP8S" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAAAAABZFcnJvck9ubHlXYXZlc0FjY2VwdGVkAgAAABllcnJvcl9vbmx5X3dhdmVzX2FjY2VwdGVkAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAJfYmFzZTY0Ok1JSUJ2VENDQVNZQ0NRRDU1Zk56YzBXRjdUQU5CZ2txaGtpRzl3MEJBUVVGQURBak1Rc3dDUVlEVlFRR0V3SktVREVVTUJJR0ExVUVDaE1MTURBdFZFVlRWQzFTVTBFd0hoY05NVEF3TlRJNE1ESXdPRFV4V2hjTk1qQXdOVEkxTURJd09EVXhXakFqTVFzd0NRWURWUVFHRXdKS1VERVVNQklHQTFVRUNoTUxNREF0VkVWVFZDMVNVMEV3Z1o4d0RRWUpLb1pJaHZjTkFRRUJCUUFEZ1kwQU1JR0pBb0dCQU5HRVlYdGZnRFJsV1VTRG4zaGFZNE5WVlFpS0k5Q3pUaG91YTkrRHhKdWlzZXl6bUJCZTdSb2gxUlBxZHZtdE9IbUVQYkora1haWWhib3p6UFJiRkdIQ0p5QmZDTHpRZlZvczkvcVVRODh1ODNiMFNGQTJNR21RV1F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kFAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADnVzZXJCYWxhbmNlS2V5BQAAAAluZXdBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEmF1Y3Rpb25Jc0FjdGl2ZUtleQYJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAFmF1Y3Rpb25MYXN0QmlkT3duZXJLZXkCAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAQbGFzdEF1Y3Rpb25JZEtleQUAAAACaWQFAAAAA25pbAAAAACw2NcB", "chainId": 84, "height": 553225, "spentComplexity": 0 } View: original | compacted Prev: 2ozRKX38jPuLzYPmyp2c31dzwaSfey6fN67nN9SZRRcv Next: 21Whzsr29ymF1Sy2AUQ2xwBvcipscZ2kaB2MyQCXn33Q Diff:
OldNewDifferences
1919
2020
2121 @Callable(i)
22-func SetData (k,v) = WriteSet([DataEntry(k, v)])
22+func SetData (k,v) = if ((k == "hello"))
23+ then throw("NONONON!!")
24+ else WriteSet([DataEntry(k, v)])
2325
2426
2527
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ErrorOnlyWavesAccepted = "error_only_waves_accepted"
55
66 let RSAPUBLIC = fromBase64String("base64:MIIBvTCCASYCCQD55fNzc0WF7TANBgkqhkiG9w0BAQUFADAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwHhcNMTAwNTI4MDIwODUxWhcNMjAwNTI1MDIwODUxWjAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANGEYXtfgDRlWUSDn3haY4NVVQiKI9CzThoua9+DxJuiseyzmBBe7Roh1RPqdvmtOHmEPbJ+kXZYhbozzPRbFGHCJyBfCLzQfVos9/qUQ88u83b0SFA2MGmQWQAlRtLy66EkR4rDRwTj2DzR4EEXgEKpIvo8VBs/3+sHLF3ESgAhAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAEZ6mXFFq3AzfaqWHmCy1ARjlauYAa8ZmUFnLm0emg9dkVBJ63aEqARhtok6bDQDzSJxiLpCEF6G4b/Nv/M/MLyhP+OoOTmETMegAVQMq71choVJyOFE5BtQa6M/lCHEOya5QUfoRF2HF9EjRF44K3OK+u3ivTSj3zwjtpudY5Xo=")
77
88 @Callable(i)
99 func GenerateRandInt (gameId,rsaSign) = {
1010 let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), toBytes(rsaSign), RSAPUBLIC)
1111 if (rsaSigValid)
1212 then {
1313 let rand = (toInt(sha256(toBytes(rsaSign))) % 6)
1414 WriteSet([DataEntry("hello", rand)])
1515 }
1616 else throw("Invalid RSA signature")
1717 }
1818
1919
2020
2121 @Callable(i)
22-func SetData (k,v) = WriteSet([DataEntry(k, v)])
22+func SetData (k,v) = if ((k == "hello"))
23+ then throw("NONONON!!")
24+ else WriteSet([DataEntry(k, v)])
2325
2426
2527
2628 @Callable(i)
2729 func bet (expectedResult) = {
2830 let lastAuctionIdKey = "last_auction_id"
2931 let lastAuctionId = match getInteger(this, lastAuctionIdKey) {
3032 case a: Int =>
3133 a
3234 case _ =>
3335 0
3436 }
3537 let id = (lastAuctionId + 1)
3638 let newAuctionId = toString(id)
3739 let ownerWallet = toBase58String(i.caller.bytes)
3840 let pmt = value(i.payment)
3941 if (isDefined(pmt.assetId))
4042 then throw(ErrorOnlyWavesAccepted)
4143 else {
4244 let assetId = toBase58String(value(pmt.assetId))
4345 let auctionDurationKey = (("auction_" + newAuctionId) + "_duration")
4446 let auctionMinBidKey = (("auction_" + newAuctionId) + "_min_bid")
4547 let auctionLastBidKey = (("auction_" + newAuctionId) + "_last_bid")
4648 let auctionLastBidOwnerKey = (("auction_" + newAuctionId) + "_last_bid_owner")
4749 let auctionOwnerKey = (("auction_" + newAuctionId) + "_owner")
4850 let auctionAmountKey = (("auction_" + newAuctionId) + "_amount")
4951 let auctionAssetIdKey = (("auction_" + newAuctionId) + "_asset_id")
5052 let auctionIsActiveKey = (("auction_" + newAuctionId) + "_is_active")
5153 let userBalanceKey = ((("balance_" + ownerWallet) + "_") + assetId)
5254 let currentAmount = match getInteger(this, userBalanceKey) {
5355 case a: Int =>
5456 a
5557 case _ =>
5658 0
5759 }
5860 let newAmount = (currentAmount + pmt.amount)
5961 WriteSet([DataEntry(auctionLastBidKey, 0), DataEntry(auctionOwnerKey, ownerWallet), DataEntry(auctionAmountKey, pmt.amount), DataEntry(auctionAssetIdKey, assetId), DataEntry(userBalanceKey, newAmount), DataEntry(auctionIsActiveKey, true), DataEntry(auctionLastBidOwnerKey, ""), DataEntry(lastAuctionIdKey, id)])
6062 }
6163 }
6264
6365

github/deemru/w8io/169f3d6 
36.19 ms