Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df5f016d31 | ||
|
|
89102b0c89 | ||
|
|
e1846c4469 | ||
|
|
cc56037e64 | ||
|
|
23d90b3e77 | ||
|
|
6745078947 |
@@ -1,5 +1,16 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 3.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1101](https://github.com/thirdweb-dev/js/pull/1101) [`e1846c44`](https://github.com/thirdweb-dev/js/commit/e1846c44696bcb25a6a137d63e117e7d2ce9d979) Thanks [@adam-maj](https://github.com/adam-maj)! - Bump invalid before with 5 minute window
|
||||
|
||||
- [#1098](https://github.com/thirdweb-dev/js/pull/1098) [`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6) Thanks [@MananTank](https://github.com/MananTank)! - add sideEffects: false in package.json
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@0.2.24
|
||||
|
||||
## 3.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.0.22",
|
||||
"version": "3.0.23",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
@@ -54,6 +54,7 @@
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/auth",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "preconstruct build",
|
||||
"format": "prettier --write 'src/**/*'",
|
||||
|
||||
@@ -54,7 +54,8 @@ export class ThirdwebAuth {
|
||||
nonce: parsedOptions?.nonce,
|
||||
expiration_time:
|
||||
parsedOptions?.expirationTime || new Date(Date.now() + 1000 * 60 * 5),
|
||||
invalid_before: parsedOptions?.invalidBefore,
|
||||
invalid_before:
|
||||
parsedOptions?.invalidBefore || new Date(Date.now() - 1000 * 60 * 5),
|
||||
resources: parsedOptions?.resources,
|
||||
});
|
||||
|
||||
|
||||
@@ -11,20 +11,23 @@ export default {
|
||||
"rpc": [
|
||||
"https://gnosis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.gnosischain.com",
|
||||
"https://rpc.gnosis.gateway.fm",
|
||||
"https://rpc.ankr.com/gnosis",
|
||||
"https://gnosischain-rpc.gateway.pokt.network",
|
||||
"https://gnosis-mainnet.public.blastapi.io",
|
||||
"https://gnosis.api.onfinality.io/public",
|
||||
"https://gnosis.blockpi.network/v1/rpc/public",
|
||||
"https://web3endpoints.com/gnosischain-mainnet",
|
||||
"wss://rpc.gnosischain.com/wss"
|
||||
],
|
||||
"faucets": [
|
||||
"https://gnosisfaucet.com",
|
||||
"https://faucet.gimlu.com/gnosis",
|
||||
"https://stakely.io/faucet/gnosis-chain-xdai",
|
||||
"https://faucet.prussia.dev/xdai"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "xDAI",
|
||||
"symbol": "xDAI",
|
||||
"symbol": "XDAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.gnosischain.com",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Chiado Testnet",
|
||||
"chain": "CHI",
|
||||
"name": "Gnosis Chiado Testnet",
|
||||
"chain": "GNO",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeidk4swpgdyqmpz6shd5onvpaujvwiwthrhypufnwr6xh3dausz2dm",
|
||||
"width": 1800,
|
||||
@@ -9,16 +9,17 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://chiado-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gnosis-chiado-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.chiadochain.net",
|
||||
"https://rpc.eu-central-2.gateway.fm/v3/gnosis/archival/chiado"
|
||||
"https://rpc.chiado.gnosis.gateway.fm",
|
||||
"wss://rpc.chiadochain.net/wss"
|
||||
],
|
||||
"faucets": [
|
||||
"https://gnosisfaucet.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Chiado xDAI",
|
||||
"symbol": "xDAI",
|
||||
"symbol": "XDAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.gnosischain.com",
|
||||
@@ -39,5 +40,5 @@ export default {
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "chiado-testnet"
|
||||
"slug": "gnosis-chiado-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,37 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Optimism on Gnosis",
|
||||
"chain": "OGC",
|
||||
"rpc": [
|
||||
"https://optimism-on-gnosis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://optimism.gnosischain.com",
|
||||
"wss://optimism.gnosischain.com/wss"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.gimlu.com/gnosis"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "xDAI",
|
||||
"symbol": "xDAI",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.xdaichain.com/for-developers/optimism-optimistic-rollups-on-gc",
|
||||
"shortName": "ogc",
|
||||
"chainId": 300,
|
||||
"networkId": 300,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.com/xdai/optimism",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "optimism-on-gnosis"
|
||||
} as const satisfies Chain;
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,13 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.10.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`23d90b3e`](https://github.com/thirdweb-dev/js/commit/23d90b3e779a5bfdb7058b8c51349d9c278fcbce), [`cc56037e`](https://github.com/thirdweb-dev/js/commit/cc56037e64560b9e0fc16eb0ac7cc2e47e2c9fdf), [`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6)]:
|
||||
- @thirdweb-dev/sdk@3.10.19
|
||||
- @thirdweb-dev/storage@1.1.4
|
||||
|
||||
## 0.10.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.10.19",
|
||||
"version": "0.10.20",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 3.12.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`23d90b3e`](https://github.com/thirdweb-dev/js/commit/23d90b3e779a5bfdb7058b8c51349d9c278fcbce), [`cc56037e`](https://github.com/thirdweb-dev/js/commit/cc56037e64560b9e0fc16eb0ac7cc2e47e2c9fdf), [`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6)]:
|
||||
- @thirdweb-dev/sdk@3.10.19
|
||||
- @thirdweb-dev/storage@1.1.4
|
||||
- @thirdweb-dev/wallets@0.2.24
|
||||
|
||||
## 3.12.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "3.12.3",
|
||||
"version": "3.12.4",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.2.16
|
||||
|
||||
## 0.2.15
|
||||
|
||||
## 0.2.14
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.2.15",
|
||||
"version": "0.2.16",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.2.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1103](https://github.com/thirdweb-dev/js/pull/1103) [`89102b0c`](https://github.com/thirdweb-dev/js/commit/89102b0c895011bb6528d2b9bc4289173b351c8d) Thanks [@iketw](https://github.com/iketw)! - [ReactNative] Fix bug where the wc uri is not being copied in the textinput after scanning it
|
||||
|
||||
- Updated dependencies [[`23d90b3e`](https://github.com/thirdweb-dev/js/commit/23d90b3e779a5bfdb7058b8c51349d9c278fcbce), [`cc56037e`](https://github.com/thirdweb-dev/js/commit/cc56037e64560b9e0fc16eb0ac7cc2e47e2c9fdf), [`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6)]:
|
||||
- @thirdweb-dev/sdk@3.10.19
|
||||
- @thirdweb-dev/storage@1.1.4
|
||||
- @thirdweb-dev/react-core@3.12.4
|
||||
- @thirdweb-dev/wallets@0.2.24
|
||||
|
||||
## 0.2.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.2.15",
|
||||
"version": "0.2.16",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -80,11 +80,11 @@ const ConnectAppField = () => {
|
||||
};
|
||||
|
||||
const onQRCodeScan = (data: string) => {
|
||||
if (wcUri !== data) {
|
||||
if (wcUri !== data && data.startsWith("wc:")) {
|
||||
setWCUri(data);
|
||||
setShowQRCodeScan(false);
|
||||
|
||||
onWCPress();
|
||||
onWCPress(data);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -92,13 +92,15 @@ const ConnectAppField = () => {
|
||||
setShowQRCodeScan(false);
|
||||
};
|
||||
|
||||
const onWCPress = () => {
|
||||
if (!wcUri || !wallet) {
|
||||
const onWCPress = (uri?: string) => {
|
||||
if (!(wcUri || uri) || !wallet) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (wcUri.startsWith("wc:")) {
|
||||
(wallet as unknown as IWalletConnectReceiver).connectApp(wcUri);
|
||||
const uriToUse = uri || wcUri;
|
||||
|
||||
if (uriToUse?.startsWith("wc:")) {
|
||||
(wallet as unknown as IWalletConnectReceiver).connectApp(uriToUse);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,11 +121,12 @@ const ConnectAppField = () => {
|
||||
<TextInput
|
||||
onChangeText={onAddressChangeText}
|
||||
flex={1}
|
||||
value={wcUri}
|
||||
placeholder={"wc://..."}
|
||||
placeholderTextColor={theme.colors.textSecondary}
|
||||
/>
|
||||
<BaseButton
|
||||
onPress={onWCPress}
|
||||
onPress={() => onWCPress()}
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
>
|
||||
|
||||
@@ -12,7 +12,7 @@ export const QRCodeScan = ({
|
||||
onClose: () => void;
|
||||
}) => {
|
||||
return (
|
||||
<TWModal isVisible={isVisible} backdropOpacity={0.7}>
|
||||
<TWModal isVisible={isVisible} backdropOpacity={1}>
|
||||
<ModalHeaderTextClose headerText={"Scan to Connect"} onClose={onClose} />
|
||||
<RNCamera
|
||||
style={{ flex: 1 }}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 3.12.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`23d90b3e`](https://github.com/thirdweb-dev/js/commit/23d90b3e779a5bfdb7058b8c51349d9c278fcbce), [`cc56037e`](https://github.com/thirdweb-dev/js/commit/cc56037e64560b9e0fc16eb0ac7cc2e47e2c9fdf)]:
|
||||
- @thirdweb-dev/sdk@3.10.19
|
||||
- @thirdweb-dev/react-core@3.12.4
|
||||
- @thirdweb-dev/wallets@0.2.24
|
||||
|
||||
## 3.12.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "3.12.3",
|
||||
"version": "3.12.4",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 3.10.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1100](https://github.com/thirdweb-dev/js/pull/1100) [`23d90b3e`](https://github.com/thirdweb-dev/js/commit/23d90b3e779a5bfdb7058b8c51349d9c278fcbce) Thanks [@MananTank](https://github.com/MananTank)! - Reduce circular dependencies
|
||||
|
||||
- [#1102](https://github.com/thirdweb-dev/js/pull/1102) [`cc56037e`](https://github.com/thirdweb-dev/js/commit/cc56037e64560b9e0fc16eb0ac7cc2e47e2c9fdf) Thanks [@MananTank](https://github.com/MananTank)! - Reduce circular dependencies
|
||||
|
||||
- Updated dependencies [[`67450789`](https://github.com/thirdweb-dev/js/commit/67450789473b6008b86453ee4f4c7b99461223a6)]:
|
||||
- @thirdweb-dev/storage@1.1.4
|
||||
|
||||
## 3.10.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "3.10.18",
|
||||
"version": "3.10.19",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -12,8 +12,12 @@ import { fetchAndCacheDeployMetadata } from "./fetchAndCacheDeployMetadata";
|
||||
import { isContractDeployed } from "./isContractDeployed";
|
||||
import { getInitBytecodeWithSalt } from "./getInitBytecodeWithSalt";
|
||||
import { computeDeploymentAddress } from "./computeDeploymentAddress";
|
||||
import { BytesLike, ethers } from "ethers";
|
||||
import { getNativeTokenByChainId } from "../../constants/currency";
|
||||
import { PreDeployMetadataFetched } from "../../schema/contracts/custom";
|
||||
import { ConstructorParamMap } from "../../types/any-evm/deploy-data";
|
||||
import { extractConstructorParamsFromAbi } from "../feature-detection/extractConstructorParamsFromAbi";
|
||||
import { caches } from "./caches";
|
||||
import { encodeConstructorParamsForImplementation } from "./encodeConstructorParamsForImplementation";
|
||||
|
||||
export async function computeDeploymentInfo(
|
||||
contractType: DeployedContractType,
|
||||
@@ -90,3 +94,109 @@ export async function computeDeploymentInfo(
|
||||
encodedArgs,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Determine constructor params required by an implementation contract.
|
||||
* Return abi-encoded params.
|
||||
*/
|
||||
export async function encodeConstructorParamsForImplementation(
|
||||
compilerMetadata: PreDeployMetadataFetched,
|
||||
provider: providers.Provider,
|
||||
storage: ThirdwebStorage,
|
||||
create2Factory: string,
|
||||
constructorParamMap?: ConstructorParamMap,
|
||||
): Promise<BytesLike> {
|
||||
const constructorParams = extractConstructorParamsFromAbi(
|
||||
compilerMetadata.abi,
|
||||
);
|
||||
let constructorParamTypes = constructorParams.map((p) => {
|
||||
if (p.type === "tuple[]") {
|
||||
return ethers.utils.ParamType.from(p);
|
||||
} else {
|
||||
return p.type;
|
||||
}
|
||||
});
|
||||
|
||||
const constructorParamValues = await Promise.all(
|
||||
constructorParams.map(async (p) => {
|
||||
if (constructorParamMap && constructorParamMap[p.name]) {
|
||||
if (constructorParamMap[p.name].type) {
|
||||
invariant(
|
||||
constructorParamMap[p.name].type === p.type,
|
||||
`Provided type ${
|
||||
constructorParamMap[p.name].type
|
||||
} doesn't match the actual type ${p.type} from Abi`,
|
||||
);
|
||||
}
|
||||
return constructorParamMap[p.name].value;
|
||||
}
|
||||
if (p.name && p.name.includes("nativeTokenWrapper")) {
|
||||
const chainId = (await provider.getNetwork()).chainId;
|
||||
let nativeTokenWrapperAddress =
|
||||
getNativeTokenByChainId(chainId).wrapped.address;
|
||||
|
||||
if (nativeTokenWrapperAddress === ethers.constants.AddressZero) {
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "WETH9",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["WETH9"]) {
|
||||
caches.deploymentPresets["WETH9"] = deploymentInfo;
|
||||
}
|
||||
|
||||
nativeTokenWrapperAddress =
|
||||
deploymentInfo.transaction.predictedAddress;
|
||||
}
|
||||
|
||||
return nativeTokenWrapperAddress;
|
||||
} else if (p.name && p.name.includes("trustedForwarder")) {
|
||||
if (compilerMetadata.name === "Pack") {
|
||||
// EOAForwarder for Pack
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "ForwarderEOAOnly",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["ForwarderEOAOnly"]) {
|
||||
caches.deploymentPresets["ForwarderEOAOnly"] = deploymentInfo;
|
||||
}
|
||||
return deploymentInfo.transaction.predictedAddress;
|
||||
}
|
||||
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "Forwarder",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["Forwarder"]) {
|
||||
caches.deploymentPresets["Forwarder"] = deploymentInfo;
|
||||
}
|
||||
|
||||
return deploymentInfo.transaction.predictedAddress;
|
||||
} else {
|
||||
throw new Error("Can't resolve constructor arguments");
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
const encodedArgs = ethers.utils.defaultAbiCoder.encode(
|
||||
constructorParamTypes,
|
||||
constructorParamValues,
|
||||
);
|
||||
return encodedArgs;
|
||||
}
|
||||
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
import { BytesLike, ethers, providers } from "ethers";
|
||||
import invariant from "tiny-invariant";
|
||||
import { getNativeTokenByChainId } from "../../constants/currency";
|
||||
import { PreDeployMetadataFetched } from "../../schema/contracts/custom";
|
||||
import { ConstructorParamMap } from "../../types/any-evm/deploy-data";
|
||||
import { extractConstructorParamsFromAbi } from "../feature-detection/extractConstructorParamsFromAbi";
|
||||
import { caches } from "./caches";
|
||||
import { computeDeploymentInfo } from "./computeDeploymentInfo";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* Determine constructor params required by an implementation contract.
|
||||
* Return abi-encoded params.
|
||||
*/
|
||||
export async function encodeConstructorParamsForImplementation(
|
||||
compilerMetadata: PreDeployMetadataFetched,
|
||||
provider: providers.Provider,
|
||||
storage: ThirdwebStorage,
|
||||
create2Factory: string,
|
||||
constructorParamMap?: ConstructorParamMap,
|
||||
): Promise<BytesLike> {
|
||||
const constructorParams = extractConstructorParamsFromAbi(
|
||||
compilerMetadata.abi,
|
||||
);
|
||||
let constructorParamTypes = constructorParams.map((p) => {
|
||||
if (p.type === "tuple[]") {
|
||||
return ethers.utils.ParamType.from(p);
|
||||
} else {
|
||||
return p.type;
|
||||
}
|
||||
});
|
||||
|
||||
const constructorParamValues = await Promise.all(
|
||||
constructorParams.map(async (p) => {
|
||||
if (constructorParamMap && constructorParamMap[p.name]) {
|
||||
if (constructorParamMap[p.name].type) {
|
||||
invariant(
|
||||
constructorParamMap[p.name].type === p.type,
|
||||
`Provided type ${
|
||||
constructorParamMap[p.name].type
|
||||
} doesn't match the actual type ${p.type} from Abi`,
|
||||
);
|
||||
}
|
||||
return constructorParamMap[p.name].value;
|
||||
}
|
||||
if (p.name && p.name.includes("nativeTokenWrapper")) {
|
||||
const chainId = (await provider.getNetwork()).chainId;
|
||||
let nativeTokenWrapperAddress =
|
||||
getNativeTokenByChainId(chainId).wrapped.address;
|
||||
|
||||
if (nativeTokenWrapperAddress === ethers.constants.AddressZero) {
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "WETH9",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["WETH9"]) {
|
||||
caches.deploymentPresets["WETH9"] = deploymentInfo;
|
||||
}
|
||||
|
||||
nativeTokenWrapperAddress =
|
||||
deploymentInfo.transaction.predictedAddress;
|
||||
}
|
||||
|
||||
return nativeTokenWrapperAddress;
|
||||
} else if (p.name && p.name.includes("trustedForwarder")) {
|
||||
if (compilerMetadata.name === "Pack") {
|
||||
// EOAForwarder for Pack
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "ForwarderEOAOnly",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["ForwarderEOAOnly"]) {
|
||||
caches.deploymentPresets["ForwarderEOAOnly"] = deploymentInfo;
|
||||
}
|
||||
return deploymentInfo.transaction.predictedAddress;
|
||||
}
|
||||
|
||||
const deploymentInfo = await computeDeploymentInfo(
|
||||
"infra",
|
||||
provider,
|
||||
storage,
|
||||
create2Factory,
|
||||
{
|
||||
contractName: "Forwarder",
|
||||
},
|
||||
);
|
||||
if (!caches.deploymentPresets["Forwarder"]) {
|
||||
caches.deploymentPresets["Forwarder"] = deploymentInfo;
|
||||
}
|
||||
|
||||
return deploymentInfo.transaction.predictedAddress;
|
||||
} else {
|
||||
throw new Error("Can't resolve constructor arguments");
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
const encodedArgs = ethers.utils.defaultAbiCoder.encode(
|
||||
constructorParamTypes,
|
||||
constructorParamValues,
|
||||
);
|
||||
return encodedArgs;
|
||||
}
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { DEFAULT_API_KEY } from "../../../core/constants/urls";
|
||||
import { fetchAndCachePublishedContractURI } from "./fetchAndCachePublishedContractURI";
|
||||
import { fetchAndCacheDeployMetadata } from "./fetchAndCacheDeployMetadata";
|
||||
import { getCreate2FactoryAddress } from "./getCreate2FactoryAddress";
|
||||
import { encodeConstructorParamsForImplementation } from "./encodeConstructorParamsForImplementation";
|
||||
import { encodeConstructorParamsForImplementation } from "./computeDeploymentInfo";
|
||||
import { getDeploymentInfo } from "./getDeploymentInfo";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NATIVE_TOKEN_ADDRESS } from "../../constants/currency";
|
||||
import { ContractWrapper } from "../../core/classes/contract-wrapper";
|
||||
import { Address } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Price } from "../../types";
|
||||
import { BigNumberish, CallOverrides } from "ethers";
|
||||
import { approveErc20Allowance } from "../currency/approveErc20Allowance";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getDefaultTrustedForwarders } from "../constants/addresses";
|
||||
import { getDefaultTrustedForwarders } from "../constants/addresses/getDefaultTrustedForwarders";
|
||||
import {
|
||||
PackInitializer,
|
||||
NFTDropInitializer,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import { BigNumber, Signer, providers } from "ethers";
|
||||
import { z } from "zod";
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
import { SUPPORTED_CHAIN_IDS } from "../constants/chains";
|
||||
import { SUPPORTED_CHAIN_IDS } from "../constants/chains/SUPPORTED_CHAIN_IDS";
|
||||
import { computeForwarderAddress } from "./any-evm-utils/computeForwarderAddress";
|
||||
import type {
|
||||
PrebuiltContractType,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { getSignerAndProvider } from "../functions/getSignerAndProvider";
|
||||
import { Address, AddressOrEns, AddressOrEnsSchema } from "../schema/shared";
|
||||
import {
|
||||
AddressOrEns,
|
||||
AddressOrEnsSchema,
|
||||
} from "../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../schema/shared/Address";
|
||||
import type { providers } from "ethers";
|
||||
|
||||
type CachedEns = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SUPPORTED_CHAIN_ID } from "../constants/chains";
|
||||
import { SUPPORTED_CHAIN_ID } from "../constants/chains/SUPPORTED_CHAIN_ID";
|
||||
import { NATIVE_TOKENS } from "../constants/currency";
|
||||
import { Feature } from "../constants/contract-features";
|
||||
import { ContractSource } from "../schema/contracts/custom";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ChainId } from "../constants/chains";
|
||||
import { ChainId } from "../constants/chains/ChainId";
|
||||
import fetch from "cross-fetch";
|
||||
import { BigNumber, ethers } from "ethers";
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ export * from "./any-evm-utils/deployContractDeterministic";
|
||||
export * from "./any-evm-utils/getDeploymentInfo";
|
||||
export * from "./any-evm-utils/deployWithThrowawayDeployer";
|
||||
export * from "./any-evm-utils/computeDeploymentInfo";
|
||||
export * from "./any-evm-utils/encodeConstructorParamsForImplementation";
|
||||
export * from "./any-evm-utils/convertParamValues";
|
||||
export * from "./any-evm-utils/getCreate2FactoryDeploymentInfo";
|
||||
export * from "./any-evm-utils/fetchAndCachePublishedContractURI";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ContractInfoSchema,
|
||||
ContractSource,
|
||||
} from "../schema/contracts/custom";
|
||||
import { Address } from "../schema/shared";
|
||||
import { Address } from "../schema/shared/Address";
|
||||
import { resolveContractUriFromAddress } from "./feature-detection/resolveContractUriFromAddress";
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
import { providers } from "ethers";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Address } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi } from "../../schema/contracts/custom";
|
||||
import { fetchContractMetadataFromAddress } from "../metadata-resolver";
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
import {
|
||||
CONTRACT_ADDRESSES,
|
||||
getContractAddressByChainId,
|
||||
} from "../constants/addresses";
|
||||
import { DeployTransaction, Transaction } from "../core/classes/transactions";
|
||||
import {
|
||||
ForwardRequestMessage,
|
||||
@@ -25,6 +21,8 @@ import ForwarderABI from "@thirdweb-dev/contracts-js/dist/abis/Forwarder.json";
|
||||
import fetch from "cross-fetch";
|
||||
import { BigNumber, BytesLike, ethers } from "ethers";
|
||||
import invariant from "tiny-invariant";
|
||||
import { CONTRACT_ADDRESSES } from "../constants/addresses/CONTRACT_ADDRESSES";
|
||||
import { getContractAddressByChainId } from "../constants/addresses/getContractAddressByChainId";
|
||||
|
||||
export function buildDeployTransactionFunction<TArgs extends any[]>(
|
||||
fn: (...args: TArgs) => Promise<DeployTransaction>,
|
||||
|
||||
@@ -1,363 +0,0 @@
|
||||
import type { PrebuiltContractType } from "../contracts";
|
||||
import { ChainId, SUPPORTED_CHAIN_ID, SUPPORTED_CHAIN_IDS } from "./chains";
|
||||
import { constants } from "ethers";
|
||||
|
||||
/**
|
||||
* publicly available wallet for local nodes
|
||||
*/
|
||||
export const LOCAL_NODE_PKEY =
|
||||
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const OZ_DEFENDER_FORWARDER_ADDRESS =
|
||||
"0xc82BbE41f2cF04e3a8efA18F7032BDD7f6d98a81";
|
||||
|
||||
const TWRegistry_address = "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd";
|
||||
const TWFactory_address = "0x5DBC7B840baa9daBcBe9D2492E45D7244B54A2A0";
|
||||
const ContractPublisher_address = "0x664244560eBa21Bf82d7150C791bE1AbcD5B4cd7"; // Polygon only
|
||||
const MultichainRegistry_address = "0xcdAD8FA86e18538aC207872E8ff3536501431B73"; // Polygon only
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const CONTRACT_ADDRESSES: Record<
|
||||
SUPPORTED_CHAIN_ID,
|
||||
{
|
||||
openzeppelinForwarder: string;
|
||||
openzeppelinForwarderEOA: string;
|
||||
biconomyForwarder: string;
|
||||
twFactory: string;
|
||||
twRegistry: string;
|
||||
twBYOCRegistry: string;
|
||||
}
|
||||
> = {
|
||||
[ChainId.Mainnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x76ce2CB1Ae48Fa067f4fb8c5f803111AE0B24BEA",
|
||||
biconomyForwarder: "0x84a0856b038eaAd1cC7E297cF34A7e72685A8693",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.Goerli]: {
|
||||
openzeppelinForwarder: "0x5001A14CA6163143316a7C614e30e6041033Ac20",
|
||||
openzeppelinForwarderEOA: "0xe73c50cB9c5B378627ff625BB6e6725A4A5D65d2",
|
||||
biconomyForwarder: "0xE041608922d06a4F26C0d4c27d8bCD01daf1f792",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0xB1Bd9d7942A250BA2Dce27DD601F2ED4211A60C4",
|
||||
},
|
||||
[ChainId.Polygon]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x4f247c69184ad61036EC2Bb3213b69F10FbEDe1F",
|
||||
biconomyForwarder: "0x86C80a8aa58e0A4fa09A69624c31Ab2a6CAD56b8",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x308473Be900F4185A56587dE54bDFF5E8f7a6AE7",
|
||||
},
|
||||
[ChainId.Mumbai]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x9399BB24DBB5C4b782C70c2969F58716Ebbd6a3b",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3F17972CB27506eb4a6a3D59659e0B57a43fd16C",
|
||||
},
|
||||
[ChainId.Avalanche]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x64CD353384109423a966dCd3Aa30D884C9b2E057",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
[ChainId.AvalancheFujiTestnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xe73c50cB9c5B378627ff625BB6e6725A4A5D65d2",
|
||||
biconomyForwarder: "0x6271Ca63D30507f2Dcbf99B52787032506D75BBF",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3E6eE864f850F5e5A98bc950B68E181Cf4010F23",
|
||||
},
|
||||
[ChainId.Fantom]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x64CD353384109423a966dCd3Aa30D884C9b2E057",
|
||||
twFactory: "0x97EA0Fcc552D5A8Fb5e9101316AAd0D62Ea0876B",
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
[ChainId.FantomTestnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x42D3048b595B6e1c28a588d70366CcC2AA4dB47b",
|
||||
biconomyForwarder: "0x69FB8Dca8067A5D38703b9e8b39cf2D51473E4b4",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3E6eE864f850F5e5A98bc950B68E181Cf4010F23",
|
||||
},
|
||||
[ChainId.Arbitrum]: {
|
||||
openzeppelinForwarder: "0x4a8AC7f22DeD2CF923A51e4A1c67490bd8868add",
|
||||
openzeppelinForwarderEOA: "0x4f247c69184ad61036EC2Bb3213b69F10FbEDe1F",
|
||||
biconomyForwarder: "0xfe0fa3C06d03bDC7fb49c892BbB39113B534fB57",
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.ArbitrumGoerli]: {
|
||||
openzeppelinForwarder: "0x8cbc8B5d71702032904750A66AEfE8B603eBC538",
|
||||
openzeppelinForwarderEOA: "0x119704314Ef304EaAAE4b3c7C9ABd59272A28310",
|
||||
biconomyForwarder: constants.AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
[ChainId.Optimism]: {
|
||||
openzeppelinForwarder: "0xd85da690EF288A6976DE0E85Fb2Aad512eBAfbf7",
|
||||
openzeppelinForwarderEOA: "0x7e80648EB2071E26937F9D42A513ccf4815fc702",
|
||||
biconomyForwarder: "0xefba8a2a82ec1fb1273806174f5e28fbb917cf95",
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.OptimismGoerli]: {
|
||||
openzeppelinForwarder: "0x8cbc8B5d71702032904750A66AEfE8B603eBC538",
|
||||
openzeppelinForwarderEOA: "0x119704314Ef304EaAAE4b3c7C9ABd59272A28310",
|
||||
biconomyForwarder: constants.AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
[ChainId.BinanceSmartChainMainnet]: {
|
||||
openzeppelinForwarder: "0x7C4717039B89d5859c4Fbb85EDB19A6E2ce61171",
|
||||
openzeppelinForwarderEOA: "0xE8dd2Ff0212F86d3197b4AfDC6dAC6ac47eb10aC",
|
||||
biconomyForwarder: "0x86C80a8aa58e0A4fa09A69624c31Ab2a6CAD56b8",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
},
|
||||
[ChainId.BinanceSmartChainTestnet]: {
|
||||
openzeppelinForwarder: "0x44bE9D54B9C8b5e57a3325E8Ec9154640e7c6955",
|
||||
openzeppelinForwarderEOA: "0x7e80648EB2071E26937F9D42A513ccf4815fc702",
|
||||
biconomyForwarder: "0x61456BF1715C1415730076BB79ae118E806E74d2",
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
},
|
||||
[ChainId.Hardhat]: {
|
||||
openzeppelinForwarder: constants.AddressZero,
|
||||
openzeppelinForwarderEOA: constants.AddressZero,
|
||||
biconomyForwarder: constants.AddressZero,
|
||||
twFactory: constants.AddressZero,
|
||||
twRegistry: constants.AddressZero,
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
[ChainId.Localhost]: {
|
||||
openzeppelinForwarder: constants.AddressZero,
|
||||
openzeppelinForwarderEOA: constants.AddressZero,
|
||||
biconomyForwarder: constants.AddressZero,
|
||||
twFactory: constants.AddressZero,
|
||||
twRegistry: constants.AddressZero,
|
||||
twBYOCRegistry: constants.AddressZero,
|
||||
},
|
||||
};
|
||||
|
||||
type DropContract = Extract<
|
||||
PrebuiltContractType,
|
||||
"nft-drop" | "token-drop" | "edition-drop" | "signature-drop"
|
||||
>;
|
||||
|
||||
// @deprecated - should not be needed anymore, rely on the publish data instead
|
||||
export const APPROVED_IMPLEMENTATIONS: Record<
|
||||
SUPPORTED_CHAIN_ID,
|
||||
Record<DropContract, string>
|
||||
> = {
|
||||
[ChainId.Mainnet]: {
|
||||
"nft-drop": "0x60fF9952e0084A6DEac44203838cDC91ABeC8736",
|
||||
"edition-drop": "0x74af262d0671F378F97a1EDC3d0970Dbe8A1C550",
|
||||
"token-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
"signature-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
},
|
||||
[ChainId.Polygon]: {
|
||||
"nft-drop": "0xB96508050Ba0925256184103560EBADA912Fcc69",
|
||||
"edition-drop": "0x74af262d0671F378F97a1EDC3d0970Dbe8A1C550",
|
||||
"token-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
"signature-drop": "0xBE2fDc35410E268e41Bec62DBb01AEb43245c7d5",
|
||||
},
|
||||
[ChainId.Fantom]: {
|
||||
"nft-drop": "0x2A396b2D90BAcEF19cDa973586B2633d22710fC2",
|
||||
"edition-drop": "0x06395FCF9AC6ED827f9dD6e776809cEF1Be0d21B",
|
||||
"token-drop": "0x0148b28a38efaaC31b6aa0a6D9FEb70FE7C91FFa",
|
||||
"signature-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
},
|
||||
[ChainId.Avalanche]: {
|
||||
"nft-drop": "0x9cF91118C8ee2913F0588e0F10e36B3d63F68bF6",
|
||||
"edition-drop": "0x135fC9D26E5eC51260ece1DF4ED424E2f55c7766",
|
||||
"token-drop": "0xca0B071899E575BA86495D46c5066971b6f3A901",
|
||||
"signature-drop": "0x1d47526C3292B0130ef0afD5F02c1DA052A017B3",
|
||||
},
|
||||
[ChainId.Optimism]: {
|
||||
"nft-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
"edition-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
"token-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"signature-drop": "0x8a4cd3549e548bbEEb38C16E041FFf040a5acabD",
|
||||
},
|
||||
[ChainId.Arbitrum]: {
|
||||
"nft-drop": "0xC4903c1Ff5367b9ac2c349B63DC2409421AaEE2a",
|
||||
"edition-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"token-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
"signature-drop": "0x2dF9851af45dd41C8584ac55D983C604da985Bc7",
|
||||
},
|
||||
[ChainId.BinanceSmartChainMainnet]: {
|
||||
"nft-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"edition-drop": "0x2A396b2D90BAcEF19cDa973586B2633d22710fC2",
|
||||
"token-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
"signature-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
},
|
||||
[ChainId.Goerli]: {
|
||||
"nft-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"edition-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
"token-drop": "0x5680933221B752EB443654a014f88B101F868d50",
|
||||
"signature-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
},
|
||||
[ChainId.Mumbai]: {
|
||||
"nft-drop": "0xC4903c1Ff5367b9ac2c349B63DC2409421AaEE2a",
|
||||
"edition-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"token-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
"signature-drop": "0x2dF9851af45dd41C8584ac55D983C604da985Bc7",
|
||||
},
|
||||
[ChainId.FantomTestnet]: {
|
||||
"nft-drop": "0x8a4cd3549e548bbEEb38C16E041FFf040a5acabD",
|
||||
"edition-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"token-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
"signature-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
},
|
||||
[ChainId.AvalancheFujiTestnet]: {
|
||||
"nft-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"edition-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
"token-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
"signature-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
},
|
||||
[ChainId.OptimismGoerli]: {
|
||||
"nft-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"edition-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
"token-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"signature-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
},
|
||||
[ChainId.ArbitrumGoerli]: {
|
||||
"nft-drop": "0x9CfE807a5b124b962064Fa8F7FD823Cc701255b6",
|
||||
"edition-drop": "0x9cF91118C8ee2913F0588e0F10e36B3d63F68bF6",
|
||||
"token-drop": "0x1d47526C3292B0130ef0afD5F02c1DA052A017B3",
|
||||
"signature-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
},
|
||||
[ChainId.BinanceSmartChainTestnet]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
[ChainId.Hardhat]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
[ChainId.Localhost]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param chainId
|
||||
* @param contractType
|
||||
*/
|
||||
export function getApprovedImplementation(
|
||||
chainId: SUPPORTED_CHAIN_ID, // TODO use SupportedChainId once we deploy to all chains
|
||||
contractType: PrebuiltContractType,
|
||||
): string | null {
|
||||
if (chainId in APPROVED_IMPLEMENTATIONS) {
|
||||
const approvedImpls = APPROVED_IMPLEMENTATIONS[chainId];
|
||||
if (contractType in approvedImpls) {
|
||||
return approvedImpls[contractType as keyof typeof approvedImpls];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getContractAddressByChainId(
|
||||
chainId: SUPPORTED_CHAIN_ID | ChainId.Hardhat,
|
||||
contractName: keyof (typeof CONTRACT_ADDRESSES)[SUPPORTED_CHAIN_ID],
|
||||
): string | undefined {
|
||||
// for testing only
|
||||
if (chainId === ChainId.Hardhat || chainId === ChainId.Localhost) {
|
||||
if (contractName === "twFactory") {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.factoryAddress as string;
|
||||
} else if (contractName === "twRegistry") {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.registryAddress as string;
|
||||
} else {
|
||||
return constants.AddressZero;
|
||||
}
|
||||
}
|
||||
// real output here
|
||||
return CONTRACT_ADDRESSES[chainId]?.[contractName];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getContractPublisherAddress() {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.contractPublisherAddress) {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.contractPublisherAddress as string;
|
||||
} else {
|
||||
return ContractPublisher_address;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getMultichainRegistryAddress() {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.multiChainRegistryAddress) {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.multiChainRegistryAddress as string;
|
||||
} else {
|
||||
return MultichainRegistry_address;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param chainId - chain id
|
||||
* @returns the array of trusted forwarders for the given chain id
|
||||
* @internal
|
||||
*/
|
||||
export function getDefaultTrustedForwarders(
|
||||
chainId: SUPPORTED_CHAIN_ID,
|
||||
): string[] {
|
||||
const chainEnum = SUPPORTED_CHAIN_IDS.find((c) => c === chainId);
|
||||
const biconomyForwarder = chainEnum
|
||||
? CONTRACT_ADDRESSES[chainEnum].biconomyForwarder
|
||||
: constants.AddressZero;
|
||||
const openzeppelinForwarder = chainEnum
|
||||
? CONTRACT_ADDRESSES[chainEnum].openzeppelinForwarder
|
||||
: constants.AddressZero;
|
||||
return [openzeppelinForwarder, biconomyForwarder].filter(
|
||||
(a) => a !== constants.AddressZero,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
import type { PrebuiltContractType } from "../../contracts";
|
||||
import { SUPPORTED_CHAIN_ID } from "../chains/SUPPORTED_CHAIN_ID";
|
||||
import { ChainId } from "../chains/ChainId";
|
||||
|
||||
type DropContract = Extract<
|
||||
PrebuiltContractType,
|
||||
"nft-drop" | "token-drop" | "edition-drop" | "signature-drop"
|
||||
>;
|
||||
|
||||
// @deprecated - should not be needed anymore, rely on the publish data instead
|
||||
export const APPROVED_IMPLEMENTATIONS: Record<
|
||||
SUPPORTED_CHAIN_ID,
|
||||
Record<DropContract, string>
|
||||
> = {
|
||||
[ChainId.Mainnet]: {
|
||||
"nft-drop": "0x60fF9952e0084A6DEac44203838cDC91ABeC8736",
|
||||
"edition-drop": "0x74af262d0671F378F97a1EDC3d0970Dbe8A1C550",
|
||||
"token-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
"signature-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
},
|
||||
[ChainId.Polygon]: {
|
||||
"nft-drop": "0xB96508050Ba0925256184103560EBADA912Fcc69",
|
||||
"edition-drop": "0x74af262d0671F378F97a1EDC3d0970Dbe8A1C550",
|
||||
"token-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
"signature-drop": "0xBE2fDc35410E268e41Bec62DBb01AEb43245c7d5",
|
||||
},
|
||||
[ChainId.Fantom]: {
|
||||
"nft-drop": "0x2A396b2D90BAcEF19cDa973586B2633d22710fC2",
|
||||
"edition-drop": "0x06395FCF9AC6ED827f9dD6e776809cEF1Be0d21B",
|
||||
"token-drop": "0x0148b28a38efaaC31b6aa0a6D9FEb70FE7C91FFa",
|
||||
"signature-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
},
|
||||
[ChainId.Avalanche]: {
|
||||
"nft-drop": "0x9cF91118C8ee2913F0588e0F10e36B3d63F68bF6",
|
||||
"edition-drop": "0x135fC9D26E5eC51260ece1DF4ED424E2f55c7766",
|
||||
"token-drop": "0xca0B071899E575BA86495D46c5066971b6f3A901",
|
||||
"signature-drop": "0x1d47526C3292B0130ef0afD5F02c1DA052A017B3",
|
||||
},
|
||||
[ChainId.Optimism]: {
|
||||
"nft-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
"edition-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
"token-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"signature-drop": "0x8a4cd3549e548bbEEb38C16E041FFf040a5acabD",
|
||||
},
|
||||
[ChainId.Arbitrum]: {
|
||||
"nft-drop": "0xC4903c1Ff5367b9ac2c349B63DC2409421AaEE2a",
|
||||
"edition-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"token-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
"signature-drop": "0x2dF9851af45dd41C8584ac55D983C604da985Bc7",
|
||||
},
|
||||
[ChainId.BinanceSmartChainMainnet]: {
|
||||
"nft-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"edition-drop": "0x2A396b2D90BAcEF19cDa973586B2633d22710fC2",
|
||||
"token-drop": "0xe135Ef65C2B2213C3fD56d0Bd6500A2cA147aC10",
|
||||
"signature-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
},
|
||||
[ChainId.Goerli]: {
|
||||
"nft-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"edition-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
"token-drop": "0x5680933221B752EB443654a014f88B101F868d50",
|
||||
"signature-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
},
|
||||
[ChainId.Mumbai]: {
|
||||
"nft-drop": "0xC4903c1Ff5367b9ac2c349B63DC2409421AaEE2a",
|
||||
"edition-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"token-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
"signature-drop": "0x2dF9851af45dd41C8584ac55D983C604da985Bc7",
|
||||
},
|
||||
[ChainId.FantomTestnet]: {
|
||||
"nft-drop": "0x8a4cd3549e548bbEEb38C16E041FFf040a5acabD",
|
||||
"edition-drop": "0x902Dd246e66d8C3CE652375a723F2a52b43b9AAE",
|
||||
"token-drop": "0xFBd7D24d80ee005671E731a7287DEB6073264dD1",
|
||||
"signature-drop": "0x5A8eA4Adad8289746D073947BA06D69A62499aaf",
|
||||
},
|
||||
[ChainId.AvalancheFujiTestnet]: {
|
||||
"nft-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"edition-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
"token-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
"signature-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
},
|
||||
[ChainId.OptimismGoerli]: {
|
||||
"nft-drop": "0xCcddcec1831646Beff2753249f1B9C580327E89F",
|
||||
"edition-drop": "0x6fD690EB509BdE4C50028C5D9C0dE3750C2Fad6A",
|
||||
"token-drop": "0xD11c97DD5F5546B5bBd630D7D1d7327481B0b92C",
|
||||
"signature-drop": "0x1b5947e1a2d5a29D0df20931DeAB0B87818209B9",
|
||||
},
|
||||
[ChainId.ArbitrumGoerli]: {
|
||||
"nft-drop": "0x9CfE807a5b124b962064Fa8F7FD823Cc701255b6",
|
||||
"edition-drop": "0x9cF91118C8ee2913F0588e0F10e36B3d63F68bF6",
|
||||
"token-drop": "0x1d47526C3292B0130ef0afD5F02c1DA052A017B3",
|
||||
"signature-drop": "0xE1eE43D23f247b6A9aF81fcE2766E76709482728",
|
||||
},
|
||||
[ChainId.BinanceSmartChainTestnet]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
[ChainId.Hardhat]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
[ChainId.Localhost]: {
|
||||
"nft-drop": "",
|
||||
"edition-drop": "",
|
||||
"token-drop": "",
|
||||
"signature-drop": "", // TODO
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export const AddressZero = "0x0000000000000000000000000000000000000000";
|
||||
@@ -0,0 +1,159 @@
|
||||
import { ChainId } from "../chains/ChainId";
|
||||
import { SUPPORTED_CHAIN_ID } from "../chains/SUPPORTED_CHAIN_ID";
|
||||
import { AddressZero } from "./AddressZero";
|
||||
|
||||
const TWRegistry_address = "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd";
|
||||
const TWFactory_address = "0x5DBC7B840baa9daBcBe9D2492E45D7244B54A2A0";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const OZ_DEFENDER_FORWARDER_ADDRESS =
|
||||
"0xc82BbE41f2cF04e3a8efA18F7032BDD7f6d98a81";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const CONTRACT_ADDRESSES: Record<
|
||||
SUPPORTED_CHAIN_ID,
|
||||
{
|
||||
openzeppelinForwarder: string;
|
||||
openzeppelinForwarderEOA: string;
|
||||
biconomyForwarder: string;
|
||||
twFactory: string;
|
||||
twRegistry: string;
|
||||
twBYOCRegistry: string;
|
||||
}
|
||||
> = {
|
||||
[ChainId.Mainnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x76ce2CB1Ae48Fa067f4fb8c5f803111AE0B24BEA",
|
||||
biconomyForwarder: "0x84a0856b038eaAd1cC7E297cF34A7e72685A8693",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.Goerli]: {
|
||||
openzeppelinForwarder: "0x5001A14CA6163143316a7C614e30e6041033Ac20",
|
||||
openzeppelinForwarderEOA: "0xe73c50cB9c5B378627ff625BB6e6725A4A5D65d2",
|
||||
biconomyForwarder: "0xE041608922d06a4F26C0d4c27d8bCD01daf1f792",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0xB1Bd9d7942A250BA2Dce27DD601F2ED4211A60C4",
|
||||
},
|
||||
[ChainId.Polygon]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x4f247c69184ad61036EC2Bb3213b69F10FbEDe1F",
|
||||
biconomyForwarder: "0x86C80a8aa58e0A4fa09A69624c31Ab2a6CAD56b8",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x308473Be900F4185A56587dE54bDFF5E8f7a6AE7",
|
||||
},
|
||||
[ChainId.Mumbai]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x9399BB24DBB5C4b782C70c2969F58716Ebbd6a3b",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3F17972CB27506eb4a6a3D59659e0B57a43fd16C",
|
||||
},
|
||||
[ChainId.Avalanche]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x64CD353384109423a966dCd3Aa30D884C9b2E057",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
[ChainId.AvalancheFujiTestnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xe73c50cB9c5B378627ff625BB6e6725A4A5D65d2",
|
||||
biconomyForwarder: "0x6271Ca63D30507f2Dcbf99B52787032506D75BBF",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3E6eE864f850F5e5A98bc950B68E181Cf4010F23",
|
||||
},
|
||||
[ChainId.Fantom]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0xb1A2883fc4d287d9cB8Dbb96cFF60C76BEf2D250",
|
||||
biconomyForwarder: "0x64CD353384109423a966dCd3Aa30D884C9b2E057",
|
||||
twFactory: "0x97EA0Fcc552D5A8Fb5e9101316AAd0D62Ea0876B",
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
[ChainId.FantomTestnet]: {
|
||||
openzeppelinForwarder: OZ_DEFENDER_FORWARDER_ADDRESS,
|
||||
openzeppelinForwarderEOA: "0x42D3048b595B6e1c28a588d70366CcC2AA4dB47b",
|
||||
biconomyForwarder: "0x69FB8Dca8067A5D38703b9e8b39cf2D51473E4b4",
|
||||
twFactory: TWFactory_address,
|
||||
twRegistry: TWRegistry_address,
|
||||
twBYOCRegistry: "0x3E6eE864f850F5e5A98bc950B68E181Cf4010F23",
|
||||
},
|
||||
[ChainId.Arbitrum]: {
|
||||
openzeppelinForwarder: "0x4a8AC7f22DeD2CF923A51e4A1c67490bd8868add",
|
||||
openzeppelinForwarderEOA: "0x4f247c69184ad61036EC2Bb3213b69F10FbEDe1F",
|
||||
biconomyForwarder: "0xfe0fa3C06d03bDC7fb49c892BbB39113B534fB57",
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.ArbitrumGoerli]: {
|
||||
openzeppelinForwarder: "0x8cbc8B5d71702032904750A66AEfE8B603eBC538",
|
||||
openzeppelinForwarderEOA: "0x119704314Ef304EaAAE4b3c7C9ABd59272A28310",
|
||||
biconomyForwarder: AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
[ChainId.Optimism]: {
|
||||
openzeppelinForwarder: "0xd85da690EF288A6976DE0E85Fb2Aad512eBAfbf7",
|
||||
openzeppelinForwarderEOA: "0x7e80648EB2071E26937F9D42A513ccf4815fc702",
|
||||
biconomyForwarder: "0xefba8a2a82ec1fb1273806174f5e28fbb917cf95",
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
|
||||
[ChainId.OptimismGoerli]: {
|
||||
openzeppelinForwarder: "0x8cbc8B5d71702032904750A66AEfE8B603eBC538",
|
||||
openzeppelinForwarderEOA: "0x119704314Ef304EaAAE4b3c7C9ABd59272A28310",
|
||||
biconomyForwarder: AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
[ChainId.BinanceSmartChainMainnet]: {
|
||||
openzeppelinForwarder: "0x7C4717039B89d5859c4Fbb85EDB19A6E2ce61171",
|
||||
openzeppelinForwarderEOA: "0xE8dd2Ff0212F86d3197b4AfDC6dAC6ac47eb10aC",
|
||||
biconomyForwarder: "0x86C80a8aa58e0A4fa09A69624c31Ab2a6CAD56b8",
|
||||
twBYOCRegistry: AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
},
|
||||
[ChainId.BinanceSmartChainTestnet]: {
|
||||
openzeppelinForwarder: "0x44bE9D54B9C8b5e57a3325E8Ec9154640e7c6955",
|
||||
openzeppelinForwarderEOA: "0x7e80648EB2071E26937F9D42A513ccf4815fc702",
|
||||
biconomyForwarder: "0x61456BF1715C1415730076BB79ae118E806E74d2",
|
||||
twBYOCRegistry: AddressZero,
|
||||
twFactory: "0xd24b3de085CFd8c54b94feAD08a7962D343E6DE0",
|
||||
twRegistry: "0x7c487845f98938Bb955B1D5AD069d9a30e4131fd",
|
||||
},
|
||||
[ChainId.Hardhat]: {
|
||||
openzeppelinForwarder: AddressZero,
|
||||
openzeppelinForwarderEOA: AddressZero,
|
||||
biconomyForwarder: AddressZero,
|
||||
twFactory: AddressZero,
|
||||
twRegistry: AddressZero,
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
[ChainId.Localhost]: {
|
||||
openzeppelinForwarder: AddressZero,
|
||||
openzeppelinForwarderEOA: AddressZero,
|
||||
biconomyForwarder: AddressZero,
|
||||
twFactory: AddressZero,
|
||||
twRegistry: AddressZero,
|
||||
twBYOCRegistry: AddressZero,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* publicly available wallet for local nodes
|
||||
*/
|
||||
export const LOCAL_NODE_PKEY =
|
||||
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { PrebuiltContractType } from "../../contracts";
|
||||
import { APPROVED_IMPLEMENTATIONS } from "./APPROVED_IMPLEMENTATIONS";
|
||||
import { SUPPORTED_CHAIN_ID } from "../chains/SUPPORTED_CHAIN_ID";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @param chainId
|
||||
* @param contractType
|
||||
*/
|
||||
export function getApprovedImplementation(
|
||||
chainId: SUPPORTED_CHAIN_ID, // TODO use SupportedChainId once we deploy to all chains
|
||||
contractType: PrebuiltContractType,
|
||||
): string | null {
|
||||
if (chainId in APPROVED_IMPLEMENTATIONS) {
|
||||
const approvedImpls = APPROVED_IMPLEMENTATIONS[chainId];
|
||||
if (contractType in approvedImpls) {
|
||||
return approvedImpls[contractType as keyof typeof approvedImpls];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { CONTRACT_ADDRESSES } from "./CONTRACT_ADDRESSES";
|
||||
import { ChainId } from "../chains/ChainId";
|
||||
import { SUPPORTED_CHAIN_ID } from "../chains/SUPPORTED_CHAIN_ID";
|
||||
import { AddressZero } from "./AddressZero";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getContractAddressByChainId(
|
||||
chainId: SUPPORTED_CHAIN_ID | ChainId.Hardhat,
|
||||
contractName: keyof (typeof CONTRACT_ADDRESSES)[SUPPORTED_CHAIN_ID],
|
||||
): string | undefined {
|
||||
// for testing only
|
||||
if (chainId === ChainId.Hardhat || chainId === ChainId.Localhost) {
|
||||
if (contractName === "twFactory") {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.factoryAddress as string;
|
||||
} else if (contractName === "twRegistry") {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.registryAddress as string;
|
||||
} else {
|
||||
return AddressZero;
|
||||
}
|
||||
}
|
||||
// real output here
|
||||
return CONTRACT_ADDRESSES[chainId]?.[contractName];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
const ContractPublisher_address = "0x664244560eBa21Bf82d7150C791bE1AbcD5B4cd7"; // Polygon only
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getContractPublisherAddress() {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.contractPublisherAddress) {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.contractPublisherAddress as string;
|
||||
} else {
|
||||
return ContractPublisher_address;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { CONTRACT_ADDRESSES } from "./CONTRACT_ADDRESSES";
|
||||
import { SUPPORTED_CHAIN_ID } from "../chains/SUPPORTED_CHAIN_ID";
|
||||
import { SUPPORTED_CHAIN_IDS } from "../chains/SUPPORTED_CHAIN_IDS";
|
||||
import { AddressZero } from "./AddressZero";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param chainId - chain id
|
||||
* @returns the array of trusted forwarders for the given chain id
|
||||
* @internal
|
||||
*/
|
||||
export function getDefaultTrustedForwarders(
|
||||
chainId: SUPPORTED_CHAIN_ID,
|
||||
): string[] {
|
||||
const chainEnum = SUPPORTED_CHAIN_IDS.find((c) => c === chainId);
|
||||
const biconomyForwarder = chainEnum
|
||||
? CONTRACT_ADDRESSES[chainEnum].biconomyForwarder
|
||||
: AddressZero;
|
||||
const openzeppelinForwarder = chainEnum
|
||||
? CONTRACT_ADDRESSES[chainEnum].openzeppelinForwarder
|
||||
: AddressZero;
|
||||
return [openzeppelinForwarder, biconomyForwarder].filter(
|
||||
(a) => a !== AddressZero,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
const MultichainRegistry_address = "0xcdAD8FA86e18538aC207872E8ff3536501431B73"; // Polygon only
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getMultichainRegistryAddress() {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.multiChainRegistryAddress) {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
return process.env.multiChainRegistryAddress as string;
|
||||
} else {
|
||||
return MultichainRegistry_address;
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
import type { ChainInfo } from "../schema/shared";
|
||||
import { defaultChains } from "@thirdweb-dev/chains";
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export enum ChainId {
|
||||
Mainnet = 1,
|
||||
Goerli = 5,
|
||||
Polygon = 137,
|
||||
Mumbai = 80001,
|
||||
Localhost = 1337,
|
||||
Hardhat = 31337,
|
||||
Fantom = 250,
|
||||
FantomTestnet = 4002,
|
||||
Avalanche = 43114,
|
||||
AvalancheFujiTestnet = 43113,
|
||||
Optimism = 10,
|
||||
OptimismGoerli = 420,
|
||||
Arbitrum = 42161,
|
||||
ArbitrumGoerli = 421613,
|
||||
BinanceSmartChainMainnet = 56,
|
||||
BinanceSmartChainTestnet = 97,
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type SUPPORTED_CHAIN_ID =
|
||||
| ChainId.Mainnet
|
||||
| ChainId.Goerli
|
||||
| ChainId.Mumbai
|
||||
| ChainId.Polygon
|
||||
| ChainId.Fantom
|
||||
| ChainId.FantomTestnet
|
||||
| ChainId.Avalanche
|
||||
| ChainId.AvalancheFujiTestnet
|
||||
| ChainId.Optimism
|
||||
| ChainId.OptimismGoerli
|
||||
| ChainId.Arbitrum
|
||||
| ChainId.ArbitrumGoerli
|
||||
| ChainId.BinanceSmartChainMainnet
|
||||
| ChainId.BinanceSmartChainTestnet
|
||||
| ChainId.Hardhat
|
||||
| ChainId.Localhost;
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const SUPPORTED_CHAIN_IDS: SUPPORTED_CHAIN_ID[] = [
|
||||
ChainId.Mainnet,
|
||||
ChainId.Goerli,
|
||||
ChainId.Polygon,
|
||||
ChainId.Mumbai,
|
||||
ChainId.Fantom,
|
||||
ChainId.FantomTestnet,
|
||||
ChainId.Avalanche,
|
||||
ChainId.AvalancheFujiTestnet,
|
||||
ChainId.Optimism,
|
||||
ChainId.OptimismGoerli,
|
||||
ChainId.Arbitrum,
|
||||
ChainId.ArbitrumGoerli,
|
||||
ChainId.BinanceSmartChainMainnet,
|
||||
ChainId.BinanceSmartChainTestnet,
|
||||
ChainId.Hardhat,
|
||||
ChainId.Localhost,
|
||||
];
|
||||
|
||||
// @ts-expect-error
|
||||
let supportedChains: ChainInfo[] = defaultChains;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function setSupportedChains(chains: ChainInfo[] | undefined) {
|
||||
if (chains && chains.length > 0) {
|
||||
supportedChains = chains;
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
supportedChains = defaultChains;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getSupportedChains() {
|
||||
return supportedChains;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export enum ChainId {
|
||||
Mainnet = 1,
|
||||
Goerli = 5,
|
||||
Polygon = 137,
|
||||
Mumbai = 80001,
|
||||
Localhost = 1337,
|
||||
Hardhat = 31337,
|
||||
Fantom = 250,
|
||||
FantomTestnet = 4002,
|
||||
Avalanche = 43114,
|
||||
AvalancheFujiTestnet = 43113,
|
||||
Optimism = 10,
|
||||
OptimismGoerli = 420,
|
||||
Arbitrum = 42161,
|
||||
ArbitrumGoerli = 421613,
|
||||
BinanceSmartChainMainnet = 56,
|
||||
BinanceSmartChainTestnet = 97,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { ChainId } from "./ChainId";
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type SUPPORTED_CHAIN_ID =
|
||||
| ChainId.Mainnet
|
||||
| ChainId.Goerli
|
||||
| ChainId.Mumbai
|
||||
| ChainId.Polygon
|
||||
| ChainId.Fantom
|
||||
| ChainId.FantomTestnet
|
||||
| ChainId.Avalanche
|
||||
| ChainId.AvalancheFujiTestnet
|
||||
| ChainId.Optimism
|
||||
| ChainId.OptimismGoerli
|
||||
| ChainId.Arbitrum
|
||||
| ChainId.ArbitrumGoerli
|
||||
| ChainId.BinanceSmartChainMainnet
|
||||
| ChainId.BinanceSmartChainTestnet
|
||||
| ChainId.Hardhat
|
||||
| ChainId.Localhost;
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ChainId } from "./ChainId";
|
||||
import { SUPPORTED_CHAIN_ID } from "./SUPPORTED_CHAIN_ID";
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const SUPPORTED_CHAIN_IDS: SUPPORTED_CHAIN_ID[] = [
|
||||
ChainId.Mainnet,
|
||||
ChainId.Goerli,
|
||||
ChainId.Polygon,
|
||||
ChainId.Mumbai,
|
||||
ChainId.Fantom,
|
||||
ChainId.FantomTestnet,
|
||||
ChainId.Avalanche,
|
||||
ChainId.AvalancheFujiTestnet,
|
||||
ChainId.Optimism,
|
||||
ChainId.OptimismGoerli,
|
||||
ChainId.Arbitrum,
|
||||
ChainId.ArbitrumGoerli,
|
||||
ChainId.BinanceSmartChainMainnet,
|
||||
ChainId.BinanceSmartChainTestnet,
|
||||
ChainId.Hardhat,
|
||||
ChainId.Localhost,
|
||||
];
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { ChainInfo } from "../../schema/shared/ChainInfo";
|
||||
import { defaultChains } from "@thirdweb-dev/chains";
|
||||
|
||||
// @ts-expect-error
|
||||
let supportedChains: ChainInfo[] = defaultChains;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function setSupportedChains(chains: ChainInfo[] | undefined) {
|
||||
if (chains && chains.length > 0) {
|
||||
supportedChains = chains;
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
supportedChains = defaultChains;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getSupportedChains() {
|
||||
return supportedChains;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { NativeToken } from "../types/currency";
|
||||
import { ChainId, getSupportedChains } from "./chains";
|
||||
import { ChainId } from "./chains/ChainId";
|
||||
import { getSupportedChains } from "./chains/supportedChains";
|
||||
import { ethers } from "ethers";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
export * from "./addresses";
|
||||
export * from "./chains";
|
||||
// addresses
|
||||
export * from "./addresses/LOCAL_NODE_PKEY";
|
||||
export * from "./addresses/CONTRACT_ADDRESSES";
|
||||
export * from "./addresses/APPROVED_IMPLEMENTATIONS";
|
||||
export * from "./addresses/getApprovedImplementation";
|
||||
export * from "./addresses/getContractAddressByChainId";
|
||||
export * from "./addresses/getContractPublisherAddress";
|
||||
export * from "./addresses/getMultichainRegistryAddress";
|
||||
export * from "./addresses/getDefaultTrustedForwarders";
|
||||
|
||||
// chains
|
||||
export * from "./chains/ChainId";
|
||||
export * from "./chains/SUPPORTED_CHAIN_ID";
|
||||
export * from "./chains/SUPPORTED_CHAIN_IDS";
|
||||
export {
|
||||
setSupportedChains,
|
||||
getSupportedChains,
|
||||
} from "./chains/supportedChains";
|
||||
|
||||
export * from "./contract";
|
||||
export * from "./currency";
|
||||
export * from "./events";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { isProvider, isSigner } from "../functions/getSignerAndProvider";
|
||||
import { StaticJsonRpcBatchProvider } from "../lib/static-batch-rpc";
|
||||
import type { SDKOptions, SDKOptionsOutput } from "../schema/sdk-options";
|
||||
import { SDKOptionsSchema } from "../schema/sdk-options";
|
||||
import type { ChainInfo } from "../schema/shared";
|
||||
import type { ChainInfo } from "../schema/shared/ChainInfo";
|
||||
import { getChainRPC } from "@thirdweb-dev/chains";
|
||||
import type { Chain } from "@thirdweb-dev/chains";
|
||||
import { providers } from "ethers";
|
||||
|
||||
@@ -11,7 +11,7 @@ import { SplitsContractSchema } from "../schema/contracts/splits";
|
||||
import { TokenErc1155ContractSchema } from "../schema/contracts/token-erc1155";
|
||||
import { TokenErc20ContractSchema } from "../schema/contracts/token-erc20";
|
||||
import { TokenErc721ContractSchema } from "../schema/contracts/token-erc721";
|
||||
import { Address } from "../schema/shared";
|
||||
import { Address } from "../schema/shared/Address";
|
||||
import { PackContractSchema } from "../schema/contracts/packs";
|
||||
import { SDKOptions } from "../schema/sdk-options";
|
||||
import { VoteContractSchema } from "../schema/contracts/vote";
|
||||
|
||||
@@ -20,7 +20,8 @@ import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { PaperCheckout } from "../../integrations/thirdweb-checkout";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { DropErc1155ContractSchema } from "../../schema/contracts/drop-erc1155";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -18,7 +18,8 @@ import { StandardErc1155 } from "../../core/classes/erc-1155-standard";
|
||||
import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { TokenErc1155ContractSchema } from "../../schema/contracts/token-erc1155";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { isNativeToken } from "../../common/currency/isNativeToken";
|
||||
import { mapOffer } from "../../common/marketplace";
|
||||
import { getRoleHash } from "../../common/role";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { SUPPORTED_CHAIN_ID } from "../../constants/chains";
|
||||
import { SUPPORTED_CHAIN_ID } from "../../constants/chains/SUPPORTED_CHAIN_ID";
|
||||
import { NATIVE_TOKENS } from "../../constants/currency";
|
||||
import { ContractAppURI } from "../../core/classes/contract-appuri";
|
||||
import { ContractEncoder } from "../../core/classes/contract-encoder";
|
||||
@@ -24,7 +24,7 @@ import { ListingType } from "../../enums";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { MarketplaceContractSchema } from "../../schema/contracts/marketplace";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Price } from "../../types/currency";
|
||||
import { AuctionListing, DirectListing, Offer } from "../../types/marketplace";
|
||||
import { MarketplaceFilter } from "../../types/marketplace/MarketPlaceFilter";
|
||||
|
||||
@@ -23,7 +23,7 @@ import { NetworkInput } from "../../core/types";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { MarketplaceContractSchema } from "../../schema/contracts/marketplace";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { Address } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import type {
|
||||
MarketplaceV3 as MarketplaceV3Contract,
|
||||
DirectListingsLogic,
|
||||
|
||||
@@ -15,7 +15,7 @@ import { StandardErc721 } from "../../core/classes/erc-721-standard";
|
||||
import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { MultiwrapContractSchema } from "../../schema/contracts/multiwrap";
|
||||
|
||||
@@ -17,7 +17,8 @@ import { Erc721WithQuantitySignatureMintable } from "../../core/classes/erc-721-
|
||||
import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import type { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { TokenErc721ContractSchema } from "../../schema/contracts/token-erc721";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -24,7 +24,8 @@ import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { PaperCheckout } from "../../integrations/thirdweb-checkout";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { DropErc721ContractSchema } from "../../schema/contracts/drop-erc721";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -22,7 +22,8 @@ import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { PackVRF } from "../../core/classes/pack-vrf";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { PackContractSchema } from "../../schema/contracts/packs";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -25,7 +25,8 @@ import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { PaperCheckout } from "../../integrations/thirdweb-checkout";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { DropErc721ContractSchema } from "../../schema/contracts/drop-erc721";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -11,7 +11,8 @@ import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { UpdateableNetwork } from "../../core/interfaces/contract";
|
||||
import { NetworkInput } from "../../core/types";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { SplitsContractSchema } from "../../schema/contracts/splits";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -15,7 +15,8 @@ import { StandardErc20 } from "../../core/classes/erc-20-standard";
|
||||
import { GasCostEstimator } from "../../core/classes/gas-cost-estimator";
|
||||
import { Transaction } from "../../core/classes/transactions";
|
||||
import { NetworkInput } from "../../core/types";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { DropErc20ContractSchema } from "../../schema/contracts/drop-erc20";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -19,7 +19,8 @@ import { NetworkInput } from "../../core/types";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { TokenErc20ContractSchema } from "../../schema/contracts/token-erc20";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { TokenMintInput } from "../../schema/tokens/token";
|
||||
import { Amount, CurrencyValue } from "../../types";
|
||||
import type { TokenERC20 } from "@thirdweb-dev/contracts-js";
|
||||
|
||||
@@ -11,7 +11,8 @@ import { Transaction } from "../../core/classes/transactions";
|
||||
import { UpdateableNetwork } from "../../core/interfaces/contract";
|
||||
import { NetworkInput, TransactionResultWithId } from "../../core/types";
|
||||
import { VoteType } from "../../enums";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Abi, AbiInput, AbiSchema } from "../../schema/contracts/custom";
|
||||
import { VoteContractSchema } from "../../schema/contracts/vote";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
|
||||
@@ -31,7 +31,7 @@ import { Erc721 } from "../core/classes/erc-721";
|
||||
import { Erc1155 } from "../core/classes/erc-1155";
|
||||
import { GasCostEstimator } from "../core/classes/gas-cost-estimator";
|
||||
import { UpdateableNetwork } from "../core/interfaces/contract";
|
||||
import { Address } from "../schema/shared";
|
||||
import { Address } from "../schema/shared/Address";
|
||||
import {
|
||||
Abi,
|
||||
AbiInput,
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
buildTransactionFunction,
|
||||
} from "../../common/transactions";
|
||||
import { EventType } from "../../constants/events";
|
||||
import { getContractAddressByChainId } from "../../constants/addresses";
|
||||
import { getContractAddressByChainId } from "../../constants/addresses/getContractAddressByChainId";
|
||||
import {
|
||||
EditionDropInitializer,
|
||||
EditionInitializer,
|
||||
@@ -36,7 +36,8 @@ import {
|
||||
TokenInitializer,
|
||||
VoteInitializer,
|
||||
} from "../../contracts";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import {
|
||||
DeployEvent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_OWNER } from "../../constants/thirdweb-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
import { Transaction } from "./transactions";
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import { getCompositePluginABI } from "../../common/plugin/getCompositePluginABI";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { isIncrementalVersion } from "../../common/version-checker";
|
||||
import { getContractPublisherAddress } from "../../constants/addresses";
|
||||
import { getContractPublisherAddress } from "../../constants/addresses/getContractPublisherAddress";
|
||||
import { getChainProvider } from "../../constants/urls";
|
||||
import {
|
||||
AbiFunction,
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
PublishedContractSchema,
|
||||
} from "../../schema/contracts/custom";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { NetworkInput, TransactionResult } from "../types";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
import { RPCConnectionHandler } from "./rpc-connection-handler";
|
||||
|
||||
@@ -4,7 +4,8 @@ import { MissingRoleError } from "../../common/error";
|
||||
import { getRoleHash, Role } from "../../common/role";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_PERMISSIONS } from "../../constants/thirdweb-features";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
import { Transaction } from "./transactions";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_PRIMARY_SALE } from "../../constants/thirdweb-features";
|
||||
import { Address } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
import { Transaction } from "./transactions";
|
||||
|
||||
@@ -16,13 +16,10 @@ import { getPolygonGasPriorityFee } from "../../common/gas-price";
|
||||
import { signEIP2612Permit } from "../../common/permit";
|
||||
import { signTypedDataInternal } from "../../common/sign";
|
||||
import { isBrowser } from "../../common/utils";
|
||||
import { ChainId } from "../../constants/chains";
|
||||
import {
|
||||
CONTRACT_ADDRESSES,
|
||||
getContractAddressByChainId,
|
||||
} from "../../constants/addresses";
|
||||
import { ChainId } from "../../constants/chains/ChainId";
|
||||
import { EventType } from "../../constants/events";
|
||||
import { Address, CallOverrideSchema } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { CallOverrideSchema } from "../../schema/shared/CallOverrideSchema";
|
||||
import { AbiSchema, ContractSource } from "../../schema/contracts/custom";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import {
|
||||
@@ -48,6 +45,8 @@ import {
|
||||
} from "ethers";
|
||||
import { ConnectionInfo } from "ethers/lib/utils.js";
|
||||
import invariant from "tiny-invariant";
|
||||
import { CONTRACT_ADDRESSES } from "../../constants/addresses/CONTRACT_ADDRESSES";
|
||||
import { getContractAddressByChainId } from "../../constants/addresses/getContractAddressByChainId";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -9,7 +9,7 @@ import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { isNode } from "../../common/utils";
|
||||
import { ClaimEligibility } from "../../enums";
|
||||
import { AbstractClaimConditionContractStruct } from "../../schema/contracts/common/claim-conditions";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { SnapshotEntryWithProof } from "../../schema/contracts/common/snapshots";
|
||||
import {
|
||||
Amount,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { isNode } from "../../common/utils";
|
||||
import { ClaimEligibility } from "../../enums";
|
||||
import { AbstractClaimConditionContractStruct } from "../../schema/contracts/common/claim-conditions";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { SnapshotEntryWithProof } from "../../schema/contracts/common/snapshots";
|
||||
import {
|
||||
ClaimCondition,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { resolveAddress } from "../../common/ens";
|
||||
import { uploadOrExtractURIs } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_EDITION_BATCH_MINTABLE } from "../../constants/erc1155-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { EditionMetadataOrUri } from "../../schema/tokens/edition";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_EDITION_BURNABLE } from "../../constants/erc1155-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
import { Transaction } from "./transactions";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_EDITION_CLAIM_CONDITIONS_V2 } from "../../constants/erc1155-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { CustomContractSchema } from "../../schema/contracts/custom";
|
||||
import { ClaimOptions } from "../../types/claim-conditions/claim-conditions";
|
||||
import { BaseClaimConditionERC1155 } from "../../types/eips";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { calculateClaimCost } from "../../common/claim-conditions/calculateClaim
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_EDITION_CLAIM_CUSTOM } from "../../constants/erc1155-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { ClaimOptions } from "../../types";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import { NFT } from "../../../core/schema/nft";
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { FEATURE_EDITION_ENUMERABLE } from "../../constants/erc1155-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { BaseERC1155 } from "../../types/eips";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { uploadOrExtractURI } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_EDITION_MINTABLE } from "../../constants/erc1155-features";
|
||||
import { EditionMetadataOrUri } from "../../schema/tokens/edition";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { NFT } from "../../../core/schema/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { AirdropInput } from "../../types/airdrop/airdrop";
|
||||
import { BaseERC1155, BaseSignatureMintERC1155 } from "../../types/eips";
|
||||
import { UpdateableNetwork } from "../interfaces/contract";
|
||||
|
||||
@@ -22,7 +22,8 @@ import {
|
||||
FEATURE_EDITION_CLAIM_CONDITIONS_V2,
|
||||
FEATURE_EDITION_LAZY_MINTABLE_V2,
|
||||
} from "../../constants/erc1155-features";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AirdropInputSchema } from "../../schema/contracts/common/airdrop";
|
||||
import { EditionMetadataOrUri } from "../../schema/tokens/edition";
|
||||
import { ClaimOptions, UploadProgressEvent } from "../../types";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_TOKEN_BURNABLE } from "../../constants/erc20-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Amount } from "../../types/currency";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_TOKEN_CLAIM_CONDITIONS_V2 } from "../../constants/erc20-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { CustomContractSchema } from "../../schema/contracts/custom";
|
||||
import { ClaimOptions } from "../../types";
|
||||
import { Amount } from "../../types/currency";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { detectContractFeature } from "../../common/feature-detection/detectCont
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_TOKEN_MINTABLE } from "../../constants/erc20-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Amount } from "../../types";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { TokenMintInput } from "../../schema/tokens/token";
|
||||
import { Amount, Currency, CurrencyValue } from "../../types/currency";
|
||||
import { BaseERC20, BaseSignatureMintERC20 } from "../../types/eips";
|
||||
|
||||
@@ -11,7 +11,8 @@ import {
|
||||
FEATURE_TOKEN_SIGNATURE_MINTABLE,
|
||||
FEATURE_TOKEN_CLAIM_CONDITIONS_V2,
|
||||
} from "../../constants/erc20-features";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { TokenMintInput } from "../../schema/tokens/token";
|
||||
import { Currency, CurrencyValue, Amount, ClaimOptions } from "../../types";
|
||||
import {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { resolveAddress } from "../../common/ens";
|
||||
import { uploadOrExtractURIs } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_NFT_BATCH_MINTABLE } from "../../constants/erc721-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NFT } from "../../../core/schema/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_NFT_CLAIM_CONDITIONS_V2 } from "../../constants/erc721-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { CustomContractSchema } from "../../schema/contracts/custom";
|
||||
import { ClaimOptions } from "../../types";
|
||||
import { BaseClaimConditionERC721 } from "../../types/eips";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NFT } from "../../../core/schema/nft";
|
||||
import { calculateClaimCost } from "../../common/claim-conditions/calculateClaimCost";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_NFT_CLAIM_CUSTOM } from "../../constants/erc721-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { ClaimOptions } from "../../types";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NFT } from "../../../core/schema/nft";
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { FEATURE_NFT_ENUMERABLE } from "../../constants/erc721-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { BaseERC721 } from "../../types/eips";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { resolveAddress } from "../../common/ens";
|
||||
import { uploadOrExtractURI } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_NFT_MINTABLE } from "../../constants/erc721-features";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
import { ContractWrapper } from "./contract-wrapper";
|
||||
|
||||
@@ -2,7 +2,8 @@ import { QueryAllParams } from "../../../core/schema/QueryParams";
|
||||
import { NFT } from "../../../core/schema/nft";
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { BaseERC721 } from "../../types/eips";
|
||||
import { UpdateableNetwork } from "../interfaces/contract";
|
||||
import { NetworkInput } from "../types";
|
||||
|
||||
@@ -23,7 +23,8 @@ import {
|
||||
FEATURE_NFT_TIERED_DROP,
|
||||
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
|
||||
} from "../../constants/erc721-features";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { ClaimOptions, UploadProgressEvent } from "../../types";
|
||||
import {
|
||||
BaseClaimConditionERC721,
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { getDeployArguments } from "../../common/deploy";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import {
|
||||
getDefaultTrustedForwarders,
|
||||
getApprovedImplementation,
|
||||
} from "../../constants/addresses";
|
||||
import {
|
||||
EditionDropInitializer,
|
||||
EditionInitializer,
|
||||
@@ -21,7 +17,7 @@ import {
|
||||
TokenInitializer,
|
||||
VoteInitializer,
|
||||
} from "../../contracts";
|
||||
import { Address } from "../../schema/shared";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { DeployEvents } from "../../types";
|
||||
import {
|
||||
@@ -45,6 +41,8 @@ import {
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import invariant from "tiny-invariant";
|
||||
import { z } from "zod";
|
||||
import { getApprovedImplementation } from "../../constants/addresses/getApprovedImplementation";
|
||||
import { getDefaultTrustedForwarders } from "../../constants/addresses/getDefaultTrustedForwarders";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
InterfaceId_IERC721,
|
||||
} from "../../constants/contract";
|
||||
import { ListingType } from "../../enums";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Price } from "../../types/currency";
|
||||
import {
|
||||
DirectListing,
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
} from "../../constants/contract";
|
||||
import { FEATURE_DIRECT_LISTINGS } from "../../constants/thirdweb-features";
|
||||
import { Status } from "../../enums";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import {
|
||||
DirectListingInputParams,
|
||||
DirectListingInputParamsSchema,
|
||||
|
||||
@@ -5,7 +5,8 @@ import { fetchTokenMetadataForContract } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { FEATURE_ENGLISH_AUCTIONS } from "../../constants/thirdweb-features";
|
||||
import { Status } from "../../enums";
|
||||
import { Address, AddressOrEns } from "../../schema/shared";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { Address } from "../../schema/shared/Address";
|
||||
import {
|
||||
EnglishAuctionInputParams,
|
||||
EnglishAuctionInputParamsSchema,
|
||||
|
||||
@@ -6,7 +6,7 @@ import { resolveAddress } from "../../common/ens";
|
||||
import { getAllInBatches, handleTokenApproval } from "../../common/marketplace";
|
||||
import { fetchTokenMetadataForContract } from "../../common/nft";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { SUPPORTED_CHAIN_ID } from "../../constants/chains";
|
||||
import { SUPPORTED_CHAIN_ID } from "../../constants/chains/SUPPORTED_CHAIN_ID";
|
||||
import { NATIVE_TOKENS } from "../../constants/currency";
|
||||
import { FEATURE_OFFERS } from "../../constants/thirdweb-features";
|
||||
import { Status } from "../../enums";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { resolveAddress } from "../../common/ens";
|
||||
import { buildTransactionFunction } from "../../common/transactions";
|
||||
import { getMultichainRegistryAddress } from "../../constants/addresses";
|
||||
import { AddressOrEns } from "../../schema/shared";
|
||||
import { getMultichainRegistryAddress } from "../../constants/addresses/getMultichainRegistryAddress";
|
||||
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||
import { PublishedMetadata } from "../../schema/contracts/custom";
|
||||
import { SDKOptions } from "../../schema/sdk-options";
|
||||
import { AddContractInput, ContractInput, DeployedContract } from "../../types";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user