staking icon indicating copy to clipboard operation
staking copied to clipboard

Deploy on local node

Open SyedImam1998 opened this issue 2 years ago • 8 comments

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.....

SyedImam1998 avatar Jul 26 '22 04:07 SyedImam1998

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.

noisekit avatar Jul 26 '22 04:07 noisekit

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.?

SyedImam1998 avatar Jul 26 '22 10:07 SyedImam1998

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.

noisekit avatar Jul 26 '22 10:07 noisekit

Sorry I didn't get your 2nd point could you please explain it?

SyedImam1998 avatar Jul 26 '22 10:07 SyedImam1998

Comment line 41 https://github.com/Synthetixio/staking/blob/2bedb58f0c2934c0db96b18cf0c08b0d4d5464df/next.config.js#L41

noisekit avatar Jul 26 '22 11:07 noisekit

Dapp is requesting me to change to mainnet. it is not working with ganache. image

SyedImam1998 avatar Jul 26 '22 11:07 SyedImam1998

I haven't tested dapp with local network, so it is not guaranteed this will work.

kovan or kovan optimism is the way then.

noisekit avatar Jul 26 '22 11:07 noisekit

getting faucet for them is lot difficult that is the reason why i trying to deploy it on local ....

SyedImam1998 avatar Jul 26 '22 12:07 SyedImam1998