Skip to main content

SrcEscrowCreatedEvent

Emitted when an escrow is created on the source chain.

Static Properties

TOPIC
string
Event topic hash: 0x1140dcf80f027f65ebd1c2e98c33e3ebf7ef025d944a079256037cd55271bf98

Constructor

new SrcEscrowCreatedEvent(
  srcImmutables: Immutables<EvmAddress>,
  dstImmutablesComplement: DstImmutablesComplement<AddressLike>
)
srcImmutables
Immutables<EvmAddress>
required
Source chain escrow immutable parameters
dstImmutablesComplement
DstImmutablesComplement<AddressLike>
required
Destination chain escrow parameters complement

Static Methods

fromData

Decode event from log data.
SrcEscrowCreatedEvent.fromData(data: string): SrcEscrowCreatedEvent
data
string
required
Hex-encoded event log data
Returns: Decoded SrcEscrowCreatedEvent instance Throws: Error if log data is invalid Example:
const event = SrcEscrowCreatedEvent.fromData(log.data)
console.log('Order hash:', event.srcImmutables.orderHash)
console.log('Maker:', event.srcImmutables.maker.toString())

Instance Properties

srcImmutables
Immutables<EvmAddress>
Source chain immutable parameters including orderHash, hashlock, maker, taker, token, amount, safetyDeposit, timelocks, and parameters
dstImmutablesComplement
DstImmutablesComplement<AddressLike>
Destination chain parameters including maker, amount, token, safetyDeposit, chainId, and fees

DstEscrowCreatedEvent

Emitted when an escrow is created on the destination chain.

Static Properties

TOPIC
string
Event topic hash: 0xc30e111dcc74fddc2c3a4d98ffb97adec4485c0a687946bf5b22c2a99c7ff96d

Constructor

new DstEscrowCreatedEvent(
  escrow: EvmAddress,
  hashlock: string,
  taker: EvmAddress
)
escrow
EvmAddress
required
Destination escrow contract address
hashlock
string
required
Hash lock value (bytes32)
taker
EvmAddress
required
Taker address

Static Methods

fromData

Decode event from log data.
DstEscrowCreatedEvent.fromData(data: string): DstEscrowCreatedEvent
data
string
required
Hex-encoded event log data
Returns: Decoded DstEscrowCreatedEvent instance Throws: Error if log data is invalid Example:
const event = DstEscrowCreatedEvent.fromData(log.data)
console.log('Escrow address:', event.escrow.toString())
console.log('Hash lock:', event.hashlock)

Instance Properties

escrow
EvmAddress
Destination chain escrow contract address
hashlock
string
Hash lock bytes32 value
taker
EvmAddress
Taker address who can withdraw funds

EscrowWithdrawalEvent

Emitted when funds are withdrawn from an escrow.

Static Properties

TOPIC
string
Event topic hash: 0xe346f5c97a360db5188bfa5d3ec5f0583abde420c6ba4d08b6cfe61addc17105

Constructor

new EscrowWithdrawalEvent(secret: string)
secret
string
required
Secret value revealed during withdrawal

Static Methods

fromData

Decode event from log data.
EscrowWithdrawalEvent.fromData(data: string): EscrowWithdrawalEvent
data
string
required
Hex-encoded event log data
Returns: Decoded EscrowWithdrawalEvent instance Throws: Error if log data is invalid Example:
const event = EscrowWithdrawalEvent.fromData(log.data)
console.log('Revealed secret:', event.secret)
// Use the secret to unlock the other chain

Instance Properties

secret
string
Secret value revealed during withdrawal (bytes32)

EscrowCancelledEvent

Emitted when an escrow is cancelled.

Static Properties

TOPIC
string
Event topic hash: 0x6e3be9294e58d10b9c8053cfd5e09871b67e442fe394d6b0870d336b9df984a9

Constructor

new EscrowCancelledEvent(escrowAddress: EvmAddress)
escrowAddress
EvmAddress
required
Address of the cancelled escrow contract

Instance Properties

escrowAddress
EvmAddress
Address of the cancelled escrow

FundsRescuedEvent

Emitted when funds are rescued from an escrow after the rescue delay period.

Static Properties

TOPIC
string
Event topic hash: 0xc4474c2790e13695f6d2b6f1d8e164290b55370f87a542fd7711abe0a1bf40ac

Constructor

new FundsRescuedEvent(
  token: EvmAddress,
  amount: bigint,
  escrowAddress: EvmAddress
)
token
EvmAddress
required
Token address that was rescued
amount
bigint
required
Amount of tokens rescued
escrowAddress
EvmAddress
required
Escrow contract address

Static Methods

fromData

Decode event from log data.
FundsRescuedEvent.fromData(
  data: string,
  escrowAddress: EvmAddress
): FundsRescuedEvent
data
string
required
Hex-encoded event log data
escrowAddress
EvmAddress
required
Address of the escrow contract (not included in log data)
Returns: Decoded FundsRescuedEvent instance Throws: Error if log data is invalid Example:
const event = FundsRescuedEvent.fromData(log.data, escrowAddr)
console.log('Rescued token:', event.token.toString())
console.log('Amount:', event.amount.toString())

Instance Properties

token
EvmAddress
Address of the rescued token
amount
bigint
Amount of tokens that were rescued
escrowAddress
EvmAddress
Address of the escrow from which funds were rescued

Build docs developers (and LLMs) love