import { SmartWalletAllowance } from "./SmartWalletAllowance"; import { smartwalletallowance } from "./proto/smartwalletallowance"; import { authority, System, Protobuf } from "@koinos/sdk-as"; const contract = new SmartWalletAllowance(); contract.callArgs = System.getArguments(); let returnBuffer = new Uint8Array(1024); switch (contract.callArgs!.entry_point) { /* class SmartWalletAllowance */ // set_allowance case 0xb1569611: { const args = Protobuf.decode(contract.callArgs!.args, smartwalletallowance.allowance.decode); contract.set_allowance(args); returnBuffer = new Uint8Array(0); break; } // authorize case 0x4a2dbd90: { const args = Protobuf.decode(contract.callArgs!.args, authority.authorize_arguments.decode); const result = contract.authorize(args); returnBuffer = Protobuf.encode(result, authority.authorize_result.encode); break; } default: { System.exit(1); break; } } System.exit(0, returnBuffer);