Giter VIP home page Giter VIP logo

random_trade's Introduction

Random Trade Project

This Project

  • finds the top 5 trending tokens in the last hour via airstack
  • generates a on-chain swap for the 5 tokens
  • submits user entropy (uint256) and the 5 trades to a randomTrade gateway smart contract
  • shuffles the trade and pick 1 to execute
  • forwards funds to the msg.sender and emits the event
set .env
PK=<PRIVATE_KEY_WITH_GT_10_000_000_USDC_ON_BASE>
AIRSTACK_API_KEY=<>

npx hardhat test 

#only test e2e:

npx hardhat test --grep "random token swap"

npx hardhat ignition deploy ./ignition/modules/Lock.ts

#deploy to base 

npx hardhat ignition deploy ./ignition/modules/RandomeTrade.ts --network base

Extension

  • make this a lootbox framework; you need to have collected x points via erc20 and we send 1_000_000 usdc of shitcoin to your address
  • the cost to collect the x points >>> 1USDC

random_trade's People

Contributors

amit-shah-cb 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.