11import { beforeAll , describe , expect , it } from "vitest" ;
22import { TEST_CLIENT } from "../../../test/src/test-clients.js" ;
3- import { zkSyncSepolia } from "../../chains/chain-definitions/zksync-sepolia .js" ;
3+ import { defineChain } from "../../chains/utils .js" ;
44import { type ThirdwebContract , getContract } from "../../contract/contract.js" ;
55import { balanceOf } from "../../extensions/erc1155/__generated__/IERC1155/read/balanceOf.js" ;
66import { claimTo } from "../../extensions/erc1155/drops/write/claimTo.js" ;
7+ import { deployPublishedContract } from "../../extensions/prebuilts/deploy-published.js" ;
78import { sendAndConfirmTransaction } from "../../transaction/actions/send-and-confirm-transaction.js" ;
89import { sendTransaction } from "../../transaction/actions/send-transaction.js" ;
910import { prepareTransaction } from "../../transaction/prepare-transaction.js" ;
@@ -20,14 +21,14 @@ let smartWalletAddress: Address;
2021let personalAccount : Account ;
2122let accountContract : ThirdwebContract ;
2223
23- const chain = zkSyncSepolia ;
24+ const chain = defineChain ( 531050104 ) ;
2425const client = TEST_CLIENT ;
2526const contract = getContract ( {
2627 client,
2728 chain,
2829 address : "0x6A7a26c9a595E6893C255C9dF0b593e77518e0c3" ,
2930} ) ;
30- describe . runIf ( process . env . TW_SECRET_KEY ) . skip . sequential (
31+ describe . runIf ( process . env . TW_SECRET_KEY ) . sequential (
3132 "SmartWallet policy tests" ,
3233 {
3334 retry : 0 ,
@@ -69,7 +70,7 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
6970 expect ( isDeployed ) . toEqual ( true ) ;
7071 } ) ;
7172
72- it ( "should send a transaction" , async ( ) => {
73+ it . skip ( "should send a transaction" , async ( ) => {
7374 const tx = prepareTransaction ( {
7475 client,
7576 chain,
@@ -106,5 +107,29 @@ describe.runIf(process.env.TW_SECRET_KEY).skip.sequential(
106107 } ) ;
107108 expect ( balance ) . toEqual ( 1n ) ;
108109 } ) ;
110+
111+ it ( "should deploy a published autofactory contract" , async ( ) => {
112+ const address = await deployPublishedContract ( {
113+ client : TEST_CLIENT ,
114+ chain,
115+ account : smartAccount ,
116+ contractId : "DropERC721" ,
117+ contractParams : {
118+ defaultAdmin : smartAccount . address , // defaultAdmin
119+ name : "test" , // name
120+ symbol : "test" , // symbol
121+ contractURI : "" , // contractURI
122+ trustedForwarders : [ ] , // trustedForwarders
123+ saleRecipient : smartAccount . address , // saleRecipient
124+ royaltyRecipient : smartAccount . address , // royaltyRecipient
125+ royaltyBps : 0n , // royaltyBps
126+ platformFeeBps : 0n , // platformFeeBps
127+ platformFeeRecipient : smartAccount . address , // platformFeeRecipient
128+ } ,
129+ } ) ;
130+ console . log ( "deployed address" , address ) ;
131+ expect ( address ) . toBeDefined ( ) ;
132+ expect ( address . length ) . toBe ( 42 ) ;
133+ } ) ;
109134 } ,
110135) ;
0 commit comments