diff --git a/examples/dojo-starter b/examples/dojo-starter index 5a1879da..93978e08 160000 --- a/examples/dojo-starter +++ b/examples/dojo-starter @@ -1 +1 @@ -Subproject commit 5a1879da18f7b71e2196252e0780f7f7787baa82 +Subproject commit 93978e08574d444cda5e3189ac2bf57220dbf76c diff --git a/examples/react/react-app/src/dojo/DojoContext.tsx b/examples/react/react-app/src/dojo/DojoContext.tsx index 4fc50fa8..6ce7dd68 100644 --- a/examples/react/react-app/src/dojo/DojoContext.tsx +++ b/examples/react/react-app/src/dojo/DojoContext.tsx @@ -37,7 +37,7 @@ export const DojoProvider = ({ ); const masterAccount = useMemo( - () => new Account(rpcProvider, masterAddress, masterPrivateKey), + () => new Account(rpcProvider, masterAddress, masterPrivateKey, "1"), [rpcProvider, masterAddress, masterPrivateKey] ); diff --git a/examples/react/react-phaser-example/src/dojo/createBurner.ts b/examples/react/react-phaser-example/src/dojo/createBurner.ts index e4c249c5..fd44d771 100644 --- a/examples/react/react-phaser-example/src/dojo/createBurner.ts +++ b/examples/react/react-phaser-example/src/dojo/createBurner.ts @@ -14,7 +14,8 @@ export const createBurner = async ({ ...config }: Config) => { masterAccount: new Account( rpcProvider, config.masterAddress, - config.masterPrivateKey + config.masterPrivateKey, + "1" ), accountClassHash: config.accountClassHash, rpcProvider, diff --git a/packages/core/src/provider/DojoProvider.ts b/packages/core/src/provider/DojoProvider.ts index 45b11edd..7f9aad61 100644 --- a/packages/core/src/provider/DojoProvider.ts +++ b/packages/core/src/provider/DojoProvider.ts @@ -153,14 +153,16 @@ export class DojoProvider extends Provider { const nonce = await account?.getNonce(); return await account?.execute( - { - contractAddress: getContractByName( - this.manifest, - contract_name - ), - entrypoint: call, - calldata: calldata, - }, + [ + { + contractAddress: getContractByName( + this.manifest, + contract_name + ), + entrypoint: call, + calldata: calldata, + }, + ], undefined, { maxFee: 0, // TODO: Update this value as needed. diff --git a/packages/create-burner/src/manager/burnerManager.ts b/packages/create-burner/src/manager/burnerManager.ts index 4a0e9e09..e9293e76 100644 --- a/packages/create-burner/src/manager/burnerManager.ts +++ b/packages/create-burner/src/manager/burnerManager.ts @@ -20,7 +20,8 @@ import { prefundAccount } from "./prefundAccount"; * const masterAccount = new Account( * rpcProvider, * import.meta.env.VITE_PUBLIC_MASTER_ADDRESS!, - * import.meta.env.VITE_PUBLIC_MASTER_PRIVATE_KEY! + * import.meta.env.VITE_PUBLIC_MASTER_PRIVATE_KEY!, + * "1" * ); * * const burnerManager = new BurnerManager({ @@ -90,7 +91,8 @@ export class BurnerManager { this.account = new Account( this.provider, address, - storage[address].privateKey + storage[address].privateKey, + "1" ); return; } @@ -146,7 +148,8 @@ export class BurnerManager { this.account = new Account( this.provider, address, - storage[address].privateKey + storage[address].privateKey, + "1" ); } @@ -156,7 +159,12 @@ export class BurnerManager { throw new Error("burner not found"); } - return new Account(this.provider, address, storage[address].privateKey); + return new Account( + this.provider, + address, + storage[address].privateKey, + "1" + ); } clear(): void { @@ -170,7 +178,8 @@ export class BurnerManager { return new Account( this.provider, address, - storage[address].privateKey + storage[address].privateKey, + "1" ); } } @@ -192,7 +201,6 @@ export class BurnerManager { if (!this.masterAccount) { throw new Error("wallet account not found"); } - try { await prefundAccount(address, this.masterAccount); } catch (e) { @@ -206,7 +214,7 @@ export class BurnerManager { }; // deploy burner - const burner = new Account(this.provider, address, privateKey); + const burner = new Account(this.provider, address, privateKey, "1"); const nonce = await this.account?.getNonce(); diff --git a/packages/create-burner/src/manager/prefundAccount.ts b/packages/create-burner/src/manager/prefundAccount.ts index 79fccfd4..b6b8ee64 100644 --- a/packages/create-burner/src/manager/prefundAccount.ts +++ b/packages/create-burner/src/manager/prefundAccount.ts @@ -32,10 +32,9 @@ export const prefundAccount = async ( // Retrieve the nonce for the account to avoid transaction collisions const nonce = await account.getNonce(); - // Initiate the transaction const { transaction_hash } = await account.execute( - transferOptions, + [transferOptions], undefined, { nonce,