tx · EcCMTiN7TcpxeDAkjWKcFS4AAitmxk21RyfiVMnHnoka
3NAfrN5xp6G6o34pzEhDwKDjz37NUaEpi8E: -0.00100000 Waves
2024.11.11 14:39 [3366734] smart account 3NAfrN5xp6G6o34pzEhDwKDjz37NUaEpi8E > SELF 0.00000000 Waves
{
"type": 13,
"id": "EcCMTiN7TcpxeDAkjWKcFS4AAitmxk21RyfiVMnHnoka",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1731325230512,
"version": 1,
"sender": "3NAfrN5xp6G6o34pzEhDwKDjz37NUaEpi8E",
"senderPublicKey": "4Hyg7NjV4cswejcnGeMvk6x68P2RLt9Y1ontHkWtTcEQ",
"proofs": [
"4NPSwmPb2VbRForDnsGpJaSnWYy9hFr1m1twhN9YNdpVNN3LsEZ3uEbEaLCGvgFMiFwb1wqcqNdw5A83Rk4qFeVo"
],
"script": "base64:BgIECAISAAQADXRhcmdldEFjY291bnQBGgFUmcdFrQw1qSNbFgeZ6tW41ICzXwdjp0IVAA5hbGxvd2VkQ2FsbGVyMQEg+e9728ltknUsQCBBwCxMBwhHVc4j3fqo8/Rn+6BSvzgADmFsbG93ZWRDYWxsZXIyASCYCefEqnQ+Xisjopf0iDd6xxXcvk3eeKqrqpB+xm2pNQEPaXNDYWxsZXJBbGxvd2VkAQ9jYWxsZXJQdWJsaWNLZXkDCQAAAgUPY2FsbGVyUHVibGljS2V5BQ5hbGxvd2VkQ2FsbGVyMQYJAAACBQ9jYWxsZXJQdWJsaWNLZXkFDmFsbG93ZWRDYWxsZXIyAQFpARRleGVjdXRlU2V0U2NyaXB0TnVsbAADCQEBIQEJAQ9pc0NhbGxlckFsbG93ZWQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkJAAIBAihVbmF1dGhvcml6ZWQ6IGNhbGxlciBub3QgaW4gYWxsb3dlZCBsaXN0BAZ0eFR5cGUJAJoDAQANBAd2ZXJzaW9uCQCaAwEAAQQHY2hhaW5JZAkAmgMBAFQEA2ZlZQkAmgMBAKCNBgQJdGltZXN0YW1wCQCaAwEIBQlsYXN0QmxvY2sJdGltZXN0YW1wBAZ0eERhdGEJAMsBAgkAywECCQDLAQIJAMsBAgkAywECBQZ0eFR5cGUFB3ZlcnNpb24FB2NoYWluSWQFDXRhcmdldEFjY291bnQFA2ZlZQUJdGltZXN0YW1wCQCUCgIJAMwIAgkBC0JpbmFyeUVudHJ5AgIPc2V0U2NyaXB0VHhEYXRhBQZ0eERhdGEJAMwIAgkBC0JpbmFyeUVudHJ5AgIPY2FsbGVyUHVibGljS2V5CAUBaQ9jYWxsZXJQdWJsaWNLZXkFA25pbAIjU2V0U2NyaXB0IHRyYW5zYWN0aW9uIGRhdGEgcHJlcGFyZWQBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5fQ/1QQ==",
"chainId": 84,
"height": 3366734,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2hMHu8oBKBMQEQhsZoBMEN8MuAv4nieLz5Tof7o3DDgB
Next: 5VR7ZhXcRsRLRxHatt56ecGC6w28hfxz3YRdzTanExY9
Diff:
Old | New | | Differences |
---|
16 | 16 | | func executeSetScriptNull () = if (!(isCallerAllowed(i.callerPublicKey))) |
---|
17 | 17 | | then throw("Unauthorized: caller not in allowed list") |
---|
18 | 18 | | else { |
---|
19 | | - | let setScriptTx = ScriptTransfer(Address(targetAccount), 0, unit) |
---|
20 | | - | [setScriptTx] |
---|
| 19 | + | let txType = toBytes(13) |
---|
| 20 | + | let version = toBytes(1) |
---|
| 21 | + | let chainId = toBytes(84) |
---|
| 22 | + | let fee = toBytes(100000) |
---|
| 23 | + | let timestamp = toBytes(lastBlock.timestamp) |
---|
| 24 | + | let txData = (((((txType + version) + chainId) + targetAccount) + fee) + timestamp) |
---|
| 25 | + | $Tuple2([BinaryEntry("setScriptTxData", txData), BinaryEntry("callerPublicKey", i.callerPublicKey)], "SetScript transaction data prepared") |
---|
21 | 26 | | } |
---|
22 | 27 | | |
---|
23 | 28 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let targetAccount = base58'3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx' |
---|
5 | 5 | | |
---|
6 | 6 | | let allowedCaller1 = base58'HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j' |
---|
7 | 7 | | |
---|
8 | 8 | | let allowedCaller2 = base58'BEVjN4AXKQ2Yw7KS1wiL5DMGg5V9cDniNH7dK2v5d7Ek' |
---|
9 | 9 | | |
---|
10 | 10 | | func isCallerAllowed (callerPublicKey) = if ((callerPublicKey == allowedCaller1)) |
---|
11 | 11 | | then true |
---|
12 | 12 | | else (callerPublicKey == allowedCaller2) |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | @Callable(i) |
---|
16 | 16 | | func executeSetScriptNull () = if (!(isCallerAllowed(i.callerPublicKey))) |
---|
17 | 17 | | then throw("Unauthorized: caller not in allowed list") |
---|
18 | 18 | | else { |
---|
19 | | - | let setScriptTx = ScriptTransfer(Address(targetAccount), 0, unit) |
---|
20 | | - | [setScriptTx] |
---|
| 19 | + | let txType = toBytes(13) |
---|
| 20 | + | let version = toBytes(1) |
---|
| 21 | + | let chainId = toBytes(84) |
---|
| 22 | + | let fee = toBytes(100000) |
---|
| 23 | + | let timestamp = toBytes(lastBlock.timestamp) |
---|
| 24 | + | let txData = (((((txType + version) + chainId) + targetAccount) + fee) + timestamp) |
---|
| 25 | + | $Tuple2([BinaryEntry("setScriptTxData", txData), BinaryEntry("callerPublicKey", i.callerPublicKey)], "SetScript transaction data prepared") |
---|
21 | 26 | | } |
---|
22 | 27 | | |
---|
23 | 28 | | |
---|
24 | 29 | | @Verifier(tx) |
---|
25 | 30 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
26 | 31 | | |
---|