So you can pass those as arguments when you call the method of a created contract:
// Passing a page sizeawaitsefi.getTransferHistory(20);
Defining the context for all your queries and messages is required even if you don't use it. As a good practice, for a unused context, name the identifier _ to express what is not being used by that query or message:
getAllowance( _: Context,// We are not using the context in this query owner: string, spender: string, key: string): ContractQueryRequest {return { allowance: { owner, spender, key } };},
More on Defining Messages
When writing messages in your contract definition, you have the following options to pass to each message:
Height is an autoincrementable in the blockchain and serves as a reference point in time. Some queries need it, fot those who needs this data there is a function that comes in the context, withHeigth wich recieves a function that receives height and returns the JSON that you want to query.