Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multicall #23

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions packages/multicall/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// eslint-disable-next-line no-undef
module.exports = {
// root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['airbnb-typescript', 'react-app', 'prettier', 'next'],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
rules: {
// "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'arrow-body-style': ['error', 'as-needed'],
'linebreak-style': [0, 'error', 'windows'],
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
],
'object-curly-spacing': ['warn', 'always'],
'object-curly-newline': 'off',
'operator-linebreak': 'off',

'max-len': [
'warn',
{
code: 120,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'no-plusplus': [
'error',
{
allowForLoopAfterthoughts: true,
},
],
'react/jsx-key': 'warn',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.js', '**/*.test.jsx', '**/*.test.ts', '**/*.test.tsx', 'src/tests/**/*'],
},
],
'react/jsx-props-no-spreading': 'off',
'import/prefer-default-export': 'off',
'react/jsx-boolean-value': 'off',
'react/no-unescaped-entities': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-wrap-multilines': 'off',
'react/destructuring-assignment': 'off',
'no-underscore-dangle': 'off',

'brace-style': 'off',
'@typescript-eslint/brace-style': ['error'],

// remove below to check before prod:
'no-console': 'off',
},
};
3 changes: 1 addition & 2 deletions packages/multicall/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/node_modules
/bin
/node_modules
1 change: 1 addition & 0 deletions packages/multicall/bin/addresses.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const MULTICALL_ADDRESSES: Record<number, string | null>;
8 changes: 8 additions & 0 deletions packages/multicall/bin/addresses.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/multicall/bin/addresses.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions packages/multicall/bin/contract.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Fragment, FunctionFragment, JsonFragment } from "@ethersproject/abi";
export declare class MulticallContract {
private _address;
private _abi;
private _functions;
get address(): string;
get abi(): Fragment[];
get functions(): FunctionFragment[];
constructor(address: string, abi: JsonFragment[] | string[] | Fragment[]);
[method: string]: any;
}
38 changes: 38 additions & 0 deletions packages/multicall/bin/contract.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/multicall/bin/contract.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions packages/multicall/bin/contracts/factories/Multicall__factory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Signer } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { Multicall, MulticallInterface } from "../Multicall";
export declare class Multicall__factory {
static readonly abi: {
constant: boolean;
inputs: ({
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
name: string;
outputs: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
payable: boolean;
stateMutability: string;
type: string;
}[];
static createInterface(): MulticallInterface;
static connect(address: string, signerOrProvider: Signer | Provider): Multicall;
}
192 changes: 192 additions & 0 deletions packages/multicall/bin/contracts/factories/Multicall__factory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/multicall/bin/contracts/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export type { Multicall } from "./Multicall";
export { Multicall__factory } from "./factories/Multicall__factory";
6 changes: 6 additions & 0 deletions packages/multicall/bin/contracts/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading