tx · 1s6gqQUuQpK962E4QwHtDNsVXMHDdE7XPeH89cGaXbT
3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx: -0.01000000 Waves
2024.10.10 07:20 [3320252] smart account 3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx > SELF 0.00000000 Waves
{
"type": 13,
"id": "1s6gqQUuQpK962E4QwHtDNsVXMHDdE7XPeH89cGaXbT",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1728534024075,
"version": 2,
"chainId": 84,
"sender": "3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx",
"senderPublicKey": "9rzJ1VRwbiG3nvL1vPf5qXCmzWG6tWwUSNxrpP68pxsw",
"proofs": [
"2DkiZu7u9ZD1vLewiiJDDewMCGSDpx2ixUT93jdpatq2iS3csqaSkaF6iX89cxUf3K9EaFB1dhfGMHbddfg42xjM"
],
"script": "base64:AAIFAAAAAAAAABEIAhIDCgEIEgMKAQgSAwoBAQAAAAIAAAAADmJyaWRnZV9hZGRyZXNzCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAADmJyaWRnZV9hZGRyZXNzAgAAAAAAAAAAC2JhaV9hc3NldGlkCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAADmJyaWRnZV9hZGRyZXNzAgAAAAAAAAADAAAAAWkBAAAAE3NldEF1dGhvcml6ZWRCcmlkZ2UAAAABAAAAB2FkZHJlc3MDCQAAAAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAlgAAAABCAUAAAAEdGhpcwAAAAVieXRlcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAA5icmlkZ2VfYWRkcmVzcwUAAAAHYWRkcmVzcwUAAAADbmlsCQAAAgAAAAECAAAAIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gY2hhbmdlIHRoaXMAAAABaQEAAAAUc2V0QXV0aG9yaXplZEFzc2l0SWQAAAABAAAAB2Fzc2V0SWQDCQAAAAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAlgAAAABCAUAAAAEdGhpcwAAAAVieXRlcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAtiYWlfYXNzZXRpZAUAAAAHYXNzZXRJZAUAAAADbmlsCQAAAgAAAAECAAAAIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gY2hhbmdlIHRoaXMAAAABaQEAAAAId2l0aGRyYXcAAAABAAAABmFtb3VudAMJAAAAAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAA5icmlkZ2VfYWRkcmVzcwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAkAAlkAAAABBQAAAAtiYWlfYXNzZXRpZAUAAAADbmlsCQAAAgAAAAECAAAAIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gY2hhbmdlIHRoaXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledJqJVs=",
"height": 3320252,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EJJP8z9pFh67AN4ePr6JimvYuqyV5egkEHre3st81z6B
Next: CkBxjYGa3xrvDHD9jtyi9xZZb3uqY5JRsExNJBBmWf8b
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let bridge_address = base58'3MvMUdqfEzC66i9SiXzpGydZoWVq62QVn1u' |
---|
| 4 | + | let bridge_address = valueOrElse(getString(this, "bridge_address"), "") |
---|
5 | 5 | | |
---|
6 | | - | let bai_assetid = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' |
---|
| 6 | + | let bai_assetid = valueOrElse(getString(this, "bridge_address"), "") |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func withdraw (amount) = if ((toBase58String(i.caller.bytes) == toBase58String(bridge_address))) |
---|
10 | | - | then [ScriptTransfer(i.caller, amount, bai_assetid)] |
---|
| 9 | + | func setAuthorizedBridge (address) = if ((toBase58String(i.caller.bytes) == toBase58String(this.bytes))) |
---|
| 10 | + | then [StringEntry("bridge_address", address)] |
---|
| 11 | + | else throw("You are not allowed to change this") |
---|
| 12 | + | |
---|
| 13 | + | |
---|
| 14 | + | |
---|
| 15 | + | @Callable(i) |
---|
| 16 | + | func setAuthorizedAssitId (assetId) = if ((toBase58String(i.caller.bytes) == toBase58String(this.bytes))) |
---|
| 17 | + | then [StringEntry("bai_assetid", assetId)] |
---|
| 18 | + | else throw("You are not allowed to change this") |
---|
| 19 | + | |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | @Callable(i) |
---|
| 23 | + | func withdraw (amount) = if ((toBase58String(i.caller.bytes) == bridge_address)) |
---|
| 24 | + | then [ScriptTransfer(i.caller, amount, fromBase58String(bai_assetid))] |
---|
11 | 25 | | else throw("You are not allowed to change this") |
---|
12 | 26 | | |
---|
13 | 27 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let bridge_address = base58'3MvMUdqfEzC66i9SiXzpGydZoWVq62QVn1u' |
---|
| 4 | + | let bridge_address = valueOrElse(getString(this, "bridge_address"), "") |
---|
5 | 5 | | |
---|
6 | | - | let bai_assetid = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' |
---|
| 6 | + | let bai_assetid = valueOrElse(getString(this, "bridge_address"), "") |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func withdraw (amount) = if ((toBase58String(i.caller.bytes) == toBase58String(bridge_address))) |
---|
10 | | - | then [ScriptTransfer(i.caller, amount, bai_assetid)] |
---|
| 9 | + | func setAuthorizedBridge (address) = if ((toBase58String(i.caller.bytes) == toBase58String(this.bytes))) |
---|
| 10 | + | then [StringEntry("bridge_address", address)] |
---|
| 11 | + | else throw("You are not allowed to change this") |
---|
| 12 | + | |
---|
| 13 | + | |
---|
| 14 | + | |
---|
| 15 | + | @Callable(i) |
---|
| 16 | + | func setAuthorizedAssitId (assetId) = if ((toBase58String(i.caller.bytes) == toBase58String(this.bytes))) |
---|
| 17 | + | then [StringEntry("bai_assetid", assetId)] |
---|
| 18 | + | else throw("You are not allowed to change this") |
---|
| 19 | + | |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | @Callable(i) |
---|
| 23 | + | func withdraw (amount) = if ((toBase58String(i.caller.bytes) == bridge_address)) |
---|
| 24 | + | then [ScriptTransfer(i.caller, amount, fromBase58String(bai_assetid))] |
---|
11 | 25 | | else throw("You are not allowed to change this") |
---|
12 | 26 | | |
---|
13 | 27 | | |
---|
14 | 28 | | @Verifier(tx) |
---|
15 | 29 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
16 | 30 | | |
---|