Coder Social home page Coder Social logo

idea-block's Introduction

IdeaBlock ๐Ÿ’ก๐ŸงŠ

IdeaBlock is an NFT contract which implements a single-block open mint for idea NFTs. mint is open during the block that the contract is deployed - the Idea Block. Only original ideas can be minted.

This idea is part of Idea Guy Summer.

Submitting Ideas ๐Ÿ’ก

to participate in the IdeaBlock open mint, idea guys must

  • have an idea (hard part)
  • hash the idea & sign it (convenience fn: IdeaBlock.getHash(string idea)
  • submit the idea in plaintext + the r, s, v signature over its hash to Idea Guy DAO
  • Idea Guy DAO will execute the Idea Block (see next section)
  • one idea NFT per idea will be minted to the originating idea guy

Executing the Idea Block ๐ŸงŠ

The Idea Block will be executed as a Flashbots bundle which

  1. deploys the IdeaBlock contract
  2. calls mint for each idea. Using a create2 deploy address, the mint transaction(s) can be constructed beforehand - see script/DeployIdeaBlock.s.sol.
  3. burns any remaining gas in the block to ensure only ideas are contained in the Idea Block.

Throughput

Gas benchmarking suggests deploy costs 892,975 gas and minting an idea of length 17 chars costs 131,949 gas. So, ((30,000,000 - 892,975) / 131,949) = approximately 220 ideas could fit in the Idea Block. As long as we use plaintext ideas, gas costs & throughput will depend on the length of ideas accepted.

Potential Features

  • implement a commit/reveal scheme so folks don't get their ideas stolen. minting with hashes instead of plaintext ideas would also save gas & increase throughput for the Idea Block
  • implement a batched mint to simplify constructing the Idea Block

Repo

Build

$ forge build

Test

$ forge test

Deploy

$ forge script DeployIdeaBlock --sig "run()" --rpc-url <your-rpc-url> --etherscan-api-key <your-etherscan-key> --private-key <your-deployer-key> --broadcast --verify

idea-block's People

Contributors

anna-carroll avatar

Stargazers

evalir 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.