Giter VIP home page Giter VIP logo

ethkit's People

Contributors

aditya520 avatar agusx1211 avatar aj0strow avatar attente avatar czar0 avatar dependabot[bot] avatar ferranbt avatar joncooperworks avatar marino39 avatar patrislav avatar pkieltyka avatar poonai avatar shubhaankar-sharma avatar xiam 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

ethkit's Issues

ethrpc: batch calls are very slow

I was trying a batch call with 4 calls, CodeAt and three function read calls, its way faster to call them seperately concurrently than doing a batch call for some reason, could be node do slower responses to batch calls but maybe a ethrpc problem

ethmonitor: review behaviour if Options.LogTopics is defined

topics := [][]common.Hash{}
if len(m.options.LogTopics) > 0 {
topics = append(topics, m.options.LogTopics)
}
logs, err := m.provider.FilterLogs(tctx, ethereum.FilterQuery{
BlockHash: &blockHash,
Topics: topics,
})
if err == nil {
// check the logsBloom from the block to check if we should be expecting logs. logsBloom
// will be included for any indexed logs.
if len(logs) > 0 || block.Bloom() == (types.Bloom{}) {
// successful backfill
if logs == nil {
block.Logs = []types.Log{}
} else {
block.Logs = logs
}
block.OK = true
continue
}
}

I haven't tried this, but I think if topics are specified, then it's possible to receive no logs, while the logs bloom filter is non-zero. This means the block is never considered backfilled and causes the monitor to hang if logs are requested.

SolidityPack negative int equal positive (PaddedBigBytes)

github.com/0xsequence/ethkit v1.22.4

SolidityPack seems to not consider negative signs:

entry1, err := ethcoder.SolidityPackHex([]string{"int32"}, []interface{}{int32(-42)})
entry2, err := ethcoder.SolidityPackHex([]string{"int32"}, []interface{}{int32(42)})
fmt.Println(entry1)
fmt.Println(entry2)
// entry1 == entry2

yields 0x0000002a, 0x0000002a

Other integer-types seem to show the same issue.

comparing to ethers/utils/solidity.ts:

let v1 = ethers.utils.solidityPack(["int32"], [-42]);
let v2 = ethers.utils.solidityPack(["int32"], [42]);
console.log(v1);
console.log(v2);

yields 0xffffffd6, 0x0000002a

Possible bug in ethmonitor/bootstrap

blocks = blocks[c.retentionLimit-1:]

Above line should be:

blocks = blocks[len(blocks)-c.retentionLimit-1:] 

updated len(blocks) after above change:

updatedLength = len(blocks)-1 - (len(blocks)-c.retentionLimit-1)
= c.retentionLimit

for example, consider blocks to be slice with length=150 and c.retentionLimit=100 then current code will do this:

blocks = blocks[99:] //blocks will end up with length = 50 (=len(blocks)-retentionLimit)

with change:

blocks = blocks[49:] //blocks will have length = 100 (=retentionLimit)

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.