tx · 5LmJ9F8jSA4REaPjQfCrrPjhdBLuNF9PaqaAFRReShij 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK: -0.01000000 Waves 2022.05.22 15:20 [2062873] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves
{ "type": 13, "id": "5LmJ9F8jSA4REaPjQfCrrPjhdBLuNF9PaqaAFRReShij", "fee": 1000000, "feeAssetId": null, "timestamp": 1653222111506, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "23cWKdNK4YAh8Bekuy7xwj9iK2HpfHNP8SLoWEj4R9husgBGtcfM6rLetdpvJrHzHPrFhyofmpMPxL42NsDe1nwj" ], "script": "base64:AAIFAAAAAAAAAAsIAhIFCgMICAgSAAAAAAEAAAAABEJVc2QBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAgAAAAFpAQAAAAxEZXBvc2l0RnVuZHMAAAADAAAACVNjb3BlRGVzYwAAAAxEZWxpdmVyYWJsZXMAAAARRnJlZWxhbmNlckFkZHJlc3MEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABxBdHRhY2hlZCBwYXltZW50IGlzIHJlcXVpcmVkAwkAAGYAAAACCQAAaAAAAAIAAAAAAAAAADIAAAAAAAX14QAJAAPwAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAARCVXNkCQAAAgAAAAECAAAAKVlvdSBtdXN0IGhhdmUgNTAgQlVzZCBhdCBsZWFzdCB0byBkZXBvc2l0AwkAAGYAAAACAAAAAAAAAAAyCAUAAAADcG10AAAABmFtb3VudAkAAAIAA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lcgAAAAVieXRlcwIAAAALX0ZyZWVsYW5jZXIEAAAABmFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAABFGcmVlTGFuY2VyUGF5bWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAABRGcmVlbGFuY2VyQWRkcmVzc1N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAABFGcmVlbGFuY2VyQWRkcmVzcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAEAAAAFkJ5dGVzQWRkcmVzc0ZyZWVMYW5jZXIJAAGbAAAAAQUAAAAURnJlZWxhbmNlckFkZHJlc3NTdHIDCQAAAAAAAAIFAAAABmFtb3VudAAAAAAAAAAAAAkAAAIAAAABAgAAADJZb3VyIGJhbGFuY2UgaXMgMCBCVXNkYyBjYW5ub3QgcmVhbGl6ZSBhbnkgcGF5bWVudAkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAIX1BheW1lbnQAAAAAAAAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAABZCeXRlc0FkZHJlc3NGcmVlTGFuY2VyBQAAAAZhbW91bnQFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAACgvJkR", "height": 2062873, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRwDatZvgRYkp2fufYygAiaZB5VpjkqNtRdfQjCzjchK Next: 3uH2YaiN4gddc4Sd4yAGD8Wg7dA8dj4cKgZAbHQVwu3Q Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func DepositFunds (amount,ScopeDesc,Deliverables,FreelancerAddress) = if (((50 * 100000000) > assetBalance(i.caller, BUsd))) | |
8 | - | then throw("You must have 50 BUsd at least to deposit") | |
9 | - | else if ((50 > amount)) | |
10 | - | then throw("Cannot deposit less than 50 Busd") | |
11 | - | else if (if (if ((ScopeDesc == "")) | |
12 | - | then true | |
13 | - | else (Deliverables == "")) | |
14 | - | then true | |
15 | - | else (FreelancerAddress == "")) | |
16 | - | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
17 | - | else $Tuple2([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"), amount), ScriptTransfer(this, amount, BUsd)], BUsd) | |
7 | + | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
8 | + | let pmt = if ((size(i.payments) == 1)) | |
9 | + | then i.payments[0] | |
10 | + | else throw("Attached payment is required") | |
11 | + | if (((50 * 100000000) > assetBalance(i.caller, BUsd))) | |
12 | + | then throw("You must have 50 BUsd at least to deposit") | |
13 | + | else if ((50 > pmt.amount)) | |
14 | + | then throw("Cannot deposit less than 50 Busd") | |
15 | + | else if (if (if ((ScopeDesc == "")) | |
16 | + | then true | |
17 | + | else (Deliverables == "")) | |
18 | + | then true | |
19 | + | else (FreelancerAddress == "")) | |
20 | + | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
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 | + | } | |
18 | 23 | ||
19 | 24 | ||
20 | 25 |
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 | - | func DepositFunds (amount,ScopeDesc,Deliverables,FreelancerAddress) = if (((50 * 100000000) > assetBalance(i.caller, BUsd))) | |
8 | - | then throw("You must have 50 BUsd at least to deposit") | |
9 | - | else if ((50 > amount)) | |
10 | - | then throw("Cannot deposit less than 50 Busd") | |
11 | - | else if (if (if ((ScopeDesc == "")) | |
12 | - | then true | |
13 | - | else (Deliverables == "")) | |
14 | - | then true | |
15 | - | else (FreelancerAddress == "")) | |
16 | - | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
17 | - | else $Tuple2([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"), amount), ScriptTransfer(this, amount, BUsd)], BUsd) | |
7 | + | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
8 | + | let pmt = if ((size(i.payments) == 1)) | |
9 | + | then i.payments[0] | |
10 | + | else throw("Attached payment is required") | |
11 | + | if (((50 * 100000000) > assetBalance(i.caller, BUsd))) | |
12 | + | then throw("You must have 50 BUsd at least to deposit") | |
13 | + | else if ((50 > pmt.amount)) | |
14 | + | then throw("Cannot deposit less than 50 Busd") | |
15 | + | else if (if (if ((ScopeDesc == "")) | |
16 | + | then true | |
17 | + | else (Deliverables == "")) | |
18 | + | then true | |
19 | + | else (FreelancerAddress == "")) | |
20 | + | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
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 | + | } | |
18 | 23 | ||
19 | 24 | ||
20 | 25 | ||
21 | 26 | @Callable(i) | |
22 | 27 | func PayFreelancer () = { | |
23 | 28 | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
24 | 29 | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
25 | 30 | let amount = match getInteger(this, FreeLancerPayment) { | |
26 | 31 | case a: Int => | |
27 | 32 | a | |
28 | 33 | case _ => | |
29 | 34 | 0 | |
30 | 35 | } | |
31 | 36 | let FreelancerAddressStr = match getString(this, FreelancerAddress) { | |
32 | 37 | case a: String => | |
33 | 38 | a | |
34 | 39 | case _ => | |
35 | 40 | "" | |
36 | 41 | } | |
37 | 42 | let BytesAddressFreeLancer = toBytes(FreelancerAddressStr) | |
38 | 43 | if ((amount == 0)) | |
39 | 44 | then throw("Your balance is 0 BUsdc cannot realize any payment") | |
40 | 45 | else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(Address(BytesAddressFreeLancer), amount, BUsd)], BUsd) | |
41 | 46 | } | |
42 | 47 | ||
43 | 48 |
github/deemru/w8io/169f3d6 39.11 ms ◑