token TEST {
import Runtime;
trigger onMint(from:address, to:address, symbol:string, tokenID:number)
{
local contractSymbol: string = $THIS_SYMBOL;
local thisAddr : address = $THIS_ADDRESS;
Runtime.expect(symbol == contractSymbol, "invalid symbol");
Runtime.expect(from == thisAddr, "minting failed -> Not Contract");
Runtime.expect(Runtime.isWitness(thisAddr), "minting failed -> not Contract");
return;
}
}
contract test {
import Runtime;
global owner : address;
trigger onBurn(from:address, symbol:string, amount:number)
{
Runtime.expect(Runtime.isWitness(owner), "Only owner can burn!");
return;
}
}
contract test {
import Runtime;
global owner : address;
trigger onSeries(from:address)
{
Runtime.expect(Runtime.isWitness(owner), "not the owner");
return;
}
}
token TEST {
import Runtime;
trigger onInfuse(from:address, target:address, symbol:string, nftID:number)
{
local thisSymbol = $THIS_SYMBOL;
Runtime.expect( thisSymbol == symbol, "Only with this token can be infused");
return;
}
}
token TEST {
import Runtime;
global owner: Address;
trigger onWrite(from:address, ram:bytes, tokenID:number)
{
Runtime.expect(Runtime.isWitness(owner), "Only owner can update");
return;
}
}