tx · BEGfzUrNJfFkmXeLeX2M27TqGKUV7VChnM9RjCQ7WeNr

3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo:  -0.04000000 Waves

2021.09.02 00:46 [1684525] smart account 3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo > SELF 0.00000000 Waves

{ "type": 13, "id": "BEGfzUrNJfFkmXeLeX2M27TqGKUV7VChnM9RjCQ7WeNr", "fee": 4000000, "feeAssetId": null, "timestamp": 1630532847948, "version": 2, "chainId": 84, "sender": "3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo", "senderPublicKey": "CD4N2SBeZVBUwmtsqwfmQ3ZKnBP3AxpZCvJ5QkHytUed", "proofs": [ "q8S3XhfiL6UZaV1VdM9BxxLKxCNGLv83wQTZf8xYYxSejXkVAhtoARpWDrYktYV6hkFxY53pCnvBFAxQuuGBTZe" ], "script": "base64:AAIFAAAAAAAAAB0IAhIECgIIGBIDCgEIEgMKAQgSBAoCCAQSAwoBCAAAAAcAAAAABmNvbmZpZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAAGY29uZmlnAgAAAAAAAAAABWFkbWluCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAVhZG1pbgIAAAAAAAAAAAVwb29scwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAABXBvb2xzAgAAABZObyBrZXkgcG9vbHMgd2FzIGZvdW5kAQAAAAdpc0FkbWluAAAAAQAAAA1jYWxsZXJBZGRyZXNzAwkAAAAAAAACBQAAAA1jYWxsZXJBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAVhZG1pbgYHAQAAAAljaGVja1Bvb2wAAAABAAAAB3Bvb2xBZGQDCQEAAAAIY29udGF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aQAAAAhwYXltZW50cwMJAAAAAAAAAgUAAAALdG9rZW5BbW91bnQFAAAAC3Rva2VuQW1vdW50BAAAAAd0b2tlbklkCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAtwb29sQWRkcmVzcwIAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAUAAAALdG9rZW5BbW91bnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAMJAAAAAAAAAgUAAAAHdG9rZW5JZAIAAAAFV0FWRVMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF0BQAAAAR1bml0BQAAAANuaWwJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF0CQACWQAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAF0BQAAAAckbWF0Y2gwBQAAAANuaWwJAAACAAAAAQIAAAAYSW5jb3JyZWN0IGludm9rZSByZXN1bHQhCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAABRObyBwYXltZW50IGF0dGFjaGVkIQkAAAIAAAABAgAAABdBc3NldElkcyBkb2VzIG5vdCBtYXRjaAkAAAIAAAABAgAAABdQb29sIGFkZHJlc3Mgbm90IGZvdW5kIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5rbnSSA==", "height": 1684525, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G2JWKd3wygEgd4HPnwDaiRUVCttDsu37jeF6jU87xqvf Next: DD7XMnCCbX2kdYpWFPv3T9ebNR4EW5FStoCQKU4LJvTK Diff:
OldNewDifferences
8787 func withdrawFrom (o) = if (f(o))
8888 then {
8989 let x = getStringValue(addressFromStringValue(o), "dTokenId")
90- if ((toBytes(x) == m.payments[0].assetId))
90+ if ((fromBase58String(x) == m.payments[0].assetId))
9191 then if ((size(m.payments) > 0))
9292 then {
9393 let s = toBase58String(m.caller.bytes)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = valueOrElse(getStringValue(this, "config"), "")
55
66 let b = valueOrElse(getStringValue(this, "admin"), "")
77
88 let c = valueOrErrorMessage(getString(this, "pools"), "No key pools was found")
99
1010 func d (e) = if ((e == addressFromStringValue(b)))
1111 then true
1212 else false
1313
1414
1515 func f (g) = if (contains(c, g))
1616 then true
1717 else false
1818
1919
2020 func h (i,j) = StringEntry(i, j)
2121
2222
2323 func k (i,l) = IntegerEntry(i, l)
2424
2525
2626 @Callable(m)
2727 func setup (n,c) = if (if (!(isDefined(getString(this, "config"))))
2828 then !(isDefined(getString(this, "pools")))
2929 else false)
3030 then [h("config", n), h("pools", makeString(c, ";"))]
3131 else throw("Admin and config address already definied!")
3232
3333
3434
3535 @Callable(m)
3636 func addPool (o) = if (d(m.caller))
3737 then {
3838 let p = split(c, ";")
3939 if ((containsElement(p, o) == false))
4040 then {
4141 let q = (p :+ o)
4242 [h("pools", makeString(q, ";"))]
4343 }
4444 else throw("Pool already exists!")
4545 }
4646 else throw("Address does not match with admin address!")
4747
4848
4949
5050 @Callable(m)
5151 func updateConfig (n) = if (d(m.caller))
5252 then [h("config", n)]
5353 else throw("Address does not match with admin address!")
5454
5555
5656
5757 @Callable(m)
5858 func depositAt (o,r) = if (f(o))
5959 then if ((size(m.payments) > 0))
6060 then {
6161 let s = toBase58String(m.caller.bytes)
6262 let t = invoke(addressFromStringValue(o), "deposit", [s, r], m.payments)
6363 if ((t == t))
6464 then {
6565 let u = getStringValue(addressFromStringValue(o), "dTokenId")
6666 let v = t
6767 if ($isInstanceOf(v, "Int"))
6868 then {
6969 let w = v
7070 [ScriptTransfer(m.caller, w, fromBase58String(u))]
7171 }
7272 else if ($isInstanceOf(v, "String"))
7373 then {
7474 let w = v
7575 nil
7676 }
7777 else throw("Incorrect invoke result!")
7878 }
7979 else throw("Strict value is not equal to itself.")
8080 }
8181 else throw("No payment attached!")
8282 else throw("Pool address not found!")
8383
8484
8585
8686 @Callable(m)
8787 func withdrawFrom (o) = if (f(o))
8888 then {
8989 let x = getStringValue(addressFromStringValue(o), "dTokenId")
90- if ((toBytes(x) == m.payments[0].assetId))
90+ if ((fromBase58String(x) == m.payments[0].assetId))
9191 then if ((size(m.payments) > 0))
9292 then {
9393 let s = toBase58String(m.caller.bytes)
9494 let t = invoke(addressFromStringValue(o), "withdraw", [s], m.payments)
9595 if ((t == t))
9696 then {
9797 let u = getStringValue(addressFromStringValue(o), "assetId")
9898 let v = t
9999 if ($isInstanceOf(v, "Int"))
100100 then {
101101 let w = v
102102 if ((u == "WAVES"))
103103 then [ScriptTransfer(m.caller, w, unit)]
104104 else [ScriptTransfer(m.caller, w, fromBase58String(u))]
105105 }
106106 else if ($isInstanceOf(v, "String"))
107107 then {
108108 let w = v
109109 nil
110110 }
111111 else throw("Incorrect invoke result!")
112112 }
113113 else throw("Strict value is not equal to itself.")
114114 }
115115 else throw("No payment attached!")
116116 else throw("AssetIds does not match")
117117 }
118118 else throw("Pool address not found!")
119119
120120
121121 @Verifier(y)
122122 func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
123123

github/deemru/w8io/026f985 
22.82 ms