Python
from compass_api_sdk import CompassAPI, models with CompassAPI( api_key_auth="<YOUR_API_KEY_HERE>", ) as compass_api: res = compass_api.smart_account.account_batched_user_operations(chain=models.Chain.BASE_MAINNET, sender="0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B", operations=[ models.UserOperation( body=models.SetAllowanceParams( token=models.TokenEnum.WETH, contract=models.SetAllowanceParamsContractEnum.UNISWAP_V3_ROUTER, amount="1000", ), ), ]) # Handle response print(res)
{ "operations": [ { "to": "<string>", "data": "<string>", "value": 123 } ] }
Generate a list of user operations for smart account batching.
Your Compass API Key. Get your key here.
Request model for batching user operations.
Successful Response
The response is of type object.
object
Was this page helpful?