Skip to content

Commit

Permalink
chore: post contracts package cleanup (#7687)
Browse files Browse the repository at this point in the history
* chore: move unchained-client address constants into contract package

* chore: consolidtate abis from unchained-client to contracts package

* fix: use correct ABI for weth

* chore: linting

* chore: remove redundant outbox abi

* chore: cleanup investor constants

* fix: dont import src from packages

* chore: remove redundant thochain router abi

* chore: consolidate abis and addresses from thorchain swaper into contract package

* chore: rename some abis

* chore: lintint

* chore: i said, LINT

* chore: use viem erc20 abi

* chore: move abi in investor-foxy to contracts package

* chore: remove testnet support from weth parser

* chore: interfaces get an i

* chore: remove redundant zrx contract addresses

* chore: use correct cowswap contract address name

* chore: use correct arbitrum erc20 gateway proxy contract address name

* chore: use getAddress for thorchain router and vault

* chore: use viem for max allowances

* chore: remove casts

* chore: contract address naming ocd

* chore: actioned apo review feedback

---------

Co-authored-by: gomes <[email protected]>
  • Loading branch information
woodenfurniture and gomesalexandre authored Sep 13, 2024
1 parent 7e22749 commit 76df0f3
Show file tree
Hide file tree
Showing 118 changed files with 485 additions and 3,056 deletions.
200 changes: 0 additions & 200 deletions packages/contracts/src/abis/ERC20ABI.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840
export const outboxAbi = [
export const ARB_OUTBOX_ABI = [
{ inputs: [], name: 'AlreadyInit', type: 'error' },
{
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const ARB_PROXY_ABI: InterfaceAbi = [
export const ARB_PROXY_ABI = [
{
inputs: [
{ internalType: 'address', name: '_logic', type: 'address' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const ARBITRUM_RETRYABLE_TX_ABI: InterfaceAbi = [
export const ARBITRUM_RETRYABLE_TX_ABI = [
{ inputs: [], name: 'NoTicketWithID', type: 'error' },
{ inputs: [], name: 'NotCallable', type: 'error' },
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const ARB_SYS_ABI: InterfaceAbi = [
export const ARB_SYS_ABI = [
{
anonymous: false,
inputs: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const FarmingABI = [
export const FARMING_ABI = [
{
inputs: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// FoxStakingV1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

export const foxStakingV1Abi = [
export const FOX_STAKING_V1_ABI = [
{ type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
{
type: 'function',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const foxyAbi: InterfaceAbi = [
export const FOXY_ABI = [
{
inputs: [],
stateMutability: 'nonpayable',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const FOXY_STAKING_ABI: InterfaceAbi = [
export const FOXY_STAKING_ABI = [
{
inputs: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

const bep20: InterfaceAbi = [
export const I_BEP20_ABI = [
{
anonymous: false,
inputs: [
Expand Down Expand Up @@ -125,5 +123,3 @@ const bep20: InterfaceAbi = [
type: 'function',
},
]

export { bep20 }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const IUniswapV2Pair = [
export const I_UNISWAP_V2_PAIR_ABI = [
{
anonymous: false,
inputs: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const IUniswapV3PoolABI = [
export const I_UNISWAP_V3_POOL_ABI = [
{
anonymous: false,
inputs: [
Expand Down
33 changes: 26 additions & 7 deletions packages/contracts/src/abis/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
export * from './ERC20ABI'
export * from './farmingAbi'
export * from './FoxStakingV1'
export * from './IUniswapV2Pair'
export * from './IUniswapV2Router02'
export * from './Outbox'
export * from './THORCHAIN_RouterABI'
export * from './arbOutbox'
export * from './arbProxy'
export * from './arbRetryableTx'
export * from './arbSys'
export * from './iBep20'
export * from './farming'
export * from './foxStaking'
export * from './foxy'
export * from './foxyStaking'
export * from './l1ArbitrumGateway'
export * from './l1OrbitCustomGateway'
export * from './l2ArbitrumGateway'
export * from './liquidityReserve'
export * from './rfox'
export * from './shapeShiftRouter'
export * from './thorchainRouter'
export * from './tokeManager'
export * from './tokePool'
export * from './tokeRewardHash'
export * from './iUniswapV2Pair'
export * from './uniswapV2Router02'
export * from './iUniswapV3Pool'
export * from './uniswapV3Quoter'
export * from './uniV2StakingRewards'
export * from './weth'
export * from './yearnVault'
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const L1_ARBITRUM_GATEWAY_ABI: InterfaceAbi = [
export const L1_ARBITRUM_GATEWAY_ABI = [
{
anonymous: false,
inputs: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const L1_ORBIT_CUSTOM_GATEWAY_ABI: InterfaceAbi = [
export const L1_ORBIT_CUSTOM_GATEWAY_ABI = [
{
inputs: [
{ internalType: 'uint256', name: 'dataLength', type: 'uint256' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const L2_ARBITRUM_GATEWAY_ABI: InterfaceAbi = [
export const L2_ARBITRUM_GATEWAY_ABI = [
{
anonymous: false,
inputs: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const liquidityReserveAbi: InterfaceAbi = [
export const LIQUIDITY_RESERVE_ABI = [
{
inputs: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const RFOX_ABI: InterfaceAbi = [
export const RFOX_ABI = [
{ type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
{
type: 'function',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const SHAPESHIFT_ROUTER_ABI: InterfaceAbi = [
export const SHAPESHIFT_ROUTER_ABI = [
{
inputs: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const THORChain_RouterABI = [
export const THORCHAIN_ROUTER_ABI = [
{
inputs: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const tokeManagerAbi: InterfaceAbi = [
export const TOKE_MANAGER_ABI = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{
anonymous: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { InterfaceAbi } from 'ethers'

export const tokePoolAbi: InterfaceAbi = [
export const TOKE_POOL_ABI = [
{
anonymous: false,
inputs: [
Expand Down
Loading

0 comments on commit 76df0f3

Please sign in to comment.