evm-translator / Exports
- ActivityData
- Address
- Chain
- Chains
- ContractData
- Decoded
- DecodedCallData
- EthersAPIKeys
- InProgressActivity
- Interaction
- InteractionEvent
- InteractionEventParams
- Interpretation
- MostTypes
- RawDecodedCallData
- RawDecodedLog
- RawDecodedLogEvent
- RawLogEvent
- RawTxData
- RawTxDataWithoutTrace
- Token
- TraceLog
- TraceLogAction
- TxReceipt
- TxResponse
- UnknownKey
- UnvalidatedTraceLog
- UnvalidatedTraceLogAction
Ƭ ActivityData: Object
Name | Type |
---|---|
decodedData |
Decoded |
interpretedData |
Interpretation |
rawTxData |
RawTxData |
Ƭ Address: `0x${string}`
40 char hexadecimal address. Can be an EOA, Contract, or Token address
Ƭ Chain: Object
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 |
Ƭ Chains: Record
<string
, Chain
>
Map of EVM chain names to an object with Chain metadata
Ƭ ContractData: Object
Name | Type |
---|---|
abi |
ABI_ItemUnfiltered [] |
address |
Address |
contractName |
string | null |
contractOfficialName |
string | null |
tokenName |
string | null |
tokenSymbol |
string | null |
type |
ContractType |
Ƭ Decoded: Object
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 |
Ƭ DecodedCallData: Object
Name | Type |
---|---|
name |
string | null |
params |
Record <string , MostTypes > |
Ƭ EthersAPIKeys: Object
Name | Type |
---|---|
alchemy |
string |
etherscan |
string |
infura |
string |
pocket |
{ applicationId : string ; applicationSecretKey : string } |
pocket.applicationId |
string |
pocket.applicationSecretKey |
string |
Ƭ InProgressActivity: Object
Name | Type |
---|---|
decoded? |
Decoded |
rawTxData? |
RawTxData |
Ƭ Interaction: Object
Name | Type |
---|---|
contractAddress |
Address |
contractName |
string | null |
contractSymbol |
string | null |
events |
InteractionEvent [] |
Ƭ InteractionEvent: Object
Name | Type | Description |
---|---|---|
eventName |
string | null |
The name of the function that was called |
logIndex |
number | null |
- |
nativeTransfer? |
true |
- |
params |
InteractionEventParams |
- |
Ƭ InteractionEventParams: Object
▪ [key: string
]: string
| string
[] | undefined
| null
| number
| boolean
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 |
Ƭ 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)
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 |
Ƭ MostTypes: string
| number
| boolean
| null
| string
[]
Ƭ RawDecodedCallData: Object
Name | Type |
---|---|
name |
string | null |
params |
{ name : string ; type : string ; value : string | number | boolean | null | string [] }[] |
Ƭ RawDecodedLog: Object
Name | Type |
---|---|
address |
string |
decoded |
boolean |
events |
RawDecodedLogEvent [] |
logIndex |
number |
name |
string | null |
Ƭ RawDecodedLogEvent: Object
Name | Type |
---|---|
name |
string |
type |
string |
value |
string | string [] |
Ƭ RawLogEvent: Object
Name | Type |
---|---|
address |
Address |
data |
string |
logIndex |
number |
topics |
string [] |
Ƭ RawTxData: Object
Name | Type |
---|---|
txReceipt |
TxReceipt |
txResponse |
TxResponse |
txTrace |
TraceLog [] |
Ƭ RawTxDataWithoutTrace: Object
Name | Type |
---|---|
txReceipt |
TxReceipt |
txResponse |
TxResponse |
Ƭ Token: Object
Name | Type |
---|---|
address |
Address |
amount? |
string |
name |
string | null |
pair? |
string |
symbol |
string | null |
token0? |
Token |
token1? |
Token |
tokenId? |
string |
type |
TokenType |
Ƭ TraceLog: Object
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 |
Ƭ TraceLogAction: Object
Name | Type |
---|---|
callType |
string |
from |
Address |
gas |
BigNumber |
input |
string |
to |
Address |
value |
BigNumber |
Ƭ TxReceipt: Omit
<unvalidatedTransactionReceipt
, "from"
| "to"
> & { from
: Address
; timestamp
: number
; to
: Address
}
Ƭ TxResponse: Omit
<unvalidatedTransactionResponse
, "from"
| "to"
> & { creates
: string
; from
: Address
}
Ƭ UnknownKey: Omit
<string
, keyof InteractionEvent
>
Ƭ UnvalidatedTraceLog: Object
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 |
Ƭ UnvalidatedTraceLogAction: Object
Name | Type |
---|---|
callType |
string |
from |
Address |
gas |
string |
input |
string |
to |
Address |
value |
string |