Skip to content

Commit

Permalink
refactor: remove fallback inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 6, 2024
1 parent e9cb8ee commit f85bf57
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion .changeset/angry-taxis-enjoy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"abitype": patch
---

normalize AbiFallback.inputs type and zod
Removed `inputs` from `AbiFallback` type and Zod schema.
1 change: 0 additions & 1 deletion packages/abitype/src/abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export type AbiConstructor = {
/** ABI ["fallback"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */
export type AbiFallback = {
type: 'fallback'
inputs?: readonly never[] | undefined
/**
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
* @see https://github.com/ethereum/solidity/issues/992
Expand Down
3 changes: 0 additions & 3 deletions packages/abitype/src/zod.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ describe('AbiFallback', () => {
}),
).toMatchInlineSnapshot(`
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "fallback",
}
Expand All @@ -502,7 +501,6 @@ describe('AbiFallback', () => {
}),
).toMatchInlineSnapshot(`
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "fallback",
Expand All @@ -516,7 +514,6 @@ describe('AbiFallback', () => {
}),
).toMatchInlineSnapshot(`
{
"inputs": [],
"payable": true,
"stateMutability": "payable",
"type": "fallback",
Expand Down
5 changes: 0 additions & 5 deletions packages/abitype/src/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ export const AbiFallback = z.preprocess(
},
z.object({
type: z.literal('fallback'),
/**
* @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
* https://github.com/ethereum/solidity/issues/992
*/
inputs: z.tuple([]).readonly().optional(),
/**
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
* https://github.com/ethereum/solidity/issues/992
Expand Down

0 comments on commit f85bf57

Please sign in to comment.