Skip to main content

Functions by role

Amounts are always counted in bills, the smallest units of the token: amount = 1000 means 1000 bills, that is ₪10.00. Functions restricted to a party revert when called from any other address; the restriction is enforced by the contract itself, not by this website.

Anyone: reading the registry​

FunctionReturns
balanceOf(account)accepted bills held by account
balanceOfUnaccepted(account)unaccepted bills held by account
totalSupply()all accepted bills in existence
totalSupplyOfUnaccepted()all unaccepted bills in existence
DRAWER_NAME, DRAWEE_NAME, ORDER, TIME_OF_PAYMENT, SUM_PER_BILL, CURRENCYthe terms on the face of the bill
DESCRIPTION, LEGAL_SIGNATURE_STATEMENT, KYC_AND_AML_NOTICEstatements recorded with every bill
DRAWER_ETH_ADDRESS, DRAWEE_ETH_ADDRESSthe addresses of the drawer and the drawee
CONTRACT_VERSION, name(), symbol(), decimals()version and token metadata

Drawer​

FunctionEffect
draw(amount)creates amount new unaccepted bills in the drawer's unaccepted balance

Drawee​

FunctionEffect
accept(amount)accepts amount unaccepted bills held by the drawee
acceptOn(holder, amount)accepts amount unaccepted bills held by holder; the bills stay with holder

Holder of unaccepted bills​

FunctionEffect
transferOfUnaccepted(to, amount)passes unaccepted bills to to
burnOfUnaccepted(amount)destroys the caller's unaccepted bills

Holder of accepted bills​

FunctionEffect
transfer(to, amount)passes accepted bills to to
approve(spender, amount), transferFrom(from, to, amount)lets another address move bills on the holder's behalf
transferAndCall, transferFromAndCall, approveAndCallERC-1363: the same, notifying a receiving contract
burn(amount), burnFrom(account, amount)destroys accepted bills

Events​

EventEmitted when
Draw(amount)the drawer draws bills
TransferOfUnaccepted(from, to, amount)unaccepted bills change hands
BurnOfUnaccepted(holder, amount)unaccepted bills are destroyed
Acceptance(holder, amount)the drawee accepts bills (no Transfer event: see How it works)
Transfer(from, to, amount)accepted bills change hands or are destroyed (ERC-20)
Approval(owner, spender, amount)an allowance is set (ERC-20)