From 382df289491ccd70999db4d1417130cbe5f33c97 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 16 Apr 2024 16:50:48 -0700 Subject: [PATCH 1/3] chore: Engine overloaded functions --- src/app/engine/features/contracts/page.mdx | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/app/engine/features/contracts/page.mdx b/src/app/engine/features/contracts/page.mdx index cd511899..370759ee 100644 --- a/src/app/engine/features/contracts/page.mdx +++ b/src/app/engine/features/contracts/page.mdx @@ -1,4 +1,4 @@ -import { createMetadata } from "@doc"; +import { Details, createMetadata } from "@doc"; export const metadata = createMetadata({ title: "Contracts | thirdweb Engine", @@ -40,7 +40,34 @@ const { result } = await resp.json(); console.log("Queue ID:", result.queueId); ``` -[See API reference.](https://redocly.github.io/redoc/?url=https://demo.web3api.thirdweb.com/json#tag/Contract/operation/write) +
+ +If there are multiple signatures for `functionName` on the contract, provide the full signature with args. + +**Example** + +Your contract has two functions named `mintTo`: + +```solidity +function mintTo(address to) public +``` + +```solidity +function mintTo(address to, uint256 quantity) public +``` + +This is the request body to call the second function: + +```json +{ + "functionName": "mintTo(address, uint256)", + "args": ["0x4Ff9aa707AE1eAeb40E581DF2cf4e14AffcC553d", "3"] +} +``` + +
+ +[See API reference](https://redocly.github.io/redoc/?url=https://demo.web3api.thirdweb.com/json#tag/Contract/operation/write) ### Call a payable method From 3af67d9a5f0765f7078323019724216da6dccfad Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 16 Apr 2024 16:59:17 -0700 Subject: [PATCH 2/3] disallow iframe --- next.config.mjs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index e4cbc048..3bb8d5ad 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,6 +12,23 @@ const withMDX = createMDX({ const nextConfig = { pageExtensions: ["mdx", "tsx", "ts"], redirects, + headers: async () => { + return [ + // Disallow all pages from being embedded in an iframe. + { + headers: [ + { + key: "Content-Security-Policy", + value: `frame-ancestors 'none';`, + }, + { + key: "X-Frame-Options", + value: "DENY", + }, + ], + }, + ]; + }, }; export default withMDX(nextConfig); From d01e42a8e52b34f6f8e9642df055cd1b47aab3a3 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 16 Apr 2024 17:28:21 -0700 Subject: [PATCH 3/3] add soruce --- next.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.mjs b/next.config.mjs index 3bb8d5ad..84ed729e 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -16,6 +16,7 @@ const nextConfig = { return [ // Disallow all pages from being embedded in an iframe. { + source: "/:path*", headers: [ { key: "Content-Security-Policy",