Replies: 1 comment
-
const Governance = await new ethers.Contract( You have not defined the provider. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys , was just makeing the frontend for interacting with the smart contract and went through ENS error . My react function call is ry {
const email = currentUser?.email;
const { data } = await supabase
.from('tokensdata') // Replace with your table name
.select('transactions')
.eq('email', email);
console.log(data);
and the contract function which I am trying to call is
function expireTokens(
uint256 _brandCoins,
address[] memory _brands,
uint256[] memory _brandAmount,
uint256 _platformCoins
) external {
User storage _user = addressToUser[msg.sender];
/*check for array lengths to be same */
if (_brandCoins > 0) {
for (uint i = 0; i < _brands.length; i++) {
/*Addd validation checks for that no zero address is there */
if (_user.rewardCoins[_brands[i]] < _brandAmount[i]) {
revert NOT_SUFFICIENT_COINS_TO_BURN();
}
_user.rewardCoins[_brands[i]] -= _brandAmount[i];
}
}
if (_platformCoins > 0) {
if (_user.availableCoins < _platformCoins) {
revert NOT_SUFFICIENT_COINS_TO_BURN();
}
_user.availableCoins -= _platformCoins;
}
IRewardToken(i_tokenAddress).burn(
_brandCoins + _platformCoins,
msg.sender
);
emit Tokens_Expired();
}
The error is
index.js:149 Error: Error: network does not support ENS (operation="getEnsAddress", info={ "network": { "chainId": "31337", "name": "unknown" } }, code=UNSUPPORTED_OPERATION, version=6.7.1)
at makeError (errors.ts:664:1)
at assert (errors.ts:683:1)
at EnsResolver.getEnsAddress (ens-resolver.ts:526:1)
at async #getResolver (ens-resolver.ts:397:1)
at async EnsResolver.fromName (ens-resolver.ts:570:1)
at async BrowserProvider.getResolver (abstract-provider.ts:1143:1)
at async BrowserProvider.resolveName (abstract-provider.ts:1151:1)
at async JsonRpcSigner.resolveName (abstract-signer.ts:202:1)
at async checkAddress (checks.ts:26:1)
at async fragments.ts:758:1
Please go through it
Beta Was this translation helpful? Give feedback.
All reactions