Code Monkey home page Code Monkey logo

ethereum-nft-sales-bot's Introduction

GitHub contributors CI CodeQL Release npm


Logo

Ethereum NFT

Ethereum NFT sale events monitoring SDK with built-in Discord and Twitter notification.



Table of Contents

Click to expand
  1. Getting Started
  2. Usage
  3. Built-in Notification
  4. Market Coverage
  5. Live Demo
  6. Unsupported Features
  7. Contributing
  8. Contact
  9. Collections
  10. License

Getting Started

Installation

npm install enft

Prerequisites

  • Support Node.js version >= 18
  • Alchemy API Key - apply here (Recommended)
  • OR
  • Infura NFT (Open Beta) API Key and API Key Secret - apply here
  • fontconfig is also required for generating image with text. If your system doesn't have it, please install it first.

Ubuntu/Debian:

sudo apt-get install fontconfig

Fedora/RHEL/CentOS:

sudo yum install fontconfig

Arch Linux:

sudo pacman -S fontconfig

MacOS (Homebrew):

brew install fontconfig

Windows (Chocolatey):

choco install fontconfig

Optional

  • Etherscan API Key for enabling ETH to USD conversion - apply here

(back to top)

Usage

Subscribe to NFT sales events by calling onItemSold method.

import { Auth, ENFT } from 'enft';

const auth = new Auth({
    alchemy: {
        apiKey: 'YOUR_ALCHEMY_API_KEY'
    }
});

const enft = new ENFT(auth);

enft.onItemSold({
    contractAddress: 'NFT_CONTRACT_ADDRESS',
    discordWebhook: 'DISCORD_WEBHOOK_URL', // optional
    etherscanApiKey: 'ETHERSCAN_API_KEY' // optional
});

To debug a specific transaction, call debugTransaction method.

enft.debugTransaction(
    {
        transactionHash: 'THE_TRANSACTION_HASH_TO_DEBUG',
        contractAddress: 'NFT_CONTRACT_ADDRESS',
        discordWebhook: 'DISCORD_WEBHOOK_URL' // optional
    },
    (txData) => {
        console.log(txData);
    }
);

For more concise example, please refer to Example.

Docs

See the auto-generated docs for more info on methods and parameters.

(back to top)

Built-in Notification

Notification is optional. You can enabling it by setting the coresponding argument when calling onItemSold method.

enft.onItemSold({
    discordWebhook: 'YOUR_DISCORD_WEBHOOK_URL',
    twitterConfig: {
        appKey: 'YOUR_TWITTER_APP_KEY',
        appSecret: 'YOUR_TWITTER_APP_SECRET',
        accessToken: 'YOUR_TWITTER_ACCESS_TOKEN',
        accessSecret: 'YOUR_TWITTER_ACCESS_SECRET'
    }
});

(back to top)

Twitter

  1. Register Twitter developer account with Elevated access. ๐Ÿ”— Link

  2. Create a development app with OAuth 1.0a read-write permissions. ๐Ÿ”— Link

  3. Install Twurl and run following command:

    twurl authorize --consumer-key <your-app-key> --consumer-secret <your-app-secret>
    

    This will return an URL that you should open up in your browser. Authenticate to Twitter, and then enter the returned PIN back into the terminal.

    This should create a file called .twurlrc in your home directory with all the necessary information.

(back to top)

Discord

  1. Open the Discord channel you want to receive sales event notifications.
  2. From the channel menu, select Edit channel.
  3. Select Integrations.
  4. Select Create Webhook.
  5. Enter the name of the bot that will post the message.
  6. Copy the URL from the WEBHOOK URL field.
  7. Click Save.

(back to top)

Market Coverage

Logo

(back to top)

Live Demo

Logo

gif_1 gif_2

Twitter

Discord

(back to top)

Unsupported Features

  • Uniswap
  • Sudo Swap OTC

Any contributions are welcome!

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

For more information on how to contribute, check out the contributing guide.

(back to top)

Contact

kenryu.eth - @kenryu42 - [email protected]

(back to top)

Collections

Collections that using this SDK.

Open a Pull Request to add your collection below.

Collection Twitter Discord
Murakami.Flowers @MFTMKKUS Murakami.Flowers
Rumble Kong League @RumbleKongs Rumble Kong League

(back to top)

LICENSE

This project is MIT licensed.

(back to top)

ethereum-nft-sales-bot's People

Contributors

kenryu42 avatar renovate[bot] avatar semantic-release-bot avatar sterlingcrispin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ethereum-nft-sales-bot's Issues

RPi2 Compatibility

Currently trying to set this up on an old Raspberry Pi 2 I have lying around.

I've can install and test successfully, but when I try and start (npm start), I'm getting an error.

pi@raspberrypi:~/ethereum-nft-sales-bot $ npm start

> [email protected] start
> node --no-warnings dist/app.js

/home/pi/ethereum-nft-sales-bot/node_modules/imagescript/codecs/node/index.js:3
catch (err) { throw new Error('unsupported arch/platform: ' + err.message); }
                    ^

Error: unsupported arch/platform: Cannot find module './bin/arm-linux.node'

I've a background in C development but JS and TS are totally new to me, but I'm wondering is there a basic compatibility issue between the components used in this project and the ARM architecture of a RPi 2?

Gem swap with zero value

Hey I'm seeing a transaction with a value of 0 even though it shouldn't be, not clear what the problem is

tx 0x091fb66ab1c522b613cc06e9baf870951c71a220d013af8eb9227d98c6f8cdd8

will try to figure this out on my own if I can but the repo has changed so much I'm not sure where its failing.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency semantic-release to v23
  • chore(deps): update npm to v10
  • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/CI.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/close-stale-issues-and-prs.yml
  • actions/stale v8
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3
npm
package.json
  • async-retry ^1.3.3
  • ethers ^6.0.4
  • gifenc ^1.0.3
  • joi ^17.7.1
  • sharp ^0.32.0
  • twitter-api-v2 ^1.14.1
  • @commitlint/cli ^17.4.3
  • @commitlint/config-conventional ^17.4.3
  • @commitlint/cz-commitlint ^17.4.2
  • @semantic-release/changelog ^6.0.2
  • @semantic-release/git ^10.0.1
  • @types/async-retry ^1.4.4
  • @types/chai ^4.3.1
  • @types/mocha ^10.0.0
  • @types/node ^18.6.1
  • @types/sharp ^0.31.1
  • @typescript-eslint/eslint-plugin ^5.31.0
  • @typescript-eslint/parser ^5.31.0
  • chai ^4.3.6
  • commitizen ^4.3.0
  • cz-conventional-changelog ^3.3.0
  • dotenv ^16.0.3
  • eslint ^8.18.0
  • eslint-config-prettier ^8.5.0
  • eslint-plugin-prettier ^4.0.0
  • husky ^8.0.3
  • inquirer ^8.2.5
  • lint-staged ^13.1.2
  • mocha ^10.0.0
  • prettier ^2.7.1
  • rimraf ^5.0.0
  • semantic-release ^21.0.0
  • ts-mocha ^10.0.0
  • ts-node ^10.9.1
  • typedoc ^0.24.0
  • typedoc-plugin-markdown ^3.14.0
  • typescript ^4.9.5
  • node >=18.0.0
  • npm >=8.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Cannot read properties of undefined (reading 'length')

Hey I'm trying to test this transaction 0x3c33ba5c1d8e9c37375cf1937ffce0b45e736e3d57c24ef256b4ce50d4f80ece for contract 0x72A94e6c51CB06453B84c049Ce1E1312f7c05e2c and getting this undefined length error

Running test for tx: 0x3c33ba5c1d8e9c37375cf1937ffce0b45e736e3d57c24ef256b4ce50d4f80ece
14 Wiiides sold on Opensea: Seaport โš“๏ธ for 0.11309999000000001 ETH
https://etherscan.io/txData/0x3c33ba5c1d8e9c37375cf1937ffce0b45e736e3d57c24ef256b4ce50d4f80ece

TypeError: Cannot read properties of undefined (reading 'length')
at tweet (file:///Users/sterlingcrispin/code/ethereum-nft-sales-bot/dist/twitter/tweet.js:50:21)
at runApp (file:///Users/sterlingcrispin/code/ethereum-nft-sales-bot/dist/controllers/runApp.js:39:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///Users/sterlingcrispin/code/ethereum-nft-sales-bot/dist/app.js:43:13
โžœ ethereum-nft-sales-bot git:(mainorigin)

feature request: rate limiting

Hey I set up the bot for my friends project https://opensea.io/collection/proofofpepe but it did like 100E+ volume in a few hours and twitter's API rate limited it to hell. It probably also got rate limited by etherscan too.

It would be great if in the .env file there was a way to define some rate limits to keep the bot throttled and not get shut down

Support SeaPort 1.5 (0x00000000000000adc04c56bf30ac9d3c0aaf14dc)

Describe the Feature

Support Seaport 1.5.

Code Example

'0x00000000000000adc04c56bf30ac9d3c0aaf14dc': {
        name: 'opensea',
        displayName: 'Opensea ๐ŸŒŠ',
        contract: '0x00000000000000adc04c56bf30ac9d3c0aaf14dc',
        color: 2130402,
        site: 'https://opensea.io/assets/',
        accountPage: 'https://opensea.io/',
        iconURL:
            'https://pbs.twimg.com/profile_images/1544105652330631168/ZuvjfGkT_400x400.png',
        topics: [
            '0x9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f31'
        ]
    },

Error when tx.isSweep > 3

2022-07-31T06:52:47: Error: Given file is not valid, please check its type.
2022-07-31T06:52:47: at getFileHandle (/www/wwwroot/wBot/ethereum-nft-sales-bot/node_modules/twitter-api-v2/dist/v1/media-helpers.v1.js:61:15)
2022-07-31T06:52:47: at TwitterApiv1.getUploadMediaRequirements (/www/wwwroot/wBot/ethereum-nft-sales-bot/node_modules/twitter-api-v2/dist/v1/client.v1.write.js:352:69)
2022-07-31T06:52:47: at TwitterApiv1.uploadMedia (/www/wwwroot/wBot/ethereum-nft-sales-bot/node_modules/twitter-api-v2/dist/v1/client.v1.write.js:285:78)
2022-07-31T06:52:47: at tweet (file:///www/wwwroot/wBot/ethereum-nft-sales-bot/twitter/tweet.js:43:35)
2022-07-31T06:52:47: at runApp (file:///www/wwwroot/wBot/ethereum-nft-sales-bot/controllers/runApp.js:63:15)
2022-07-31T06:52:47: at runMicrotasks ()
2022-07-31T06:52:47: at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-07-31T06:52:47: at async Subscription. (file:///www/wwwroot/wBot/ethereum-nft-sales-bot/app.js:49:17)

Add Blur Marketplace v3 Support

Describe the Feature

Most NFT volume is currently being funneled through Blur, so adding support for their new contract would be ideal.

Code Example

No response

Bug Report Title

ENFT Version

^1.0.6

Describe the Problem

It didn't notified of this NFT sold transaction.
Opensea: https://opensea.io/collection/opepen-edition

Contract Address

0x6339e5E072086621540D0362C4e3Cea0d643E114

Transaction Hash

0xa3f4e1ed59ef91bb7a67d3199092a812141b78b5c55d8219719d33340bd91cfd

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

node.js (v16 or newer)

Environment (Other)

No response

Breaking usage change

Suggestion

Hey it seems like the app that used to be in this repo is gone and now it's an SDK?

Maybe you could add some documentation on how to build the onItemSold.ts file into something that can be run like the repo used to be structured?

Possible EventEmitter memory leak

ENFT Version

1.0.5

Describe the Problem

Thank you for this awesome library. This simplified so much work for collection creators.

This is somewhat a vague report, and not sure if this is a bug entirely either. When running ENFT via npm package on a local machine, everything works fine. The definition of works fine for me is: "It posts the sales to Discord".

However, when we package this up in a docker container and run on ecs on fargate, cloudwatch reports the following error:

(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [FormData]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:587:17)
    at FormData.addListener (node:events:605:10)
    at Stream.pipe (node:internal/streams/legacy:86:10)
    at CombinedStream.pipe (/app/node_modules/combined-stream/lib/combined_stream.js:65:25)
    at dispatchHttpRequest (file:///app/node_modules/axios/lib/adapters/http.js:645:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [FormData]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:587:17)
    at FormData.addListener (node:events:605:10)
    at Stream.pipe (node:internal/streams/legacy:87:10)
    at CombinedStream.pipe (/app/node_modules/combined-stream/lib/combined_stream.js:65:25)
    at dispatchHttpRequest (file:///app/node_modules/axios/lib/adapters/http.js:645:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [FormData]. Use emitter.setMaxListeners() to increase limit
at _addListener (node:events:587:17)
at FormData.prependListener (node:events:619:14)
at prependListener (node:internal/streams/legacy:100:20)
at Stream.pipe (node:internal/streams/legacy:66:3)
at CombinedStream.pipe (/app/node_modules/combined-stream/lib/combined_stream.js:65:25)
at dispatchHttpRequest (file:///app/node_modules/axios/lib/adapters/http.js:645:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
file:///app/node_modules/axios/lib/core/AxiosError.js:89
AxiosError.call(axiosError, error.message, code, config, request, response);
^
AxiosError: socket hang up
at AxiosError.from (file:///app/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (file:///app/node_modules/axios/lib/adapters/http.js:577:25)
at RedirectableRequest.emit (node:events:525:35)
at eventHandlers.<computed> (/app/node_modules/follow-redirects/index.js:14:24)
at ClientRequest.emit (node:events:513:28)
at TLSSocket.socketOnEnd (node:_http_client:526:9)
at TLSSocket.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: [Function: FormData] {
LINE_BREAK: '\r\n',
DEFAULT_CONTENT_TYPE: 'application/octet-stream'
},
Blob: [class Blob]
},
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'multipart/form-data; boundary=--------------------------116409738858655009138031',
'User-Agent': 'axios/1.3.4',
'Content-Length': '336452',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'https://discord.com/api/webhooks/<correct webhook id>',
data: FormData {
_overheadLength: 261,
_valueLength: 336191,
_valuesToMeasure: [],
writable: false,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
_released: true,
_streams: [],
_currentStream: null,
_insideLoop: false,
_pendingNext: false,
_boundary: '--------------------------116409738858655009138031',
_events: [Object: null prototype] {
end: [
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
warned: true
],
error: [
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
[Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
warned: true
],
close: [
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
[Function (anonymous)],
warned: true
]
},
_eventsCount: 3
}
},
request: <ref *3> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError],
socket: [Function: handleRequestSocket]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'https:',
path: '/api/webhooks/<correct webhook id>',
method: 'POST',
headers: [Object: null prototype] {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'multipart/form-data; boundary=--------------------------116409738858655009138031',
'User-Agent': 'axios/1.3.4',
'Content-Length': '336452',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
agents: { http: undefined, https: undefined },
auth: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: { proxy: [Function: beforeRedirect] },
hostname: 'discord.com',
port: '',
agent: undefined,
nativeProtocols: {
'http:': {
_connectionListener: [Function: connectionListener],
METHODS: [
'ACL',         'BIND',       'CHECKOUT',
'CONNECT',     'COPY',       'DELETE',
'GET',         'HEAD',       'LINK',
'LOCK',        'M-SEARCH',   'MERGE',
'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
'MOVE',        'NOTIFY',     'OPTIONS',
'PATCH',       'POST',       'PROPFIND',
'PROPPATCH',   'PURGE',      'PUT',
'REBIND',      'REPORT',     'SEARCH',
'SOURCE',      'SUBSCRIBE',  'TRACE',
'UNBIND',      'UNLINK',     'UNLOCK',
'UNSUBSCRIBE'
],
STATUS_CODES: {
'100': 'Continue',
'101': 'Switching Protocols',
'102': 'Processing',
'103': 'Early Hints',
'200': 'OK',
'201': 'Created',
'202': 'Accepted',
'203': 'Non-Authoritative Information',
'204': 'No Content',
'205': 'Reset Content',
'206': 'Partial Content',
'207': 'Multi-Status',
'208': 'Already Reported',
'226': 'IM Used',
'300': 'Multiple Choices',
'301': 'Moved Permanently',
'302': 'Found',
'303': 'See Other',
'304': 'Not Modified',
'305': 'Use Proxy',
'307': 'Temporary Redirect',
'308': 'Permanent Redirect',
'400': 'Bad Request',
'401': 'Unauthorized',
'402': 'Payment Required',
'403': 'Forbidden',
'404': 'Not Found',
'405': 'Method Not Allowed',
'406': 'Not Acceptable',
'407': 'Proxy Authentication Required',
'408': 'Request Timeout',
'409': 'Conflict',
'410': 'Gone',
'411': 'Length Required',
'412': 'Precondition Failed',
'413': 'Payload Too Large',
'414': 'URI Too Long',
'415': 'Unsupported Media Type',
'416': 'Range Not Satisfiable',
'417': 'Expectation Failed',
'418': "I'm a Teapot",
'421': 'Misdirected Request',
'422': 'Unprocessable Entity',
'423': 'Locked',
'424': 'Failed Dependency',
'425': 'Too Early',
'426': 'Upgrade Required',
'428': 'Precondition Required',
'429': 'Too Many Requests',
'431': 'Request Header Fields Too Large',
'451': 'Unavailable For Legal Reasons',
'500': 'Internal Server Error',
'501': 'Not Implemented',
'502': 'Bad Gateway',
'503': 'Service Unavailable',
'504': 'Gateway Timeout',
'505': 'HTTP Version Not Supported',
'506': 'Variant Also Negotiates',
'507': 'Insufficient Storage',
'508': 'Loop Detected',
'509': 'Bandwidth Limit Exceeded',
'510': 'Not Extended',
'511': 'Network Authentication Required'
},
Agent: [Function: Agent] { defaultMaxSockets: Infinity },
ClientRequest: [Function: ClientRequest],
IncomingMessage: [Function: IncomingMessage],
OutgoingMessage: [Function: OutgoingMessage],
Server: [Function: Server],
ServerResponse: [Function: ServerResponse],
createServer: [Function: createServer],
validateHeaderName: [Function: __node_internal_],
validateHeaderValue: [Function: __node_internal_],
get: [Function: get],
request: [Function: request],
setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],
maxHeaderSize: [Getter],
globalAgent: [Getter/Setter]
},
'https:': {
Agent: [Function: Agent],
globalAgent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
Server: [Function: Server],
createServer: [Function: createServer],
get: [Function: get],
request: [Function: request]
}
},
pathname: '/api/webhooks/<correct webhook id>'
},
_ended: false,
_ending: false,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: <ref *1> ClientRequest {
_events: [Object: null prototype] {
response: [Function: bound onceWrapper] {
listener: [Function (anonymous)]
},
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: false,
_closed: false,
socket: <ref *2> TLSSocket {
_tlsOptions: {
allowHalfOpen: undefined,
pipe: false,
secureContext: SecureContext { context: SecureContext {} },
isServer: false,
requestCert: true,
rejectUnauthorized: true,
session: Buffer(1711) [Uint8Array] [
48, 130,   <a bunch more uint8s>,
... 1611 more items
],
ALPNProtocols: undefined,
requestOCSP: undefined,
enableTrace: undefined,
pskCallback: undefined,
highWaterMark: undefined,
onread: undefined,
signal: undefined
},
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'discord.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype] {
close: [
[Function: onSocketCloseDestroySSL],
[Function],
[Function: onClose],
[Function: socketCloseListener]
],
end: [ [Function: onReadableStreamEnd], [Function: socketOnEnd] ],
newListener: [Function: keylogNewListener],
secure: [Function: onConnectSecure],
session: [Function (anonymous)],
free: [Function: onFree],
timeout: [Function: onTimeout],
agentRemove: [Function: onRemove],
error: [Function: socketErrorListener],
data: [Function: socketOnData],
drain: [Function: ondrain]
},
_eventsCount: 11,
connecting: false,
_hadError: true,
_parent: null,
_host: 'discord.com',
_closeAfterHandlingError: false,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,

<!--EndFragment-->
</body>
</html>

For reference, the docker that we push to ECR is over here: https://github.com/rumble-kong-league/sales-bot.

The above error does not happen immediately after a sale. Rather after about 10 minutes from the first sale. I suspect it's because of the retry in your library, that tries to post the embed to discord multiple times. I doubt this error has anything to do with networking, since twitter posts work just fine on ecs on fargate.

What is slightly worrying is that it is making http requests, however discord webhook url is https.

This is running on v1CPU and 3GB RAM.

This happens on any collection.

Contract Address

No response

Transaction Hash

No response

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

Opensea sweep feature

I'm encountering sweeps completed by Opensea which when detected are appearing with mis-information.

e.g. A sweep of various tokens on a single contract

Correctly says the Qty and 'SWEPT', but the total sales price is incorrect. It is likely showing a price paid for one of the tokens.
The 'From' and 'To' only appears as if it's one token sold.

I notice in the src code that the embedded object appears differently for sweeps when the tx is from 'gem', 'genie' or 'blurSwap'. I suspect the Opensea sweep feature is not yet supported?

tokenData is missing in type

Not sure why this is pinging an error.

I tried adding it to this object but it shows the error in second screenshot

image

image

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.