Skip to content

Latest commit

 

History

History
601 lines (406 loc) · 24.1 KB

modules.md

File metadata and controls

601 lines (406 loc) · 24.1 KB

evm-translator / Exports

evm-translator

Table of contents

Enumerations

Type aliases

Type aliases

ActivityData

Ƭ ActivityData: Object

Type declaration

Name Type
decodedData Decoded
interpretedData Interpretation
rawTxData RawTxData

Defined in

index.ts:249


Address

Ƭ Address: `0x${string}`

40 char hexadecimal address. Can be an EOA, Contract, or Token address

Defined in

index.ts:10


Chain

Ƭ Chain: Object

Type declaration

Name Type Description
EVM boolean If this transaction is from an EVM-compatible chain. This it true for all, currently
blockExplorerUrl string The block explorer URL for this chain. https://etherscan.io/
daiAddress Address The singleton contract address for DAI
id number The chain's id. ETH=1, MATIC=137
name string The chain's colloquial name. Ethereum, Polygon
symbol ChainSymbol The chain's symbol. ETH, MATIC
testnet boolean If this chain is a testnet.
usdcAddress Address The singleton contract address for USDC
usdtAddress Address The singleton contract address for USDT
wethAddress Address The singleton contract address for the wrapped version of the native token. Need to change the variable name

Defined in

index.ts:19


Chains

Ƭ Chains: Record<string, Chain>

Map of EVM chain names to an object with Chain metadata

Defined in

index.ts:43


ContractData

Ƭ ContractData: Object

Type declaration

Name Type
abi ABI_ItemUnfiltered[]
address Address
contractName string | null
contractOfficialName string | null
tokenName string | null
tokenSymbol string | null
type ContractType

Defined in

index.ts:133


Decoded

Ƭ Decoded: Object

Type declaration

Name Type Description
chainSymbol string The symbol for the native token. ex: ETH
contractMethod string | null the name of the function that initiated the transaction. If not decoded, null
contractMethodArguments Record<string, MostTypes> -
contractName string | null -
contractType ContractType The type of contract. An ERC-xx, WETH, or
effectiveGasPrice string | null -
fromAddress Address -
fromENS string | null -
gasUsed string -
interactions Interaction[] -
nativeValueSent string The amount of native token (ex: ETH) sent denominated in wei
officialContractName string | null -
reverted boolean -
timestamp number | null -
toAddress Address | null -
toENS string | null -
txHash string The transaction's unique hash
txIndex number -
txType TxType The one of three types the transaction can be. TODO switch to required

Defined in

index.ts:153


DecodedCallData

Ƭ DecodedCallData: Object

Type declaration

Name Type
name string | null
params Record<string, MostTypes>

Defined in

index.ts:336


EthersAPIKeys

Ƭ EthersAPIKeys: Object

Type declaration

Name Type
alchemy string
etherscan string
infura string
pocket { applicationId: string ; applicationSecretKey: string }
pocket.applicationId string
pocket.applicationSecretKey string

Defined in

index.ts:303


InProgressActivity

Ƭ InProgressActivity: Object

Type declaration

Name Type
decoded? Decoded
rawTxData? RawTxData

Defined in

index.ts:121


Interaction

Ƭ Interaction: Object

Type declaration

Name Type
contractAddress Address
contractName string | null
contractSymbol string | null
events InteractionEvent[]

Defined in

index.ts:181


InteractionEvent

Ƭ InteractionEvent: Object

Type declaration

Name Type Description
eventName string | null The name of the function that was called
logIndex number | null -
nativeTransfer? true -
params InteractionEventParams -

Defined in

index.ts:188


InteractionEventParams

Ƭ InteractionEventParams: Object

Index signature

▪ [key: string]: string | string[] | undefined | null | number | boolean

Type declaration

Name Type
_amount? string
_amounts? string[]
_approved? string
_approvedENS? string
_from? string
_fromENS? string
_id? string | null
_ids? string[]
_operator? string
_operatorENS? string
_owner? string
_ownerENS? string
_to? string
_toENS? string
_tokenId? string
_value? string
from? string
fromENS? string
to? string
toENS? string
tokenId? string
value? string

Defined in

index.ts:196


Interpretation

Ƭ Interpretation: Object

Each address that was part of a transaction has its own interpretation of the transaction. native tokens and gas number are denominated in their native token (ex: eth, not wei)

Type declaration

Name Type
action Action
chainSymbol ChainSymbol
contractName string | null
counterpartyName string | null
exampleDescription string
extra Record<string, any>
gasPaid string
nativeValueReceived string
nativeValueSent string
reverted true | null
tokensReceived Token[]
tokensSent Token[]
txHash string
userAddress Address
userName string

Defined in

index.ts:230


MostTypes

Ƭ MostTypes: string | number | boolean | null | string[]

Defined in

index.ts:341


RawDecodedCallData

Ƭ RawDecodedCallData: Object

Type declaration

Name Type
name string | null
params { name: string ; type: string ; value: string | number | boolean | null | string[] }[]

Defined in

index.ts:327


RawDecodedLog

Ƭ RawDecodedLog: Object

Type declaration

Name Type
address string
decoded boolean
events RawDecodedLogEvent[]
logIndex number
name string | null

Defined in

index.ts:319


RawDecodedLogEvent

Ƭ RawDecodedLogEvent: Object

Type declaration

Name Type
name string
type string
value string | string[]

Defined in

index.ts:313


RawLogEvent

Ƭ RawLogEvent: Object

Type declaration

Name Type
address Address
data string
logIndex number
topics string[]

Defined in

index.ts:126


RawTxData

Ƭ RawTxData: Object

Type declaration

Name Type
txReceipt TxReceipt
txResponse TxResponse
txTrace TraceLog[]

Defined in

index.ts:110


RawTxDataWithoutTrace

Ƭ RawTxDataWithoutTrace: Object

Type declaration

Name Type
txReceipt TxReceipt
txResponse TxResponse

Defined in

index.ts:116


Token

Ƭ Token: Object

Type declaration

Name Type
address Address
amount? string
name string | null
pair? string
symbol string | null
token0? Token
token1? Token
tokenId? string
type TokenType

Defined in

index.ts:291


TraceLog

Ƭ TraceLog: Object

Type declaration

Name Type
action TraceLogAction
blockHash string
blockNumber number
result { gasUsed: BigNumber ; output: string }
result.gasUsed BigNumber
result.output string
subtraces number
traceAddress number[]
transactionHash string
transactionPosition number
type string

Defined in

index.ts:86


TraceLogAction

Ƭ TraceLogAction: Object

Type declaration

Name Type
callType string
from Address
gas BigNumber
input string
to Address
value BigNumber

Defined in

index.ts:101


TxReceipt

Ƭ TxReceipt: Omit<unvalidatedTransactionReceipt, "from" | "to"> & { from: Address ; timestamp: number ; to: Address }

Defined in

index.ts:56


TxResponse

Ƭ TxResponse: Omit<unvalidatedTransactionResponse, "from" | "to"> & { creates: string ; from: Address }

Defined in

index.ts:55


UnknownKey

Ƭ UnknownKey: Omit<string, keyof InteractionEvent>

Defined in

index.ts:222


UnvalidatedTraceLog

Ƭ UnvalidatedTraceLog: Object

Type declaration

Name Type
action UnvalidatedTraceLogAction
blockHash string
blockNumber number
result { gasUsed: string ; output: string }
result.gasUsed string
result.output string
subtraces number
traceAddress number[]
transactionHash string
transactionPosition number
type string

Defined in

index.ts:62


UnvalidatedTraceLogAction

Ƭ UnvalidatedTraceLogAction: Object

Type declaration

Name Type
callType string
from Address
gas string
input string
to Address
value string

Defined in

index.ts:77