tx · oBAdq27BP79QYqV5tJoQQHvRwaBv5d3Q9QNvHK3Em7u

3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6:  -0.01000000 Waves

2023.02.27 15:28 [2468121] smart account 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6 > SELF 0.00000000 Waves

{ "type": 13, "id": "oBAdq27BP79QYqV5tJoQQHvRwaBv5d3Q9QNvHK3Em7u", "fee": 1000000, "feeAssetId": null, "timestamp": 1677500917748, "version": 2, "chainId": 84, "sender": "3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6", "senderPublicKey": "3pW4h7e3NAcqGkvc1AyziZLMPSsG2eXvCGU7vLxPXkaq", "proofs": [ "3ricgKYY6H4WwFdJnbPo8qED65fa75niXasyaRdbhGASGGJRSCfcAJi8WFDt9UNJPgE2RrvckXZyeK7XEjKokcnG" ], "script": "base64:BgIKCAISABIECgIBAQMAFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkCDmJzdFVzZHRBc3NldElkABZic3RTdXJmQXNzZXRTdG9yYWdlS2V5Ag5ic3RTdXJmQXNzZXRJZAEGdW53cmFwAQRkYXRhBAckbWF0Y2gwBQRkYXRhAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAXYFByRtYXRjaDAFAXYJAAIBAiFFeHBlY3RlZCB0aGF0IGRhdGEgd2lsbCBiZSBzdHJpbmcCAWkBC2lzc3VlQXNzZXRzAAQHYnN0VXNkdAkAwwgHAgxic3RVc2R0VGVzdDECAACAreIEAAYGBQR1bml0AAAEDmJzdFVzZHRBc3NldElkCQC4CAEFB2JzdFVzZHQEB2JzdFN1cmYJAMMIBwIMYnN0U3VyZlRlc3QxAgAAgK3iBAAGBgUEdW5pdAABBA5ic3RTdXJmQXNzZXRJZAkAuAgBBQdic3RTdXJmCQDMCAIJAQtEZWxldGVFbnRyeQEFFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkJAMwIAgkBC0RlbGV0ZUVudHJ5AQUWYnN0U3VyZkFzc2V0U3RvcmFnZUtleQkAzAgCCQELQmluYXJ5RW50cnkCBRZic3RVc2R0QXNzZXRTdG9yYWdlS2V5BQ5ic3RVc2R0QXNzZXRJZAkAzAgCCQELQmluYXJ5RW50cnkCBRZic3RTdXJmQXNzZXRTdG9yYWdlS2V5BQ5ic3RTdXJmQXNzZXRJZAkAzAgCBQdic3RVc2R0CQDMCAIFB2JzdFN1cmYFA25pbAFpAR1zZW5kSW50ZXJuYWxBc3NldHNUb1RoZUNhbGxlcgICaWQGYW1vdW50BAdhc3NldElkAwkAAAIFAmlkAAAJAQZ1bndyYXABCQChCAEFFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkDCQAAAgUCaWQAAQkBBnVud3JhcAEJAKEIAQUWYnN0U3VyZkFzc2V0U3RvcmFnZUtleQkAAgECDldyb25nIEFzc2V0IElkBAdiYWxhbmNlCQDwBwIFBHRoaXMFB2Fzc2V0SWQDCQBnAgUHYmFsYW5jZQUGYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUGYW1vdW50BQdhc3NldElkBQNuaWwJAMwIAgkBB1JlaXNzdWUDBQdhc3NldElkBQZhbW91bnQGCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUGYW1vdW50BQdhc3NldElkBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5WVm1RQ==", "height": 2468121, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EQsk4kmittQy7Re7ZRkQgomcom7JZ6LGj5QAvDvA6xyp Next: 54y3zxTKCsTaGVavBfiJja7zr2977ojrTzVunUJig2xZ Diff:
OldNewDifferences
3434 let balance = assetBalance(this, assetId)
3535 if ((balance >= amount))
3636 then [ScriptTransfer(i.caller, amount, assetId)]
37- else throw("Insufficient funds")
37+ else [Reissue(assetId, amount, true), ScriptTransfer(i.caller, amount, assetId)]
3838 }
3939
4040
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let bstUsdtAssetStorageKey = "bstUsdtAssetId"
55
66 let bstSurfAssetStorageKey = "bstSurfAssetId"
77
88 func unwrap (data) = match data {
99 case v: ByteVector =>
1010 v
1111 case _ =>
1212 throw("Expected that data will be string")
1313 }
1414
1515
1616 @Callable(i)
1717 func issueAssets () = {
1818 let bstUsdt = Issue("bstUsdtTest1", "", 10000000, 6, true, unit, 0)
1919 let bstUsdtAssetId = calculateAssetId(bstUsdt)
2020 let bstSurf = Issue("bstSurfTest1", "", 10000000, 6, true, unit, 1)
2121 let bstSurfAssetId = calculateAssetId(bstSurf)
2222 [DeleteEntry(bstUsdtAssetStorageKey), DeleteEntry(bstSurfAssetStorageKey), BinaryEntry(bstUsdtAssetStorageKey, bstUsdtAssetId), BinaryEntry(bstSurfAssetStorageKey, bstSurfAssetId), bstUsdt, bstSurf]
2323 }
2424
2525
2626
2727 @Callable(i)
2828 func sendInternalAssetsToTheCaller (id,amount) = {
2929 let assetId = if ((id == 0))
3030 then unwrap(getBinary(bstUsdtAssetStorageKey))
3131 else if ((id == 1))
3232 then unwrap(getBinary(bstSurfAssetStorageKey))
3333 else throw("Wrong Asset Id")
3434 let balance = assetBalance(this, assetId)
3535 if ((balance >= amount))
3636 then [ScriptTransfer(i.caller, amount, assetId)]
37- else throw("Insufficient funds")
37+ else [Reissue(assetId, amount, true), ScriptTransfer(i.caller, amount, assetId)]
3838 }
3939
4040
4141 @Verifier(tx)
4242 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4343

github/deemru/w8io/169f3d6 
49.88 ms