Giter Site home page Giter Site logo

rocketarb's Issues

Improve the logs

Howdy,

I have two suggestions:

  1. improve the logs to make it more obvious why the transaction reverted in a --dry-run
  2. (not sure if possible) say what the current bundle's set base and priority fee are

Sample output for running the commands

Is it okay to add some sample output when commands are run? Even one sample output would help someone new to understand how the script would work and what the output would look like.

out-of-bounds Error When using custom RPC

I tried using rocketarb when my primary client is not synced and used my fallback as custom RPC. Rocketarb gives me out of bounds exception when creatign the arb transaction.

Here are detailed logs:

$ ./scripts/rocketarb-docker.sh -n --rpc http://proteus:8545
Welcome to RocketArb: Deposit!
Have you tried almost depositing your minipool using the smartnode? y
Got smartnode version 1.10.1

Creating deposit transaction by executing smartnode: docker exec rocketpool_node /go/bin/rocketpool api node deposit 8000000000000000000 0.14 6131696543806149 true false
2023/08/15 16:46:02 Primary execution client is still syncing (100.00%), using fallback execution client...
2023/08/15 16:46:02 Primary execution client is still syncing (100.00%), using fallback execution client...
Got deposit transaction data from smartnode
Creating arb transaction
/app/node_modules/@ethersproject/logger/lib/index.js:238
        var error = new Error(message);
                    ^

Error: value out-of-bounds (argument="ethAmount", value={"type":"BigNumber","hex":"-0xa6fdd7f434f4b2fd"}, code=INVALID_ARGUMENT, version=abi/5.7.0)
    at Logger.makeError (/app/node_modules/@ethersproject/logger/lib/index.js:238:21)
    at Logger.throwError (/app/node_modules/@ethersproject/logger/lib/index.js:247:20)
    at Logger.throwArgumentError (/app/node_modules/@ethersproject/logger/lib/index.js:250:21)
    at Coder._throwError (/app/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:41:16)
    at NumberCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/number.js:46:18)
    at /app/node_modules/@ethersproject/abi/lib/coders/array.js:74:19
    at Array.forEach (<anonymous>)
    at pack (/app/node_modules/@ethersproject/abi/lib/coders/array.js:60:12)
    at TupleCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/tuple.js:71:33)
    at AbiCoder.encode (/app/node_modules/@ethersproject/abi/lib/abi-coder.js:91:15) {
  reason: 'value out-of-bounds',
  code: 'INVALID_ARGUMENT',
  argument: 'ethAmount',
  value: BigNumber { _hex: '-0xa6fdd7f434f4b2fd', _isBigNumber: true }
}

Node.js v19.5.0


Improve the logs

Howdy,

I have two suggestions:

  1. improve the logs to make it more obvious why the transaction reverted in a --dry-run
  2. (not sure if possible) say what the current bundle's set base and priority fee are

Doesn't work with smartnode 1.11.12

Here's the output from a dry run:

$ ./scripts/rocketarb-docker.sh --dry-run
Welcome to RocketArb: Deposit!
Have you tried almost depositing your minipool using the smartnode? y
Got smartnode version 1.11.2

Creating deposit transaction by executing smartnode: docker exec rocketpool_node /go/bin/rocketpool api node deposit 8000000000000000000 0.14 533611257236573 true false
Got deposit transaction data from smartnode
Creating arb transaction
/app/node_modules/@ethersproject/logger/lib/index.js:238
        var error = new Error(message);
                    ^

Error: value out-of-bounds (argument="ethAmount", value={"type":"BigNumber","hex":"-0x55469ba6564b81869a"}, code=INVALID_ARGUMENT, version=abi/5.7.0)
    at Logger.makeError (/app/node_modules/@ethersproject/logger/lib/index.js:238:21)
    at Logger.throwError (/app/node_modules/@ethersproject/logger/lib/index.js:247:20)
    at Logger.throwArgumentError (/app/node_modules/@ethersproject/logger/lib/index.js:250:21)
    at Coder._throwError (/app/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:41:16)
    at NumberCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/number.js:46:18)
    at /app/node_modules/@ethersproject/abi/lib/coders/array.js:74:19
    at Array.forEach (<anonymous>)
    at pack (/app/node_modules/@ethersproject/abi/lib/coders/array.js:60:12)
    at TupleCoder.encode (/app/node_modules/@ethersproject/abi/lib/coders/tuple.js:71:33)
    at AbiCoder.encode (/app/node_modules/@ethersproject/abi/lib/abi-coder.js:91:15) {
  reason: 'value out-of-bounds',
  code: 'INVALID_ARGUMENT',
  argument: 'ethAmount',
  value: BigNumber { _hex: '-0x55469ba6564b81869a', _isBigNumber: true }
}

Node.js v19.9.0

Better error handling for 1inch

Or even better, figuring out why it happens and changing that so it doesn't :)

Got 500 from 1inch
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<IncomingMessage>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v19.3.0

Suggest having an error handler here that prints out the code and also the message - 1inch usually delivers a reason it returned a 500.

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.