tx · 27u99cDbUcJy2mVFzfzQ4dMUAj3ZtRXcCyEkKGhm4H1F
3N3sVqNviLW8oXtNFids96WheCPVhVH6MxY: -0.01400000 Waves
2019.06.27 15:45 [560552] smart account 3N3sVqNviLW8oXtNFids96WheCPVhVH6MxY > SELF 0.00000000 Waves
{
"type": 13,
"id": "27u99cDbUcJy2mVFzfzQ4dMUAj3ZtRXcCyEkKGhm4H1F",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1561639482718,
"version": 1,
"sender": "3N3sVqNviLW8oXtNFids96WheCPVhVH6MxY",
"senderPublicKey": "1wL7DuULCyVDWMe1JNaLWiTTEcWUinaWX8h82hgH8k2",
"proofs": [
"3o4pi1TRFpHQVTpuHwbikALYNMa1eAftLFcZmD7cLu6F9VpHLqsZjkQF2gTvTLFgbh4idUYXxrQEm3ecWcTAkBkR"
],
"script": "base64:AgQAAAARZW1wbG95ZWVQdWJsaWNLZXkBAAAAIOhJV7T3E/sDzyx0gkPLAHSn7un5Ex1h6AiuiE07fmJaBAAAAA5vd25lclB1YmxpY0tleQEAAAAgLs9qIqF/gFv4H5JpbGM4G2/jXU6IPL5XKgU/j2tvSm0EAAAADmNvbXBhbnlBc3NldElEAQAAACDzuvEcY7lmVpwQTbK1RUBOWABWYh6eWrhgnGMBFaaCsgQAAAAOd2l0aGRyYXdBbW91bnQAAAAAAA7msoAEAAAADm51bU9mV2l0aGRyYXdzAAAAAAAAAAAEBAAAAA1wcmVtaXVtQnVkZ2V0AAAAAAA7msoABAAAAAR0aGlzCAUAAAACdHgAAAAGc2VuZGVyBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAQAAAAJZnJvbU93bmVyCQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVy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ZXkHLp0Cfg==",
"chainId": 84,
"height": 560552,
"spentComplexity": 0
}
View: original | compacted
Prev: GJrMwgyTHdJ8LnCsW3LCACfG4G3mDYixFdZen5XYbKyb
Next: none
Diff:
Old | New | | Differences |
---|
6 | 6 | | let withdrawAmount = 250000000 |
---|
7 | 7 | | let numOfWithdraws = 4 |
---|
8 | 8 | | let premiumBudget = 1000000000 |
---|
9 | | - | let this = extract(tx.sender) |
---|
| 9 | + | let this = tx.sender |
---|
10 | 10 | | match tx { |
---|
11 | 11 | | case t: TransferTransaction => |
---|
12 | 12 | | let fromOwner = sigVerify(t.bodyBytes, t.proofs[0], ownerPublicKey) |
---|
|
16 | 16 | | let fromEmployee = sigVerify(t.bodyBytes, t.proofs[0], employeePublicKey) |
---|
17 | 17 | | if (fromEmployee) |
---|
18 | 18 | | then { |
---|
19 | | - | let attempt = (numOfWithdraws - (assetBalance(t.sender, companyAssetID) / withdrawAmount)) |
---|
| 19 | + | let attempt = (numOfWithdraws - (assetBalance(this, companyAssetID) / withdrawAmount)) |
---|
20 | 20 | | let keyName = ("dates" + toString(attempt)) |
---|
21 | 21 | | let targetDate = if (isDefined(getInteger(this, keyName))) |
---|
22 | 22 | | then extract(getInteger(this, keyName)) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let employeePublicKey = base58'GdkT8KewPT7fZGtCmmPx94SqTzSpMuhnpBVdaQaq5PSR' |
---|
4 | 4 | | let ownerPublicKey = base58'49jCAx3nnNQ9Xj5xUXwhjy5czmt1AWLHMYf6PxxjFzip' |
---|
5 | 5 | | let companyAssetID = base58'HQRQNF5iq1yAvSDqTvK8JC2D3dfn8tkkWPdBmDez2Riq' |
---|
6 | 6 | | let withdrawAmount = 250000000 |
---|
7 | 7 | | let numOfWithdraws = 4 |
---|
8 | 8 | | let premiumBudget = 1000000000 |
---|
9 | | - | let this = extract(tx.sender) |
---|
| 9 | + | let this = tx.sender |
---|
10 | 10 | | match tx { |
---|
11 | 11 | | case t: TransferTransaction => |
---|
12 | 12 | | let fromOwner = sigVerify(t.bodyBytes, t.proofs[0], ownerPublicKey) |
---|
13 | 13 | | if (fromOwner) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else { |
---|
16 | 16 | | let fromEmployee = sigVerify(t.bodyBytes, t.proofs[0], employeePublicKey) |
---|
17 | 17 | | if (fromEmployee) |
---|
18 | 18 | | then { |
---|
19 | | - | let attempt = (numOfWithdraws - (assetBalance(t.sender, companyAssetID) / withdrawAmount)) |
---|
| 19 | + | let attempt = (numOfWithdraws - (assetBalance(this, companyAssetID) / withdrawAmount)) |
---|
20 | 20 | | let keyName = ("dates" + toString(attempt)) |
---|
21 | 21 | | let targetDate = if (isDefined(getInteger(this, keyName))) |
---|
22 | 22 | | then extract(getInteger(this, keyName)) |
---|
23 | 23 | | else throw("Incorrect witdraw attempt or missing key on Smart account state") |
---|
24 | 24 | | if (if ((t.timestamp >= targetDate)) |
---|
25 | 25 | | then (t.amount == withdrawAmount) |
---|
26 | 26 | | else false) |
---|
27 | 27 | | then (t.assetId == companyAssetID) |
---|
28 | 28 | | else false |
---|
29 | 29 | | } |
---|
30 | 30 | | else false |
---|
31 | 31 | | } |
---|
32 | 32 | | case s: DataTransaction|SetScriptTransaction => |
---|
33 | 33 | | sigVerify(s.bodyBytes, s.proofs[0], ownerPublicKey) |
---|
34 | 34 | | case _ => |
---|
35 | 35 | | false |
---|
36 | 36 | | } |
---|