@btc-vision/btc-runtime
Version:
Bitcoin L1 Smart Contract Runtime for OP_NET. Build decentralized applications on Bitcoin using AssemblyScript and WebAssembly. Fully audited.
17 lines (14 loc) • 568 B
text/typescript
import { NetEvent } from '../NetEvent';
import { BytesWriter } from '../../buffer/BytesWriter';
import { Address } from '../../types/Address';
import { ADDRESS_BYTE_LENGTH } from '../../utils';
export class OP721ApprovedForAllEvent extends NetEvent {
constructor(account: Address, operator: Address, approved: boolean) {
const writer = new BytesWriter(ADDRESS_BYTE_LENGTH * 2 + 1);
writer.writeAddress(account);
writer.writeAddress(operator);
writer.writeBoolean(approved);
super('ApprovedForAll', writer);
}
}