Skip to content

Commit

Permalink
Merge pull request #50 from thepeanutgalleryandco/v-1-7-3
Browse files Browse the repository at this point in the history
Opensea Sell NFTs Added Metamask Account Number
  • Loading branch information
thepeanutgalleryandco committed Apr 5, 2022
2 parents 12e2c1b + 8325bf8 commit 27fe394
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ If you would like to support my NFT collection, please take a look at the below.


### Added Opensea Selling Script
Added a new script `utils/opensea/sell_nfts.js` that will allow users to sell NFTs between two edition numbers (inclusive) to be put up for sale if the user owns the NFTs. This functionality uses Puppeteer and Chainsafe's Dappeteer, so please use at your own discretion as you will need to make use of your seed phrase for this functionality to work. [Feature - Opensea Polygon Script To Auto Sell NFTs](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/42) and [Feature - Opensea Polygon Script To Auto Sell NFTs Additional Fields](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/47)
Added a new script `utils/opensea/sell_nfts.js` that will allow users to sell NFTs between two edition numbers (inclusive) to be put up for sale if the user owns the NFTs. This functionality uses Puppeteer and Chainsafe's Dappeteer, so please use at your own discretion as you will need to make use of your seed phrase for this functionality to work. [Feature - Opensea Polygon Script To Auto Sell NFTs](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/42), [Feature - Opensea Polygon Script To Auto Sell NFTs Additional Fields](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/47) and [Feature - Opensea Polygon Script To Auto Sell NFTs Added Metamask Account Number](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/49)


### Added Start Collection Edition Setting
Expand Down Expand Up @@ -508,11 +508,11 @@ Use the `Opensea - Refresh_Metadata Command` below to start the refresh of meta


### 18. Sell NFTS On Opensea
Go to the utils/opensea/sell_nfts.js file and update the `START_EDITION`, `END_EDITION`, `NFT_PRICE`, `DROPDOWN_OPTION`, `DATE_PICK_SKIP`, `START_HOUR`, `START_MINUTE`, `END_HOUR`, `END_MINUTE` and potentially `seed` fields. Please make sure that the contract address that you are trying sell NFTs for has been set in the `contract_address` field in the `constants/account_details.js` file as well as that the `chain` value is correct for the specific contract address.
Go to the utils/opensea/sell_nfts.js file and update the `START_EDITION`, `END_EDITION`, `NFT_PRICE`, `DROPDOWN_OPTION`, `DATE_PICK_SKIP`, `START_HOUR`, `START_MINUTE`, `END_HOUR`, `END_MINUTE` fields. Optionally, users can also update the `METAMASK_ACCOUNT_NUMBER` and `seed` fields. Please make sure that the contract address that you are trying sell NFTs for has been set in the `contract_address` field in the `constants/account_details.js` file (also ensure that your `METAMASK_ACCOUNT_NUMBER` is mapped correctly to the `contract_address` value on your Metamask dropdown list) as well as that the `chain` value is correct for the specific contract address.

Use the `Opensea - Sell_Nfts Command` below to start the putting each NFT edition up for sale between your start and end editions for the given price.

[Feature - Opensea Polygon Script To Auto Sell NFTs](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/42) and [Feature - Opensea Polygon Script To Auto Sell NFTs Additional Fields](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/47)
[Feature - Opensea Polygon Script To Auto Sell NFTs](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/42), [Feature - Opensea Polygon Script To Auto Sell NFTs Additional Fields](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/47) and [Feature - Opensea Polygon Script To Auto Sell NFTs Added Metamask Account Number](https://github.com/thepeanutgalleryandco/create-and-mint-nft-collection/issues/49)

**Please read the warning very carefully within the the sell_nfts.js file with regards to the seed field.**
**Please note that this script will only work with the Polygon network**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-and-mint-nft-collection",
"version": "1.7.2",
"version": "1.7.3",
"description": "Source code to create and mint generative art via NFTPort API. Special thanks to codeSTACKr and Hashlips for their source codebase.",
"main": "index.js",
"bin": "index.js",
Expand Down
7 changes: 7 additions & 0 deletions utils/opensea/sell_nfts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const START_HOUR = 18; // Set the start hour for the sale.
const START_MINUTE = 00; // Set the start minute for the sale.
const END_HOUR = 23; // Set the end hour for the sale.
const END_MINUTE = 59; // Set the end minute for the sale.
const METAMASK_ACCOUNT_NUMBER = 1; // Set the account to be used from your metamask wallet list.

let COLLECTION_BASE_URL = '';

Expand Down Expand Up @@ -84,6 +85,12 @@ async function main() {
COLLECTION_BASE_URL = "https://opensea.io/assets" ;
}

// Switch to specific account on Metamask seed
if (METAMASK_ACCOUNT_NUMBER != 0 && METAMASK_ACCOUNT_NUMBER != 1) {
metamask.switchAccount(METAMASK_ACCOUNT_NUMBER);
console.log(`Updated Metamask account number to ${METAMASK_ACCOUNT_NUMBER}`);
}

// Set your collection URL. The contract address from the account_details.js file will be used.
COLLECTION_BASE_URL = `${COLLECTION_BASE_URL}/${ACCOUNT_DETAILS.contract_address}/` ;

Expand Down

0 comments on commit 27fe394

Please sign in to comment.