Questions tagged [drizzle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
42 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 ...
0
votes
0answers
19 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 ...
1
vote
0answers
36 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 ...
1
vote
1answer
38 views

Windows: “npm install drizzle” command don't work, Why? [closed]

when i try to run the command "npm install drizzle" on my machine it don't work. i install drizzle-react and drizzle-react-components without problem but "npm install drizzle" don't work. Any ideas?
0
votes
0answers
24 views

Error using drizzle and react

My contract Storage.sol - pragma solidity ^0.5.0; contract Storage { string public data; function getData() view external returns(string memory) { return data; } function setData(...
0
votes
0answers
33 views

How to Access Value of Drizzle ContractData Method

I would like to access the value of a Drizzle ContractData method: this outputs: 1000000000: <ContractData contract={name} method="getValue" /> Now, ...
0
votes
0answers
33 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 ...
1
vote
1answer
66 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 ...
0
votes
1answer
67 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 ...
1
vote
0answers
35 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 ?
1
vote
0answers
68 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?
0
votes
0answers
33 views

How to force update Drizzle cacheCall value

I have a contract value inside the Drizzle store. It updates correctly when a transaction directly interacts with a contract. But it doesn't updates when the transaction is internal. I want to update ...
0
votes
0answers
19 views

Web3NotFound Page rendering every time the drizzle-react DApp is refreshed

I'm trying to build a drizzle-react DApp. I want to implement a page called Web3NotFound.js which gets rendered when drizzle fails to find any web3 injected from MetaMask or Trust wallet browser. ...
0
votes
0answers
11 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 ...
0
votes
0answers
28 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...'})
0
votes
0answers
33 views

Supporting multiple HDwallets with truffle/drizzle

I have a dapp using truffle/ drizzle that implements regular user auth format (Login, id, tokn, etc). If I wanted to support each user having access to their own hd wallet, how would I do that with ...
0
votes
0answers
91 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 ...
0
votes
0answers
57 views

Warning: myJS defines an invalid contextType. contextType should point to the Context object returned by React.createContext()

I'm using DrizzleContext of drizzle-react package. I'm deriving the context object using the following code: static contextType = DrizzleContext.Consumer; the derived context object is then ...
1
vote
0answers
17 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 ...
1
vote
1answer
104 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 = ...
1
vote
2answers
193 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 ...
0
votes
1answer
141 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 ...
2
votes
1answer
80 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:...
0
votes
1answer
127 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 ...
1
vote
1answer
213 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) ...
1
vote
0answers
36 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....
1
vote
1answer
128 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 ...
1
vote
0answers
232 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 ...
1
vote
0answers
50 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, ...
0
votes
1answer
82 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
81 views

dApp Tech Stack

So I'm looking into building a dApp with standard app I functionality like user login/posts/likes/comments etc. Along with harnessing the power of ethereum to support betting and donations. Here is ...
2
votes
1answer
136 views

TruffleContract At() function with Drizzle

I am learning the Drizzle framework after I did a project using TruffleContract abstractions in Javascript (DApp). I have multiple instances of a contract and I am not able to access at the instances ...
1
vote
1answer
298 views

How to return array from struct using drizzle?

So I have been wondering how to return an array from a struct in drizzle, I can make multiple calls using web3, but it is kinda complex and would like a simpler approach. A simplified contract is ...
1
vote
0answers
156 views

How to update drizzle-box app to handle metamask no longer injecting web3?

I was reading about the latest and greatest metamask changes, and was wondering how I can update one of my dapps based off the truffle drizzle-box to be compatiable with the new metamask changes. For ...
1
vote
1answer
33 views

Starting Ethereum Development [duplicate]

Sorry for vague question but just looking to get some insight. I have just began developing a dapp for the ethereum network and I need some advice on what development frameworks/technologies to use. I ...
0
votes
1answer
338 views

How to write a component in Drizzle React? [closed]

The components are for the following functions: function tokenURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return tokenURIs[_tokenId]; } function ...
1
vote
0answers
135 views

How to update react component state with Drizzle

I'm using react and drizzle and want to update the classes state based on data returned from a call to a contract. I'm using the standard pattern from the drizzle box and here (https://itnext.io/how-...
4
votes
1answer
433 views

Having issues using the Drizzle library in React

Using Ubuntu 16.04 Greetings, all I was following the tutorial for getting Drizzle up and running located here. I advanced to this step when I attempted to run the app using the "npm start" command ...
1
vote
0answers
199 views

Uncaught at initializeDrizzle TypeError: Cannot read property 'apply' of undefined

I am working a Drizzle truffle box project, and this is my first intro to React so I am struggling a little bit. I keep getting this error and I cannot for the life of me seem to fix it. The ...
1
vote
0answers
257 views

How to instantiate and interact with a contract in web3, metamask and drizzle, given the ABI and the address?

I have a method on a Contract A which I am calling (in my dapp). This method in turn instantiates a second Contract B and emits an event with contract B's address. I then use this address, along with ...
3
votes
1answer
667 views

Drizzle cacheCall is not updating data correctly

I have a react component which is interacting with a solidity contract via drizzle. I store a cacheCall index in the constructor: this.opcTokenCacheCallIndex = context.drizzle.contracts.OPCToken....
2
votes
2answers
250 views

Drizzle and mapDispatchToProps not working

I'm still struggling with Drizzle, trying to dispatch my own action. Based on the Drizzle box, I added the following to HomeContainer: import Home from './Home'; import {drizzleConnect} from 'drizzle-...
3
votes
2answers
1k views

How to Listen to Contract Events in Drizzle

Let's take the example of the SimpleStorage contract that comes with the truffle box drizzle-box How can we listen to the event StorageSet and console.log it to the JS console? drizzleOptions.js ...
1
vote
1answer
259 views

can't access web3 object in Drizzle Box

I am building a DAPP based on drizzle box. I am struggling to find out how can i get the web3 instance without initiating a new one I want to end up with something like : this.props.web3.eth Thanks
2
votes
2answers
127 views

Is drizzle a contracts lib?

I'm researching about smart contracts, and been seeing a lot of truffleframework, ganache and drizzle. In the other hand, only found broad descriptions of those tools: "Drizzle is a collection of ...
1
vote
0answers
156 views

set default amout to transaction

I have a ticket system where you can buy some tickets to an given price. I want to set the amount to the method and send it back to the contract. For this I'm using metamask but I don't really get, ...
3
votes
1answer
523 views

How can I access the address of a contract in a drizzle dapp?

I've started working from the drizzle box and can access functions within contracts, but if I want to give an allowance to a contract address so it can use users tokens how can I give the correct ...
0
votes
1answer
977 views

How to access web3Instance when using Truffle's Drizzle

I'm working on a dapp with the boilerplate created by running truffle unbox drizzle and need to call functions provided by the web3 instance. Is there a way to access the web3 instance object? All we ...
2
votes
1answer
289 views

Truffle: cannot use drizzle for communicating between react app and blockchain

I am using Truffle for writing smart contract and using drizzle and drizzle-react for communicating with smart contract. I have configured as tutorial said. After that, I try to print out: this....