tx · EsReM4XWYiefaggUJevHyUvvpKGRBhqnpWutAe9U8Fw4

3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G:  -0.04200000 Waves

2022.06.21 14:06 [2106072] smart account 3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G > SELF 0.00000000 Waves

{ "type": 13, "id": "EsReM4XWYiefaggUJevHyUvvpKGRBhqnpWutAe9U8Fw4", "fee": 4200000, "feeAssetId": null, "timestamp": 1655809657037, "version": 2, "chainId": 84, "sender": "3MyYckPLvxVKaoywB9DyoUQpy4rPbG44W2G", "senderPublicKey": "GSE3xef7yPJM86RK98TTRpNp7C67yeMHAkciapPuU56K", "proofs": [ "26TAVKRjPxdq2qdaR9ky7G7MQa845D5Fg2eUCxJ6fDjad4dKq27ftqDMbTX8ZJjMzUfVeyRmTnv8rpLABJxECRoQ" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAJ0dwEAAAAaAVQ+7YEH8mRvE3c0tbqpeHlZj6y6IMZvhw8AAAAAAkJBAQAAACCMCWI0B6uy2aH1YA8IDoXmh9Ymmpl0HityIO+TCT8VJQAAAAADVENJAQAAACC+QxgAujAmMp9Bgik1StjQaVZeQEXcnOB8P3E0N8Qy/AAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAkJBCQAAAgAAAAECAAAAGFlvdSBjYW4gc3Rha2Ugc05TQlQgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAkJBBAAAAAt0b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JAABnAAAAAgAAAAAAAAAAAAUAAAAHYmFsYW5jZQkAAAIAAAABAgAAABtVbnN1ZmljaWVudCBhY2NvdW50IGJhbGFuY2UEAAAACVRDSUFtb3VudAQAAAAHJG1hdGNoMAkAA+wAAAABBQAAAANUQ0kDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAFxBQAAAAckbWF0Y2gwCAUAAAABcQAAAAhxdWFudGl0eQAAAAAAAAAAAAQAAAACdnAJAABrAAAAAwkAA/AAAAACBQAAAAR0aGlzBQAAAAJCQQAAAAAABfXhAAUAAAAJVENJQW1vdW50BAAAAAV0b1JlcAkAAGsAAAADBQAAAAJ2cAUAAAAGYW1vdW50AAAAAAAF9eEABAAAAAJ0YwkAAGsAAAADBQAAAAV0b1JlcAAAAAAABfXhAAAAAAACVAvkAAQAAAADYnJuCQEAAAAEQnVybgAAAAIFAAAAA1RDSQUAAAAGYW1vdW50BAAAAAN0cmIJAABlAAAAAgUAAAAFdG9SZXAFAAAAAnRjBAAAAAR0cnNmCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAA3RyYgUAAAACQkEEAAAAA3R0cgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAJ0dwUAAAACdGMFAAAAAkJBCQAETAAAAAIFAAAAA2JybgkABEwAAAACBQAAAAR0cnNmCQAETAAAAAIFAAAAA3R0cgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlw7SdL", "height": 2106072, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BG4k9JGedSbTfMmd43MsDer4cnGBHv54hoAksapcjqaw Next: none Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'3MuepBtBCjoxHzt6z8cSKhcg7hps7AR9DoL'
55
6-let b = base58'DatazKNzkW2dr3r2ZGCCYWoy52JV5pcZfrRNPQgKh9ai'
6+let b = base58'AReNqsLEzTufx73ftawaLcsDVAnvFjD2iVzzAE2CPXsS'
77
88 let c = base58'DohoSLuGMXvefNR5eZmQbmas5amzdCkNY6DmfqgjfZ7q'
99
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'3MuepBtBCjoxHzt6z8cSKhcg7hps7AR9DoL'
55
6-let b = base58'DatazKNzkW2dr3r2ZGCCYWoy52JV5pcZfrRNPQgKh9ai'
6+let b = base58'AReNqsLEzTufx73ftawaLcsDVAnvFjD2iVzzAE2CPXsS'
77
88 let c = base58'DohoSLuGMXvefNR5eZmQbmas5amzdCkNY6DmfqgjfZ7q'
99
1010 let d = false
1111
1212 @Callable(e)
1313 func stake () = {
1414 let f = value(e.payments[0])
1515 let g = f.amount
1616 if ((f.assetId != b))
1717 then throw("You can stake sNSBT only")
1818 else if (d)
1919 then throw("smart contract is on lock")
2020 else {
2121 let h = assetBalance(this, b)
2222 let i = {
2323 let j = assetInfo(c)
2424 if ($isInstanceOf(j, "Asset"))
2525 then {
2626 let k = j
2727 k.quantity
2828 }
2929 else throw("Can't find asset")
3030 }
3131 let l = (h - g)
3232 let m = fraction(i, 100000000, l)
3333 let n = fraction(g, m, 100000000)
3434 let o = Reissue(c, n, true)
3535 let p = ScriptTransfer(e.caller, n, c)
3636 [o, p]
3737 }
3838 }
3939
4040
4141
4242 @Callable(e)
4343 func withdraw () = {
4444 let q = value(e.payments[0])
4545 let r = q.amount
4646 let s = assetBalance(e.caller, c)
4747 if ((q.assetId != c))
4848 then throw("sdasda")
4949 else if ((0 >= r))
5050 then throw("Can't withdraw 0 or negative ammount")
5151 else if ((0 >= s))
5252 then throw("Unsuficient account balance")
5353 else {
5454 let t = {
5555 let j = assetInfo(c)
5656 if ($isInstanceOf(j, "Asset"))
5757 then {
5858 let u = j
5959 u.quantity
6060 }
6161 else 0
6262 }
6363 let v = fraction(assetBalance(this, b), 100000000, t)
6464 let w = fraction(v, r, 100000000)
6565 let x = fraction(w, 100000000, 10000000000)
6666 let y = Burn(c, r)
6767 let z = (w - x)
6868 let A = ScriptTransfer(e.caller, z, b)
6969 let B = ScriptTransfer(Address(a), x, b)
7070 [y, A, B]
7171 }
7272 }
7373
7474
7575 @Verifier(C)
7676 func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey)
7777

github/deemru/w8io/026f985 
54.33 ms