Questions tagged [drizzle]
The drizzle tag has no usage guidance.
71
questions
0
votes
1
answer
701
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 ...
2
votes
0
answers
211
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-...
5
votes
1
answer
814
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
0
answers
327
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 ...
2
votes
0
answers
513
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
1
answer
1k
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
2
answers
400
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
2
answers
2k
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
2
answers
424
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
3
answers
213
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
0
answers
257
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, ...
4
votes
2
answers
1k
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 ...
1
vote
1
answer
2k
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 ...
3
votes
1
answer
355
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....
7
votes
1
answer
928
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....
3
votes
2
answers
2k
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
4
answers
622
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
0
answers
359
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
0
answers
448
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
0
answers
333
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
1
answer
662
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={["...