Questions tagged [drizzle]

The tag has no usage guidance.

0
votes
0answers
12 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
22 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
42 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
21 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
20 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 ?
0
votes
0answers
29 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
16 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
12 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
9 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
10 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
15 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
54 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
30 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
70 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
117 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
79 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
44 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
70 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 ...
0
votes
1answer
130 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
26 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
85 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
177 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 ...
0
votes
0answers
33 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
55 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
637 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
68 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
90 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
267 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
133 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
32 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
295 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
112 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
372 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
194 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
231 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
535 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
220 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
923 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
237 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
117 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
136 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, ...
0
votes
0answers
77 views

Truffle Drizzle React returns string when expecting a number

I have a method in a contract which returns a uint: function numberTest() public pure returns(uint) { return 10; } However when I call the method from my React component it returns ...
3
votes
1answer
442 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
838 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
263 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....
6
votes
1answer
465 views

Truffle unbox drizzle not working properly

truffle version = 4.1.4 truffle unbox drizzle truffle compile truffle migrate npm run build npm run start this gets me this error: Truffle Drizzle-box fails with TypeError: (0 , _drizzle....
1
vote
2answers
829 views

Drizzle Contract call returns unexpected object

I have a view function in my smart contract that returns a uint. In the Truffle Drizzle javascript page I make the call when the page loads: this.contracts.TheContract.methods.getNumber.call() I ...
4
votes
4answers
449 views

Truffle Drizzle-box fails with TypeError: (0 , _drizzle.generateContractsInitialState) is not a function

Right after unboxing Drizzle-box I'm getting a TypeError: (0 , _drizzle.generateContractsInitialState) is not a function. Ganache is running on localhost:8545, contracts are deployed, Metamask ...
1
vote
0answers
253 views

Drizzle React Component ContractData for array returns empty

<ContractData contract="TheContract" method="getData" methodArgs={[accounts[0], "0", { from: accounts[0] }]} /> and a contract view function function getData() public view returns (...