contract interaction (works fine with metamask login via web3auth but it doesn't with other social logins) #1378
oscar88leonardo
announced in
Help
Replies: 1 comment 1 reply
-
Hey @oscar88leonardo , was there any update on this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hey guys, i am doing a simple implementation of a whitelist using nextJS and solidity. It works ok when you have to add users to the whitlelist contract using web3auth and selecting metamask in the login. The problem arise when i use another social login, like gmail or twitter.
code related:
const provider0 = new providers.Web3Provider(provider); const signer = provider0.getSigner(); console.log('signer:'); console.log(signer); // Create a new instance of the Contract with a Signer, which allows // update methods const whitelistContract = new Contract( WHITELIST_CONTRACT_ADDRESS, abi, signer ); // call the addAddressToWhitelist from the contract const tx = await whitelistContract.addAddressToWhitelist();
The error im getting is :
Error: Internal JSON-RPC error.
EthereumRpcError classes.js:18
getEthJsonRpcError errors.js:118
internal errors.js:28
sendAsync baseControllers.esm.js:447
request baseControllers.esm.js:469
buildEip1193Fetcher web3-provider.js:65
send web3-provider.js:128
sendUncheckedTransaction json-rpc-provider.js:230
promise callbacksendUncheckedTransaction json-rpc-provider.js:220
sendTransaction json-rpc-provider.js:253
fulfilled json-rpc-provider.js:5
promise callbackstep json-rpc-provider.js:7
__awaiter json-rpc-provider.js:8
__awaiter json-rpc-provider.js:4
sendTransaction json-rpc-provider.js:249
buildSend index.js:323
fulfilled index.js:5
promise callback*step index.js:7
__awaiter index.js:8
__awaiter index.js:4
buildSend index.js:312
_ref whitelist.tsx:88
step tslib.es6.js:102
verb tslib.es6.js:83
asyncGeneratorStep _async_to_generator.mjs:3
_next _async_to_generator.mjs:25
_asyncToGenerator _async_to_generator.mjs:32
_asyncToGenerator _async_to_generator.mjs:21
addAddressToWhitelist whitelist.tsx:149
React 16
next-dev.js:20:25
any help is highly appreciated! ;)
Beta Was this translation helpful? Give feedback.
All reactions