tx · HUHqq7f67fSgE3VKu1gkVMxmCoXu1v8v1GjaqPt1WLsv
3MvkyDr4VsmLhsQAg1CfMnsvbsAYJDBXJ1o: -0.01400000 Waves
2021.12.16 15:47 [1836828] smart account 3MvkyDr4VsmLhsQAg1CfMnsvbsAYJDBXJ1o > SELF 0.00000000 Waves
{
"type": 13,
"id": "HUHqq7f67fSgE3VKu1gkVMxmCoXu1v8v1GjaqPt1WLsv",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1639658832378,
"version": 2,
"chainId": 84,
"sender": "3MvkyDr4VsmLhsQAg1CfMnsvbsAYJDBXJ1o",
"senderPublicKey": "EfgW9rhZvzmXU1Fcb1fJTgQzZWmyKDnKM3DkvfUh888x",
"proofs": [
"4dDWsh7MdUGAxQxSvvXDKKGA8XkxByKC43uCvhvi3X9epT9LYdXYRFvyAsHBigEtYRnqjuDQ63WVPcet3BjF4kuT"
],
"script": "base64:AAIFAAAAAAAAAGwIAhIECgIICBobCgFhEhZjb250cm9sQ29udHJhY3RBZGRyZXNzGgYKAWISAWkaCQoBYxIEYWRkchoOCgFkEgloYXNoZWRVcmkaDAoBZRIHJG1hdGNoMBoHCgFmEgJ0eBoLCgFnEgZ2ZXJpZnkAAAABAAAAAAFhAQAAABoBVKT64jLa+CJeizfFodW99FF4iM0xnvpPsgAAAAEAAAABYgEAAAAGYWRkUmVmAAAAAgAAAAFjAAAAAWQDCQEAAAACIT0AAAACCAgFAAAAAWIAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAFhCQAAAgAAAAECAAAARUl0J3Mgb3JhY2xlIG1ldGhvZCBhbmQgY2FuIGJlIGNhbGxlZCBvbmx5IGJ5IGNvbnRyb2wgY29udHJhY3QgYWRkcmVzcwQAAAABZQkABB0AAAACBQAAAAR0aGlzBQAAAAFkAwkAAAEAAAACBQAAAAFlAgAAAARVbml0CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAAWQJAAEsAAAAAgkAASwAAAACBQAAAAFjAgAAAAE6CQACWAAAAAEIBQAAAAFiAAAADXRyYW5zYWN0aW9uSWQFAAAAA25pbAkAAAIAAAABAgAAACpSZWYgZm9yIHNwZWNpZmllZCBoYXNoZWRVcmkgYWxyZWFkeSBleGlzdHMAAAABAAAAAWYBAAAAAWcAAAAACQAB9AAAAAMIBQAAAAFmAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABZgAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFmAAAAD3NlbmRlclB1YmxpY0tleQ6vfCQ=",
"height": 1836828,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: D8fxnkLp2vnyKehjgWEYHDq76VFxwMxTamwuBrepRBt1
Next: J8NT99tYiygC5ViLd86pK6ExCH3yG9T5MWgoyNTmF8JJ
Diff:
Old | New | | Differences |
---|
4 | 4 | | let controlContractAddress = base58'3N4xR95UqYH94X8cU4BGPCpPHB6wgMS8jSy' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func addRef (encryptedUri,addr) = if ((i.caller.bytes != controlContractAddress)) |
---|
8 | | - | then throw("It's an oracle method and can be called only by the control contract") |
---|
9 | | - | else match getString(this, encryptedUri) { |
---|
| 7 | + | func addRef (addr,hashedUri) = if ((i.caller.bytes != controlContractAddress)) |
---|
| 8 | + | then throw("It's oracle method and can be called only by control contract address") |
---|
| 9 | + | else match getString(this, hashedUri) { |
---|
10 | 10 | | case _: Unit => |
---|
11 | | - | [StringEntry(encryptedUri, addr)] |
---|
| 11 | + | [StringEntry(hashedUri, ((addr + ":") + toBase58String(i.transactionId)))] |
---|
12 | 12 | | case _ => |
---|
13 | | - | throw("Ref for specified encryptedUri already exists") |
---|
| 13 | + | throw("Ref for specified hashedUri already exists") |
---|
14 | 14 | | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let controlContractAddress = base58'3N4xR95UqYH94X8cU4BGPCpPHB6wgMS8jSy' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func addRef (encryptedUri,addr) = if ((i.caller.bytes != controlContractAddress)) |
---|
8 | | - | then throw("It's an oracle method and can be called only by the control contract") |
---|
9 | | - | else match getString(this, encryptedUri) { |
---|
| 7 | + | func addRef (addr,hashedUri) = if ((i.caller.bytes != controlContractAddress)) |
---|
| 8 | + | then throw("It's oracle method and can be called only by control contract address") |
---|
| 9 | + | else match getString(this, hashedUri) { |
---|
10 | 10 | | case _: Unit => |
---|
11 | | - | [StringEntry(encryptedUri, addr)] |
---|
| 11 | + | [StringEntry(hashedUri, ((addr + ":") + toBase58String(i.transactionId)))] |
---|
12 | 12 | | case _ => |
---|
13 | | - | throw("Ref for specified encryptedUri already exists") |
---|
| 13 | + | throw("Ref for specified hashedUri already exists") |
---|
14 | 14 | | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Verifier(tx) |
---|
18 | 18 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
19 | 19 | | |
---|