Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
cbd5ed3
[ReactCoreSDK] pass default key to the sdkprovider
Mar 1, 2023
00b63f9
Merge branch 'main' into ike/key
Jul 10, 2023
14ba813
[Storage] Pass apikey to ipfsuploader
Jul 10, 2023
d384eba
apikey
Jul 10, 2023
5588452
remove unusued api key
Jul 10, 2023
1045bf3
use apikey
Jul 10, 2023
302c87f
Merge branch 'main' into ike/key
Jul 10, 2023
3cb1141
default
Jul 11, 2023
c36cae7
key
Jul 11, 2023
8022ecb
comments
Jul 11, 2023
6417a89
pass apikey
Jul 11, 2023
c87a970
Merge branch 'main' into ike/key
jnsdls Jul 11, 2023
dadb9ff
sw api key
Jul 11, 2023
fbabc93
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 11, 2023
479ad21
Remove new ThirdStorage() from ContractWrapper
MananTank Jul 11, 2023
4d4bfe3
feedback
Jul 11, 2023
8c6ebfd
Fix build
MananTank Jul 11, 2023
76b3a55
apikey -> thirdwebApiKey
Jul 11, 2023
3c9c2e0
thirdwebapikey
Jul 11, 2023
04c46ff
better way to fix user-wallet
MananTank Jul 11, 2023
dc35a96
Remove ThirdwebStorage() creation from transactions.ts
MananTank Jul 11, 2023
c03fca4
Merge branch 'ike/key' into mnn/storage-eliminate
MananTank Jul 11, 2023
bb5bb66
Fix build
MananTank Jul 11, 2023
b6d3f6d
revert useStorage change in useBalance
MananTank Jul 11, 2023
4947554
pass apikey to wallets/connectors
Jul 11, 2023
7238aea
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 11, 2023
2431eb8
Merge branch 'main' into ike/key
joaquim-verges Jul 11, 2023
40c20be
fix build
joaquim-verges Jul 11, 2023
2313fc9
cleanup
joaquim-verges Jul 12, 2023
7b1a40c
redirect to /dashboard/settings
joaquim-verges Jul 12, 2023
1907783
lint
joaquim-verges Jul 12, 2023
dc07c1e
[SDK, React] mass rename thirdwebApiKey -> apiKey (#1323)
joaquim-verges Jul 12, 2023
4324340
improved warnings
MananTank Jul 12, 2023
12e89bc
Merge branch 'main' into ike/key
Jul 12, 2023
8025f6b
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 12, 2023
e7d6178
use apiKey in wallets, unity bridge
MananTank Jul 12, 2023
7e7e8d9
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 12, 2023
bf6f4f7
magicApiKey
MananTank Jul 12, 2023
b40ac05
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 12, 2023
c1007ac
semi-change
Jul 12, 2023
75b0818
clientId / secretKey
Jul 13, 2023
f0ec47a
rename magicApiKey
Jul 13, 2023
b18ab28
clean
Jul 13, 2023
8d8c2fb
Merge branch 'main' into ike/key
Jul 13, 2023
b712899
Merge branch 'main' into ike/key
Jul 13, 2023
3b72171
Merge branch 'main' into ike/key
MananTank Jul 13, 2023
39afeef
headers correction
MananTank Jul 13, 2023
0a62630
Merge branch 'main' into ike/key
Jul 13, 2023
d7e587b
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 13, 2023
ca4471e
Fix test
MananTank Jul 13, 2023
055f432
Enforce API Keys for certain commands (#1317)
Marfuen Jul 13, 2023
9532993
fix typo and update chains
Marfuen Jul 13, 2023
9bfa507
update url
Marfuen Jul 13, 2023
f2a4812
if both secret and client throw
Jul 13, 2023
8874b0a
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 13, 2023
be9d9fc
fix rpc logic
joaquim-verges Jul 13, 2023
f2a1d66
Merge branch 'main' into ike/key
Jul 13, 2023
72b14a8
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 13, 2023
d05eb86
only log if called login
Marfuen Jul 13, 2023
fd09536
gateway subdomains (#1321)
joaquim-verges Jul 13, 2023
6a35c52
Merge branch 'main' into ike/key
joaquim-verges Jul 13, 2023
9bd1de2
validate keys from -k
Marfuen Jul 13, 2023
f896088
update show logs
Marfuen Jul 13, 2023
4be8a81
Merge branch 'main' into ike/key
Marfuen Jul 13, 2023
535f73f
update chains
joaquim-verges Jul 13, 2023
cd9bba9
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 14, 2023
a2a47c4
Merge branch 'main' into ike/key
Jul 14, 2023
b02653b
switch to staging gateway
joaquim-verges Jul 14, 2023
ff17ac1
remove 403 check
joaquim-verges Jul 14, 2023
35b6a94
implement RN storage
Jul 14, 2023
0f63f5d
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 14, 2023
3485fe2
Merge branch 'main' into ike/key
Jul 14, 2023
6a40ee6
changeset
Jul 14, 2023
e9ce7db
fix RN crypto dependency from storage
Jul 14, 2023
4e79bb3
[Storage] Use new upload server for uploads (#1322)
adam-maj Jul 14, 2023
81d8779
Fix storage tests to use secretKey
Marfuen Jul 14, 2023
aad95e3
pass through api keys in smart wallet
joaquim-verges Jul 14, 2023
5d07f9d
Merge branch 'main' into ike/key
joaquim-verges Jul 14, 2023
fd9d9ba
uploader-rn
Jul 14, 2023
fffdfc6
merge
Jul 14, 2023
7751ace
fix sdk-init tests
Marfuen Jul 14, 2023
7b122a0
update cli to validate secret key using staging, CHANGE TO PROD BEFOR…
Marfuen Jul 14, 2023
b4ddcd1
fix typo in url
Marfuen Jul 14, 2023
8fde89e
updated upload server url to staging
farhanW3 Jul 14, 2023
95ae9cb
upload json
Jul 14, 2023
3e67d10
Merge branch 'main' into ike/key
Jul 14, 2023
282b3cc
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 14, 2023
11d3fa6
Merge branch 'main' into ike/key
nachoiacovino Jul 14, 2023
c4a5517
update clientId
Jul 14, 2023
66721f4
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 14, 2023
37e029a
Merge branch 'main' into ike/key
Jul 14, 2023
ec79eb7
Merge branch 'main' into ike/key
jnsdls Jul 15, 2023
5d28cc8
Fix too many requests error and add error handling
jnsdls Jul 15, 2023
693c377
amman file
jnsdls Jul 15, 2023
70c3437
Remove unnecessary console.warn statement
jnsdls Jul 15, 2023
8a72891
fix(urls): Throw error when using secretKey in browser context
jnsdls Jul 15, 2023
069482b
feat(chains): Add Toronet Testnet and Toronet chains
jnsdls Jul 15, 2023
a79a871
fix(storage): add isTwGatewayUrl function to check if resolvedUri is …
jnsdls Jul 15, 2023
4398a2e
skip publish e2e test for now
jnsdls Jul 15, 2023
2f50872
chore: Update package dependencies
jnsdls Jul 15, 2023
43a15d5
init prettier 3.0.0
jnsdls Jul 15, 2023
8f06932
Merge branch 'main' into ike/key
Jul 16, 2023
a741d93
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 16, 2023
baa9505
[unity] pass supportedChains from C#
0xFirekeeper Jul 17, 2023
e3e5ef0
[RN] fix download, add polyfill for URL and use expo-app for bundleId
Jul 17, 2023
b2edd11
Merge branch 'main' into ike/key
Jul 17, 2023
ae59e8a
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 17, 2023
205ff91
pass bundleId in bundler/paymaster/ipfs. point to prod.
Jul 17, 2023
fad061d
default to ipfscdn.io only
joaquim-verges Jul 17, 2023
c75fc57
[sdk, react-core] - Remove ThirdwebStorage creation from user-wallet …
MananTank Jul 17, 2023
b2e39c2
check if bundler/paymaster before injecting apikey
Jul 17, 2023
9d9f68c
merge
Jul 17, 2023
6131a72
pass headers to RPC
joaquim-verges Jul 17, 2023
ddc5646
safely JSON parse in getLastConnectedWalletInfo
MananTank Jul 17, 2023
9e2a4af
point to prod + add changesets
Jul 17, 2023
f2dcb79
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 17, 2023
b6e6a69
fix changeset
jnsdls Jul 17, 2023
1147f72
more changeset changes
jnsdls Jul 17, 2023
aaebb6f
omit clientId/secret key from wallets, it will be fetched from the Th…
Jul 17, 2023
0dea54b
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 17, 2023
3f71bae
Omit clientId type from smartWallet() options
MananTank Jul 17, 2023
1f08c15
Omit secretKey from smartWallet options too
MananTank Jul 17, 2023
eeeb62e
switch api key redirect
joaquim-verges Jul 17, 2023
20683f7
check apikey in sdk
Jul 17, 2023
edb62d2
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 17, 2023
da640c3
Add option to show coinbase default modal
MananTank Jul 17, 2023
3b3f859
pass apikey error message from client vs sdk
Jul 17, 2023
0e65534
Merge branch 'ike/key' of github.com:thirdweb-dev/js into ike/key
Jul 17, 2023
b86eb14
fix(sdk): Fix condition to check if window is defined
jnsdls Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove new ThirdStorage() from ContractWrapper
  • Loading branch information
MananTank committed Jul 11, 2023
commit 479ad2127eb6c9ac9f27c6836e9c5b1c8460dbb0
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export async function approveErc20Allowance(
currencyAddress,
ERC20Abi,
contractToApprove.options,
contractToApprove.storage,
);
const owner = await contractToApprove.getSignerAddress();
const spender = contractToApprove.readContract.address;
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/common/currency/hasERC20Allowance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export async function hasERC20Allowance(
currencyAddress,
ERC20Abi,
{},
contractToApprove.storage,
);
const owner = await contractToApprove.getSignerAddress();
const spender = contractToApprove.readContract.address;
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/common/currency/setErc20Allowance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export async function setErc20Allowance(
currencyAddress,
ERC20Abi,
contractToApprove.options,
contractToApprove.storage,
);

const owner = await contractToApprove.getSignerAddress();
Expand Down
3 changes: 3 additions & 0 deletions packages/sdk/src/evm/common/marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export async function handleTokenApproval(
assetContract,
ERC165Abi,
contractWrapper.options,
contractWrapper.storage,
);
const isERC721 = await erc165.readContract.supportsInterface(
InterfaceId_IERC721,
Expand All @@ -120,6 +121,7 @@ export async function handleTokenApproval(
assetContract,
ERC721Abi,
contractWrapper.options,
contractWrapper.storage,
);
const approved = await asset.readContract.isApprovedForAll(
from,
Expand All @@ -143,6 +145,7 @@ export async function handleTokenApproval(
assetContract,
ERC1155Abi,
contractWrapper.options,
contractWrapper.storage,
);

const approved = await asset.readContract.isApprovedForAll(
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/evm/common/plugin/getCompositePluginABI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function getCompositePluginABI(
address,
getAllExtensionsAbi,
options,
storage,
);

const plugins = await contract.call("getAllExtensions");
Expand All @@ -56,6 +57,7 @@ export async function getCompositePluginABI(
address,
getAllPluginsAbi,
options,
storage,
);

const pluginMap = await contract.call("getAllPlugins");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export async function getMetadataForPlugins(
implementation,
getAllPluginsAbi,
{},
storage,
);

const pluginMap = await contract.call("getAllPlugins");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class EditionDrop extends StandardErc1155<PrebuiltEditionDrop> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class Edition extends StandardErc1155<TokenERC1155> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class Marketplace implements UpdateableNetwork {
address,
abi,
options,
storage,
),
) {
this._chainId = chainId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export class MarketplaceV3 implements UpdateableNetwork {
address,
abi,
options,
storage,
),
) {
this._chainId = chainId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class Multiwrap extends StandardErc721<MultiwrapContract> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export class NFTCollection extends StandardErc721<TokenERC721> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export class NFTDrop extends StandardErc721<PrebuiltNFTDrop> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class Pack extends StandardErc1155<PackContract> {
},
}
: options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export class SignatureDrop extends StandardErc721<SignatureDropContract> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class Split implements UpdateableNetwork {
address,
abi,
options,
storage,
),
) {
this._chainId = chainId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class TokenDrop extends StandardErc20<PrebuiltTokenDrop> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export class Token extends StandardErc20<TokenERC20> {
address,
abi,
options,
storage,
),
) {
super(contractWrapper, storage, chainId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export class Vote implements UpdateableNetwork {
address,
abi,
options,
storage,
),
) {
this._chainId = chainId;
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/contracts/smart-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ export class SmartContract<
address,
abi,
options,
storage,
),
) {
this._chainId = chainId;
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/core/classes/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class Account<TContract extends IAccountCore>
factoryAddress,
IAccountFactoryAbi,
this.contractWrapper.options,
this.contractWrapper.storage,
);
wrapper.updateSignerOrProvider(this.contractWrapper.getSigner() as Signer);
return wrapper;
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/core/classes/contract-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class ContractPublisher extends RPCConnectionHandler {
getContractPublisherAddress(),
ContractPublisherAbi,
options,
storage,
);
}

Expand Down
15 changes: 7 additions & 8 deletions packages/sdk/src/evm/core/classes/contract-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class ContractWrapper<
> extends RPCConnectionHandler {
// TODO: In another PR, make this storage private, and have extending classes pass
// down storage to be stored in contract wrapper.
#storage: ThirdwebStorage;
storage: ThirdwebStorage;
private isValidContract = false;
private customOverrides: () => CallOverrides = () => ({});
/**
Expand All @@ -71,6 +71,7 @@ export class ContractWrapper<
contractAddress: string,
contractAbi: ContractInterface,
options: SDKOptions,
storage: ThirdwebStorage,
) {
super(network, options);
this.abi = contractAbi;
Expand All @@ -84,9 +85,7 @@ export class ContractWrapper<
this.readContract = this.writeContract.connect(
this.getProvider(),
) as TContract;
this.#storage = new ThirdwebStorage({
apiKey: options?.thirdwebApiKey,
});
this.storage = storage;
}

public override updateSignerOrProvider(network: NetworkInput): void {
Expand Down Expand Up @@ -520,15 +519,15 @@ export class ContractWrapper<
const metadata = await fetchContractMetadataFromAddress(
this.readContract.address,
this.getProvider(),
this.#storage,
this.storage,
);

if (metadata.name) {
contractName = metadata.name;
}

if (metadata.metadata.sources) {
sources = await fetchSourceFilesFromMetadata(metadata, this.#storage);
sources = await fetchSourceFilesFromMetadata(metadata, this.storage);
}
} catch (err) {
// no-op
Expand Down Expand Up @@ -798,11 +797,11 @@ export class ContractWrapper<
? CONTRACT_ADDRESSES[
transaction.chainId as keyof typeof CONTRACT_ADDRESSES
].openzeppelinForwarderEOA ||
(await computeEOAForwarderAddress(this.getProvider(), this.#storage))
(await computeEOAForwarderAddress(this.getProvider(), this.storage))
: CONTRACT_ADDRESSES[
transaction.chainId as keyof typeof CONTRACT_ADDRESSES
].openzeppelinForwarder ||
(await computeForwarderAddress(this.getProvider(), this.#storage)));
(await computeForwarderAddress(this.getProvider(), this.storage)));

const forwarder = new Contract(forwarderAddress, ForwarderABI, provider);
const nonce = await getAndIncrementNonce(forwarder, "getNonce", [
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/evm/core/classes/drop-claim-conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ export class DropClaimConditions<
claimCondition.currencyAddress,
ERC20Abi,
{},
this.storage,
);
const balance = await erc20.readContract.balanceOf(resolvedAddress);
if (balance.lt(totalPrice)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ export class DropErc1155ClaimConditions<
claimCondition.currencyAddress,
IERC20ABI,
{},
this.storage,
);

const balance = await erc20.readContract.balanceOf(resolvedAddress);
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/evm/core/classes/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { getDefaultTrustedForwarders } from "../../constants/addresses/getDefaul
* @internal
*/
export class ContractFactory extends ContractWrapper<TWFactory> {
private storage: ThirdwebStorage;
storage: ThirdwebStorage;

// Map from contract type to version to deploy specific versions by default
private DEFAULT_VERSION_MAP: Record<PrebuiltContractType, number> = {
Expand All @@ -73,7 +73,7 @@ export class ContractFactory extends ContractWrapper<TWFactory> {
storage: ThirdwebStorage,
options?: SDKOptions,
) {
super(network, factoryAddr, TWFactoryAbi, options);
super(network, factoryAddr, TWFactoryAbi, options, storage);
this.storage = storage;
}

Expand Down
16 changes: 13 additions & 3 deletions packages/sdk/src/evm/core/classes/marketplacev3-offers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
* @returns the Offer object array
* @twfeature Offers
*/
public async getAll(filter?: MarketplaceFilterWithoutSeller): Promise<OfferV3[]> {
public async getAll(
filter?: MarketplaceFilterWithoutSeller,
): Promise<OfferV3[]> {
const totalOffers = await this.getTotalCount();

let start = BigNumber.from(filter?.start || 0).toNumber();
Expand Down Expand Up @@ -133,7 +135,9 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
* @returns the Offer object array
* @twfeature Offers
*/
public async getAllValid(filter?: MarketplaceFilterWithoutSeller): Promise<OfferV3[]> {
public async getAllValid(
filter?: MarketplaceFilterWithoutSeller,
): Promise<OfferV3[]> {
const totalOffers = await this.getTotalCount();

let start = BigNumber.from(filter?.start || 0).toNumber();
Expand Down Expand Up @@ -426,7 +430,13 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
: offer.currencyContractAddress;

const provider = this.contractWrapper.getProvider();
const erc20 = new ContractWrapper<IERC20>(provider, currency, ERC20Abi, {});
const erc20 = new ContractWrapper<IERC20>(
provider,
currency,
ERC20Abi,
{},
this.storage,
);

const offerorBalance = await erc20.readContract.balanceOf(
offer.offerorAddress,
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/evm/core/classes/multichain-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ export class MultichainRegistry {
getMultichainRegistryAddress(),
TWRegistryABI,
options,
storage,
);

this.registryRouter = new ContractWrapper<TWMultichainRegistryRouter>(
network,
getMultichainRegistryAddress(),
TWRegistryRouterABI,
options,
storage,
);
}

Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/evm/core/classes/pack-vrf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class PackVRF implements UpdateableNetwork, DetectableFeature {
address,
IPackAbi,
options,
storage,
),
) {
this.contractWrapper = contractWrapper;
Expand Down Expand Up @@ -344,6 +345,7 @@ export class PackVRF implements UpdateableNetwork, DetectableFeature {
linkAddress,
ERC20Abi,
this.contractWrapper.options,
this.storage,
);
return new Erc20(contract, this.storage, this.chainId);
}
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk/src/evm/core/classes/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Transaction } from "./transactions";
import type { TWRegistry } from "@thirdweb-dev/contracts-js";
import TWRegistryABI from "@thirdweb-dev/contracts-js/dist/abis/TWRegistry.json";
import { constants, utils } from "ethers";
import type { ThirdwebStorage } from "@thirdweb-dev/storage";

/**
* @internal
Expand All @@ -16,9 +17,10 @@ export class ContractRegistry extends ContractWrapper<TWRegistry> {
constructor(
registryAddress: string,
network: NetworkInput,
storage: ThirdwebStorage,
options?: SDKOptions,
) {
super(network, registryAddress, TWRegistryABI, options);
super(network, registryAddress, TWRegistryABI, options, storage);
}

public async getContractAddresses(walletAddress: AddressOrEns) {
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk/src/evm/core/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class ThirdwebSDK extends RPCConnectionHandler {
this.storage = configuredStorage;
this.storageHandler = configuredStorage;

this.wallet = new UserWallet(network, options);
this.wallet = new UserWallet(network, options, configuredStorage);
this.deployer = new ContractDeployer(network, options, configuredStorage);
this.verifier = new ContractVerifier(network, options, configuredStorage);
this.multiChainRegistry = new MultichainRegistry(
Expand Down Expand Up @@ -1728,6 +1728,7 @@ export class ContractDeployer extends RPCConnectionHandler {
return new ContractRegistry(
registryAddress,
this.getSignerOrProvider(),
this.storage,
this.options,
);
}));
Expand Down
Loading