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+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAgAAAAFpAQAAAAxEZXBvc2l0RnVuZHMAAAADAAAACVNjb3BlRGVzYwAAAAxEZWxpdmVyYWJsZXMAAAARRnJlZWxhbmNlckFkZHJlc3MEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABxBdHRhY2hlZCBwYXltZW50IGlzIHJlcXVpcmVkAwkAAGYAAAACCQAAaAAAAAIAAAAAAAAAADIAAAAAAAX14QAJAAPwAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAARCVXNkCQAAAgAAAAECAAAAKVlvdSBtdXN0IGhhdmUgNTAgQlVzZCBhdCBsZWFzdCB0byBkZXBvc2l0AwkAAGYAAAACAAAAAAAAAAAyCAUAAAADcG10AAAABmFtb3VudAkAAAIA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xlcgAAAAVieXRlcwIAAAALX0ZyZWVsYW5jZXIEAAAABmFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAABFGcmVlTGFuY2VyUGF5bWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAABRGcmVlbGFuY2VyQWRkcmVzc1N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAABFGcmVlbGFuY2VyQWRkcmVzcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAEAAAAFkJ5dGVzQWRkcmVzc0ZyZWVMYW5jZXIJAAGbAAAAAQUAAAAURnJlZWxhbmNlckFkZHJlc3NTdHIDCQAAAAAAAAIFAAAABmFtb3VudAAAAAAAAAAAAAkAAAIAAAABAgAAADJZb3VyIGJhbGFuY2UgaXMgMCBCVXNkYyBjYW5ub3QgcmVhbGl6ZSBhbnkgcGF5bWVudAkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAIX1BheW1lbnQAAAAAAAAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAABZCeXRlc0FkZHJlc3NGcmVlTGFuY2VyBQAAAAZhbW91bnQFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAACgvJkR", "height": 2062873, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRwDatZvgRYkp2fufYygAiaZB5VpjkqNtRdfQjCzjchK Next: 3uH2YaiN4gddc4Sd4yAGD8Wg7dA8dj4cKgZAbHQVwu3Q Diff:
OldNewDifferences
44 let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 @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+ }
1823
1924
2025
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 @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+ }
1823
1924
2025
2126 @Callable(i)
2227 func PayFreelancer () = {
2328 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
2429 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
2530 let amount = match getInteger(this, FreeLancerPayment) {
2631 case a: Int =>
2732 a
2833 case _ =>
2934 0
3035 }
3136 let FreelancerAddressStr = match getString(this, FreelancerAddress) {
3237 case a: String =>
3338 a
3439 case _ =>
3540 ""
3641 }
3742 let BytesAddressFreeLancer = toBytes(FreelancerAddressStr)
3843 if ((amount == 0))
3944 then throw("Your balance is 0 BUsdc cannot realize any payment")
4045 else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(Address(BytesAddressFreeLancer), amount, BUsd)], BUsd)
4146 }
4247
4348

github/deemru/w8io/169f3d6 
39.11 ms