Skip to content

Commit c0a3550

Browse files
d4mrjoaquim-verges
authored andcommitted
update API reference, and test-transaction
1 parent b18549b commit c0a3550

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/transactions/server-wallets/components/send-dummy-tx.client.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function SendDummyTx(props: {
3838
accessToken: string;
3939
}) => {
4040
const response = await fetch(
41-
`${THIRDWEB_ENGINE_CLOUD_URL}/account/send-transaction`,
41+
`${THIRDWEB_ENGINE_CLOUD_URL}/write/contract`,
4242
{
4343
method: "POST",
4444
headers: {
@@ -52,8 +52,9 @@ export default function SendDummyTx(props: {
5252
},
5353
transactionParams: [
5454
{
55-
to: "0xeb0effdfb4dc5b3d5d3ac6ce29f3ed213e95d675",
56-
value: "0",
55+
contractAddress: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
56+
method: "approve",
57+
params: [args.walletAddress, "0"],
5758
},
5859
],
5960
vaultAccessToken: args.accessToken,

apps/dashboard/src/app/team/[team_slug]/[project_slug]/transactions/server-wallets/components/try-it-out.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ export function TryItOut(props: {
3232
/>
3333
<div className="h-4" />
3434
<div className="flex flex-row justify-end gap-4">
35-
<Button variant={"secondary"}>View API reference</Button>
35+
<Button variant={"secondary"} asChild>
36+
<a
37+
href={`${THIRDWEB_ENGINE_CLOUD_URL}/reference`}
38+
target="_blank"
39+
rel="noreferrer"
40+
>
41+
View API reference
42+
</a>
43+
</Button>
3644
{props.wallet && (
3745
<SendDummyTx
3846
authToken={props.authToken}
@@ -49,7 +57,7 @@ export function TryItOut(props: {
4957

5058
const sendTransactionExample = () => `\
5159
const response = fetch(
52-
"${THIRDWEB_ENGINE_CLOUD_URL}/account/send-transaction",
60+
"${THIRDWEB_ENGINE_CLOUD_URL}/write/contract",
5361
{
5462
method: "POST",
5563
headers: {
@@ -62,10 +70,11 @@ const response = fetch(
6270
"signerAddress": "<your-server-wallet-address>"
6371
},
6472
"transactionParams": [
65-
{
66-
"to": "0xeb0effdfb4dc5b3d5d3ac6ce29f3ed213e95d675",
67-
"value": "0"
68-
}
73+
{
74+
"contractAddress": "0x...",
75+
"method": "approve",
76+
"params": ["0x...", "0"],
77+
},
6978
],
7079
"vaultAccessToken": "<your-wallet-access-token>",
7180
"chainId": "84532"

0 commit comments

Comments
 (0)