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+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAwAAAAFpAQAAAAxEZXBvc2l0RnVuZHMAAAADAAAACVNjb3BlRGVzYwAAAAxEZWxpdmVyYWJsZXMAAAARRnJlZWxhbmNlckFkZHJlc3MEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABxBdHRhY2hlZCBwYXltZW50IGlzIHJlcXVpcmVkAwkAAGYAAAACCQAAaAAAAAIAAAAAAAAAADIAAAAAAAX14QAJAAPwAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAARCVXNkCQAAAgAAAAECAAAAKVlvdSBtdXN0IGhhdmUgNTAgQlVzZCBhdCBsZWFzdCB0byBkZXBvc2l0AwkAAGYAAAACAAAAAAAAAAAyCAUAAAADcG10AAAABmFtb3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VyUGF5bWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAABRGcmVlbGFuY2VyQWRkcmVzc1N0cgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwUAAAARRnJlZWxhbmNlckFkZHJlc3MEAAAAEUFkZHJlc3NGcmVlTGFuY2VyCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAABRGcmVlbGFuY2VyQWRkcmVzc1N0cgQAAAAOVXNlckFkZHJlc3NTdHIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMFAAAAEUZyZWVsYW5jZXJBZGRyZXNzBAAAABVBZGRyZXNzVXNlckFkZHJlc3NTdHIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAADlVzZXJBZGRyZXNzU3RyAwkAAAAAAAACBQAAAAZhbW91bnQAAAAAAAAAAAAJAAACAAAAAQIAAAA0VXNlcidzIGJhbGFuY2UgaXMgMCBCVXNkYyBjYW5ub3QgcmVhbGl6ZSBhbnkgcGF5bWVudAkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAABFVzZXICAAAACF9QYXltZW50AAAAAAAAAAAACQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEUFkZHJlc3NGcmVlTGFuY2VyBQAAAAZhbW91bnQFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAACLq9vn", "height": 2062910, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2SoAhnVU2qhEiUeGNU4MAbzfNvv9C1jh9SejmtW2HpvY Next: B4NCscQpUgg42CJw4mjsafahK7ecC9RwyWYNm2RgKxP9 Diff:
OldNewDifferences
4141 }
4242
4343
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+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 @Callable(i)
77 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
88 let pmt = if ((size(i.payments) == 1))
99 then i.payments[0]
1010 else throw("Attached payment is required")
1111 if (((50 * 100000000) > assetBalance(i.caller, BUsd)))
1212 then throw("You must have 50 BUsd at least to deposit")
1313 else if ((50 > pmt.amount))
1414 then throw("Cannot deposit less than 50 Busd")
1515 else if (if (if ((ScopeDesc == ""))
1616 then true
1717 else (Deliverables == ""))
1818 then true
1919 else (FreelancerAddress == ""))
2020 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
2121 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)]
2222 }
2323
2424
2525
2626 @Callable(i)
2727 func PayFreelancer () = {
2828 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
2929 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
3030 let amount = match getInteger(this, FreeLancerPayment) {
3131 case a: Int =>
3232 a
3333 case _ =>
3434 0
3535 }
3636 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
3737 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
3838 if ((amount == 0))
3939 then throw("Your balance is 0 BUsdc cannot realize any payment")
4040 else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, amount, BUsd)], BUsd)
4141 }
4242
4343
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