Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drizzle]

The tag has no usage guidance.

0
votes
0answers
11 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
7 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
15 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
37 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
1answer
44 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
52 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
28 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
44 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
71 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) ...
0
votes
0answers
16 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....
0
votes
1answer
64 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
83 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
21 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
36 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
374 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
63 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
62 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
210 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
103 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
31 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
261 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
106 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
324 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
190 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
218 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
436 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
202 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
825 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
207 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
109 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
118 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
75 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
389 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
709 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
253 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....
0
votes
0answers
54 views

How to block AppContainer from being initialized if MetaMask is not installed?

I am following this tutorial to create a simple Dapp using React. So far everything looks fine except when I tried it on my another browser that doesn't has MetaMask installed. Before that, this is ...
6
votes
1answer
447 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
698 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
433 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
243 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 (...
1
vote
0answers
309 views

Drizzle React Component ContractData returns empty

My contract call to a simple view function that returns an array of data returns empty using: From testing it appears that ContractData can't deal with more than one return value. If I return one unit ...
0
votes
0answers
150 views

Truffle Drizzle: Passing String address results in Invalid Number of Parameters

I have a view function in my contract that takes an address as a parameter and returns a uint: function getNumber(address _address) public view returns (uint) { require(_address != 0x0); ...
1
vote
1answer
340 views

Truffle Drizzle ContractData call keccak256 error

I started with truffle unbox drizzle then made use of my contract. I can make use of the ContactForm without error in App.js: <ContractForm contract="TheContract" method="addData" labels={["...