Questions tagged [drizzle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Smart Contract interaction with drizzle cacheCall() returning undefined

I have an existing contract and want to integrate drizzle to read data using drizzle cacheCall() I have setup my drizzle options as seen below (saw this method in drizzle doc) const options = { ...
user avatar
  • 11
0 votes
0 answers
46 views

Drizzle Components in React App - can not read properties of undefined. Above statement occured in <o> component

I am trying to use Drizzle inside a React App to show the smart contract details in the front end. However stuck at this error, which says ` drizzle-react-components.js:1 Uncaught ...
user avatar
1 vote
1 answer
316 views

How to fix "MetaMask no longer injects web3" & "Cannot read properties of undefined (reading 'toWei')" errors when using Drizzle for building a Dapp?

I'm trying to build a decentralized app for a lottery smart contract, deployed on a local ganache ethereum network, but in this case I'm using Drizzle tool from Truffle Suite. This is the smart ...
user avatar
  • 111
0 votes
0 answers
15 views

Truffle contract is not persisting my writing to the contract (Accessing through drizzle)

Relevant contract code from an ERC20 template: uint256 public _myNumber = 0; function saveNumber(uint256 num) public returns (uint256) { _myNumber = num; return _myNumber; } function getNumber() ...
user avatar
0 votes
0 answers
286 views

Git error during installation of Drizzle

I am trying to install the drizzle with this terminal command (on Windows 10): npm install drizzle --save But I am getting this error: npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! ...
user avatar
  • 138
0 votes
0 answers
141 views

how to cache responses of rpc api calls in DApps

Issue: JSON RPC Queries When interacting with an ethereum rpc interface for building DApps with JS or TS, the huge amount of communication round trips becomes a huge burden. The UI just takes a couple ...
user avatar
2 votes
1 answer
624 views

MetaMask (Web3) Inflates Transaction/Mint Price to Ridiculous Amount

I am writing a dApp/UI for my ERC721 smart contract and facing a recurring issue. My contract has been deployed to the Rinkeby test network and the contract has been verified on Etherscan, allowing me ...
user avatar
1 vote
2 answers
91 views

Infinite loop using react Drizzle component

This might be the best place to ask this. I'm having an infinite loop issue when fetching my NFT's json URI. My main issue was being able to display my NFT's name on the screen but now i'm getting an ...
user avatar
  • 175
1 vote
0 answers
82 views

How to send multiple function arguments to solidity smart contract from react.js using Drizzle?

I am trying to call a function of solidity contract that takes in multiple arguments(8 arguments). This is my contract function. function generatePet( uint256 _petPrice, ...
user avatar
  • 245
0 votes
0 answers
390 views

MetaMask: ALERT: Transaction Error. Exception thrown in contract code

I'm working with ganache, drizzle and Vue on a decentralized app. I have a simple contract IPFSStore which contains the following function: function changeStatus(address owner, string memory ...
user avatar
1 vote
0 answers
112 views

how to implement connect button alongwith drizzle library for ethereum dapp?

I'm trying to create an ethereum dapp which uses drizzle library. I need to implement a connect button logic in which clicking on connect button will provide options like Metamask, WalletConnect, ...
user avatar
  • 311
0 votes
0 answers
57 views

Display the user object array in react app using drizzle

I have been trying to do a simple use case where we return all the user details please find my code myComponent.js <div className="section"> <h2>JurStatus</h2> ...
user avatar
0 votes
0 answers
73 views

Send from Drizzle useCacheSend hook sends trasactions twice

I'm following the old documentation about hooks and I'm getting a problem at sending transactions: every transaction is sent twice, why? The next is the current core: <form onSubmit={...
user avatar
1 vote
0 answers
141 views

Which Ethereum library is the one to use nowadays? Contract events on mobile must work

I used drizzle in our dApp and contract events work fine on Desktop browsers with MetaMask. However, on mobile (tested with Rinkeby deployment on MetaMask and Status on Android) the contract events ...
user avatar
1 vote
0 answers
120 views

How can I inject a custom web3 provider into the drizzle app when using Nightwatch e2e tests?

I have setup a basic e2e test with a Drizzle VueJS app. It appears that when the tests run drizzle uses the fallback option for connecting to the blockchain using web sockets (ws://127.0.0.1:8545). I ...
user avatar
1 vote
0 answers
141 views

Drizzle problem: how to connect to infura direct when user has Metamask, but isn't connected?

I understand how to connect direct to infura if the user has no wallet at all (for displaying blockchain data when users don't have a wallet) the problem is that I don’t know how to connect to infura ...
user avatar
2 votes
1 answer
483 views

Drizzle cacheSend outputs "cacheSend is not a function" error, but the tx works when using send

I'm using Drizzle and react-hooks in my new open source project, but cacheSend outputs always "cacheSend is not a function" This line of code with send works as expected const stackId = contract....
user avatar
0 votes
0 answers
107 views

Out of gas error even for simple one string set

I have been struggling with this exception and am literally stuck in development: "Error: Returned error: VM Exception while processing transaction: out of gas" I removed all the code and just ...
user avatar
  • 217
0 votes
0 answers
54 views

Truffle Object Keeps Changing to Undefined When I Try To Play With Data With React

The question is in the title. I have a React Component that displays the appropriate data when I do it in a very specific way, but breaks when I try to play with the data. state = { dataKey: "1",...
user avatar
2 votes
0 answers
85 views

What are the differences between Drizzle and the Truffle React box?

Truffle has many "boxes", two of which are: truffle unbox react And: truffle unbox drizzle They both seem to be focused on frontend development. Other than Drizzle being based on a Redux store, ...
user avatar
1 vote
0 answers
35 views

Retrieve drizzleContext from within componentDidMount [closed]

How do i get drizzleContext from inside the componentDidMount function? I am currently getting it from render using the following code which seems to be working fine: render() { return ( &...
user avatar
  • 11
1 vote
1 answer
30 views

input field is not getting displayed by using ContractForm

<DrizzleProvider options={drizzleOptions}> <LoadingContainer> <div> <h1>Welcome Doctor</h1> ...
user avatar
1 vote
0 answers
33 views

Any idea how to add new contracts into drizzle react app using the address?

I have a react app which creates new contracts. lets say A creates B. I have the addresses of the newly created contracts of B. How do i add the newly created contracts of B using its address to ...
user avatar
1 vote
1 answer
91 views

How can I add new contracts generated from a factory to my drizzle-react app?

I have a Factory contract which creates new contracts. How do I get the new contract into my drizzle-react web app? I am using to send the transaction to create a new contract but I don't know how ...
user avatar
1 vote
0 answers
25 views

How can I specify a date picker in one of the fields in my ContractForm React component?

I'm using the ContractForm React component available in the drizzle-react-component library. It's super nice and easy to setup and use, but I am dealing with a date in one of the fields (which is ...
user avatar
  • 123
0 votes
1 answer
233 views

How does drizzle know when contract state has updated and reflect that state in the store (when a value has been `cacheCall`ed)?

Basically could someone provide a more technical explanation of this? It says that it watches(subscribes to) for block headers and when comes in it "through the transactions looking to see if any of ...
user avatar
  • 359
0 votes
1 answer
184 views

Windows: command "npm install drizzle" give me an ERR!

npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ `tar.gz module has been deprecated and your application is ...
user avatar
1 vote
0 answers
200 views

Truffle vs. Embark [closed]

Say a programmer developer a web front-end using Truffle/Drizzle. The developer moved on and a new developer, who only knows JavaScript comes along to manage and extend the Dapp. Someone told me that ...
user avatar
1 vote
1 answer
704 views

Issue with the "npm install drizzle" command on Windows [closed]

I want to install Drizzle. Running "npm install drizzle" only displays errors and the installation has failed. I have been able to install drizzle-react and drizzle-react-components without an issue ...
user avatar
0 votes
0 answers
113 views

Drizzle Installation: pauses at fetchMetadata: sill resolveWithNewModule http-https@1.0

I am following this tutorial https://www.trufflesuite.com/tutorials/getting-started-with-drizzle-and-react. Everything is working smoothly until I have to npm install drizzle. I then run into the ...
user avatar
1 vote
1 answer
416 views

Drizzle - accessing array items from a getter

In my contract I have a getter function that returns a full array of addresses: function getDeployedCampaigns() public view returns(address[] memory) { return deployedCampaigns; } Using drizzle ...
user avatar
  • 59
0 votes
1 answer
928 views

Contract [Contract's name] not found on network ID: 5777

I am using truffle with drizzle. In the contract folder I provide a file that includes two contracts A that is a factory contract and B that is created through one of A's functions After compiling ...
user avatar
  • 59
1 vote
0 answers
100 views

How to pass array parameter. Drizzle

Is there have a way to pass array parameter from the drizzle to my contract ? I want to pass an array of uint[] i have read a lot about getData() function and encodeABI but how to use it in Drizzle ?
user avatar
1 vote
0 answers
211 views

Error occurs when I attempt to run `npm install drizzle` (Truffle product)

I am having an issue using Drizzle. When I run the command npm install drizzle I get the following error: How can I fix this?
user avatar
1 vote
0 answers
23 views

Account & Block Polling not happening properly for the DApp in Trust Wallet Browser

my DApp works fine in desktop/laptop using metamask which polls the accounts and blocks (1500ms and 3000ms respectively), as set in the drizzle options. But the same DApp when I open in trust wallet ...
user avatar
  • 311
0 votes
2 answers
349 views

How to use cacheSend of drizzle library when the method needs two parameters

Should it be like the example below(2,2 as two different parametres) Ex: const stackId = drizzle.contracts.SimpleStorage.methods.set.cacheSend(2,2, {from: '0x3f...'})
user avatar
0 votes
0 answers
343 views

how to inject web3 in drizzle based DApp from Trust Wallet web3 provider?

My DApp is using drizzle alongwith DrizzleContext provider which takes care of checking for web3 provider, and is successfully getting web3 provider from MetaMask. The same is not working for trust ...
user avatar
  • 311
1 vote
0 answers
27 views

Adding additional info for initial state of Drizzle

How do I add extra content to the initial state of drizzle? I want to keep some local information that is not dependant on the blockchain. Should I keep a seperate redux store for that or is there a ...
user avatar
  • 107
1 vote
1 answer
317 views

Drizzle CacheCall always returns null

I have set up drizzle to be able to connect to my smart contract from my react-application. After some fiddling, I decided to make this function in my smart contract: /*** test ***/ uint numberFive = ...
user avatar
  • 107
1 vote
2 answers
693 views

How to integrate Drizzle with react

I have currently set up a truffle project with react, redux and react-router. I just finished writing my first implementation of the smart contract, and now want redux to connect with the smart ...
user avatar
  • 107
0 votes
1 answer
388 views

Specify an alternative node (IP:Port) for Drizzle, if there is no MetaMask or Web3-enabled browser

Drizzle will automatically use the injected Web3 object. But if there is now Web3 object, Drizzle will try to connect to ws://127.0.0.1:8545'. How to configure Drizzle to connect to Infura.io for ...
user avatar
2 votes
1 answer
595 views

How to initialize empty Drizzle instance and later provide contracts data

Following Drizzle documentation, Drizzle instance can only be created with: const drizzle = new Drizzle(options) Where the options is mandatory. And trying to not pass options will generate an error:...
user avatar
0 votes
1 answer
365 views

drizzle.contracts is empty object after creating new instance of Drizzle

After creating a new istance of Dirzzle and passing the needed options: const drizzle = new Drizzle(options); The object drizzle.contracts is an empty object instead of being an array of the ...
user avatar
1 vote
1 answer
679 views

Call `getPastEvents` with Drizzle raise error: "getPastEvents is not a function"

Calling getPastEvents with Drizzle will cause the exception: TypeError: this.drizzle.contracts.Contract.getPastEvents is not a function How to get all the past events in an array (in-one-shot) ...
user avatar
1 vote
0 answers
74 views

drizzle not updating events properly - duplicate events

I'm facing a peculiar problem while rendering event values in a component using drizzle. When a new event is created and is updated in the events array of drizzle (drizzleState.contracts.MyContract....
user avatar
  • 311
1 vote
1 answer
336 views

How to handle events using drizzle?

strange that after much searching, i havent found even one piece of info out there which clearly elaborates on how the events are manipulated in drizzle. From what i understand, the event names (and ...
user avatar
  • 311
1 vote
1 answer
1k views

How to get the returned value of a smart contract function when it called by using cacheSend() in drizzle

I just tried to build a simple DApp using truffle, react and drizzle. My question is how to get the returned value of a smart contract function when it called by using cacheSend() in drizzle? As ...
user avatar
  • 11
1 vote
0 answers
75 views

using <DrizzleContext.Consumer> re-renders the component infinitely

I'm trying to build a simple dapp using drizzle-react's 'DrizzleContext'. This is how my index.js file looks like: import React from 'react'; import ReactDOM from 'react-dom'; import { Drizzle, ...
user avatar
  • 311
0 votes
1 answer
272 views

How to send context from DrizzleContext.Provider to a Class Component / Class Container

I'm using the new Context API supported 'drizzle-react' library in my dapp. Can anyone please clarify how to receive the context sent from DrizzleContext.Provider into a "class" component? Check out ...
user avatar
  • 311
0 votes
2 answers
3k views

Could not find "store" in either the context or props of "Connect(c)". Either wrap the root component in a <Provider>

i'm trying to create a drizzle-react app which uses the new DrizzleContext component but running the following error in my 'localhost:3000': > Could not find "store" in either the context or ...
user avatar
  • 311