Comment on page
Use Permissions
Now that the user granted you some permissions and you are connected to a bundler you may want to use them.
const result = await account.call(
bundler,
contractAddress, // the contract you want to interact with, the `to` field in the permission
value, // the value you want to send (in wei)
calldata // the calldata encoded in the permisive format
);
Because ABI is fixed typed and we needed dynamic for permissive we’ve replaced it with the RLP format. So the calldata is a little bit different. The first 4 bytes are the function selector and then is followed by the RLP encoded array of abi-encoded arguments. So each element of the array is 32 bytes.
abi_encoded = abi.encode(arg1, arg2, ..., argn)
calldata = selector + RLP.encode([abi_encoded.split_every_32_bytes()])
The result of the call can vary either the Permissive error object:
{
"error": "Max usage hitted"
}