Skip to main content

contracts/handlers/nucleus-atomic-queue-handler

Classes

NucleusAtomicQueueHandler

Handler for the AtomicQueue contract.

Constructors

new NucleusAtomicQueueHandler()

new NucleusAtomicQueueHandler(chain, walletClient, publicClient): NucleusAtomicQueueHandler

Parameters
ParameterType
chainChain
walletClientobject
publicClientobject
Returns

NucleusAtomicQueueHandler

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:34

Properties

PropertyModifierType
chainprivateChain
publicClientprivateobject
viemChainprivateChain
walletClientprivateobject

Methods

getContract()

getContract(): object

Returns

object

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:42

getUserAtomicRequest()

getUserAtomicRequest(user, offerToken, wantToken): Promise<object>

Get the atomic request details for a specific user (wallet address).

Parameters
ParameterTypeDescription
user`0x${string}`User address
offerToken`0x${string}`Token being offered
wantToken`0x${string}`Token being requested
Returns

Promise<object>

atomicPrice

atomicPrice: bigint

deadline

deadline: bigint

inSolve

inSolve: boolean

offerAmount

offerAmount: bigint

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:60

isAtomicRequestValid()

isAtomicRequestValid(offerToken, user, request): Promise<boolean>

Check if an atomic request is valid.

Parameters
ParameterTypeDescription
offerToken`0x${string}`Token being offered
user`0x${string}`User address
requestAtomicRequestAtomic request details
Returns

Promise<boolean>

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:78

solve()

solve(offerToken, wantToken, users, runData, solver): Promise<`0x${string}`>

Solve atomic requests for multiple users.

Parameters
ParameterTypeDescription
offerToken`0x${string}`Token being offered
wantToken`0x${string}`Token being requested
users`0x${string}`[]Array of user addresses
runData`0x${string}`Execution data for the solve
solver`0x${string}`Address of the solver
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:98

updateAtomicRequest()

updateAtomicRequest(offerToken, wantToken, request, ownerAddress): Promise<`0x${string}`>

Update an atomic request.

Parameters
ParameterTypeDescription
offerToken`0x${string}`Token being offered
wantToken`0x${string}`Token being requested
requestAtomicRequestNew atomic request details
ownerAddress`0x${string}`-
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:120

userAtomicRequest()

userAtomicRequest(user, offerToken, wantToken): Promise<readonly [bigint, bigint, bigint, boolean]>

Get user's atomic request details directly from storage.

Parameters
ParameterTypeDescription
user`0x${string}`User address
offerToken`0x${string}`Token being offered
wantToken`0x${string}`Token being requested
Returns

Promise<readonly [bigint, bigint, bigint, boolean]>

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:138

Type Aliases

AtomicRequest

AtomicRequest: object

Type declaration

atomicPrice

atomicPrice: bigint

deadline

deadline: bigint

inSolve

inSolve: boolean

offerAmount

offerAmount: bigint

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:14


SolveMetaData

SolveMetaData: object

Type declaration

assetsForWant

assetsForWant: bigint

assetsToOffer

assetsToOffer: bigint

flags

flags: number

user

user: Address

Source

lib/contracts/handlers/nucleus-atomic-queue-handler.ts:21