tx · 9ANzN8Ncytm7UKzfUAi5B3xPPnfY6Ag7ZwJvJ8LjDJmf
3MrmGzcV66AnwcVLXqEBY5n9c3bWhkqXhEU: -0.01400000 Waves
2022.04.01 20:23 [1989816] smart account 3MrmGzcV66AnwcVLXqEBY5n9c3bWhkqXhEU > SELF 0.00000000 Waves
{
"type": 13,
"id": "9ANzN8Ncytm7UKzfUAi5B3xPPnfY6Ag7ZwJvJ8LjDJmf",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1648833867365,
"version": 2,
"chainId": 84,
"sender": "3MrmGzcV66AnwcVLXqEBY5n9c3bWhkqXhEU",
"senderPublicKey": "2B9TEww3r5DnQBtU4cuHLA6jiWtrzvLFwKTAhGfRhKf2",
"proofs": [
"C6JrXTJ48xJ9guhbSDSLSmE5aNfsgksoGVNZWx5PQsDx9UzTviQnYpuNPKpijD2uTDrrtHRe35j9Vg7tAhrJk7p"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABgAAAAAFYXhhaXACAAAABGF4YWkAAAAAD3N0YWtlcldhdmVzQXhhaQIAAAAad2F2ZXNheGFpX2FkZHJlc3NfY29udHJhY3QAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAABQAAAAAMYWRpbWluT3JhY2xlCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUDsdtEk6F5tGxA0UcblzCTpEG+4oMPelAAAAAAARheGFpCQACWQAAAAEJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAxhZGltaW5PcmFjbGUFAAAABWF4YWlwAgAAACBhc3NldCBpZCBmb3IgYXhhaSBpcyBub3QgZGVmaW5lZAAAAAAGc3Rha2VyCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAADGFkaW1pbk9yYWNsZQUAAAAPc3Rha2VyV2F2ZXNBeGFpAgAAADBhZGRyZXNzIGZvciBzdGFrZXIgZm9yIEF4QWkvV2F2ZXMgaXMgbm90IGRlZmluZWQAAAABAAAAAWkBAAAAEWV4Y2hhbmdlV2F2ZXNBeEFpAAAAAAMJAQAAAAIhPQAAAAIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABHVuaXQJAAACAAAAAQIAAAAQdW5leHBlY3RlZCBhc3NldAQAAAABcgkAA/wAAAAEBQAAAAZzdGFrZXICAAAAC2NhbmNlbFN0YWtlCQAETAAAAAIJAABoAAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BQAAAAxleGNoYW5nZVJhdGUFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAAFyBQAAAAFyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQFAAAADGV4Y2hhbmdlUmF0ZQUAAAAEYXhhaQUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAArAoDE",
"height": 1989816,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Bv27KjRGKg6UwdbhkCxUexdFdKzN4kNG8spnteoL2seu
Next: none
Diff:
Old | New | | Differences |
---|
9 | 9 | | |
---|
10 | 10 | | let adiminOracle = Address(base58'3MqGE8yKJmPuwn7sXFLo56rhW9tnMapDDRq') |
---|
11 | 11 | | |
---|
12 | | - | let axai = base58'496Ep8DDZwru81HjT5YAj7vUvYUi4zxyrHCgkD9GXmwe' |
---|
| 12 | + | let axai = fromBase58String(valueOrErrorMessage(getString(adiminOracle, axaip), "asset id for axai is not defined")) |
---|
13 | 13 | | |
---|
14 | 14 | | let staker = Address(fromBase58String(valueOrErrorMessage(getString(adiminOracle, stakerWavesAxai), "address for staker for AxAi/Waves is not defined"))) |
---|
15 | 15 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let axaip = "axai" |
---|
5 | 5 | | |
---|
6 | 6 | | let stakerWavesAxai = "wavesaxai_address_contract" |
---|
7 | 7 | | |
---|
8 | 8 | | let exchangeRate = 5 |
---|
9 | 9 | | |
---|
10 | 10 | | let adiminOracle = Address(base58'3MqGE8yKJmPuwn7sXFLo56rhW9tnMapDDRq') |
---|
11 | 11 | | |
---|
12 | | - | let axai = base58'496Ep8DDZwru81HjT5YAj7vUvYUi4zxyrHCgkD9GXmwe' |
---|
| 12 | + | let axai = fromBase58String(valueOrErrorMessage(getString(adiminOracle, axaip), "asset id for axai is not defined")) |
---|
13 | 13 | | |
---|
14 | 14 | | let staker = Address(fromBase58String(valueOrErrorMessage(getString(adiminOracle, stakerWavesAxai), "address for staker for AxAi/Waves is not defined"))) |
---|
15 | 15 | | |
---|
16 | 16 | | @Callable(i) |
---|
17 | 17 | | func exchangeWavesAxAi () = if ((i.payments[0].assetId != unit)) |
---|
18 | 18 | | then throw("unexpected asset") |
---|
19 | 19 | | else { |
---|
20 | 20 | | let r = invoke(staker, "cancelStake", [(i.payments[0].amount * exchangeRate)], nil) |
---|
21 | 21 | | if ((r == r)) |
---|
22 | 22 | | then [ScriptTransfer(i.caller, (i.payments[0].amount * exchangeRate), axai)] |
---|
23 | 23 | | else throw("Strict value is not equal to itself.") |
---|
24 | 24 | | } |
---|
25 | 25 | | |
---|
26 | 26 | | |
---|