Skip to content

Commit

Permalink
Format code snippets (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest authored May 21, 2024
1 parent 5490b25 commit 0bd6fae
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/data/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export const menu: {
title: "Deploy ExampleReceiverDapp",
description:
"Deploy a receiver contract on the target chain to receive messages. (for example purposes only)",
code: `// SPDX-License-Identifier: MIT
code: `
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "https://github.com/msgport/msgport/blob/main/src/user/Application.sol";
Expand Down Expand Up @@ -82,7 +83,8 @@ export const menu: {
{
title: "Encode Calldata",
description: "Build the remote call data as the message payload.",
code: `import { ethers } from 'ethers';
code: `
import { ethers } from 'ethers';
const privateKey = process.env.PRIVATE_KEY;
const providerUrl = <Your RPC provider URL>;
Expand Down Expand Up @@ -116,7 +118,8 @@ export const menu: {
{
title: "Get Fee And Params From Msgport API",
description: "Estimate fee and get adaptation params from Msgport API.",
code: `import axios from 'axios';
code: `
import axios from 'axios';
async function getFeeParams() {
const requestBody = {
Expand All @@ -139,7 +142,9 @@ export const menu: {
title: "Sending Message",
description:
"Sending massage via Msgport to dapp on target chain using encoded message data and params provided in previous steps.",
code: `pragma solidity ^0.8.17;
code: `
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "https://github.com/msgport/msgport/blob/main/src/interfaces/IMessagePort.sol";
Expand All @@ -163,7 +168,9 @@ export const menu: {
{
title: "XAccount",
description: "",
code: `pragma solidity ^0.8.0;
code: `
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ExampleXAccount {
// XAccountFactory address
Expand Down Expand Up @@ -206,8 +213,8 @@ export const menu: {
{
title: "Order Clearing",
description: "",
code: `// SPDX-License-Identifier: MIT
code: `
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
contract MsglineMessager is Application, AccessController {
Expand Down

0 comments on commit 0bd6fae

Please sign in to comment.