Coder Social home page Coder Social logo

blockchain-api's Introduction

WalletConnect Specs

This repo runs specs.walletconnect.com.

Source can be viewed in docs directory.

Running Locally

  1. yarn install
  2. yarn start
  3. Open http://localhost:3000/

Adding a New Page

  1. Create a new file in docs/
  2. Configure sidebars.js to create the sidebar link.

Editing a Page

  1. Open the file in docs/

Older versions are available in versioned_docs/.

Customize Settings & Theme

  1. Open docusaurus.config.js

More

For more options, check the Docusaurus docs.

Archived v1.0 docs can be viewed in the v1.0 branch.

blockchain-api's People

Contributors

arein avatar chris13524 avatar farazdagi avatar geekbrother avatar github-actions[bot] avatar githubdoramon avatar heilhead avatar rakowskiii avatar xav avatar xdarksome 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockchain-api's Issues

Analytics File Thresholds

Currently we roll up files based on:

  • file size
  • file age

We roll it up into // partitions.

Currently we may not honor these correctly as file size/file age doesn't necessarily match the day.

Hence, we need to introduce another threshold which is when a new day begins.

Track Project ID Cache Hit Ration

We recently had a regression where the project id cache hit ratio went to 0 (Slack thread).

In order to faster see this in the future and to be able to alarm on it we should track the cache hit ration.

AC:

  • Metrics added in relay
  • Widget added to dashboard
  • Alarm defined

Fix tests failing randomly

Integ test seem to fail randomly, probaly due to some race condition.
Works locally, break on github actions.

Needs investigation.

Better error messaging for downstream RPC failures

Action items:

  • Attribution: Aggregate 5XX from RPC into HTTP502 response from our RPC
  • User confusion: give a good error message to end-users that our chosen RPC provider is down as the reason of the HTTP502
  • Failover: give another RPC provider a chance to satisfy the request
  • Smart Routing: route traffic to alternative RPC if one RPC is detected to be down

Track NLB target resets

We track metrics from the application level hence might miss the Load Balancer picture.
We use an NLB so it's not a straight up metric.
To improve that and get insight we should track NLB target resets.

add `origin` to tracked rpc_requests data

We want to know where are rpc_request originating from so we want to add the origin (eg. opensea.io) to the data we send to the data lake. This will enable us to have more oversight of RPC usage from the different projects or bad actors.

AC:

  • a new field is added to the rpc_request data containing origin when available

Export Analytics to Athena

In rs-relay we have logic to "dump" certain data (socket/messages) into parquet files. Based on certain thresholds e.g. time/file size we upload these files to S3. From there on our Athena pipeline kicks (in data-lake repo).

Subject of this task is only the file creation and upload part.

chore: add binance smart chain support.

Hi! I'm having a problem using WallectConnect with wagmi. Here's my code:

`
const chains = [bsc, bscTestnet];

const { provider } = configureChains(chains, [
walletConnectProvider({
projectId
}),
]);

const wagmiClient = createClient({
autoConnect: true,
connectors: modalConnectors({ appName: "web3Modal", chains }),
provider,
});

const ethereumClient = new EthereumClient(wagmiClient, chains);
const web3modal = new Web3Modal(
{ projectId, network: 'binance' },
ethereumClient,
);

const account = getAccount()

const getAllowance = async (address) => {
const data = await readContract({
address: marketContractAddress,
abi: abi,
functionName: 'getAllowanceToBuy',
args: [address]
}).catch(err => console.log(err))
console.log(data)
return data
}`

It connects and gets account data just fine, but when I call getAllowance I get an error sayng We don't support the chainId you provided: eip155:97
Which is kinda weird, since both WC and Wagmi are supposed to support both BSC (56) and BSC testnet (97).
If anybody knows what to do with it, please, help!

fix: service responds 500 when it should be 401

curl -v -X POST -H "Content-Type:application/json" "https://rpc.walletconnect.com/v1?chainId=eip155:56&projectId=8e6b5ffdcbc9794bf9f4a1952578365b" -d '{"method":"eth_getBalance", "jsonrpc":"2.0", "id":"42", "params":["0xce93f04e99824ba2c56ce20b27ea391abe961bf0", "latest"]}'

Works

When I change the project Id

curl -v -X POST -H "Content-Type:application/json" "https://rpc.walletconnect.com/v1?chainId=eip155:56&projectId=7e6b5ffdcbc9794bf9f4a1952578365b" -d '{"method":"eth_getBalance", "jsonrpc":"2.0", "id":"42", "params":["0xce93f04e99824ba2c56ce20b27ea391abe961bf0", "latest"]}'

I receive HTTP500

Expectation:
HTTP401 or HTTP404

ENS Caching

  • Draft ENS Caching docs
  • Consult draft version
  • Brainstorm the solution on team meeting
  • Implement simple Caching
  • Implement additional logic

Tasks

  1. accepted
    chris13524
  2. accepted
    chris13524
  3. accepted
    chris13524

Tag images with with versions

Each time we merge app logic (as opposed to terraform) we should build an image with a specific tag such that we can pin this tag in deployments and roll back etc.

We do this in other repos e.g. rs-relay

Expose data in Preset

Acceptance criteria:

  • Dashboard depicting the RPC usage exposed in preset (@chadyj can you advise?)

Prerequisites:

  • AWS Glue crawler setup in data-lake repository to create Athena tables / maintain Athena partitions.

Update privacy policy with links to RPC providers

WalletConnect is careful about what data we collect, but some of the RPC providers we use may be less privacy-focused and log IP address and other PII data. (such as Infura logging IP addresses.

To be transparent we need to update out privacy policy listing our RPC providers, and link to their privacy policies. We should always consider the customer and end-user privacy.

Please list the chains/providers and I will update the policy in https://github.com/WalletConnect/explorer-temp

bug: "The method eth_sendTransaction does not exist is not available"

When I try to call a contract method that requires a user signature, an error is returned to me:
On bsc(id:56) - code: -32000, message: "unknown account", No transaction comes to the wallet.
On mainnet(id:1) - code: -32601, message: "The method eth_sendTransaction does not exist is not available", The transaction does not come to the wallet.

{"jsonrpc":"2.0","id":43,"error":{"code":-32000,"message":"unknown account"}}

I expect that the transaction will come for confirmation in the connected wallet, after confirmation and payment of the fee, the transaction will be successful

async function approveRouter(address) {
const tokenAddress = "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"; // WBNB
const approveAddress = "0x10ed43c718714eb63d5aa57b78b54704e256024e"; // PCRouter v2

const tokenContract = new ethers.Contract(
	tokenAddress,
	erc20ABI,
	provider(56).getSigner(address) // address - connected user address
);
const maxApproval = ethers.constants.MaxUint256;

const txRes = await tokenContract.approve(approveAddress, maxApproval, {
	gasLimit: 310000,
});
console.log(txRes);

image_2023-01-24_14-38-43
image_2023-01-24_14-41-28

}

Browser: Google Chrome desktop

add `provider` to tracked rpc_requests data

as we want to know about how much rpc_requests are routed to which provider ( infura,quicknode,etc) we need to add a new field to the tracked data that contains the provider.

ac:

  • rpc_requests logs have a provider column with the id/name of the provider

Track integration latency

We should have a latency metric that subtracks the proxy time and only tracks the latency we are adding.

fix: add logging to rpc proxy

Currently there's no way to figure out why RPC Proxy is throwing HTTP 5xx to the user, unless it's 502.
Logs are needed to be able to distinguish and understand the reason,

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.