Skip to main content
9 votes

Efficient Solidity storage pattern for a directional weighted graph

I think you could do worse than to start with something like this: pragma solidity 0.5.14; import "./HitchensUnorderedKeySet.sol"; contract DirectedGraph { using HitchensUnorderedKeySetLib for ...
Rob Hitchens's user avatar
  • 55.2k
5 votes
Accepted

Where can I find transactions per second statistics?

etherchain.org now shows a chart of the average number of transactions per second during a given day. At the time of writing the peak was on the 6th of February 2016 with a 1.2 average transactions ...
P.P.'s user avatar
  • 565
3 votes

Failed to deploy to Graph node: Ethereum network not supported by registrar: mainnet

That error message “Ethereum network not supported by registrar: mainnet” can be misleading, at least it was in my case. I was getting this error because I had run hardhat node on the host, but not ...
dwardu's user avatar
  • 1,408
3 votes

Graph traversals on Ethereum, at scale

You could require streamers to overcollateralize, with those that fail to stay overcollateralized being liquidated. With that you can take a lazy update approach, where self-interested actors update ...
Alberto Cuesta Cañada's user avatar
3 votes

The Graph nodes can't decode ABI encoded data containing arrays

They can, actually. I ran into a totally different problem: decoding tuples vs. decoding arrays. When trying to call ethereum.decode using this type string (address[],uint256[],uint32,bytes32[],bytes) ...
elmariachi's user avatar
2 votes

'Invalid account name or access token' when deploying to Thegraph

This happens if the access token is not set as the deployment key properly. Try running the command: graph auth --product hosted-service You should get the below message if successfull
Aurobindo Nayak's user avatar
2 votes
Accepted

TheGraph is not connecting to IPFS locally

The issue was that I had RemixIDE running on port 5001 and subgraph didn't give me a "port unavailable" error or anything. Turning off RemixIDE solved the problem.
blockbyblock's user avatar
2 votes

Failed to deploy to Graph node: Ethereum network not supported by registrar: mainnet

I got the same issue with graph-node and Ganache (port: 7545) on my Mac. Update <graph-node>/docker/docker-compose.yml graph-node's ethereum environment works for me services: graph-node: ...
ezza's user avatar
  • 21
2 votes
Accepted

Getting trading data efficiently

This data is not available readily on-chain, so it becomes difficult to get this kind of data. QuickNode has this data available via their Graph API You get historical NFT Trading data, marketplace ...
Sahil - QuickNode's user avatar
2 votes
Accepted

Problem compiling subgraph with graph-ts new version

there are 2 ways to solve this: in your schema.graphql set kind as optional with a ! at the end kind: Value! you check for yor variable ValueKind.STRING to be not null if(null!===ValueKind....
Carlo's user avatar
  • 36
1 vote

Failed to deploy to Graph node: Ethereum network not supported by registrar: mainnet

While running a graph node locally, in subgraph.yaml, the network value should be mainnet, this is not clear in the documentation. From this awesome dapp-development-with-a-local-subgraph article, ...
hack3r-0m's user avatar
  • 1,919
1 vote

Failed to deploy to Graph node: Ethereum network not supported by registrar: mainnet

Getting the same issue but with the Mumbai network, solved by changing the RPC link to point to the Mumbai network. Changing this line: https://github.com/graphprotocol/graph-node/blob/...
penguin's user avatar
  • 133
1 vote

Efficient Solidity storage pattern for a directional weighted graph

library GraphLibrary { struct Graph { mapping (uint => mapping (uint => uint)) edges; mapping (uint => uint) sourceNodes; mapping (uint => uint) targetNodes; uint ...
Mikhail Vladimirov's user avatar
1 vote
Accepted

Problem with array of adresses

new address[] returns a new array of addresses in memory. You can't then assign that to ReferralsOf[msg.sender] because there's no built-in support for such an array copy operation. Fortunately, you ...
user19510's user avatar
  • 28k

Only top scored, non community-wiki answers of a minimum length are eligible