-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dawn/historical-updates-evm
- Loading branch information
Showing
65 changed files
with
1,001 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Request reviews from the formatting team for all PRs | ||
* @moonbeam-foundation/devrel-formatting |
11 changes: 11 additions & 0 deletions
11
.snippets/code/builders/ethereum/dev-env/scaffold-eth/terminal/account-import.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">yarn account:import</span> | ||
<span data-ty>👛 Importing Wallet</span> | ||
<span data-ty="input">Paste your private key: [hidden]</span> | ||
<span data-ty="input">Enter a password to encrypt your private key: [hidden]</span> | ||
<span data-ty="input">Confirm password: [hidden]</span> | ||
<span data-ty>📄 Encrypted Private Key saved to packages/hardhat/.env file</span> | ||
<span data-ty>🪄 Imported wallet address: 0x3B939FeaD1557C741Ff06492FD0127bd287A421e</span> | ||
<span data-ty>⚠️ Make sure to remember your password! You'll need it to decrypt the private key.</span> | ||
<span data-ty="input"> </span> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
.snippets/code/builders/ethereum/dev-env/scaffold-eth/terminal/compile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">yarn compile</span> | ||
<span data-ty>Generating typings for: 2 artifacts in dir: typechain-types for target: ethers-v6</span> | ||
<span data-ty>Successfully generated 6 typings!</span> | ||
<span data-ty>Compiled 2 Solidity files successfully (evm target: paris).</span> | ||
<span data-ty="input"> </span> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
.snippets/code/builders/ethereum/dev-env/scaffold-eth/terminal/deploy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">yarn deploy</span> | ||
<span data-ty="input">Enter password to decrypt private key: [hidden]</span> | ||
<span data-ty>Nothing to compile</span> | ||
<span data-ty>No need to generate any newer typings.</span> | ||
<span data-ty>deploying "YourContract" (tx: 0xda4b71904cae30fad60669b321e1dd51b28a6cf197fc7ea13b5d85035b41d92c)...: deployed at 0xB527D4Ed38249d35cfCBAb92b51f45895622c6Eb with 837042 gas</span> | ||
<span data-ty>👋 Initial greeting: Building Unstoppable Apps!!!</span> | ||
<span data-ty>📝 Updated TypeScript contract definition file on ../nextjs/contracts/deployedContracts.ts</span> | ||
<span data-ty="input"> </span> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
.snippets/code/builders/ethereum/dev-env/scaffold-eth/terminal/start.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">yarn start</span> | ||
<span data-ty> ▲ Next.js 14.2.11</span> | ||
<span data-ty> - Local: http://localhost:3000</span> | ||
<span data-ty> ✓ Starting...</span> | ||
<span data-ty> Downloading swc package @next/swc-darwin-arm64...</span> | ||
<span data-ty> ✓ Ready in 3.7s</span> | ||
<span data-ty> ○ Compiling / ...</span> | ||
<span data-ty>🌼 daisyUI 4.12.10</span> | ||
<span data-ty>├─ ✔︎ 2 themes added https://daisyui.com/docs/themes</span> | ||
<span data-ty>╰─ ★ Star daisyUI on GitHub https://github.com/saadeghi/daisyui</span> | ||
<span data-ty> ✓ Compiled / in 10.8s (7727 modules)</span> | ||
<span data-ty> GET / 200 in 11353ms</span> | ||
<span data-ty> HEAD / 200 in 31ms</span> | ||
<span data-ty="input"> </span> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
.snippets/code/builders/ethereum/dev-env/scaffold-eth/terminal/verify.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">yarn verify --api-url https://api-moonbase.moonscan.io</span> | ||
<span data-ty>verifying YourContract (0xB527D4Ed38249d35cfCBAb92b51f45895622c6Eb) ...</span> | ||
<span data-ty>waiting for result...</span> | ||
<span data-ty>=> contract YourContract is now verified</span> | ||
<span data-ty="input"> </span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.snippets/code/builders/get-started/networks/moonbeam-dev/terminal/sidecar.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.snippets/code/builders/interoperability/xcm/core-concepts/location-to-account.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ApiPromise, WsProvider } from '@polkadot/api'; | ||
|
||
const main = async () => { | ||
// Construct API provider | ||
const wsProvider = new WsProvider('INSERT_WSS_ENDPOINT'); | ||
const api = await ApiPromise.create({ provider: wsProvider }); | ||
|
||
// Define the multilocation parameter | ||
const multilocation = { | ||
V4: { | ||
parents: 1, | ||
interior: 'Here', | ||
}, | ||
}; | ||
|
||
// Query the locationToAccountApi using convertLocation method | ||
const result = | ||
await api.call.locationToAccountApi.convertLocation(multilocation); | ||
console.log('Conversion result:', result.toHuman()); | ||
|
||
// Disconnect the API | ||
await api.disconnect(); | ||
}; | ||
|
||
main().catch(console.error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
...code/builders/interoperability/xcm/send-execute-xcm/dry-run/dry-run-call-return-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
Dry run XCM result: { | ||
"ok": { | ||
"executionResult": { | ||
"ok": { | ||
"actualWeight": { | ||
"refTime": 7301615000, | ||
"proofSize": 20928 | ||
}, | ||
"paysFee": "Yes" | ||
} | ||
}, | ||
"emittedEvents": [ | ||
{ | ||
"index": "0x030b", | ||
"data": [ | ||
"0x88bcE0b038eFFa09e58fE6d24fDe4b5Af21aa798", | ||
"0x0000000000000000016345785d8a0000" | ||
] | ||
}, | ||
{ | ||
"index": "0x0300", | ||
"data": [ | ||
"0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0", | ||
"0x0000000000000000016345785d8a0000" | ||
] | ||
}, | ||
{ | ||
"index": "0x030a", | ||
"data": [ | ||
"0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0", | ||
"0x0000000000000000016345785d8a0000" | ||
] | ||
}, | ||
{ | ||
"index": "0x1c00", | ||
"data": [ | ||
{ | ||
"complete": { | ||
"used": { | ||
"refTime": 7250000000, | ||
"proofSize": 19374 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"localXcm": { | ||
"v4": [ | ||
{ | ||
"withdrawAsset": [ | ||
{ | ||
"id": { | ||
"parents": 0, | ||
"interior": { | ||
"x1": [ | ||
{ | ||
"palletInstance": 3 | ||
} | ||
] | ||
} | ||
}, | ||
"fun": { | ||
"fungible": "0x0000000000000000016345785d8a0000" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"depositAsset": { | ||
"assets": { | ||
"wild": { | ||
"allCounted": 1 | ||
} | ||
}, | ||
"beneficiary": { | ||
"parents": 0, | ||
"interior": { | ||
"x1": [ | ||
{ | ||
"accountKey20": { | ||
"network": null, | ||
"key": "0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} // Additional events returned here | ||
// Omitted for clarity |
44 changes: 44 additions & 0 deletions
44
.snippets/code/builders/interoperability/xcm/send-execute-xcm/dry-run/dry-run-call.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ApiPromise, WsProvider } from '@polkadot/api'; | ||
import { hexToU8a } from '@polkadot/util'; | ||
|
||
const main = async () => { | ||
try { | ||
// Construct API provider | ||
const wsProvider = new WsProvider('INSERT_WSS_ENDPOINT'); | ||
const api = await ApiPromise.create({ provider: wsProvider }); | ||
|
||
console.log('Connected to the API. Preparing dry run call...'); | ||
|
||
// Create a test account (you should replace this with an actual account) | ||
const testAccount = api.createType( | ||
'AccountId20', | ||
'0x88bcE0b038eFFa09e58fE6d24fDe4b5Af21aa798' | ||
); | ||
|
||
// The call data (replace with your actual call data) | ||
const callData = | ||
'0x1c030408000400010403001300008a5d784563010d010204000103003cd0a705a2dc65e5b1e1205896baa2be8a07c6e007803822b001ba2e0100'; // Your hex-encoded call data | ||
|
||
// Convert hex to Uint8Array | ||
const callDataU8a = hexToU8a(callData); | ||
|
||
// Perform the dry run call | ||
const result = await api.call.dryRunApi.dryRunCall( | ||
{ system: { Signed: testAccount } }, // origin | ||
callDataU8a // call | ||
); | ||
|
||
console.log( | ||
'Dry run XCM result:', | ||
JSON.stringify(result.toJSON(), null, 2) | ||
); | ||
|
||
// Disconnect the API | ||
await api.disconnect(); | ||
console.log('Disconnected from the API.'); | ||
} catch (error) { | ||
console.error('An error occurred:', error); | ||
} | ||
}; | ||
|
||
main().catch(console.error); |
Oops, something went wrong.