tx · 33Bpk4KFsnuM7F27Mwef9u5drNDTHfXNQMZmoX1d5MXC
3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX: -0.01000000 Waves
2021.06.10 21:43 [1564654] smart account 3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX > SELF 0.00000000 Waves
{
"type": 13,
"id": "33Bpk4KFsnuM7F27Mwef9u5drNDTHfXNQMZmoX1d5MXC",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1623350619802,
"version": 2,
"chainId": 84,
"sender": "3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX",
"senderPublicKey": "BLYPM7pr6zCdxj9zzANneoGVcDEwBnQApCEnR3BkNm68",
"proofs": [
"5njKtKatRAifNy2UzBNLW1dtSr8AMF91QuxmyGixcGqyyxXKJHbrCeXoij6mrGFe7dbsbix7Y26EzPk33aEfQZmq"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAQEAAAAKZ2V0UGF5bWVudAAAAAEAAAABaQMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABhQYXltZW50IG11c3QgYmUgYXR0YWNoZWQEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAnVGhpcyBmdW5jdGlvbiBhY2NlcHRzIFdBVkVTIHRva2VucyBvbmx5CAUAAAADcG10AAAABmFtb3VudAAAAAEAAAABaQEAAAADcGF5AAAAAAQAAAAGYW1vdW50CQEAAAAKZ2V0UGF5bWVudAAAAAEFAAAAAWkJAAUUAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAZhbW91bnQFAAAAA25pbAUAAAAEdW5pdAAAAAAQNEP8",
"height": 1564654,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: ELEzRF7Bup2noCS8mYGc8Aq7PVQMr3ZAVpkwoEjRY37X
Next: 72uVtNn9q39vpbyBsUge7svEeCGVWFeb6eG1SZ1ExJsx
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | func getPayment (i) = if ((size(i.payments) == 0)) |
---|
| 5 | + | then throw("Payment must be attached") |
---|
| 6 | + | else { |
---|
| 7 | + | let pmt = i.payments[0] |
---|
| 8 | + | if (isDefined(pmt.assetId)) |
---|
| 9 | + | then throw("This function accepts WAVES tokens only") |
---|
| 10 | + | else pmt.amount |
---|
| 11 | + | } |
---|
4 | 12 | | |
---|
5 | 13 | | |
---|
6 | 14 | | @Callable(i) |
---|
7 | | - | func myToken () = $Tuple2([Issue(("Spring_" + toBase58String(i.caller.bytes)), "", 100000, 2, true)], unit) |
---|
| 15 | + | func pay () = { |
---|
| 16 | + | let amount = getPayment(i) |
---|
| 17 | + | $Tuple2([IntegerEntry(toBase58String(i.caller.bytes), amount)], unit) |
---|
| 18 | + | } |
---|
8 | 19 | | |
---|
9 | 20 | | |
---|