MCPcopy Create free account
hub / github.com/circlefin/arc-node / deploy

Method deploy

tests/helpers/NativeTransferHelper.ts:43–56  ·  view source on GitHub ↗
(account: WalletClient, client: PublicClient, value: bigint, selfDestructTarget?: Address)

Source from the content-addressed store, hash-verified

41 }
42
43 static async deploy(account: WalletClient, client: PublicClient, value: bigint, selfDestructTarget?: Address) {
44 const artifact = await hre.artifacts.readArtifact('NativeTransferHelper')
45 const deployedTxHash = await account.deployContract({
46 abi: artifact.abi,
47 bytecode: artifact.bytecode,
48 args: [selfDestructTarget ?? zeroAddress, selfDestructTarget !== undefined] as const,
49 value,
50 })
51 const receipt: TransactionReceipt = await client.waitForTransactionReceipt({ hash: deployedTxHash })
52 if (!receipt.contractAddress) {
53 throw new Error('Deployment failed, missing contract address')
54 }
55 return new NativeTransferHelper(receipt.contractAddress, artifact.abi, artifact.bytecode as Hex, client, receipt)
56 }
57
58 async callCanReceive(account: WalletClient, value: bigint): Promise<TransactionReceipt> {
59 const txHash = await account.writeContract({

Callers 3

subcall.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected