Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docs path in estimateContractGas #1000

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mighty-ants-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Fixed `docsPath` value in `estimateContractGas`.
22 changes: 11 additions & 11 deletions src/actions/public/estimateContractGas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('wagmi', () => {
args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC, 420)
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2"
`)
await expect(() =>
Expand All @@ -95,7 +95,7 @@ describe('wagmi', () => {
args: (1)
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2"
`)
await expect(() =>
Expand All @@ -119,7 +119,7 @@ describe('wagmi', () => {
args: (0x1a1E021A302C237453D3D45c7B82B19cEEB7E2e6, 0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC, 1)
sender: 0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2"
`)
})
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('BAYC', () => {
args: (1)
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2"
`)
})
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('contract errors', () => {
function: revertWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -258,7 +258,7 @@ describe('contract errors', () => {
function: assertWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -282,7 +282,7 @@ describe('contract errors', () => {
function: overflowWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -306,7 +306,7 @@ describe('contract errors', () => {
function: divideByZeroWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -329,7 +329,7 @@ describe('contract errors', () => {
function: requireWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -355,7 +355,7 @@ describe('contract errors', () => {
function: simpleCustomWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand All @@ -381,7 +381,7 @@ describe('contract errors', () => {
function: complexCustomWrite()
sender: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Docs: https://viem.sh/docs/contract/simulateContract.html
Docs: https://viem.sh/docs/contract/estimateContractGas.html
Version: viem@1.0.2]
`)
})
Expand Down
2 changes: 1 addition & 1 deletion src/actions/public/estimateContractGas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function estimateContractGas<
abi: abi as Abi,
address,
args,
docsPath: '/docs/contract/simulateContract',
docsPath: '/docs/contract/estimateContractGas',
functionName,
sender: account?.address,
})
Expand Down