tx · 97ds3z8imM8aug4XfbqRCEj9h3EFSSfoiqExdeLom6P 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK: -0.01000000 Waves 2022.05.22 16:29 [2062943] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves
{ "type": 13, "id": "97ds3z8imM8aug4XfbqRCEj9h3EFSSfoiqExdeLom6P", "fee": 1000000, "feeAssetId": null, "timestamp": 1653226161969, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "7YnTP9pen3Ah2SGBuSoC8FDT93TPmVfBaUM2ih7oza2WT15UHmL8k1PY8yTQVFiU684d1EqzqM3d66aXNDnBogS" ], "script": "base64:AAIFAAAAAAAAABEIAhIFCgMICAgSABIECgIICAAAAAIAAAAABEJVc2QBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAAhkQXBwRmVlcwEAAAAaAVTVEO4dXi2WWBlfa2VnxLZIutJS/g3SExoAAAADAAAAAWkBAAAADERlcG9zaXRGdW5kcwAAAAMAAAAJU2NvcGVEZXNjAAAADERlbGl2ZXJhYmxlcwAAABFGcmVlbGFuY2VyQWRkcmVzcwQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQAAZgAAAAIJAABoAAAAAgAAAAAAAAAAMgAAAAAABfXhAAkAA/AAAAACCAUAAAABaQAAAAZjYWxsZXIFAAAABEJVc2QJAAACAAAAAQIAAAApWW91IG11c3QgaGF2ZSA1MCBCVXNkIGF0IGxlYXN0IHRvIGRlcG9zaXQDC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bWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAEUZyZWVMYW5jZXJQYXltZW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAFEZyZWVsYW5jZXJBZGRyZXNzU3RyCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzBQAAABFGcmVlbGFuY2VyQWRkcmVzcwQAAAARQWRkcmVzc0ZyZWVMYW5jZXIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAFEZyZWVsYW5jZXJBZGRyZXNzU3RyBAAAAAlkQXBwRnJlZXMJAQAAAAdBZGRyZXNzAAAAAQUAAAAIZEFwcEZlZXMDCQAAAAAAAAIFAAAABmFtb3VudAAAAAAAAAAAAAkAAAIAAAABAgAAADRVc2VyJ3MgYmFsYW5jZSBpcyAwIEJVc2RjIGNhbm5vdCByZWFsaXplIGFueSBwYXltZW50CQAFFAAAAAIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgUAAAAEVXNlcgIAAAAIX1BheW1lbnQAAAAAAAAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAARQWRkcmVzc0ZyZWVMYW5jZXIJAABpAAAAAgkAAGgAAAACAAAAAAAAAABfBQAAAAZhbW91bnQAAAAAAAAAAGQFAAAABEJVc2QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJZEFwcEZyZWVzCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAGYW1vdW50AAAAAAAAAABkBQAAAARCVXNkBQAAAANuaWwFAAAABEJVc2QAAAAAKvfoeQ==", "height": 2062943, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B4NCscQpUgg42CJw4mjsafahK7ecC9RwyWYNm2RgKxP9 Next: 676LSzL4NA8vY5DcCQjUkawWSqCSDWvR9k6jRUrkfScp Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | let dAppFrees = Address(dAppFees) | |
60 | 60 | if ((amount == 0)) | |
61 | 61 | then throw("User's balance is 0 BUsdc cannot realize any payment") | |
62 | - | else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) | |
62 | + | else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd) | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
5 | 5 | ||
6 | 6 | let dAppFees = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo' | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
10 | 10 | let pmt = if ((size(i.payments) == 1)) | |
11 | 11 | then i.payments[0] | |
12 | 12 | else throw("Attached payment is required") | |
13 | 13 | if (((50 * 100000000) > assetBalance(i.caller, BUsd))) | |
14 | 14 | then throw("You must have 50 BUsd at least to deposit") | |
15 | 15 | else if ((50 > pmt.amount)) | |
16 | 16 | then throw("Cannot deposit less than 50 Busd") | |
17 | 17 | else if (if (if ((ScopeDesc == "")) | |
18 | 18 | then true | |
19 | 19 | else (Deliverables == "")) | |
20 | 20 | then true | |
21 | 21 | else (FreelancerAddress == "")) | |
22 | 22 | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
23 | 23 | else [StringEntry((toBase58String(i.caller.bytes) + "_Scope"), ScopeDesc), StringEntry((toBase58String(i.caller.bytes) + "_Deliv"), Deliverables), StringEntry((toBase58String(i.caller.bytes) + "_Freelancer"), FreelancerAddress), IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), pmt.amount)] | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func PayFreelancer () = { | |
30 | 30 | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
31 | 31 | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
32 | 32 | let amount = match getInteger(this, FreeLancerPayment) { | |
33 | 33 | case a: Int => | |
34 | 34 | a | |
35 | 35 | case _ => | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
39 | 39 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
40 | 40 | if ((amount == 0)) | |
41 | 41 | then throw("Your balance is 0 BUsdc cannot realize any payment") | |
42 | 42 | else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, amount, BUsd)], BUsd) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(i) | |
48 | 48 | func AdminTransfer (User,Freelancer) = { | |
49 | 49 | let FreeLancerPayment = (User + "_Payment") | |
50 | 50 | let FreelancerAddress = (User + "_Freelancer") | |
51 | 51 | let amount = match getInteger(this, FreeLancerPayment) { | |
52 | 52 | case a: Int => | |
53 | 53 | a | |
54 | 54 | case _ => | |
55 | 55 | 0 | |
56 | 56 | } | |
57 | 57 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
58 | 58 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
59 | 59 | let dAppFrees = Address(dAppFees) | |
60 | 60 | if ((amount == 0)) | |
61 | 61 | then throw("User's balance is 0 BUsdc cannot realize any payment") | |
62 | - | else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) | |
62 | + | else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd) | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 |
github/deemru/w8io/169f3d6 34.75 ms ◑