Skip to content

Commit

Permalink
Support wrapped ERC20 and legacy ERC721 in simulations (#4122)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwalsh0 authored Apr 3, 2024
1 parent 4f6df1d commit bb81647
Show file tree
Hide file tree
Showing 3 changed files with 425 additions and 146 deletions.
48 changes: 48 additions & 0 deletions packages/transaction-controller/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,51 @@ export const GAS_BUFFER_CHAIN_OVERRIDES = {
[CHAIN_IDS.OPTIMISM]: 1,
[CHAIN_IDS.OPTIMISM_SEPOLIA]: 1,
};

/** Extract of the Wrapped ERC-20 ABI required for simulation. */
export const ABI_SIMULATION_ERC20_WRAPPED = [
{
anonymous: false,
inputs: [
{ indexed: true, name: 'to', type: 'address' },
{ indexed: false, name: 'wad', type: 'uint256' },
],
name: 'Deposit',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, name: 'from', type: 'address' },
{ indexed: false, name: 'wad', type: 'uint256' },
],
name: 'Withdrawal',
type: 'event',
},
];

/** Extract of the legacy ERC-721 ABI required for simulation. */
export const ABI_SIMULATION_ERC721_LEGACY = [
{
anonymous: false,
inputs: [
{
indexed: false,
name: '_from',
type: 'address',
},
{
indexed: false,
name: '_to',
type: 'address',
},
{
indexed: false,
name: '_tokenId',
type: 'uint256',
},
],
name: 'Transfer',
type: 'event',
},
];
Loading

0 comments on commit bb81647

Please sign in to comment.