Types
Glossary of transaction types used to defined the schema of Decent transactions.
DecodedInput
Decent decodes the input data used to call each transaction, so you can recover key parameters. The schema of args will vary by function type.
{
functionName: string,
args: Array
}
Org
Information defining the application sending the transaction and key fee information.
{
appId: `0x${string}`,
affiliateId: `0x${string}`,
lensInfo?: LensInfo,
appFees: [
{
recipient: `0x${string}`,
token: `0x${string}`,
amount: `${string}n`,
usd: number
}
]
}
LensInfo
Lens Open Action transactions routed through Decent are attributed to Lens applications and users via the LensInfo
type. Transactions will not include this type if unless you are building with the Decent Open Action.
{
publicationActedProfileId: `${string}n`,
publicationActedId: `${string}n`,
actionProfileId: `${string}n`,
referrerProfileIds: `${string}n`[],
referrerPubIds: `${string}n`[],
}
PaymentToken
Tokens used to initiate and settle transactions.
{
src: {
name: string,
symbol: string,
decimals: number,
swap: boolean,
amount: `${string}n`
},
dst: {
name: string | null,
symbol: string | null,
decimals: number | null,
swap: boolean | null,
amount: `${string}n` | null
}
}
SrcTx
Receipts from source chain transactions.
{
blockHash: `0x${string}`,
blockNumber: number,
accessList: Array,
transactionIndex: number,
type: string,
nonce: number,
input: `0x${string}`,
r: `0x${string}`,
s: `0x${string}`,
v: `${string}n`,
chainId: number,
gas: `${string}n`,
maxPriorityFeePerGas: `${string}n`,
from: `0x${string}`,
to: `0x${string}`,
maxFeePerGas: `${string}n`,
value: `${string}n`,
gasPrice: `${string}n`,
typeHex: string, // e.g., "0x01"
transactionHash: `0x${string}`,
success: boolean,
blockExplorer: `https://{string}`
decodedInput: DecodedInput,
org: Org,
method: string,
usdValue: number,
paymentToken: PaymentToken,
timestamp: number,
error?: string
}
BridgeTxLZ
Receipts from bridge transactions routed through bridges using Layer Zero for messaging.
{
srcUaAddress: `0x${string}`,
dstUaAddress: `0x${string}`,
updated: number,
created: number,
srcChainId: number,
dstChainId: number,
dstTxHash: `0x${string}`,
srcTxHash: `0x${string}`,
srcBlockHash: `0x${string}`,
srcBlockNumber: string,
srcUaNonce: number,
status: 'INFLIGHT' | 'DELIVERED' | 'FAILED' | 'PAYLOAD_STORED' | 'BLOCKED' | 'CONFIRMING'
}
BridgeTxOrbit
Receipts from bridge transactions routed through canonical bridges deployed with Arbitrum Orbit chains.
{
srcChainId: number,
dstChainId: number,
sender: `0x${string}`,
messageNumber: string, // e.g., "0x01"
l1BaseFee: string, // e.g., "0x01"
messageData: {
destAddress: `0x${string}`,
l2CallVAlue: string, // e.g., "0x01"
l1Value: string, // e.g., "0x01"
maxSubmissionFee: string, // e.g., "0x01"
excessFeeRefundAddress: `0x${string}`,
callValueRefundAddresS: `0x${string}`,
gasLimit: string, // e.g., "0x01"
maxFeePerGas: string, // e.g., "0x01"
data: string,
},
success: boolean,
}
BridgeTxOpStack
Receipts from bridge transactions routed through canonical bridges deployed with OP Stack chains.
{
srcChainId,
dstChainId,
sender: `0x${string}`,
success: boolean,
status: L1ToL2OpMessageStatus
}
enum L1ToL2OpMessageStatus {
UNCONFIRMED_L1_TO_L2_MESSAGE = 0,
FAILED_L1_TO_L2_MESSAGE = 1,
STATE_ROOT_NOT_PUBLISHED = 2,
READY_TO_PROVE = 3,
IN_CHALLENGE_PERIOD = 4,
READY_FOR_RELAY = 5,
RELAYED = 6
}
DstTxFast
Receipts from destination transactions routed through fast bridges.
{
transactionHash: `0x${string}`,
blockHash: `0x${string}`,
blockNumber: number,
logsBloom: `0x${string}`,
l1GasUsed: string, // e.g., "0x01"
l1Fee: string, // e.g., "0x01"
contractAddress: `0x${string}` | null,
transactionIndex: number,
l1GasPrice: string, // e.g., "0x01"
type: string,
gasUsed: `${string}n`,
cumulativeGasUsed: `${string}n`,
from: `0x${string}`,
to: `0x${string}`,
effectiveGasPrice: `${string}n`,
status: string,
chainId: number,
blockExplorer: `https://{string}`,
timestamp: number,
error?: string
}
DstTxCanonical
Receipts from destination transactions routed through canonical bridges.
{
to: `0x${string}`,
from: `0x${string}`,
contractAddress: `0x${string}` | null,
transactionIndex: number,
gasUsed: string, // e.g., "0x01"
logsBloom: `0x${string}`,
blockHash: `0x${string}`,
transactionHash: `0x${string}`,
blockNumber: number,
confirmations: number,
cumulativeGasUsed: string, // e.g., "0x01"
effectiveGasPrice: string, // e.g., "0x01"
status: 1 | 0,
type: number,
byzantium: boolean,
chainId: number,
blockExplorer: `https://{string}`,
timestamp: number,
error?: string
}