Git Product home page Git Product logo

dagger.js's People

Contributors

0xashish avatar azhang avatar dependabot[bot] avatar itzmeanjan avatar jdkanani avatar ptsayli avatar shahbhavir avatar youfoundron 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  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  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

dagger.js's Issues

latest:addr/0x3693.../tx/in not working

I have this code:

var Dagger = require("eth-dagger");

// connect to Dagger ETH ropsten network over web socket
var dagger = new Dagger('wss://ropsten.dagger.matic.network');

// confirmed (irreversible) incoming transaction
dagger.on("confirmed:addr/0x3693f7449BD461F74975D571E7e3Bc031eF73586/tx/in", function(result) {
  console.log('Confirmed'+ result)
});

// latest incoming transaction
dagger.on("latest:addr/0x3693f7449BD461F74975D571E7e3Bc031eF73586/tx/in", function(result) {
  console.log('Latest: ' + result)
});

When I run it, it return only:

reconnecting...
Confirmed[object Object]

Here is tx: https://ropsten.etherscan.io/tx/0x746ec51d25b5235217bf690e03da6ebbcfe8e9e22b0a0a7b21c2df5f285d2a65

Error: certificate has expired

Yo. Very strange behaviour continues to happen over and over:
When having a line like _dagger = new Dagger.default(daggerAddr); Node crashes with this error:

Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1060:34)
at TLSSocket.emit (events.js:182:13)
at TLSSocket.EventEmitter.emit (domain.js:442:20)
at TLSSocket._finishInit (_tls_wrap.js:639:8)

If line _dagger = new Dagger.default(daggerAddr); is commented out error is not showing up.

Any ideas how to solve that?

Node v10.7.0 - install/build error

Issue description:

  • running npm i eth-dagger throws error

Logs:

> [email protected] preinstall /Users/projects/eth-dagger.js/node_modules/scrypt
> node node-scrypt-preinstall.js
> [email protected] install /Users/projects/eth-dagger.js/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)

CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from ../lib/kerberos.cc:1:
In file included from ../lib/kerberos.h:9:
In file included from ../node_modules/nan/nan.h:190:
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);

Possible causes: fsevents/fsevents#229, nodejs/nan#763

Multiple Address in filter

Hello,
Currently, I am using the following code to filter the transaction:

const Web3 = require('web3');
const Dagger = require('@maticnetwork/dagger');
const dagger = new Dagger('wss://kovan.dagger.matic.network');
const abi = require('./abi.json');

var web3 = new Web3('wss://kovan.infura.io/ws/v3/<Infura Key>');
var web3Contract = new web3.eth.Contract(abi,'0x9dd6a7dc18f20a3dcb4d422a7387747072524886');
var contrat = dagger.contract(web3Contract);
var filter = contrat.events.Transfer({filter: {to: '0x4601A10F14C480d22830070aCF6c2c5455DAC27D'}, room: 'latest'});
filter.watch(async function(data, removed){
	console.log('QRXD Recived');
	var a = await web3.eth.getTransaction(data.transactionHash);
    console.log(a);
});

But how can I filter multiple addresses?
Thanks in advance.

error when trying to cnnect to matic mainnet

(node:21) UnhandledPromiseRejectionWarning: Error: Connection closed
    at /app/node_modules/mqtt/lib/client.js:124:29
    at Array.forEach (<anonymous>)
    at flushVolatile (/app/node_modules/mqtt/lib/client.js:122:24)
    at Duplex.<anonymous> (/app/node_modules/mqtt/lib/client.js:358:5)
    at Duplex.emit (events.js:315:20)
    at emitClose (/app/node_modules/ws/lib/stream.js:12:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
(node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise r
ejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

eth mainnet is working fine

MQTT reconnecting all the time on testnet v3

I'm getting reconnecting... message every minute or so in the log. From code I can see this is caused by mqtt reconnecting.

I am using https://testnetv3-dagger.matic.network dagger server.

Is this behaviour expected?

Anyway I would prefer to replace console.log with a listener, so I can choose how to react in that scenario.

module error

var Dagger = require('eth-dagger')
new Dagger(...)

doesn't work for me, I have to use

var Dagger = require('eth-dagger').default
new Dagger(...)

Also, is the mainnet supposed to be down currently?

Support for custom RPC

I'd love support for the POA chain (https://poa.network/), as well as any other chain that implements ethereum's standard RPC. It's probably a more expensive lift for you because you probably run a full node in order to get all the data needed, so each custom chain you would need to also run a full node of their network. Just thought I'd open an issue to start the conversation.

Thoughts?

Problem with Dagger Play

In Dagger Play the event config string is automatically converted into lowercase, because of which there is a problem with using the address which is Case Sensitive. Therefore, currently the Dagger commands using address cannot be run with the Dagger Play.

Support for balance threshold alert

We would like to see support for an event that is triggered based on an account balance lower than a certain threshold. The use case is for automated hot wallets.

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.