GithubHelp home page GithubHelp logo

ygtdmn / safe-havens Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8 KB

Safe Havens is a conceptual blockchain art project created on Bitcoin Ordinals and distributed via Bitcoin Runes.

Home Page: https://ygtdmn.github.io/safe-havens/

License: MIT License

HTML 100.00%

safe-havens's Introduction

Safe Havens - An Apocalypse Checker

Safe Havens is a conceptual blockchain art project created on Bitcoin Ordinals and distributed via Bitcoin Runes.

The Concept

Safe Havens is an HTML program that checks the availability of 20 websites deemed *very safe* in terms of longevity by GPT-4.

If all of these websites fails to connect, the program returns with the following message:

> APOCALYPSE

> Nothing really ever mattered.

> Your existence is
> as unimportant as always.

Output when all the websites are unavailable

If any of the safe havens are still available, the program redirects the viewer into the website.

Output when any of the websites are available

How Does It Work?

Safe Havens is a very simple HTML program that uses JavaScript to fetch website availability.

First 57 lines of Safe Havens

It starts by shuffling the domain array so that the program can test a different domain on each run. After that, when the content is loaded, it checks Safe Havens one by one.

Each check consists of a simple fetch call with no-cors mode and a 3-second timeout. If the call is successful, the program redirects the viewer to the checked website, if the call is failed, the program tries to check the next website in the domains array. If all calls fail, the program returns the apocalypse message.

GPT-4 Conversation

GPT-4 is famous for its shallow answers and the question of “What are some websites that would still be reachable after 100 years?” is a very superficial one. So I used GPT-4 as a a common knowledge hub to get an answer without adding any personal bias.

The Conversation I had with ChatGPT

Use of Bitcoin Ordinals and Runes

Safe Havens is stored on Bitcoin as an inscription via the Ordinals protocol. This is because the artwork needs to stand the test of time to do its job. And since Bitcoin is seen as the safest haven in the universe (at least by me), I chose to store the art on Bitcoin.

As a distribution method, I chose Bitcoin Runes, a new experimental protocol on Bitcoin that can act as fungible tokens, or as semi-fungible tokens as the way used in this project.

Use of Runes

Bitcoin Runes has a few launch parameters that make this artwork use Runes as a distribution mechanism.

Name: The name of the Runestone has been set as ALL•YOUR•SAFE•HAVENS.

The names can be between 12 and 26 characters at the time of writing. As more time goes by, runes with fewer characters can be etched/deployed.

Divisibility: This is the most important parameter since setting it to 0 makes the token actually Semi-Fungible. This way, the token acts similarly to a single ERC-1155 token of Ethereum.

Premine: This setting allocates a certain amount of tokens to the deployer. It is set to 0, which means no artist allocation (although it doesn’t mean I won’t mint some after launch 👀)

Terms:
- Amount: Set to 1 to make sure everyone can mint one token per transaction.
- Cap: Set to 100 to make sure a total of 100 tokens can be minted, ever.
- Height: Set as “843630, 8436300” to make the token start minting at block 843630 and end minting at 8436300.

Symbol: Each rune comes with a symbol parameter. This sets how the amounts of tokens should be displayed.

For Safe Havens, the symbol is set as: 🧿. This is the symbol of the Nazar amulet. It is known to give protection from the evil eye. It is a symbolic choice to protect our Safe Havens from the evil eye.

The project started as an experiment to leave a mark on this shiny new protocol that its future and longevity are very much unknown. A small mark beside thousands of meme coins and highly speculative, degenerate plays.

Some Early Rumblings about "Art on Runes" in Pushers Discord

Future-Proofness

The artwork speculates to exist even after 100 years. Because of this, the code has been created as simply and as understandable as possible. Safe Havens consists of 188 lines of code, a mix of HTML, CSS, and JavaScript languages.

JavaScript-less-ness:

It seems like a stretch but Safe Havens is prepared for a future where there is no default support for JavaScript. Browsers with JavaScript disabled will see the below error:

Safe Havens on a JavaScript disabled browser

HTML-less-ness:

If we go even further, we can think about a future with no HTML support. To be prepared for that case, the first 7 lines of the code come with the following explanation:

The first 7 lines of Safe Havens

One step further might be the absence of the Ordinals protocol or Bitcoin itself. In that case, the only hope for Safe Havens is the hope of a hard disk being found in the ruins of its used-to-be location.

Getting Rugged by Content Security Policy

Safe Havens can’t be properly experienced using the official Ordinals website since the ord client adds a safety feature to its server called Content Security Policy.

This basically prevents any call outside of the server and results in every Safe Haven being seen as down.

However, ord client is only a way of displaying inscription on Bitcoin Ordinals protocol. You can properly experience Safe Havens on its GitHub Page or by running the program on your computer.

How to Mint?

You can mint a token by spinning up your own Bitcoin node and installing Ord client or use third-party tools such as Luminex and OrdinalsBot to mint easily.

Mint will start at block 843630, approximately around May 14th, 2024. There is no mint price (free mint) as it’s not a thing on Bitcoin Runes.

Trading runes is a highly speculative and most likely dangerous game. If you are planning to mint, please wait for gas to be lower to not spend any unnecessary fees to miners.

Final Words

Even though people have been creating art on Bitcoin for years, after the launch of the Ordinals protocol, Bitcoin saw a huge surge of artists creating on it. I also created a small collection on the first week of Ordinals called BitGrids.

It’s amazing to see Bitcoin, the biggest decentralized public ledger continues to give more opportunities to create and host art.

Until next time,

Yigit

safe-havens's People

Contributors

ygtdmn avatar

Stargazers

Arda Günsüren avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.