tx · ECwb8qW1baA19ZFMfzYTSByjbC469T5mGT5z5UVVKAmb

3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE:  -0.04000000 Waves

2022.05.04 11:20 [2036692] smart account 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE > SELF 0.00000000 Waves

{ "type": 13, "id": "ECwb8qW1baA19ZFMfzYTSByjbC469T5mGT5z5UVVKAmb", "fee": 4000000, "feeAssetId": null, "timestamp": 1651652419855, "version": 2, "chainId": 84, "sender": "3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE", "senderPublicKey": "B3JNxLE1zmVDjs6MqSA1d3N7V6dS5Rq2wvxZqqVHo1fK", "proofs": [ "zSfm9TX96hu693ChdbWeFqLqWh1LuAHGGc1L3KJMxdE2omif3aPzTKqLDYp8fGmUvPTrMmX6rgrpxNEWbxEsoAA" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEIEggKBggICAgICBIDCgEEEgcKBQgICAgIEgMKAQgAAAARAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAACWxlYXNlUG9vbAkBAAAAB0FkZHJlc3MAAAABCAUAAAAEdGhpcwAAAAVieXRlcwAAAAACc2ECAAAAD1NUQUtJTkdfQU1PVU5UXwAAAAACbGECAAAADUxFQVNFX0FNT1VOVF8AAAAAAml4AgAAAANJRF8AAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAABQEAAA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JAAEsAAAAAgUAAAAEdHlwZQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAAmExBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAACYTIFAAAAB2FkZHJlc3MFAAAAA25pbAUAAAAJZGVsZXRFbnR5BAAAAAdiYmVudHJ5CQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABFBNQUEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAICAAAABVBPT0xfBQAAAARQTUFBCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgIAAAAJbHBfYXNzZXRfBQAAAARQTUFBCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAADYWExBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAADYWEyBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAAEdHlwZQUAAAAHYWRkcmVzcwUAAAADbmlsBQAAAAdiYmVudHJ5CQAAAgAAAAECAAAALk9ubHkgdGhlIEFkbWluIGl0c2VsZiBjYW4gaW52b2tlIHRoaXMgZnVuY3Rpb24AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlBe4UT", "height": 2036692, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2a63ZBPxJ4RxMLNJqKSSL4k5u178Lnv95VbrNYaybXuF Next: 7V1vRz9kVybdPesFfpstoYRkBsivipHs4wsqbwxx2dit Diff:
OldNewDifferences
8989 deletEnty
9090 }
9191 else {
92- let bbentry = [DeleteEntry(PMAA), DeleteEntry(address), DeleteEntry(("POOL_" + PMAA)), DeleteEntry((l + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address)), DeleteEntry((type + address))]
92+ let bbentry = [DeleteEntry(PMAA), DeleteEntry(address), DeleteEntry(("POOL_" + PMAA)), DeleteEntry(("lp_asset_" + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address)), DeleteEntry((type + address))]
9393 bbentry
9494 }
9595 else throw("Only the Admin itself can invoke this function")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let main = "main_asset"
55
66 let l = "lp_asset_"
77
88 let a1 = "swap_asset1_"
99
1010 let st = "address_staker_"
1111
1212 let sst = "address_pool_"
1313
1414 let swp = "address_swap_"
1515
1616 let a2 = "swap_asset2_"
1717
1818 let aa1 = "pool_1_"
1919
2020 let aa2 = "pool_2_"
2121
2222 let st1 = "staker_address"
2323
2424 let type = "type_"
2525
2626 let leasePool = Address(this.bytes)
2727
2828 let sa = "STAKING_AMOUNT_"
2929
3030 let la = "LEASE_AMOUNT_"
3131
3232 let ix = "ID_"
3333
3434 let exchangeRate = 5
3535
3636 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse " + address) + " as address")))
3737
3838
3939 @Callable(i)
4040 func addMainAsset (id) = if ((i.caller == this))
4141 then [StringEntry(main, id)]
4242 else throw("Only the Admin itself can invoke this function")
4343
4444
4545
4646 @Callable(i)
4747 func addPool (addres,pair,lp,stake,asset1,asset2) = {
4848 let address = getAddressIfValid(addres)
4949 let staker = getAddressIfValid(stake)
5050 let PMAA = getString(this, address)
5151 if ((i.caller == this))
5252 then if (isDefined(PMAA))
5353 then throw("The pool has been previously added.")
5454 else [StringEntry(address, pair), StringEntry(("POOL_" + pair), staker), StringEntry(address, ("POOL_" + pair)), StringEntry((l + pair), lp), StringEntry((aa1 + address), asset1), StringEntry((aa2 + address), asset2), StringEntry((type + address), "pools")]
5555 else throw("Only the Admin itself can invoke this function")
5656 }
5757
5858
5959
6060 @Callable(i)
6161 func activate (v) = if ((i.caller == this))
6262 then [BooleanEntry("activate", v)]
6363 else throw("Only the Admin itself can invoke this function")
6464
6565
6666
6767 @Callable(i)
6868 func addSwap (addres,stake,pair,asset1,asset2) = {
6969 let address = getAddressIfValid(addres)
7070 let staker = getAddressIfValid(stake)
7171 let PMAA = getString(this, address)
7272 if ((i.caller == this))
7373 then if (isDefined(PMAA))
7474 then throw("The address for this swap has been previously added.")
7575 else [StringEntry(pair, staker), StringEntry(address, pair), StringEntry((a1 + address), asset1), StringEntry((a2 + address), asset2), StringEntry((type + address), "swap")]
7676 else throw("Only the Admin itself can invoke this function")
7777 }
7878
7979
8080
8181 @Callable(i)
8282 func removeSwapOrPool (address) = {
8383 let PAA = getStringValue(this, (type + address))
8484 let PMAA = getStringValue(this, address)
8585 if ((i.caller == this))
8686 then if ((PAA == "swap"))
8787 then {
8888 let deletEnty = [DeleteEntry(PMAA), DeleteEntry(address), DeleteEntry((type + address)), DeleteEntry((a1 + address)), DeleteEntry((a2 + address))]
8989 deletEnty
9090 }
9191 else {
92- let bbentry = [DeleteEntry(PMAA), DeleteEntry(address), DeleteEntry(("POOL_" + PMAA)), DeleteEntry((l + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address)), DeleteEntry((type + address))]
92+ let bbentry = [DeleteEntry(PMAA), DeleteEntry(address), DeleteEntry(("POOL_" + PMAA)), DeleteEntry(("lp_asset_" + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address)), DeleteEntry((type + address))]
9393 bbentry
9494 }
9595 else throw("Only the Admin itself can invoke this function")
9696 }
9797
9898
9999 @Verifier(tx)
100100 func verify () = match tx {
101101 case _ =>
102102 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
103103 }
104104

github/deemru/w8io/169f3d6 
38.74 ms