tx · DmEvoNtfouYRyRk238qN5fQS7bFnas6Bprh9gb4DoamK
3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt: -0.05000000 Waves
2023.03.22 11:40 [2501003] smart account 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt > SELF 0.00000000 Waves
{
"type": 13,
"id": "DmEvoNtfouYRyRk238qN5fQS7bFnas6Bprh9gb4DoamK",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1679474457243,
"version": 2,
"chainId": 84,
"sender": "3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt",
"senderPublicKey": "FACNGaFYnR8yFbQFg9sRBpzGVCyzMyLeVw3JMhGQT1wn",
"proofs": [
"3EwYnbwgWjiDQqjguToh5BgZVYquQDXi6o5jULwsnPYMj7bQq3TYqgJSSdncp2S86CTG5Kk1KWytqfmTcepHAQ6i"
],
"script": "base64:BgIGCAISABIABAATcGVwZUNvbnRyYWN0QWRkcmVzcwIjM040a1haSEdrZTZ5UnEzWjU3cTdCVGdDclQyU0N2UUNZRVIADnNXYXZlc0lkU3RyaW5nAixGWGlGeGVkUDc2Q21nMXY0WEdORFlKcE5FOWdUR1BSRzF6amZrbVVzR2hGbQAMcGVwZUNvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBBRNwZXBlQ29udHJhY3RBZGRyZXNzAAZzV2F2ZXMJANkEAQUOc1dhdmVzSWRTdHJpbmcCAWkBB2dldFJhdGUABAdyZXN1bHRzCQD8BwQFDHBlcGVDb250cmFjdAIHZ2V0UmF0ZQUDbmlsBQNuaWwEByRtYXRjaDAFB3Jlc3VsdHMDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF0BQckbWF0Y2gwCQCUCgIFA25pbAUBdAkAAgECBUVycm9yAWkBB2RlcG9zaXQABAxzdGFydEJhbGFuY2UJAPAHAgUEdGhpcwUGc1dhdmVzAwkAAAIFDHN0YXJ0QmFsYW5jZQUMc3RhcnRCYWxhbmNlBAdyZXN1bHRzCQD8BwQFDHBlcGVDb250cmFjdAIHZGVwb3NpdAUDbmlsCAUBaQhwYXltZW50cwQHJG1hdGNoMAUHcmVzdWx0cwMJAAECBQckbWF0Y2gwAgRVbml0BAFhBQckbWF0Y2gwBApuZXdCYWxhbmNlCQDwBwIFBHRoaXMFBnNXYXZlcwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIJAGUCBQpuZXdCYWxhbmNlBQxzdGFydEJhbGFuY2UFBnNXYXZlcwUDbmlsCQACAQINRXJyb3IgZGVwb3NpdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgCj3/dK",
"height": 2501003,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6dqSR13AkJcTe5n48uyEH118aPSDkV82espR2dK82kZs
Next: D1Zxi7LVxf9iCyNDmz6ur6unYyY37eyBjF8cjNGaPrYE
Diff:
Old | New | | Differences |
---|
25 | 25 | | @Callable(i) |
---|
26 | 26 | | func deposit () = { |
---|
27 | 27 | | let startBalance = assetBalance(this, sWaves) |
---|
28 | | - | let results = invoke(pepeContract, "deposit", nil, i.payments) |
---|
29 | | - | if ((results == results)) |
---|
30 | | - | then match results { |
---|
31 | | - | case a: Unit => |
---|
32 | | - | let newBalance = assetBalance(this, sWaves) |
---|
| 28 | + | if ((startBalance == startBalance)) |
---|
| 29 | + | then { |
---|
| 30 | + | let results = invoke(pepeContract, "deposit", nil, i.payments) |
---|
| 31 | + | match results { |
---|
| 32 | + | case a: Unit => |
---|
| 33 | + | let newBalance = assetBalance(this, sWaves) |
---|
33 | 34 | | [ScriptTransfer(i.caller, (newBalance - startBalance), sWaves)] |
---|
34 | | - | case _ => |
---|
35 | | - | throw("Error deposit") |
---|
36 | | - | } |
---|
| 35 | + | case _ => |
---|
| 36 | + | throw("Error deposit") |
---|
| 37 | + | } |
---|
| 38 | + | } |
---|
37 | 39 | | else throw("Strict value is not equal to itself.") |
---|
38 | 40 | | } |
---|
39 | 41 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let pepeContractAddress = "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER" |
---|
5 | 5 | | |
---|
6 | 6 | | let sWavesIdString = "FXiFxedP76Cmg1v4XGNDYJpNE9gTGPRG1zjfkmUsGhFm" |
---|
7 | 7 | | |
---|
8 | 8 | | let pepeContract = addressFromStringValue(pepeContractAddress) |
---|
9 | 9 | | |
---|
10 | 10 | | let sWaves = fromBase58String(sWavesIdString) |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | 13 | | func getRate () = { |
---|
14 | 14 | | let results = invoke(pepeContract, "getRate", nil, nil) |
---|
15 | 15 | | match results { |
---|
16 | 16 | | case t: String => |
---|
17 | 17 | | $Tuple2(nil, t) |
---|
18 | 18 | | case _ => |
---|
19 | 19 | | throw("Error") |
---|
20 | 20 | | } |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | @Callable(i) |
---|
26 | 26 | | func deposit () = { |
---|
27 | 27 | | let startBalance = assetBalance(this, sWaves) |
---|
28 | | - | let results = invoke(pepeContract, "deposit", nil, i.payments) |
---|
29 | | - | if ((results == results)) |
---|
30 | | - | then match results { |
---|
31 | | - | case a: Unit => |
---|
32 | | - | let newBalance = assetBalance(this, sWaves) |
---|
| 28 | + | if ((startBalance == startBalance)) |
---|
| 29 | + | then { |
---|
| 30 | + | let results = invoke(pepeContract, "deposit", nil, i.payments) |
---|
| 31 | + | match results { |
---|
| 32 | + | case a: Unit => |
---|
| 33 | + | let newBalance = assetBalance(this, sWaves) |
---|
33 | 34 | | [ScriptTransfer(i.caller, (newBalance - startBalance), sWaves)] |
---|
34 | | - | case _ => |
---|
35 | | - | throw("Error deposit") |
---|
36 | | - | } |
---|
| 35 | + | case _ => |
---|
| 36 | + | throw("Error deposit") |
---|
| 37 | + | } |
---|
| 38 | + | } |
---|
37 | 39 | | else throw("Strict value is not equal to itself.") |
---|
38 | 40 | | } |
---|
39 | 41 | | |
---|
40 | 42 | | |
---|