MCPcopy Create free account
hub / github.com/wevm/viem / deploy

Function deploy

test/src/utils.ts:80–99  ·  view source on GitHub ↗
(
  client: TestClient<
    TestClientMode,
    Transport,
    Chain,
    Account | undefined,
    false
  >,
  args: DeployContractParameters<abi, (typeof client)['chain'], Account>,
)

Source from the content-addressed store, hash-verified

78}
79
80export async function deploy<const abi extends Abi | readonly unknown[]>(
81 client: TestClient<
82 TestClientMode,
83 Transport,
84 Chain,
85 Account | undefined,
86 false
87 >,
88 args: DeployContractParameters<abi, (typeof client)['chain'], Account>,
89) {
90 const hash = await deployContract(client, {
91 account: accounts[0].address,
92 ...args,
93 } as any)
94 await mine(client, { blocks: 1 })
95 const { contractAddress } = await getTransactionReceipt(client, {
96 hash,
97 })
98 return { contractAddress, hash }
99}
100
101export async function deployBAYC() {
102 return deploy(client, {

Callers 15

getVerifyingPaymaster_08Function · 0.85
getVerifyingPaymaster_07Function · 0.85
getVerifyingPaymaster_06Function · 0.85
deployBAYCFunction · 0.85
deployErrorExampleFunction · 0.85
deployEnsAvatarTokenUriFunction · 0.85
deployPayableFunction · 0.85
deploySoladyAccount_07Function · 0.85
deploySoladyAccount_06Function · 0.85

Calls 3

mineFunction · 0.85
getTransactionReceiptFunction · 0.85
deployContractFunction · 0.50

Tested by

no test coverage detected