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