Skip to content

Commit b99542b

Browse files
authored
Merge branch 'yash/ocr-contracts-integration' into 06-16-_tool-4689_dashboard_integrate_erc20asset_contract_in_token_creation_flow
2 parents 0ebf6cb + 9989b9d commit b99542b

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

packages/thirdweb/src/exports/tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export {
88
} from "../tokens/constants.js";
99
export { createToken } from "../tokens/create-token.js";
1010
export { distributeToken } from "../tokens/distribute-token.js";
11-
export { getEntrypointERC20 } from "../tokens/get-entrypoint-erc20.js";
11+
export { getDeployedEntrypointERC20 } from "../tokens/get-entrypoint-erc20.js";
1212
export { isPoolRouterEnabled } from "../tokens/is-router-enabled.js";
1313
export {
1414
generateSalt,

packages/thirdweb/src/tokens/create-token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createdEvent } from "../extensions/tokens/__generated__/ERC20Entrypoint
55
import { create } from "../extensions/tokens/__generated__/ERC20Entrypoint/write/create.js";
66
import { sendAndConfirmTransaction } from "../transaction/actions/send-and-confirm-transaction.js";
77
import { DEFAULT_REFERRER_ADDRESS } from "./constants.js";
8-
import { getEntrypointERC20 } from "./get-entrypoint-erc20.js";
8+
import { getDeployedEntrypointERC20 } from "./get-entrypoint-erc20.js";
99
import {
1010
encodeInitParams,
1111
encodePoolConfig,
@@ -25,7 +25,7 @@ export async function createToken(options: CreateTokenOptions) {
2525

2626
const salt: Hex = generateSalt(options.salt || bytesToHex(randomBytes(31)));
2727

28-
const entrypoint = await getEntrypointERC20(options);
28+
const entrypoint = await getDeployedEntrypointERC20(options);
2929

3030
let hookData: Hex = "0x";
3131
if (launchConfig?.kind === "pool") {

packages/thirdweb/src/tokens/distribute-token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { distribute } from "../extensions/tokens/__generated__/ERC20Entrypoint/write/distribute.js";
22
import type { ClientAndChain } from "../utils/types.js";
33
import { toUnits } from "../utils/units.js";
4-
import { getEntrypointERC20 } from "./get-entrypoint-erc20.js";
4+
import { getDeployedEntrypointERC20 } from "./get-entrypoint-erc20.js";
55
import type { DistributeContent } from "./types.js";
66

77
type DistrbuteTokenParams = ClientAndChain & {
@@ -10,7 +10,7 @@ type DistrbuteTokenParams = ClientAndChain & {
1010
};
1111

1212
export async function distributeToken(options: DistrbuteTokenParams) {
13-
const entrypoint = await getEntrypointERC20(options);
13+
const entrypoint = await getDeployedEntrypointERC20(options);
1414

1515
if (!entrypoint) {
1616
throw new Error(`Entrypoint not found on chain: ${options.chain.id}`);

packages/thirdweb/src/tokens/get-entrypoint-erc20.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getContract } from "../contract/contract.js";
22
import type { ClientAndChain } from "../utils/types.js";
33
import { IMPLEMENTATIONS } from "./constants.js";
44

5-
export async function getEntrypointERC20(options: ClientAndChain) {
5+
export async function getDeployedEntrypointERC20(options: ClientAndChain) {
66
const implementations = IMPLEMENTATIONS[options.chain.id];
77

88
if (implementations?.EntrypointERC20) {

packages/thirdweb/src/tokens/is-router-enabled.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { getContract } from "../contract/contract.js";
33
import { getPoolRouter } from "../extensions/tokens/__generated__/ERC20Entrypoint/read/getPoolRouter.js";
44
import { getAdapter } from "../extensions/tokens/__generated__/PoolRouter/read/getAdapter.js";
55
import type { ClientAndChain } from "../utils/types.js";
6-
import { getEntrypointERC20 } from "./get-entrypoint-erc20.js";
6+
import { getDeployedEntrypointERC20 } from "./get-entrypoint-erc20.js";
77

88
export async function isPoolRouterEnabled(
99
options: ClientAndChain,
1010
): Promise<boolean> {
11-
const entrypoint = await getEntrypointERC20(options);
11+
const entrypoint = await getDeployedEntrypointERC20(options);
1212
if (!entrypoint) {
1313
return false;
1414
}

0 commit comments

Comments
 (0)