staking
staking copied to clipboard
Deploy on local node
Hi team, Could you please help me, how can I deploy this dapp on my local node, I have tried it but it is only working on mainnet and kovan. Could you please help me here? I just wanted to learn how synthetix dapp work.....
With this PR https://github.com/Synthetixio/staking/pull/1160/files we have removed all the networks except mainnet and kovan (+optimism). If you want to run it locally - add local
network there to the list (to avoid cleaning it from contract definitions). I haven't tested dapp with local network, so it is not guaranteed this will work.
i have add local here
const networks = ['kovan', 'kovan-ovm', 'mainnet', 'mainnet-ovm', 'local'];
in next.config.js file
but i am getting this error Error: Cannot find module 'synthetix/publish/deployed/local/deployment.json' Require stack:
- C:\Users\ACER\Desktop\staking-dev\scripts\minify-synthetix-contract.js
- C:\Users\ACER\Desktop\staking-dev\next.config.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.mod._resolveFilename (C:\Users\ACER\Desktop\staking-dev\node_modules\next\dist\build\webpack\require-hook.js:182:28)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at C:\Users\ACER\Desktop\staking-dev\scripts\minify-synthetix-contract.js:6:22
at Array.forEach (
) at generate (C:\Users\ACER\Desktop\staking-dev\scripts\minify-synthetix-contract.js:5:11) at optimiseContracts (C:\Users\ACER\Desktop\staking-dev\next.config.js:12:2) at Object.webpack (C:\Users\ACER\Desktop\staking-dev\next.config.js:41:4) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\ACER\Desktop\staking-dev\scripts\minify-synthetix-contract.js', 'C:\Users\ACER\Desktop\staking-dev\next.config.js' ] }
can you please guide what else can i do here.?
1.Running Dapp on Windows is not supported (but you may be lucky). 2. I suggest commenting out whole contract minification bit in next.config instead. That would include full synthetix bundle with all supported networks.
Sorry I didn't get your 2nd point could you please explain it?
Comment line 41 https://github.com/Synthetixio/staking/blob/2bedb58f0c2934c0db96b18cf0c08b0d4d5464df/next.config.js#L41
Dapp is requesting me to change to mainnet. it is not working with ganache.
I haven't tested dapp with local network, so it is not guaranteed this will work.
kovan or kovan optimism is the way then.
getting faucet for them is lot difficult that is the reason why i trying to deploy it on local ....