Skip to content

Commit

Permalink
TECH-3629 - Changing chainlog's hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrUA committed Sep 25, 2024
1 parent b9968c9 commit 4ec2cc6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/aws-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- main
- TECH-3629-Chainlog-Prod

name: Deploy to AWS Production (K8s)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ UI and API for MakerDAO’s chainlog contract

## Production environment

* [chainlog.makerdao.com](https://chainlog.makerdao.com)
* [chainlog.makerdao.com/api.html](https://chainlog.makerdao.com/api.html)
* chainlog.makerdao.com/checksum/\<address\>
* [chainlog.sky.money](https://chainlog.sky.money)
* [chainlog.sky.money/api.html](https://chainlog.sky.money/api.html)
* chainlog.sky.money/checksum/\<address\>

## Staging environment

Expand Down
12 changes: 6 additions & 6 deletions api.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<h1>Chainlog historical API</h1>
<h2>Usage</h2>
<h3>Get a list of all available chains and versions</h3>
<pre>GET <a href="https://chainlog.makerdao.com/api/index.json">https://chainlog.makerdao.com/api/index.json</a></pre>
<pre>GET <a href="https://chainlog.sky.money/api/index.json">https://chainlog.sky.money/api/index.json</a></pre>
<h3>Get the active version on a given chain</h3>
<pre>GET https://chainlog.makerdao.com/api/{chain}/active.json</pre>
<pre>GET https://chainlog.sky.money/api/{chain}/active.json</pre>
<h3>Get a specific version on a given chain</h3>
<pre>GET https://chainlog.makerdao.com/api/{chain}/{version}.json</pre>
<pre>GET https://chainlog.sky.money/api/{chain}/{version}.json</pre>
<h2>Code examples</h2>
You can set your JavaScript app to use this API <a href="https://github.com/makerdao/chainlog-ui/blob/main/examples/api.js">in the following way</a>:
<pre>
const url = "https://chainlog.makerdao.com/api/mainnet/active.json";
const url = "https://chainlog.sky.money/api/mainnet/active.json";
const response = await fetch(url);
const chainlog = await response.json();
console.log(chainlog);
Expand Down Expand Up @@ -71,8 +71,8 @@ <h2>Code examples</h2>
The above code has the advantage that it will allow you to retreive historical data as long as you are using an archival node. In order to do that, replace <code>"latest"</code> with a specific block number.
<h2>Available resources in this API</h2>
<pre>
https://chainlog.makerdao.com/api
├── <a href="https://chainlog.makerdao.com/api/index.json">index.json</a>
https://chainlog.sky.money/api
├── <a href="https://chainlog.sky.money/api/index.json">index.json</a>
<div id="canvas"></div>
</pre>
<script>
Expand Down
2 changes: 1 addition & 1 deletion deploy/prod/chainlog-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ serviceAccount:
create: false
ingress:
enabled: true
host: chainlog.makerdao.com
host: chainlog.sky.money
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
podAnnotations:
Expand Down
2 changes: 1 addition & 1 deletion examples/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fetch from "node-fetch";

const main = async () => {
const url = "https://chainlog.makerdao.com/api/mainnet/active.json";
const url = "https://chainlog.sky.money/api/mainnet/active.json";
const response = await fetch(url);
const chainlog = await response.json();
console.log(chainlog);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
linksDiv.append(separator);
const apiLink = document.createElement("a");
apiLink.innerHTML = "historical API";
apiLink.setAttribute("href", "https://chainlog.makerdao.com/api.html");
apiLink.setAttribute("href", "https://chainlog.sky.money/api.html");
apiLink.setAttribute("target", "_blank");
linksDiv.append(apiLink);
document.body.append(linksDiv);
Expand Down

0 comments on commit 4ec2cc6

Please sign in to comment.