Giter Club home page Giter Club logo

bidding-bot-demo's Introduction

Bidding Bot Demo

Learn how to post a collection offer on OpenSea!

Local development

Setup node (optional)

nvm install

Install dependencies

yarn

Configure Environment Variables

These are the environment variables used in this bidding bot. Add them to .env in this directory and they'll get sourced automatically.

WALLET_PRIVATE_KEY - The private key of the wallet you want to use to make the offer. Set it according to the instructions in yarn create-wallet

API_KEY - Your OpenSea API key. Get one here. This is only required for mainnet.

NETWORK - The network you want to use. Either mainnet or testnets. Use testnets for testing, and mainnet for real offers.

The following environment variables are network specific, and should be prefixed with MAINNET_ or TESTNETS_ depending on the network you're using.

{network}_RPC_URL - The RPC URL. You can get this by signing up with e.g. Alchemy.

{network}_COLLECTION_SLUG - The slug of the collection you want to make an offer on.

{network}_ITEM_ASSET_CONTRACT_ADDRESS - The asset contract address of the item you want to make an offer on.

{network}_ITEM_TOKEN_IDENTIFIER - The token identifier of the item you want to make an offer on.

Create a Wallet

Follow the steps from the command below to create a new wallet and add the private key to a .env file in this directory.

yarn create-wallet

Make Offers

Adjust the values in biddingBot.ts to make an offer on a collection and an individual item. Then run the following command to make the offers.

yarn bidding-bot

Demo Fulfillment

To see how to fulfill an offer, run the following command with the order hash of the offer you want to fulfill and the address you would fulfill it from. If you're fulfilling a criteria offer, you also need to pass in the contract address and token ID of the NFT you're trying to fulfill with.

yarn demo-fulfillment {order_hash} {from_address} [{contract_address} {token_id}]

To actually fulfill the offer, check out the _fulfillTransaction function in fulfillOffer.ts.

bidding-bot-demo's People

Contributors

montasaurus avatar ryanio avatar dependabot[bot] 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.