welcome to hello world docs



Abstract

This whitepaper describes hello world, an AI-powered NFT game and social experiment centered around the way we experience, share and interact with the news and the world around us.

In a world where news organizations compete for ad revenue with clickbait, half-truths and bias, polarizing viewers to breed brand loyalty, hello world primes a fresh, blank canvas for users to write the stories themselves.

On-chain and censorship resistant, on hello world you own what you say.

Hello world, hello free speech.




Abstract

This whitepaper describes hello world, an AI-powered NFT game and social experiment centered around the way we experience, share and interact with the news and the world around us.

In a world where news organizations compete for ad revenue with clickbait, half-truths and bias, polarizing viewers to breed brand loyalty, hello world primes a fresh, blank canvas for users to write the stories themselves.

On-chain and censorship resistant, on hello world you own what you say.

Hello world, hello free speech.




Background

NFTs were first described, in principle if not by name, in Meni Rosenfeld’s 2012 “Overview of Colored Coins.” The paper described a protocol built atop Bitcoin that enabled the marking, or "coloring" of coins, for the purpose of establishing ownership or represent some real-world asset. 1

The concept evolved over the next four years, mostly on early altcoin protocols Namecoin and Counterparty, before the definitive NFT implementation was made on Ethereum in 2017, and the modern era of NFTs was ushered in. 2

The first two Ethereum NFT series were deployed in 2017, CryptoPunks in June 3 and CryptoKitties in October. 4 Both were received well by the market, with sales figures briefly capturing mainstream news headlines. 5 But the hype was short lived. As the 2017 crypto bull market turned into the 2018 bear, the buzz around crypto collectibles all but faded.

While potential use-cases for NFTs expanded over the next few years, it wasn’t until 2021 that NFTs began to show true staying power as digital collectables. In 2021, NFT markets flourished. Aggregate NFT trading volume saw a more than 30,000% increase from 2020 year-over-year, from $82 million in 2020 to $25.1 billion in 2021. In 2022, despite mixed market conditions and sentiment, total organic NFT trading volume ended the year nearly even with 2021, with $24.7 billion in total. 6

Social media giants began their entry into NFTs in 2021 and 2022, however confused their approaches sometimes seemed. In June of 2021, Twitter released a set of seven limited-edition Ethereum-based NFTs depicting various Twitter symbols, memes, and then-CEO Jack Dorsey’s first tweet. 7 Reddit entered the NFT arena in June of 2021 with the auction of three Ethereum NFTs featuring its mascot “Snoo.” 8 In May of 2022 Instagram launched a large-scale digital collectibles initiative to “Support Creators and Collectors in Showcasing their NFTs on Instagram.” 9

While the social media giants of yesterday scramble to latch onto the NFT hype in some relevant way, we present a platform built around NFTs, where NFTs are native, and where you own what you say.






The hello world Platform

The hello world platform is native on both Ethereum and Polygon, leveraging each protocol’s strongpoints seamlessly.




Ethereum

NEWS is hello world’s native ERC-20 token, issued on Ethereum, where the vast majority of liquidity exists and the vast majority of trading activity occurs.


//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-20[ERC20] Fungible Token Standard
 *
 */
contract News is ERC20 {
    constructor() ERC20("hello world", "NEWS") {
        _mint(msg.sender, 1e27);
    }
}




Polygon

HEADLINE and COMMENT NFTs are hello world’s two ERC-721 tokens, issued on Polygon’s PoS sidechain, the most widely used Ethereum scaling ecosystem.

Polygon PoS offers EVM-compatibility and a superior user experience compared to Ethereum, with faster transactions and near-zero gas fees.

HEADLINE and COMMENT NFTs can be traded on any of the number of NFT marketplaces that support Polygon, and can be bridged to Ethereum via Polygon’s trustless two-way bridge and listed on any Ethereum NFT marketplace. 1

ERC721 HEADLINE Contract

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension and the ERC721Enumerable extension and ERC721URIStorage extension.
 *
 */
contract Headline is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIds;

    constructor() ERC721("Helloworld.news", "HEADLINE") {}

    /**
     * @dev List all tokens owned by a single user
     *
     *
     */

    function tokensOfOwner(address _owner) external view returns (uint256[] memory) {
        uint256 tokenCount = balanceOf(_owner);
        if (tokenCount == 0) {
            // Return an empty array
            return new uint256[](0);
        } else {
            uint256[] memory result = new uint256[](tokenCount);
            uint256 index;
            for (index = 0; index < tokenCount; index++) {
                result[index] = tokenOfOwnerByIndex(_owner, index);
            }
            return result;
        }
    }

    /**
     * @dev Mint a new headline to a user
     *
     * Requirements:
     *
     * - Caller must be owner.
     *
     *
     */

    function newHeadline(address _owner, string memory Info) public onlyOwner returns (uint256) {
        _tokenIds.increment();

        uint256 newId = _tokenIds.current();
        _mint(_owner, newId);
        _setTokenURI(newId, Info);

        return newId;
    }

    // The following functions are overrides required by Solidity.

    function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
        internal
        override(ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

ERC721 COMMENT Contract

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension and the ERC721Enumerable extension and ERC721URIStorage extension.
 *
 */
contract CommentNFT is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIds;

    constructor() ERC721("Helloworld.news", "Comment") {}

    /**
     * @dev List all tokens owned by a single user
     *
     *
     */

    function tokensOfOwner(address _owner) external view returns (uint256[] memory) {
        uint256 tokenCount = balanceOf(_owner);
        if (tokenCount == 0) {
            // Return an empty array
            return new uint256[](0);
        } else {
            uint256[] memory result = new uint256[](tokenCount);
            uint256 index;
            for (index = 0; index < tokenCount; index++) {
                result[index] = tokenOfOwnerByIndex(_owner, index);
            }
            return result;
        }
    }

    /**
     * @dev Mint a new headline to a user
     *
     * Requirements:
     *
     * - Caller must be owner.
     *
     *
     */

    function newComment(address _owner, string memory Info) public onlyOwner returns (uint256) {
        _tokenIds.increment();

        uint256 newId = _tokenIds.current();
        _mint(_owner, newId);
        _setTokenURI(newId, Info);

        return newId;
    }

    // The following functions are overrides required by Solidity.

    function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
        internal
        override(ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

newsMaker Contract

The newsMaker contract handles various functions for the hello world dApp.

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./headline.sol";
import "./commentNFT.sol";

/**
 * @dev newsMaker vault for managing the discussions.
 *
 */
contract newsMaker is AccessControl {
    using Counters for Counters.Counter;

    bytes32 public constant MINTER_ROLE = keccak256("can_mint");
    bytes32 public constant CREDIT_ROLE = keccak256("can_credit");
    Headline public headline;
    CommentNFT public commentNFT;
    uint256 public maxAmount;
    Counters.Counter private _commentIds;

    struct Discussion {
        uint256 expiry;
        uint256 outcome;
        uint256 maxUpdoot;
    }

    struct Comment {
        address owner;
        string opinion;
        uint256 discussion;
    }

    mapping(uint256 => Discussion) public discussions;
    mapping(uint256 => uint256) public updoots;
    mapping(uint256 => Comment) public comments;
    mapping(address => uint256) public credits;

    event Commented(uint256 indexed id, uint256 indexed commentId);
    event discussionStarted(uint256 indexed id, uint256 _expiry);

    /**
     * @dev Initializes the contract by setting the `headline` and the `comment` contract addresses.
     */
    constructor(address _headline, address _comment) {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, msg.sender);
        _setupRole(CREDIT_ROLE, msg.sender);
        headline = Headline(_headline);
        commentNFT = CommentNFT(_comment);
    }

    function grantCredit(address user, uint256 amount) public onlyRole(CREDIT_ROLE) {
        credits[user] += amount;
    }

    function startDiscussion(string memory _uri, uint256 _expiry) public onlyRole(MINTER_ROLE) {
        uint256 id = headline.newHeadline(address(this), _uri);
        discussions[id] = Discussion(_expiry, 0, 0);
        emit discussionStarted(id, _expiry);
    }

    function addComment(uint256 _discussion, string memory _opinion) public returns (uint256 _commentId) {
        Discussion memory d = discussions[_discussion];
        require(d.expiry > block.timestamp, "commentining isn't allowed");
        _commentIds.increment();

        comments[_commentIds.current()] = Comment(msg.sender, _opinion, _discussion);
        emit Commented(_discussion, _commentIds.current());
        _commentId = _commentIds.current();
    }

    function mintComment(uint256 _discussion) public {
        Discussion memory d = discussions[_discussion];
        Comment memory c = comments[d.maxUpdoot];
        require(msg.sender == c.owner, "can't mint a comment that isn't yours");
        commentNFT.newComment(c.owner, c.opinion);
    }

    function updootComment(uint256 _comment, uint256 amount) public {
        require(credits[msg.sender] >= amount, "not enought credits");
        Comment storage c = comments[_comment];
        Discussion storage d = discussions[c.discussion];
        require(d.expiry > block.timestamp, "discussion has ended");
        updoots[_comment] += amount;
        if (updoots[_comment] > updoots[d.maxUpdoot]) {
            d.maxUpdoot = _comment;
        }
        credits[msg.sender] -= amount;
    }
}







The hello world dApp

The hello world dApp leverages two of the world's most advanced large language models (LLMs) to generate the headlines and images minted on HEADLINE NFTs, as well as the images minted on COMMENT NFTs if the user chooses to use an AI-generated image.







GPT

HEADLINE NFT text content is generated using OpenAI’s Generative Pre-trained Transformer (GPT), a multimodal large language model (LLM) trained using large text data sets and fine-tuned with reinforcement learning from human and AI feedback, and has the ability to generate novel, human-like content. 1

Once a day, hello world’s GPT agent retrieves and processes headlines from a vast number of world news sources, then generates ten unique headlines to be minted as HEADLINE NFTs.





Stable Diffusion

HEADLINE NFT images and COMMENT NFT images (when applicable) are generated using Stable Diffusion, a deep learning, text-to-image latent diffusion model developed by Stability AI, which has the ability to generate detailed images conditioned on text descriptions. 1

An image is generated from each headline prompt and minted onto the headline NFT.

Additionally, when a user mints a COMMENT NFT they have the option to either use their own image, or use an image generated by the AI from a text prompt containing their comment.







The hello world User Experience

The hello world user experience is simple and intuitive for any user, with a familiar imageboard layout and Web3 integration.

If you’ve posted on 4chan and used MetaMask, interacting with the hello world dApp is second nature.

Users can view the day’s headlines, each a HEADLINE NFT and AI-generated thumbnail, on the dApp’s main page.

To view the COMMENTs minted on a headline, simply click the headline and view the thread.

There are initially two ways users can interact with a thread, by minting a COMMENT and by upvoting a COMMENT. Both interactions require the user to burn NEWS tokens.




Minting a COMMENT

Minting a COMMENT NFT costs 10 NEWS. All NEWS tokens spent using the dApp are burned on-chain.

To reply on a thread and mint a COMMENT NFT, make sure your Web3 wallet is connected, then click Comment and enter your reply.

Users have the option to add a post image of their choice, have the AI generate an image from their text, or post the comment with no image.

When you’re satisfied with your post, click Mint Comment and approve the mint transaction in your Web3 wallet. COMMENT NFTs are minted to the commenter’s address, and are owned by the commenter. They are transferable, and can be listed on any NFT marketplace that supports Polygon or Ethereum NFTs. 1







Upvoting a COMMENT

Upvotes cost 1 NEWS per upvote. All NEWS tokens spent using the dApp are burned on-chain. Users can upvote any comment they like, whether another user’s or their own.

The COMMENT on each HEADLINE that has the most upvotes at the end of each 24-hour period is awarded the HEADLINE NFT the COMMENT was minted on.

HEADLINE NFTs are unique, 1-of-1, AI-generated real-world international news headlines. Each HEADLINE NFT contains a unique AI-generated image which, unlike most NFTs, is contained on the NFT and stored on the blockchain.

HEADLINE NFTs are transferable, and can be listed on any NFT marketplace that supports Polygon or Ethereum NFTs. 1







NEWS Tokenomics

The total (max) supply is 1 billion NEWS.

The NEWS token contract is renounced by default, it has no owner or admin role.




Links


Website   | helloworld.news


Twitter   | twitter.com/helloWorldNft


Threads   | threads.net/@helloworlddotnews


Telegram  | t.me/helloWorldNft


GitHub    | github.com/helloWorldNft


Contact   | [email protected]



Brand Assets

NEWS Token Icon

Colors

Jordy Blue: #9494ff
Yankees Blue: #112840


Toolbox: #6970c2
Cadet Blue: #b2bac2

Usage Guidelines

Use as you please mmkay.