Trigger OnSend
Example 1
In this example, this account will only accept transfers of KCAL and reject anything else.
contract test {
trigger onSend(from:address, symbol:string, amount:number)
{
if (symbol != "KCAL") {
throw "can't send asset: " + symbol;
}
return;
}
}
Last updated