Giter Site home page Giter Site logo

franono / fluxaggregatorledgerwithdraw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fiews/fluxaggregatorledgerwithdraw

0.0 0.0 0.0 24 KB

This script will help you automatically withdraw from FluxAggregator contracts using a Ledger hardware wallet.

License: MIT License

JavaScript 100.00%

fluxaggregatorledgerwithdraw's Introduction

FluxAggregator Ledger Withdraw script

This script will help you automatically withdraw from FluxAggregator contracts using a Ledger hardware wallet.

The script will query the withdrawable amount for the node address on the list of FluxAggregator contracts provided. If there's a LINK balance, it will prompt to withdraw. A transaction proposal is made to withdraw the full amount from node address to the Ledger's PATH address (admin address).

Note: This script is only meant as a helper. Maintain proper security on your system and always review the transactions before approving.

Configuration

Before starting, a set of environment variables has to be set:

Env var Description
RPC_URL An HTTP(s) RPC URL for yourEthereum node. Infura works fine for this.
LEDGER_PATH Your Ledger path for your account with the address index appended (e.g. m/44'/60'/0'/0/0)
NODE_ADDRESS The node address in the FluxAggregator contracts. This is the address that writes results to the FA contract.
GAS_PRICE Gas price in Gwei. Max value is 250. Defaults to 50.

You also need to create a contracts.txt file with a list of FluxAggregator contracts to use. Place one address per line.

Running

Install dependencies with yarn:

yarn

Make sure your Ledger HW wallet is connected, unlocked and the Ethereum application is started.

Always verify the transaction params before approving the transaction!

Simply run the script with Node:

node ./index.js

Note: If you are getting errors about not being able to connect to the device, try running with sudo: sudo -E node ./index.js

The script will now check the withdrawable amounts in the FluxAggregator contracts, and prompt you to withdraw!

fluxaggregatorledgerwithdraw's People

Contributors

boxhock 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.