Skip to content

st4cks1defl0w/hegex

Repository files navigation

Hegex Options DEX

[DEV] Deployable Hegic Contracts

https://github.com/stacksideflow/contracts-v888

Deps

  • node 15.4.0, likely any v15

Development

Install npm deps and compile webpack:

npm i && npx webpack --mode development

Compile contracts (assumes you have solc installed):

truffle compile

Migrate (ropsten):

truffle migrate --network ropsten

After migration is completed ABIs will be written to /resources/public/contracts/build, addresses will be written to shared clj file; ready to be consumed by frontend.

If you wish to skip truffle migrate and start UI without migrating the contracts:

cp resources/external-abi/* resources/public/contracts/build/

Start UI:

lein build-css
lein repl
# alternatively, start from clean slate w/ webpack
rm -rf node_modules && lein clean && npm i && npx webpack --mode development && (echo "(start-ui\!)"; cat <&0) | lein repl
# go to http://localhost:4177/ 

NB external ABIs

external ABIs (generated for contracts outside of the scope of this project) is kept under VC in resources/external-abi dir

NB - security guarantees

  • no double-minting
  • beforeTokenTransfer hook locks NFT unless it's owned by Chef

NB - current testnet deployments

NB - current mainnet deployments

NB - 0x relay for ropsten

http://138.68.106.185:3000/sra/v3/