forked from ligolang/contract-catalogue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fa2.1-single-asset.jsligo
27 lines (20 loc) · 1.35 KB
/
fa2.1-single-asset.jsligo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#import "./data/ledger.jsligo" "Ledger"
export #import "./fa2.1-generic.jsligo" "Generic"
export type Storage = Generic.Storage<unit, Ledger.Single_asset.L>;
const specialised : Generic.Interface<unit, Ledger.Single_asset.L> =
Generic.make(Ledger.Single_asset.ledger_module);
const specialisedViews : Generic.InterfaceViews<unit, Ledger.Single_asset.L> =
Generic.makeViews(Ledger.Single_asset.ledger_module)
@entry const transfer = (p, s) => specialised.transfer([p, s]);
@entry const balance_of = (p, s) => specialised.balance_of([p, s]);
@entry const update_operators = (p, s) => specialised.update_operators([p, s]);
@entry const approve = (p, s) => specialised.approve([p, s]);
@entry const export_ticket = (p, s) => specialised.export_ticket([p, s]);
@entry const lambda_export = (p, s) => specialised.lambda_export([p, s]);
@entry const import_ticket = (p, s) => specialised.import_ticket([p, s]);
@view const get_balance = (p, s) => specialisedViews.get_balance([p, s]);
@view const get_total_supply = (p, s) => specialisedViews.get_total_supply([p, s]);
@view const is_operator = (p, s) => specialisedViews.is_operator([p, s]);
@view const get_allowance = (p, s) => specialisedViews.get_allowance([p, s]);
@view const get_token_metadata = (p, s) => specialisedViews.get_token_metadata([p, s]);
@view const is_token = (p, s) => specialisedViews.is_token([p, s]);