tx · Hi69Rrj2cQya4yUQZ9hMENHvjifxfhTpm8hH3GpmGz6w
3N4Pws1hZGMw3qDdRjhinhXr6KVMkcggjgL: -0.01400000 Waves
2019.10.21 18:40 [730030] smart account 3N4Pws1hZGMw3qDdRjhinhXr6KVMkcggjgL > SELF 0.00000000 Waves
{
"type": 13,
"id": "Hi69Rrj2cQya4yUQZ9hMENHvjifxfhTpm8hH3GpmGz6w",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1571672464205,
"version": 1,
"sender": "3N4Pws1hZGMw3qDdRjhinhXr6KVMkcggjgL",
"senderPublicKey": "CwvrpTWSUeB7TpDCw7NdABvqpF6NY2UzMvZZ7SbgrXUM",
"proofs": [
"xx2Rs8q3jRmv8PXqHz2o5PnF3CfQ6iKXQbka2H1C4uZa6aqQZJpyEnihezD75M7T4FT7Y3tDTYx8XSoEUuEN4QB"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAQEAAAAVZ2V0VXNlckdvYWxBZGRyZXNzS2V5AAAAAgAAABV1c2VyQWNjb3VudEFkZHJlc3NTdHIAAAAVZ29hbEFjY291bnRBZGRyZXNzU3RyCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABnVzZXJfPAUAAAAVdXNlckFjY291bnRBZGRyZXNzU3RyAgAAAAQ+X188BQAAABVnb2FsQWNjb3VudEFkZHJlc3NTdHICAAAAAT4AAAABAAAAAWkBAAAAB2FkZEdvYWwAAAABAAAAFWdvYWxBY2NvdW50QWRkcmVzc1N0cgQAAAAHcGF5bWVudAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAABV1c2VyQWNjb3VudEFkZHJlc3NTdHIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAASdXNlckdvYWxBZGRyZXNzS2V5CQEAAAAVZ2V0VXNlckdvYWxBZGRyZXNzS2V5AAAAAgUAAAAVdXNlckFjY291bnRBZGRyZXNzU3RyBQAAABVnb2FsQWNjb3VudEFkZHJlc3NTdHIDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAkAAAIAAAABAgAAABl5b3UgY2FuIGJldCBvbmx5IGluIHdhdmVzCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJ1c2VyR29hbEFkZHJlc3NLZXkIBQAAAAdwYXltZW50AAAABmFtb3VudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAb65/lC",
"chainId": 84,
"height": 730030,
"spentComplexity": 0
}
View: original | compacted
Prev: CGSfP9xYctWXS6sMCjufWXvC4UQQQrkkU7MxwCXb5SR6
Next: 5DFYSQjy7Gk2varnhFHF5Trm9ofGWt4FvDBi2rDFCkjB
Diff:
Old | New | | Differences |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | @Callable(i) |
---|
8 | | - | func addGoal (goalAccountAddressStr) = throw("hello") |
---|
| 8 | + | func addGoal (goalAccountAddressStr) = { |
---|
| 9 | + | let payment = extract(i.payment) |
---|
| 10 | + | let userAccountAddressStr = toBase58String(i.caller.bytes) |
---|
| 11 | + | let userGoalAddressKey = getUserGoalAddressKey(userAccountAddressStr, goalAccountAddressStr) |
---|
| 12 | + | if (isDefined(payment.assetId)) |
---|
| 13 | + | then throw("you can bet only in waves") |
---|
| 14 | + | else WriteSet([DataEntry(userGoalAddressKey, payment.amount)]) |
---|
| 15 | + | } |
---|
9 | 16 | | |
---|
10 | 17 | | |
---|
11 | 18 | | @Verifier(tx) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getUserGoalAddressKey (userAccountAddressStr,goalAccountAddressStr) = (((("user_<" + userAccountAddressStr) + ">__<") + goalAccountAddressStr) + ">") |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | @Callable(i) |
---|
8 | | - | func addGoal (goalAccountAddressStr) = throw("hello") |
---|
| 8 | + | func addGoal (goalAccountAddressStr) = { |
---|
| 9 | + | let payment = extract(i.payment) |
---|
| 10 | + | let userAccountAddressStr = toBase58String(i.caller.bytes) |
---|
| 11 | + | let userGoalAddressKey = getUserGoalAddressKey(userAccountAddressStr, goalAccountAddressStr) |
---|
| 12 | + | if (isDefined(payment.assetId)) |
---|
| 13 | + | then throw("you can bet only in waves") |
---|
| 14 | + | else WriteSet([DataEntry(userGoalAddressKey, payment.amount)]) |
---|
| 15 | + | } |
---|
9 | 16 | | |
---|
10 | 17 | | |
---|
11 | 18 | | @Verifier(tx) |
---|
12 | 19 | | func verify () = true |
---|
13 | 20 | | |
---|