Skip to content

Commit

Permalink
fix: docs path in estimateContractGas (wevm#1000)
Browse files Browse the repository at this point in the history
* fix estimateContractGas' error docsPath

* chore: update snapshots

---------

Co-authored-by: norswap <norswap@gmail.com>
  • Loading branch information
2 people authored and aaronmgdr committed Aug 18, 2023
1 parent fad744a commit 6b38230
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
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

0 comments on commit 6b38230

Please sign in to comment.