what happens if you use 127.0.0.1:3000 instead of localhost?
Nice that works thanks!
I noticed when looking at ERC20Transfers on the BSC network, that the link to follow the transaction leads to Avalanche. when is should lead to bscscan.com/tx/.
followed it back to line 10 of ERC20Transfers.jsx:
const { ERC20Transfers, chainId } = useERC20Transfers();
ERC20Transfers - fills with data.
chainId - returns as undefined.
Will fix that with the next commit thanks for letting us know
For now you can add:
const { chainId } = useMoralisDapp()
to erc20 transfers
once you install 1inch plugin in what file you put the functions for the dex. under 1inchdex/conponents?
This is fixed now in newest version
The logic for 1inch plugin can be found in src/hooks/useInchDex
EDIT: Regarding the .ENV entries, it looks like thatās just a mistake when Dimity last updated. None of those new values are used anywhere in the repo.
Hey everybody, I have a few questions/observations regarding the boilerplateā¦
- The Discord dev-chat channel is noisy so this dedicated post is great.
- I pulled latest changes and .env items are unexplained in the Readme or here in this forum thread. I can figure out what to do, but would be best to update the Readme.
frpcPath = F:\frpc\frpc.exe
chain = ganache
moralisSubdomain = xxxxxxx.usemoralis.com
abiPath = "F:\ethereum-boilerplate\Truffle\build\contracts\Contract.json"
- Thereās no mention in the Quick Start about truffle or ganache or the proxy server as prerequisites.
- The Windows style āF driveā hard-coded values should be consistent with the other āinsert hereā placeholder text.
- There are no source code comments in the boilerplate. Templates such as OpenZeppelin have extensive source comments. Consider adding comments to reduce the number of inbound support inquiries.
I could do a pull request to help with this type work, but I donāt know whatās intentional or scheduled to be changed soon.
Great job and I respect the work!
I was playing with the <TokenPrice>
tag. but im having some issues.
this works:
<TokenPrice
address="0xb27adaffb9fea1801459a1a81b17218288c097cc"
chain="bsc"
image="/logo.png"
size="40px"
/>
this dont work:
const [address, setAddress] = useState('')
setAddress(0xb27adaffb9fea1801459a1a81b17218288c097cc)
<TokenPrice
address={address}
chain="bsc"
image="/logo.png"
size="40px"
/>
Because you need to put your address inside a string.
setAddress(ā0xā¦.837ā)
Hey @kevlawton!
It looks like you didnāt notice my answer in the Discord. So I will duplicate it there.
Weāve added more params for fast connection your localdevchain to your Moralis DB. If you donāt need them-specify appId and serverUrl only
Iāll update the docs and we will make a video tutorial how to use this functionality after updating the moralis-admin-cli
It is in a string, It makes it a string by making to starting state an empty string. The tag accepts the props, if I check the object with react dev tools both ways. But for some reason every time a pass a state to the prop it fails.
Well, based on what you posted in here the Input in setAddress() is clearly not inside string annotations.
I was trying to show the issue with more simplified code. Really I am passing something like coinData[3].bscContract into the setAddress().
both ways show this:
so it does appear that the data is passed in a string, but still not working. I know this is more of a issue with my understanding of react then it is with the Boilerplate, but thank you for any help you offer.
I solved my issue. I just had to add my state to the return,
return (
coinData,
address // added state here
?
<div className="coin">
<TokenPrice
address={address}
chain="bsc"
image="/logo.png"
size="40px"
/>
Hi everyone,
Iām trying to run properly the git of Etherum Boilerplate but Iām facing many issues.
Firt, whenever I go on the site I have an error 400 (missing address maybe) when trying to access to getNativeBalance function from my moralis server. Also, when I try to use the dex with testnet it says āSwitch to supported eth network or edit InchDex settingsā. And when I change eth with anything else in my code, the dex is showing up but we have no token to select.
Can you help me?
Same error on POST request when trying to access to the wallet
For the dex,it is showing me tokens for bsc, eth but not bnb.
Thank you
Iāve checked your server logs. I see that you are calling getNativeBalance()
for "chain":"ganache"
. But our web3API endpoints are not available for local chains.
They support all public testnets/mainnets