Skip to content

Commit

Permalink
Merge pull request #35 from decentldotland/homepage
Browse files Browse the repository at this point in the history
feat: molecule.sh homepage
  • Loading branch information
charmful0x authored Mar 3, 2023
2 parents e173c30 + 2297f3b commit e30b610
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import express from "express";
import cors from "cors";
import assert from "node:assert";
import path from "node:path";
import { fileURLToPath } from "node:url";
import base64url from "base64url";

import { checkSubdomain } from "./utils/resolving.js";
import { getArTxObject } from "./molecules/ar/atoms/tx-gql.js";
Expand All @@ -27,17 +30,23 @@ import { readNearOracleState } from "./molecules/near/atoms/read-contract.js";
import { getEverTxObject } from "./molecules/everpay/atoms/tx.js";
import { getTokenPrice } from "./molecules/redstone/atoms/oracle.js";
import { postExmData } from "./molecules/exm/atoms/bundlr.js";
import base64url from "base64url";

const app = express();
const port = process.env.PORT || 3000;

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

app.use(
cors({
origin: "*",
})
);

app.get("/", (req, res) => {
res.sendFile(path.join(__dirname + "/views/homepage.html"));
});

app.get("/tx-gql/:txid", async (req, res) => {
try {
res.setHeader("Content-Type", "application/json");
Expand Down
159 changes: 159 additions & 0 deletions src/views/homepage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-KVS4HYPPD1"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-KVS4HYPPD1");
</script>
<link rel="stylesheet" href="style.css" />
<link
rel="icon"
type="image/x-icon"
href="https://raw.githubusercontent.com/decentldotland/molecule-web/main/favicon.ico"
/>
<title>
molecule.sh | composable building blocks for EXM smart contracts
</title>
<meta property="og:title" content="molecule.sh" />
<meta
property="og:description"
content="composable building blocks for EXM smart contracts"
/>
<meta
property="og:image"
content="https://raw.githubusercontent.com/decentldotland/molecule/main/img/molecule.svg"
/>
<meta property="og:url" content="https://molecule.sh" />
<style>
body {
// background-color: black;
// color: white;
margin-top: 3em;
}

.subtitle {
text-align: center;
padding: 1em;
}

.header {
text-align: center;
max-width: 100%;
}

.header-img {
}

.structure {
margin: auto;
width: 50%;
margin-bottom: 5em;
}

.hero {
font-family: serif;
font-size: 7em;
line-height: 0.7em;
margin-left: 1em;
}
</style>
</head>
<body>
<div class="header">
<img
class="header-img"
src="https://raw.githubusercontent.com/decentldotland/molecule/main/img/molecule.svg"
/>
</div>
<h3 class="subtitle">composable building blocks for EXM smart contracts</h3>
<h3 class="subtitle">
<a href="https://github.com/decentldotland/molecule/tree/main/examples"
>EXAMPLES</a
>
&nbsp; &nbsp; // &nbsp; &nbsp;
<a href="https://github.com/decentldotland/molecule">GITHUB</a>
</h3>
<br /><br />
<hr />
<div class="structure">
<h3 class="subtitle">tree</h3>
<pre>
molecules/
├── ar/
│ └── tx-gql ~> atom
└── evm/
├── └── signer
└── sol/ ~> molecule
├── └── auth
└── zil/
├── └── zil-auth
├── stx/
│ └── stx-auth
└── substrate/
├── └── substrate-auth
└── trx/
├── └── trx-auth
└── icp/
├── └── icp-auth
└── ton/
├── └── ton-auth/
└── massa/
├── └── massa-auth
└── fuel/
├── └── fuel-auth
└── tez/
├── └── tez-auth
└── aptos/
└── └── aptos-auth/
└── nostr/
└── nostr-auth
└── exm/
└── └── exm-bundlr
└── near/
└── └── n-view-state/
└── ever/
├── └── tx
└── redstone/
└── └── price
└── ark/
├── ├── resolve
├── └── state
│ └── soark/domain
└── ai/
└── └── chatgpt
└── └── gpt3</pre
>
<h3 class="subtitle">abstract</h3>
<p>
molecule.sh is a developer tooling library and API for EXM alchemists.
Built on top of the `deterministicFetch` EXM feature, molecule.sh is
composed of reusable components to facilitate writing EXM functions.
</p>
<p>
Like OpenZeppelin on Ethereum, molecule.sh aims to prevent EXM
developers from reinventing the wheel by packaging common operations as
importable functions.
</p>
<p>
molecule.sh is exposed to EXM functions via npm:
<code>npm i -g @execution-machine/sdk</code>
</p>

<h3 class="subtitle">releases</h3>
<p>
<a href="https://github.com/decentldotland/molecule/releases/tag/v0.2.4"
>v0.2.4</a
>
</p>
</div>
</body>
</html>

0 comments on commit e30b610

Please sign in to comment.