GithubHelp home page GithubHelp logo

philogy / curta-golf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from waterfall-mkt/curta-golf

2.0 1.0 0.0 114 KB

A king-of-the-hill style competition, where players optimize gas challenges.

Home Page: https://curta.wtf?tab=golf

License: MIT License

Solidity 100.00%

curta-golf's Introduction

Curta Golf

Website - Docs - Twitter

A king-of-the-hill style competition, where players optimize gas challenges.

The goal of players is to view Courses (challenges) and try to implement the most optimized solution for it. If the solution is valid, a Par Token with the corresponding metadata will be minted to their address. If it's the most efficient, they will be crowned the "King," and King NFT will be transferred to them.

Deployments

Chain Chain ID Contract Deploy
Base 8453 CurtaGolf 0xb8d97B24935C70cD931bbc6150e2596570997cE9
Par 0x6B780314f95452E37D88A2F950Bbd3885851fD10
PurityChecker 0xE03Bbdb59444581f54f6823F0091FdF738E3Ce62

Usage

This project uses Foundry as its development/testing framework.

Installation

First, make sure you have Foundry installed. Then, run the following commands to clone the repo and install its dependencies:

git clone https://github.com/waterfall-mkt/curta-golf.git
cd curta-golf
forge install

Testing

To run tests, run the following command:

forge test

To test the metadata output for King and Art, run the following commands:

forge script script/metadata/PrintKingArt.s.sol:PrintKingArtScript --via-ir -vvv
forge script script/metadata/PrintPartArt.s.sol:PrintPartArtScript --via-ir -vvv

Coverage

To view coverage, run the following command:

forge coverage

To generate a report, run the following command:

forge coverage --report lcov

Note

It may be helpful to use an extension like Coverage Gutters to display the coverage over the code.

Deploying

There are three core contracts that get deployed in Deploy.s.sol: PurityChecker.sol, Par.sol, and CurtaGolf.sol. We also make use of three external libraries. These are: Perlin.sol, ParArt.sol, and KingArt.sol. Perlin.sol is used by KingArt.sol, which is used by KingERC721.sol, which is inherited by CurtaGolf.sol, and ParArt.sol is used by Par.sol. We include these in foundry.toml if we don't want them to be deployed alongside the contracts that use them. Otherwise, as an example, Perlin.sol and KingArt.sol would be deployed alongside CurtaGolf.sol.

A standard example for deploying everything would look like this:

forge script script/Deploy.s.sol:Deploy \
--rpc-url <rpc_url> \
--sender <sender> \
--account <account> \
--broadcast

If libraries have already been deployed we would do:

forge script script/Deploy.s.sol:Deploy \
--rpc-url <rpc_url> \
--sender <sender> \
--account <account> \
--broadcast \
--libraries src/utils/Perlin.sol:Perlin:<address> \
--libraries src/utils/metadata/KingArt.sol:KingArt:<address> \
--libraries src/utils/metadata/ParArt.sol:ParArt:<address>

Note

When using forge verify-contract to verify a contract on a contract with libraries, the --libraries arg needs to be supplied in the form --libraries <remapped path to lib>:<library name>:<address>.

Acknowledgements

curta-golf's People

Contributors

fiveoutofnine avatar sabnock01 avatar philogy avatar

Stargazers

Bakuchi avatar malik 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.