diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 4ae40904..c6ab047d 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -38,10 +38,7 @@ function Footer() { */}
- + source
|
@@ -52,6 +49,12 @@ function Footer() { license
+
+ (fork of  + + solidity-by-example) + +
) } diff --git a/src/keywords.json b/src/keywords.json index a7c01221..6e67db62 100644 --- a/src/keywords.json +++ b/src/keywords.json @@ -1,23 +1,5 @@ { - "/swap": [ - "swap", - "trade", - "swapping" - ], - "/initialize": [ - "pool", - "initialize", - "init", - "create", - "pair", - "factory" - ], - "/create-liquidity": [ - "liquidity", - "LP", - "lp", - "provide", - "provision", - "supply" - ] -} \ No newline at end of file + "/swap": ["swap", "trade", "swapping"], + "/initialize": ["pool", "initialize", "init", "create", "pair", "factory"], + "/create-liquidity": ["liquidity", "LP", "lp", "provide", "provision", "supply"] +} diff --git a/src/nav.ts b/src/nav.ts index 947a376f..94ce3f70 100644 --- a/src/nav.ts +++ b/src/nav.ts @@ -8,36 +8,30 @@ export interface Translation { url: string } -export const TRANSLATIONS: Translation[] = [ - -] +export const TRANSLATIONS: Translation[] = [] export const SOL_ROUTES: Route[] = [ { path: "initialize", - title: "Initialize Pool" + title: "Initialize Pool", }, { path: "create-liquidity", - title: "Create Liquidity" + title: "Create Liquidity", }, { path: "swap", - title: "Swap" + title: "Swap", }, ] -export const APP_ROUTES: Route[] = [ -] +export const APP_ROUTES: Route[] = [] -const HACK_ROUTES: Route[] = [ -] +const HACK_ROUTES: Route[] = [] -export const TEST_ROUTES: Route[] = [ -] +export const TEST_ROUTES: Route[] = [] -export const DEFI_ROUTES = [ -] +export const DEFI_ROUTES = [] export const ROUTES_BY_CATEGORY = [ { diff --git a/src/pages/create-liquidity/index.html.ts b/src/pages/create-liquidity/index.html.ts index 66357fbd..aa84ffe3 100644 --- a/src/pages/create-liquidity/index.html.ts +++ b/src/pages/create-liquidity/index.html.ts @@ -3,24 +3,17 @@ export const version = "0.8.20" export const title = "Create Liquidity" export const description = "Providing Liquidity to a Uniswap V4 Pool" -export const keywords = [ - "liquidity", - "LP", - "lp", - "provide", - "provision", - "supply", -] +export const keywords = ["liquidity", "LP", "lp", "provide", "provision", "supply"] export const codes = [ - { - fileName: "CreateLiquidity.sol", - code: "Ly8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IE1JVApwcmFnbWEgc29saWRpdHkgXjAuOC4yMDsKCmltcG9ydCB7SVBvb2xNYW5hZ2VyfSBmcm9tICJAdW5pc3dhcC92NC1jb3JlL2NvbnRyYWN0cy9pbnRlcmZhY2VzL0lQb29sTWFuYWdlci5zb2wiOwppbXBvcnQge1Bvb2xLZXl9IGZyb20gIkB1bmlzd2FwL3Y0LWNvcmUvY29udHJhY3RzL3R5cGVzL1Bvb2xLZXkuc29sIjsKaW1wb3J0IHtQb29sTW9kaWZ5UG9zaXRpb25UZXN0fSBmcm9tICJAdW5pc3dhcC92NC1jb3JlL2NvbnRyYWN0cy90ZXN0L1Bvb2xNb2RpZnlQb3NpdGlvblRlc3Quc29sIjsKCmNvbnRyYWN0IENyZWF0ZUxpcXVpZGl0eSB7CiAgICAvLyBzZXQgdGhlIHJvdXRlciBhZGRyZXNzCiAgICBQb29sTW9kaWZ5UG9zaXRpb25UZXN0IGxwUm91dGVyID0gUG9vbE1vZGlmeVBvc2l0aW9uVGVzdCgweDAxKTsKCiAgICBmdW5jdGlvbiBjcmVhdGVMaXF1aWRpdHkoCiAgICAgICAgUG9vbEtleSBtZW1vcnkgcG9vbEtleSwKICAgICAgICBpbnQyNCB0aWNrTG93ZXIsCiAgICAgICAgaW50MjQgdGlja1VwcGVyLAogICAgICAgIGludDI1NiBsaXF1aWRpdHksCiAgICAgICAgYnl0ZXMgY2FsbGRhdGEgaG9va0RhdGEKICAgICkgZXh0ZXJuYWwgewogICAgICAgIC8vIGlmIDAgPCBsaXF1aWRpdHk6IGFkZCBsaXF1aWRpdHkgLS0gb3RoZXJ3aXNlIHJlbW92ZSBsaXF1aW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m91dGVyID0gUG9vbE1vZGlmeVBvc2l0aW9uVGVzdCgweDAxKTsKCiAgICBmdW5jdGlvbiBjcmVhdGVMaXF1aWRpdHkoCiAgICAgICAgUG9vbEtleSBtZW1vcnkgcG9vbEtleSwKICAgICAgICBpbnQyNCB0aWNrTG93ZXIsCiAgICAgICAgaW50MjQgdGlja1VwcGVyLAogICAgICAgIGludDI1NiBsaXF1aWRpdHksCiAgICAgICAgYnl0ZXMgY2FsbGRhdGEgaG9va0RhdGEKICAgICkgZXh0ZXJuYWwgewogICAgICAgIC8vIGlmIDAgPCBsaXF1aWRpdHk6IGFkZCBsaXF1aWRpdHkgLS0gb3RoZXJ3aXNlIHJlbW92ZSBsaXF1aWRpdHkKICAgICAgICBscFJvdXRlci5tb2RpZnlQb3NpdGlvbigKICAgICAgICAgICAgcG9vbEtleSwKICAgICAgICAgICAgSVBvb2xNYW5hZ2VyLk1vZGlmeVBvc2l0aW9uUGFyYW1zKHt0aWNrTG93ZXI6IHRpY2tMb3dlciwgdGlja1VwcGVyOiB0aWNrVXBwZXIsIGxpcXVpZGl0eURlbHRhOiBsaXF1aWRpdHl9KSwKICAgICAgICAgICAgaG9va0RhdGEKICAgICAgICApOwogICAgfQp9Cg==", + }, + { + fileName: "CreateLiquidityExampleInputs.sol", + code: "aW1wb3J0IHtQb29sTW9kaWZ5UG9zaXRpb25UZXN0fSBmcm9tICJAdW5pc3dhcC92NC1jb3JlL2NvbnRyYWN0cy90ZXN0L1Bvb2xNb2RpZnlQb3NpdGlvblRlc3Quc29sIjsKClBvb2xNb2RpZnlQb3NpdGlvblRlc3QgbHBSb3V0ZXIgPSBQb29sTW9kaWZ5UG9zaXRpb25UZXN0KDB4MDEpOwphZGRyZXNzIHRva2VuMCA9IGFkZHJlc3MoMHgxMSk7CmFkZHJlc3MgdG9rZW4xID0gYWRkcmVzcygweDIyKTsKYWRkcmVzcyBob29rQWRkcmVzcyA9IGFkZHJlc3MoMHg4MCk7CgovLyBQb29sIHRoYXQgd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