Skip to content

Commit

Permalink
docs: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Jun 14, 2024
1 parent 723c695 commit cbb6644
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions site/pages/docs/actions/public/call.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export const publicClient = createPublicClient({

:::

### Deployless Counterfactual Calls
### Deployless Calls

It is possible to call a function on a contract that has not been deployed yet. For instance, we may want
to call a function on an [ERC-4337 Smart Account](https://eips.ethereum.org/EIPS/eip-4337) contract which has not been deployed.

Viem utilizes a **Deployless Counterfactual Call** pattern to:
Viem utilizes a **Deployless Call** pattern via a [Deploy Factory](https://docs.alchemy.com/docs/create2-an-alternative-to-deriving-contract-addresses#create2-contract-factory) to:
1. "temporarily deploy" a contract (e.g. a Smart Account) with a provided [Deployment Factory Contract](https://docs.alchemy.com/docs/create2-an-alternative-to-deriving-contract-addresses#create2-contract-factory) address ([`factory`](#factory-optional)) with deployment arguments ([`factoryData`](#factorydata-optional)),
2. Call the function on the "temporarily deployed" contract ([`to`](#to-optional)).

Expand Down Expand Up @@ -93,7 +93,7 @@ This example utilizes the [SimpleAccountFactory](https://github.com/eth-infiniti
:::

:::tip
The **Deployless Counterfactual Call** pattern (and `factory` + `factoryData` parameters) is also accessible via the [`readContract`](/docs/contract/readContract#deployless-counterfactual-reads) & [Contract Instance](http://localhost:5173/docs/contract/getContract) APIs.
The **Deployless Call** pattern (and `factory` + `factoryData` parameters) is also accessible via the [`readContract`](/docs/contract/readContract#deployless-reads) & [Contract Instance](http://localhost:5173/docs/contract/getContract) APIs.
:::

## Returns
Expand Down
4 changes: 2 additions & 2 deletions site/pages/docs/contract/readContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ export const publicClient = createPublicClient({

:::

### Deployless Counterfactual Reads
### Deployless Reads

It is possible to call a function on a contract that has not been deployed yet. For instance, we may want
to call a function on an [ERC-4337 Smart Account](https://eips.ethereum.org/EIPS/eip-4337) contract which has not been deployed.

Viem utilizes a **Deployless Counterfactual Read** pattern to:
Viem utilizes a **Deployless Read** pattern via a [Deploy Factory](https://docs.alchemy.com/docs/create2-an-alternative-to-deriving-contract-addresses#create2-contract-factory) to:
1. "temporarily deploy" a contract (e.g. a Smart Account) with a provided [Deployment Factory Contract](https://docs.alchemy.com/docs/create2-an-alternative-to-deriving-contract-addresses#create2-contract-factory) address ([`factory`](#factory-optional)) with deployment arguments ([`factoryData`](#factorydata-optional)),
2. Call the function on the "temporarily deployed" contract ([`address`](#address)).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.17;

// https://eips.ethereum.org/EIPS/eip-7679#counterfactual-call-contract

contract CounterfactualCall {
contract DeploylessCallViaFactory {
error CounterfactualDeployFailed(bytes error);
constructor(
address to,
Expand Down

0 comments on commit cbb6644

Please sign in to comment.