tx · CsPSU8fAfh2uKtLcx2KvKVhNVBZbK39AfbVqEcttC8XX
3N7ZC7GnSHjLJbcK19XLTzQM98ydFCjGJqb: -0.01000000 Waves
2024.06.27 20:15 [3169420] smart account 3N7ZC7GnSHjLJbcK19XLTzQM98ydFCjGJqb > SELF 0.00000000 Waves
{
"type": 13,
"id": "CsPSU8fAfh2uKtLcx2KvKVhNVBZbK39AfbVqEcttC8XX",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1719508513087,
"version": 2,
"chainId": 84,
"sender": "3N7ZC7GnSHjLJbcK19XLTzQM98ydFCjGJqb",
"senderPublicKey": "3zgUW8CDTqH4BdsSszbDZPjHX9wMKyhA9uBgU4G9nSCj",
"proofs": [
"4ySpp6WkAPCrreBjUDAhdShW8xSV6vbuVUFA98bor3ETXJKct5bgcxCEAb2y9tB72aBdnVUs5hCgvU9YELmvWCbi"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIFCgMICAgAAAAAAAAAAQAAAAFpAQAAAA9yZWdpc3RlckNvbXBhbnkAAAADAAAABG5hbWUAAAAHYWRkcmVzcwAAAAh1bmlxdWVJZAQAAAAGY2FsbGVyCAUAAAABaQAAAAZjYWxsZXIEAAAACWtleVByZWZpeAkAASwAAAACAgAAAAhjb21wYW55XwUAAAAIdW5pcXVlSWQDAwMJAQAAAAIhPQAAAAIJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlrZXlQcmVmaXgCAAAABV9uYW1lBQAAAAR1bml0BgkBAAAAAiE9AAAAAgkABB0AAAACBQAAAAR0aGlzCQABLAAAAAIFAAAACWtleVByZWZpeAIAAAAIX2FkZHJlc3MFAAAABHVuaXQGCQEAAAACIT0AAAACCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAJa2V5UHJlZml4AgAAAAZfb3duZXIFAAAABHVuaXQJAAACAAAAAQIAAAAqQ29tcGFueSB3aXRoIHRoaXMgdW5pcXVlIElEIGFscmVhZHkgZXhpc3RzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAAJa2V5UHJlZml4AgAAAAVfbmFtZQUAAAAEbmFtZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACWtleVByZWZpeAIAAAAIX2FkZHJlc3MFAAAAB2FkZHJlc3MFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5vVgTXw==",
"height": 3169420,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GHSKFCSMcMQcX2EYBefvvx5AXsk2ir7v8pGHwVHwLnpj
Next: none
Diff:
Old | New | | Differences |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func SaveSum (num1,num2) = { |
---|
8 | | - | let sum = (num1 + num2) |
---|
9 | | - | [IntegerEntry("Sum", sum)] |
---|
| 7 | + | func registerCompany (name,address,uniqueId) = { |
---|
| 8 | + | let caller = i.caller |
---|
| 9 | + | let keyPrefix = ("company_" + uniqueId) |
---|
| 10 | + | if (if (if ((getString(this, (keyPrefix + "_name")) != unit)) |
---|
| 11 | + | then true |
---|
| 12 | + | else (getString(this, (keyPrefix + "_address")) != unit)) |
---|
| 13 | + | then true |
---|
| 14 | + | else (getString(this, (keyPrefix + "_owner")) != unit)) |
---|
| 15 | + | then throw("Company with this unique ID already exists") |
---|
| 16 | + | else [StringEntry((keyPrefix + "_name"), name), StringEntry((keyPrefix + "_address"), address)] |
---|
10 | 17 | | } |
---|
11 | 18 | | |
---|
| 19 | + | |
---|
| 20 | + | @Verifier(tx) |
---|
| 21 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
12 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func SaveSum (num1,num2) = { |
---|
8 | | - | let sum = (num1 + num2) |
---|
9 | | - | [IntegerEntry("Sum", sum)] |
---|
| 7 | + | func registerCompany (name,address,uniqueId) = { |
---|
| 8 | + | let caller = i.caller |
---|
| 9 | + | let keyPrefix = ("company_" + uniqueId) |
---|
| 10 | + | if (if (if ((getString(this, (keyPrefix + "_name")) != unit)) |
---|
| 11 | + | then true |
---|
| 12 | + | else (getString(this, (keyPrefix + "_address")) != unit)) |
---|
| 13 | + | then true |
---|
| 14 | + | else (getString(this, (keyPrefix + "_owner")) != unit)) |
---|
| 15 | + | then throw("Company with this unique ID already exists") |
---|
| 16 | + | else [StringEntry((keyPrefix + "_name"), name), StringEntry((keyPrefix + "_address"), address)] |
---|
10 | 17 | | } |
---|
11 | 18 | | |
---|
| 19 | + | |
---|
| 20 | + | @Verifier(tx) |
---|
| 21 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
12 | 22 | | |
---|