Typescript SDK

DEPLOY.deployERC20Contract

Deploys an thirdweb ERC20 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.

Example

import { deployERC20Contract } from "thirdweb/deploys";
const contractAddress = await deployERC20Contract({
chain,
client,
account,
type: "TokenERC20",
params: {
name: "MyToken",
description: "My Token contract",
symbol: "MT",
});
function deployERC20Contract(options: {
account: Account;
chain: Readonly;
client: ThirdwebClient;
publisher?: string;
}): Promise<string>;

Parameters

The deployment options.

Type

let options: {
account: Account;
chain: Readonly;
client: ThirdwebClient;
publisher?: string;
};

Returns

let returnType: Promise<string>;

The deployed contract address.