@@ -23,12 +23,14 @@ import { createContractActions } from '@/utils/contract';
23
23
import httpClient from '@/utils/http' ;
24
24
import { parseTokenUnits } from '@/utils/web3' ;
25
25
26
+ import type { Address } from '@wagmi/core' ;
27
+
26
28
import { getContractAddress } from './helper' ;
27
29
import bountyAbi from './helper/abi' ;
28
30
29
- const { writeActions : { createTask, withdraw : withdrawFromAbi } } = createContractActions ( bountyAbi ) ;
31
+ const { writeActions : { createTask : createTaskFromAbi , withdraw : withdrawFromAbi } } = createContractActions ( bountyAbi ) ;
30
32
31
- function resolveSkipped ( page , size = PAGE_SIZE ) {
33
+ function resolveSkipped ( page : number | string , size : number = PAGE_SIZE ) {
32
34
let resolved = Number ( page ) ;
33
35
34
36
if ( ! isInteger ( resolved ) || resolved < 1 ) {
@@ -87,6 +89,10 @@ async function requestTermination(id, data) {
87
89
return httpClient . post ( `/build/creator/bounties/${ id } /status/termination/propose` , data ) ;
88
90
}
89
91
92
+ async function createTask ( args : [ bigint , Address , Address , bigint ] ) {
93
+ return createTaskFromAbi ( getContractAddress ( ) , args ) ;
94
+ }
95
+
90
96
async function withdraw ( walletClient , chainId , taskId , amount , deadline , signature ) {
91
97
try {
92
98
const { hash } = await withdrawFromAbi ( getContractAddress ( chainId ) , [
0 commit comments