File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- import { abiContractFactory } from '@/utils/abiContractFactory' ;
18
-
19
17
const abi = [
20
18
{
21
19
inputs : [ ] ,
@@ -787,6 +785,4 @@ const abi = [
787
785
} ,
788
786
] as const ;
789
787
790
- export const { readActions : readNftAbiActions , writeActions : writeNftAbiActions } = abiContractFactory ( abi ) ;
791
-
792
788
export default abi ;
Original file line number Diff line number Diff line change 17
17
import { TransactionBlock } from '@mysten/sui.js/transactions' ;
18
18
import { waitForTransaction } from '@wagmi/core' ;
19
19
20
+ import { createContractActions } from '@/utils/contract' ;
20
21
import httpClient from '@/utils/http' ;
21
22
22
23
import type { Address } from '@wagmi/core' ;
23
24
24
- import { writeNftAbiActions } from './helper/nftAbi ' ;
25
+ import nftAbi from './helper/abi ' ;
25
26
27
+ const { writeActions : { safeMint } } = createContractActions ( nftAbi ) ;
26
28
27
29
async function fetchGainedReputationList ( userId ) {
28
30
return httpClient . get ( `/nft/general/public/${ userId } /infos` ) ;
@@ -65,7 +67,7 @@ async function mintNft({
65
67
66
68
const signed = signRes . data ;
67
69
68
- const { hash } = await writeNftAbiActions . safeMint ( contract , [
70
+ const { hash } = await safeMint ( contract , [
69
71
address ,
70
72
id ,
71
73
userId ,
You can’t perform that action at this time.
0 commit comments