Closed 4skinSkywalker closed 3 years ago
OK guys, I got to the root of this: I had no EVM address paired with my Polkadot generated SR25519 address.
Now one thing: how do I get the EVM address when connected with polkadot{.js}?
Normally I would do the following:
// Retrieving the selectedAccount
let accounts = await this.provider.listAccounts();
console.log("Accounts", accounts);
this.selectedAccount$.next(accounts[0]);
But I see this is returning an error as there's no listAccounts method in your provider... How to go on with this?
I've found a couple of methods inside the signer module:
Yet when I await both it stays pending... :/
Maybe it's because I keep getting disconnected from the WS:
How do I solve this?
I confirm that I was unable to get the pending promises resolved because of frequent disconnections.
Is it possible to listen for a disconnection event?
Thanks
The public RPC might be overloaded, hence Abnormal closure. Best to run your own node if you want to make many connections.
As you may have noticed, Reef is not like Ethereum, because it is not based on Ethereum. So its unlikely things will work with your existing web3 provider. You will probably want to check out reef provider https://docs.reef.finance/docs/developers/js_libraries/
Lastly, it might be expedient for you to borrow code from UI examples or one of the OS projects: https://github.com/reef-defi/ui-examples https://github.com/reef-defi/reefswap
The call
issue on testnet is confirmed, we are working on a fix.
You can use the mainnet in the meantime.
The testnet has been upgraded to v7.
https://github.com/reef-defi/reef-chain/releases/tag/v7
The smart contracts deployed on testnet from block 1,077,077 to 1,145,000 have been lost. Any smart contracts affected by address overwriting will have to be redeployed as well.
I'm trying to complete the integration with Reef on our dapp, currently testing a contract in the Reef Testenet but I kept getting Error: call revert exception.
So far I'm able to connect to Polkadot{.js} and successfully get the account address, provider and signer. I can instantiate the contract with ethers without errors but as soon as I call contract's methods I get errors.
The contract deployment can be found at https://testnet.reefscan.com/block/?blockNumber=889100.
I paste here the dapp contract addresses and ABI:
I paste some code below, let me know if there's something I'm missing:
This exact code works flawlessly on every chain except Reef. Maybe something went wrong during the contract deployment?
Thanks, Fredo