File tree Expand file tree Collapse file tree 2 files changed +30
-18
lines changed
packages/thirdweb/src/extensions/erc20/write Expand file tree Collapse file tree 2 files changed +30
-18
lines changed Original file line number Diff line number Diff line change 1- import type { BaseTransactionOptions } from "../../../transaction/types.js" ;
1+ import type {
2+ BaseTransactionOptions ,
3+ WithOverrides ,
4+ } from "../../../transaction/types.js" ;
25import type { Prettify } from "../../../utils/type-utils.js" ;
36import { toUnits } from "../../../utils/units.js" ;
47import { transfer as generatedTransfer } from "../__generated__/IERC20/write/transfer.js" ;
@@ -8,14 +11,16 @@ import { transfer as generatedTransfer } from "../__generated__/IERC20/write/tra
811 * @extension ERC20
912 */
1013export type TransferParams = Prettify <
11- { to : string } & (
12- | {
13- amount : number | string ;
14- }
15- | {
16- amountWei : bigint ;
17- }
18- )
14+ WithOverrides <
15+ { to : string } & (
16+ | {
17+ amount : number | string ;
18+ }
19+ | {
20+ amountWei : bigint ;
21+ }
22+ )
23+ >
1924> ;
2025
2126/**
@@ -60,6 +65,7 @@ export function transfer(options: BaseTransactionOptions<TransferParams>) {
6065 amountWei : amount ,
6166 tokenAddress : options . contract . address ,
6267 } ,
68+ ...options . overrides ,
6369 } ,
6470 } as const ;
6571 } ,
Original file line number Diff line number Diff line change 11import type { Address } from "abitype" ;
2- import type { BaseTransactionOptions } from "../../../transaction/types.js" ;
2+ import type {
3+ BaseTransactionOptions ,
4+ WithOverrides ,
5+ } from "../../../transaction/types.js" ;
36import { toUnits } from "../../../utils/units.js" ;
47
58import type { Prettify } from "../../../utils/type-utils.js" ;
@@ -10,14 +13,16 @@ import { transferFrom as generatedTransferFrom } from "../__generated__/IERC20/w
1013 * @extension ERC20
1114 */
1215export type TransferFromParams = Prettify <
13- { to : Address ; from : Address } & (
14- | {
15- amount : number | string ;
16- }
17- | {
18- amountWei : bigint ;
19- }
20- )
16+ WithOverrides <
17+ { to : Address ; from : Address } & (
18+ | {
19+ amount : number | string ;
20+ }
21+ | {
22+ amountWei : bigint ;
23+ }
24+ )
25+ >
2126> ;
2227
2328/**
@@ -66,6 +71,7 @@ export function transferFrom(
6671 amountWei : amount ,
6772 tokenAddress : options . contract . address ,
6873 } ,
74+ ...options . overrides ,
6975 } ,
7076 } as const ;
7177 } ,
You can’t perform that action at this time.
0 commit comments