Dylan-Kerler

Dylan-Kerler

Member Since 3 years ago

Experience Points
15
follower
Lessons Completed
1
follow
Lessons Completed
56
stars
Best Reply Awards
34
repos

122 contributions in the last year

Pinned
⚡ Market making bot for Binance to maintain a fixed spread and fixed portfolio exposure for any given period
⚡ Smart contract for onchain decentralised exchange for eosio.tokens
⚡ EventEmitter implementation in rust
⚡ Utxo based cryptocurrency written from scratch using sha256 hashing algorithm and ecdsa signing on secp256k1 elliptic curve
⚡ Go wrapper around p2pb2b cryptocurrency exchange api endpoints
⚡ A website to display anomalous data among cryptocurrency prices, built with React
Activity
Oct
14
2 days ago
Activity icon
issue

Dylan-Kerler issue comment rainbow-me/rainbow

Dylan-Kerler
Dylan-Kerler

Is Rinkeby intentionally excluded from WalletConnect support?

The following list excludes Rinkeby but I haven't been able to identify the reason. Is this intentional or can I create a PR to add it?

https://github.com/rainbow-me/rainbow/blob/18c56c1a21faa2bf30d206461cac63c5eb13b339/src/redux/walletconnect.js#L305

Dylan-Kerler
Dylan-Kerler

@akramhussein what was the result of this issue?

Activity icon
issue

Dylan-Kerler issue comment rainbow-me/rainbow

Dylan-Kerler
Dylan-Kerler

No way to switch connected app's network to testnet

Affected Rainbow App version: 1.5.19 (7).

In previous Rainbow versions it was possible to switch the test network globally via settings, now that value is ignored in the connected apps.

IMG_9714

IMG_9715

Dylan-Kerler
Dylan-Kerler

+1 chainId is always equal to 1 (mainnet). Even when switching networks in the app, it stays connected to 1

Activity icon
issue

Dylan-Kerler issue comment expressjs/cors

Dylan-Kerler
Dylan-Kerler

Allow CORS on static file serving

Hello, and thank you for this wonderful lib, dynamic options are the greatest.

Now to problem. I have this configuration, app.options('*', cors()); All static files are loading well but the font files which returns CORS issue. Static file serving is done this way. app.use(express.static(myParh))

Thank you.

Oct
8
1 week ago
Oct
7
1 week ago
Activity icon
issue

Dylan-Kerler issue comment ethers-io/ethers.js

Dylan-Kerler
Dylan-Kerler

WebSocketProvider handle ws close and reconnect

Hi @ricmoo,

I'm using WebSocketProvider server-side to listen to blockchain events and performing calls to smart contracts. Sometimes the websocket pipe got broken and I need to reconnect it.

I use this code to detect ws close and reconnect but it would be nice to not have to rely on _websocket to do it:

let wsProvider;

init = async () => {
  wsProvider = new ethers.providers.WebSocketProvider(wsHost);
  wsProvider._websocket.on('close', async (code) => {
    console.log('ws closed', code);
    wsProvider._websocket.terminate();
    await sleep(3000); // wait before reconnect
    init();
  });
  wsProvider.on('block', doStuff);
};

I also noticed when the websocket is broken Promise call don't reject wich is not super intuitive.

Dylan-Kerler
Dylan-Kerler

How can this be the accepted solution? It's like 50 lines of custom code...

@sentilesdal solution seems much better - wrapping the input provider in web3Ws provider:

import Web3WsProvider from 'web3-providers-ws'

this.provider = new ethers.providers.Web3Provider(
  // @ts-ignore
  new Web3WsProvider(process.env.PROVIDER_URL, {
    clientConfig: {
        keepalive: true,
        keepaliveInterval: 60000, // ms
     }
     // Enable auto reconnection
     reconnect: {
        auto: true,
        delay: 5000, // ms
        maxAttempts: 5,
        onTimeout: false
     }
  }),
)

I don't see why this is so hard to add to ethersjs though. If web3Ws provider can do it, why can't ethersjs do it?

Oct
2
2 weeks ago
Activity icon
issue

Dylan-Kerler issue EthWorks/useDApp

Dylan-Kerler
Dylan-Kerler

useContractCall returning undefined when value exists

    const [tokenURI] =
        useContractCall({
            abi: new utils.Interface(NFT.abi),
            address: "0x1a92f7381b9f03921564a437210bb9396471050c",
            method: "tokenURI",
            args: [10],
        }) || [];

Expected to get: https://api.coolcatsnft.com/cat/10 Actually got: undefined

I can see that this NFT definitely exists here: https://etherscan.io/address/0x1a92f7381b9f03921564a437210bb9396471050c#readContract

Why am I getting undefined?

Activity icon
issue

Dylan-Kerler issue comment EthWorks/useDApp

Dylan-Kerler
Dylan-Kerler

useContractCall returning undefined when value exists

    const [tokenURI] =
        useContractCall({
            abi: new utils.Interface(NFT.abi),
            address: "0x1a92f7381b9f03921564a437210bb9396471050c",
            method: "tokenURI",
            args: [10],
        }) || [];

Expected to get: https://api.coolcatsnft.com/cat/10 Actually got: undefined

I can see that this NFT definitely exists here: https://etherscan.io/address/0x1a92f7381b9f03921564a437210bb9396471050c#readContract

Why am I getting undefined?

Dylan-Kerler
Dylan-Kerler

I had another useContractCall hook that was throwing an error in another component. After fixing the error there, I now get the result here. Apparently all useContractCall hooks have to be successful for them to work.

Activity icon
issue

Dylan-Kerler issue EthWorks/useDApp

Dylan-Kerler
Dylan-Kerler

useContractCall returning undefined when value exists

    const [tokenURI] =
        useContractCall({
            abi: new utils.Interface(NFT.abi),
            address: "0x1a92f7381b9f03921564a437210bb9396471050c",
            method: "tokenURI",
            args: [10],
        }) || [];

Expected to get: https://api.coolcatsnft.com/cat/10 Actually got: undefined

I can see that this NFT definitely exists here: https://etherscan.io/address/0x1a92f7381b9f03921564a437210bb9396471050c#readContract

Why am I getting undefined?

Sep
24
3 weeks ago
Activity icon
issue

Dylan-Kerler issue OpenZeppelin/openzeppelin-upgrades

Dylan-Kerler
Dylan-Kerler

How can I ignore a rule for a single line?

Is there something like // eslint-ignore ?

Activity icon
issue

Dylan-Kerler issue comment OpenZeppelin/openzeppelin-upgrades

Dylan-Kerler
Dylan-Kerler

How can I ignore a rule for a single line?

Is there something like // eslint-ignore ?

Dylan-Kerler
Dylan-Kerler

I found what i was looking for -

    /// @custom:oz-upgrades-unsafe-allow constructor

Activity icon
issue

Dylan-Kerler issue OpenZeppelin/openzeppelin-upgrades

Dylan-Kerler
Dylan-Kerler

How can I ignore a rule for a single line?

Is there something like // eslint-ignore ?

Activity icon
issue

Dylan-Kerler issue protofire/solhint

Dylan-Kerler
Dylan-Kerler

state-visibility rule gives incorrect output when using `fallback()`

To reproduce:

Test.sol

fallback() external payable {
}

.solhint.json

{
    "extends": "solhint:recommended",
    "rules": {
        "compiler-version": ["error", "0.8.6"],
        "func-visibility": ["warn", { "ignoreConstructors": true }],
    }
}

output:

/Users/t/Test.sol
  4:5  warning  Explicitly mark visibility of state  state-visibility
Activity icon
issue

Dylan-Kerler issue nomiclabs/hardhat

Dylan-Kerler
Dylan-Kerler

.solhintignore is not utilised in hardhat-solhint plugin

As per this line https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-solhint/src/index.ts#L88 the .solhintignore file is never read. npx hardhat check will run solhint using all files in the config.paths.sources.

Reproduce:

.solhintignore

MyContract.sol
npx hardhat check
// output showing errors for MyContract.sol
Sep
13
1 month ago
push

Dylan-Kerler push Dylan-Kerler/contracts

Dylan-Kerler
Dylan-Kerler

Merge pull request #1 from Dylan-Kerler/add-harvesting

WIP: SettlementsV2

Dylan-Kerler
Dylan-Kerler
Dylan-Kerler
Dylan-Kerler
Dylan-Kerler
Dylan-Kerler

Merge pull request #2 from Dylan-Kerler/add-harvesting

Fix opensea attribute

Dylan-Kerler
Dylan-Kerler

commit sha: 610d708c770bdcdea3e163f84e8962ca9978d8bb

push time in 1 month ago
Activity icon
created branch

Dylan-Kerler in Dylan-Kerler/contracts create branch islands-ships

createdAt 1 month ago
Sep
12
1 month ago
push

Dylan-Kerler push Dylan-Kerler/website

Dylan-Kerler
Dylan-Kerler

Add Settlements Experience token

commit sha: 14b8b4a77ab114bba93a2742a255aa729309a4ee

push time in 1 month ago
open pull request

Dylan-Kerler wants to merge thesettlements/website

Dylan-Kerler
Dylan-Kerler

WIP: Add island and ship page

Screenshot 2021-09-10 at 22 33 57 Screenshot 2021-09-10 at 22 34 37

Dylan-Kerler
Dylan-Kerler

We need to approve the ships contract and islands contract as minters on the wood, iron and silver token contracts though I think that is separate.

open pull request

Dylan-Kerler wants to merge thesettlements/website

Dylan-Kerler
Dylan-Kerler

WIP: Add island and ship page

Screenshot 2021-09-10 at 22 33 57 Screenshot 2021-09-10 at 22 34 37

Dylan-Kerler
Dylan-Kerler

It can use public functions

Sep
10
1 month ago
Previous