Skip to content

Commit

Permalink
v3 part 6 (#350)
Browse files Browse the repository at this point in the history
* --wip-- [skip ci]

* Getting moon chain data

* In pre-commit hook just checking staged files

* Fixed unit tests

* Fix

* Removing Hydration config from MRL

* Fixing linter

* Finished with getEstimate and getMin

* Different assets on source and destination to support MRL

* Config fixes

* --wip-- [skip ci]

* Updated some dependencies

* Fixed tests and linter

* Fixed snapshots of acceptance test
  • Loading branch information
ekenigs authored Sep 24, 2024
1 parent 4644b6d commit 00822cf
Show file tree
Hide file tree
Showing 98 changed files with 1,432 additions and 798 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"aseed",
"astar",
"ausd",
"axlusdc",
"biomejs",
"bncs",
"composablenodes",
Expand Down Expand Up @@ -90,14 +91,14 @@
"xfer",
"xtokens"
],
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"typescript.preferences.importModuleSpecifier": "relative",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
1 change: 1 addition & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'**/*Abi.ts',
'**/*.ts.snap',
'**/*.sol',
'pnpm-lock.yaml',
],
words: vscodeConfig['cSpell.words'],
};
16 changes: 5 additions & 11 deletions examples/mrl-simple/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Mrl } from '@moonbeam-network/mrl';
import {
fantomTestnet,
ftmwh,
moonbeam,
peaqChain,
polkadot,
} from '@moonbeam-network/xcm-config';
import { fantomTestnet, ftm, peaqAlphanet } from '@moonbeam-network/xcm-config';
import { Keyring } from '@polkadot/api';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { http, type Address, createWalletClient } from 'viem';
Expand All @@ -28,7 +22,7 @@ if (!EVM_PRIVATE_KEY || !POLKADOT_PRIVATE_KEY) {
const account = privateKeyToAccount(EVM_PRIVATE_KEY as Address);
const walletClient = createWalletClient({
account,
chain: moonbeam.getViemChain(),
chain: fantomTestnet.getViemChain(),
transport: http(),
});

Expand All @@ -38,7 +32,7 @@ console.log(`\nEVM address: ${account.address}`);

await cryptoWaitReady();
const keyring = new Keyring({
ss58Format: polkadot.ss58Format,
ss58Format: peaqAlphanet.ss58Format,
type: 'sr25519',
});
const pair = keyring.createFromUri(POLKADOT_PRIVATE_KEY);
Expand All @@ -55,8 +49,8 @@ main()
async function main() {
const data = await Mrl()
.setSource(fantomTestnet)
.setDestination(peaqChain)
.setAsset(ftmwh)
.setDestination(peaqAlphanet)
.setAsset(ftm)
.setAddresses({
sourceAddress: account.address,
destinationAddress: pair.address,
Expand Down
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pre-commit:
run: pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
stage_fixed: true
spell:
run: pnpm run spell
run: pnpm cspell --no-summary --no-progress --no-must-find-files --files {staged_files}
79 changes: 45 additions & 34 deletions mkdocs/material-overrides/assets/stylesheets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

/** Material theme overrides **/
/* Fonts */
--header-font: 'Banana Grotesk', sans-serif;
--label-font: 'Space Mono', monospace;
--header-font: "Banana Grotesk", sans-serif;
--label-font: "Space Mono", monospace;

/* Borders */
--border-width-thin: 0.5px;
Expand All @@ -34,11 +34,11 @@
--hover-opacity: 0.7;

/** Admonition */
--md-admonition-icon--code: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LjYsMTYuNkwxOS4yLDEyTDE0LjYsNy40TDE2LDZMMjIsMTJMMTYsMThMMTQuNiwxNi42TTkuNCwxNi42TDQuOCwxMkw5LjQsNy40TDgsNkwyLDEyTDgsMThMOS40LDE2LjZaIiAvPjwvc3ZnPg==');
--md-admonition-icon--code: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LjYsMTYuNkwxOS4yLDEyTDE0LjYsNy40TDE2LDZMMjIsMTJMMTYsMThMMTQuNiwxNi42TTkuNCwxNi42TDQuOCwxMkw5LjQsNy40TDgsNkwyLDEyTDgsMThMOS40LDE2LjZaIiAvPjwvc3ZnPg==");
}

:root,
[data-md-color-scheme='default'] {
[data-md-color-scheme="default"] {
--md-accent-fg-color: var(--teal-light);

/** Code highlighting color shades **/
Expand Down Expand Up @@ -82,8 +82,8 @@
}

:root,
[data-md-color-scheme='slate'],
[data-md-color-scheme='slate'][data-md-color-primary='black'] {
[data-md-color-scheme="slate"],
[data-md-color-scheme="slate"][data-md-color-primary="black"] {
--md-default-bg-color: var(--dark);
--md-accent-fg-color: var(--teal-light);

Expand Down Expand Up @@ -125,8 +125,8 @@
--border-grid: var(--border-width-thin) solid var(--border-color);
}

[data-md-color-primary='black'] .md-tabs,
[data-md-color-primary='black'] .md-header {
[data-md-color-primary="black"] .md-tabs,
[data-md-color-primary="black"] .md-header {
background-color: var(--dark);
}

Expand Down Expand Up @@ -181,15 +181,19 @@ body {
}

@media screen and (min-width: 76.25em) {
[dir='ltr'] .md-header__source {
[dir="ltr"] .md-header__source {
margin-left: 0;
}
}

[data-md-color-scheme=slate] .md-nav__button.md-logo img[src$="#only-light"],
[data-md-color-scheme='default'] .md-nav__button.md-logo img[src$='#only-dark'],
[data-md-color-scheme=slate] .md-header__button.md-logo img[src$="#only-light"],
[data-md-color-scheme='default'] .md-header__button.md-logo img[src$='#only-dark'] {
[data-md-color-scheme="slate"] .md-nav__button.md-logo img[src$="#only-light"],
[data-md-color-scheme="default"] .md-nav__button.md-logo img[src$="#only-dark"],
[data-md-color-scheme="slate"]
.md-header__button.md-logo
img[src$="#only-light"],
[data-md-color-scheme="default"]
.md-header__button.md-logo
img[src$="#only-dark"] {
display: none;
}

Expand All @@ -214,13 +218,13 @@ body {
border-bottom: var(--border-grid);
}

[dir=ltr] .md-search__input::placeholder {
[dir="ltr"] .md-search__input::placeholder {
font-family: var(--label-font);
text-transform: uppercase;
}

.md-header__title--active .md-header__topic+.md-header__topic,
.md-header__topic+.md-header__topic {
.md-header__title--active .md-header__topic + .md-header__topic,
.md-header__topic + .md-header__topic {
transition: none;
}

Expand Down Expand Up @@ -264,10 +268,9 @@ body {
}
}


/* Reference page styling */
/* Grid styling */
.grid>div:last-child {
.grid > div:last-child {
max-height: 1000px;
overflow: auto;
}
Expand All @@ -276,7 +279,7 @@ body {
grid-gap: 3rem;
}

.md-typeset .grid>div:first-child>p:first-child {
.md-typeset .grid > div:first-child > p:first-child {
margin-top: 0;
}

Expand All @@ -298,11 +301,10 @@ body {

/* Add arrows to left navigation sections */
@media screen and (min-width: 76.25em) {

.md-nav__item--active .md-nav__link[href='../interfaces/'] .md-ellipsis:after,
.md-nav__item--active .md-nav__link[href='../methods/'] .md-ellipsis:after {
.md-nav__item--active .md-nav__link[href="../interfaces/"] .md-ellipsis:after,
.md-nav__item--active .md-nav__link[href="../methods/"] .md-ellipsis:after {
background-color: currentcolor;
content: '';
content: "";
display: inline-block;
-webkit-mask-position: center;
mask-position: center;
Expand All @@ -320,10 +322,12 @@ body {
vertical-align: middle;
}

.md-nav__item--active .md-nav__link.md-nav__link--active[href='./'] .md-ellipsis:after {
.md-nav__item--active
.md-nav__link.md-nav__link--active[href="./"]
.md-ellipsis:after {
transform: rotate(90deg);
background-color: currentcolor;
content: '';
content: "";
display: inline-block;
-webkit-mask-position: center;
mask-position: center;
Expand All @@ -341,11 +345,18 @@ body {
vertical-align: middle;
}

[dir='ltr'] .md-nav--integrated>.md-nav__list>.md-nav__item--active .md-nav--secondary {
[dir="ltr"]
.md-nav--integrated
> .md-nav__list
> .md-nav__item--active
.md-nav--secondary {
border-left: 0.05rem solid var(--md-default-fg-color--lightest);
}

[dir='ltr'] .md-sidebar--primary:not([hidden])~.md-content>.md-content__inner {
[dir="ltr"]
.md-sidebar--primary:not([hidden])
~ .md-content
> .md-content__inner {
margin-left: 0;
margin-right: 0;
}
Expand All @@ -364,11 +375,11 @@ body {
border-color: var(--teal-light-shade-50);
}

.md-typeset .note>.admonition-title {
.md-typeset .note > .admonition-title {
background-color: var(--teal-dark-transparent-15);
}

.md-typeset .note>.admonition-title:before {
.md-typeset .note > .admonition-title:before {
background-color: var(--teal-light-shade-50);
}

Expand All @@ -377,13 +388,13 @@ body {
border-color: var(--purple-light);
}

.md-typeset .code>.admonition-title,
.md-typeset .code>summary {
.md-typeset .code > .admonition-title,
.md-typeset .code > summary {
background-color: var(--purple-dark-transparent-15);
}

.md-typeset .code>.admonition-title::before,
.md-typeset .code>summary::before {
.md-typeset .code > .admonition-title::before,
.md-typeset .code > summary::before {
background-color: var(--purple-light);
-webkit-mask-image: var(--md-admonition-icon--code);
mask-image: var(--md-admonition-icon--code);
Expand All @@ -392,4 +403,4 @@ body {
/* Tab styling */
.js .md-typeset .tabbed-labels:before {
background-color: var(--purple-light);
}
}
18 changes: 9 additions & 9 deletions mkdocs/material-overrides/assets/stylesheets/home.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* Background image on home page */
[data-md-color-scheme='slate'] .md-main {
[data-md-color-scheme="slate"] .md-main {
/* Set gradient background */
background: linear-gradient(#000, #291E3A);
background: linear-gradient(#000, #291e3a);
/* For older browsers */
background: -webkit-linear-gradient(#000, #291E3A);
background: -moz-linear-gradient(#000, #291E3A);
background: -o-linear-gradient(#000, #291E3A);
background: -webkit-linear-gradient(#000, #291e3a);
background: -moz-linear-gradient(#000, #291e3a);
background: -o-linear-gradient(#000, #291e3a);
}

/* Background image on home page */
[data-md-color-scheme='default'] .md-main {
[data-md-color-scheme="default"] .md-main {
/* Set gradient background */
background: linear-gradient(#958fdc, #fff);
/* For older browsers */
Expand Down Expand Up @@ -101,7 +101,7 @@
justify-content: center;
}

.md-typeset pre>code {
.md-typeset pre > code {
display: flex;
height: 4em;
padding: 0;
Expand All @@ -113,7 +113,7 @@

@media screen and (max-width: 76.234375em) {
.code {
display: none
display: none;
}
}

Expand All @@ -133,4 +133,4 @@
.feature {
width: 100%;
}
}
}
Loading

0 comments on commit 00822cf

Please sign in to comment.