Tooling
ModuleKit
Reference
Testing
Smart Sessions
Usesession

⚠️ Deprecation Notice

ModuleKit was developed by Rhinestone and is no longer actively supported. If you're building modules and need assistance, reach out to Rhinestone at gm@rhinestone.dev


title: "useSession"

Use a session to make a call or batch of calls, even if the session is not enabled yet.

Usage

instance.useSession({
  session: session,
  target: address(0x69),
  value: 1 wei,
  callData: ""
})

Parameters

instance

The instance of the account used for testing.

session

The session to use for the call.

target (optional)

  • Type: address

The address of the contract to call.

value (optional)

  • Type: uint256

The amount of wei to send with the call.

callData (optional)

  • Type: bytes

The data to send with the call.

executions (optional)

An array of executions to use in the session instead of doing a single call.

Returns

None