https://github.com/hashgraph/hedera-accelerator-defi-dex
https://github.com/hashgraph/hedera-accelerator-defi-dex
hacktoberfest
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hashgraph/hedera-accelerator-defi-dex
- Owner: hashgraph
- License: apache-2.0
- Created: 2022-07-15T19:28:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-06T16:33:28.000Z (3 months ago)
- Last Synced: 2026-03-06T19:58:10.547Z (3 months ago)
- Topics: hacktoberfest
- Language: TypeScript
- Size: 4.11 MB
- Stars: 8
- Watchers: 10
- Forks: 5
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-hedera - https://github.com/hashgraph/hedera-accelerator-defi-dex
README
# Project Setup -
## Run locally follow these instructions - Needs Node v18.x.x and npm
[Follow this link to get context of HardHat](https://hardhat.org/getting-started)
Compile and run tests -
```shell
npx hardhat compile
npx hardhat test
```
---
## `Deploy existing contracts on testnet using gitHub actions`
Tests run before deploying the contract on testnet.
#### Normal contract
1. Go to [GitHub action page](https://github.com/hashgraph/hedera-accelerator-defi-dex/actions/workflows/deploy-contract-github.yml)
2. Run this workflow `Deploy a contract to testnet using dispatch` with input parameters contract name and type e.g. contract name = `factory` and contract type = `Logic`. Both name and type are case sensitive.
3. Monitor the `Deploy a contract to testnet using dispatch` workflow.
#### Proxy contract
1. Go to [GitHub action page](https://github.com/hashgraph/hedera-accelerator-defi-dex/actions/workflows/deploy-contract-github.yml)
2. Run this workflow `Deploy a contract to testnet using dispatch` with input parameters contract name and type e.g. contract name = `factory` and contract type = `Proxy`. Both name and type are case sensitive.
3. Monitor the `Deploy a contract to testnet using dispatch` workflow.
#### Upgrade implementation contract
1. Go to [GitHub action page](https://github.com/hashgraph/hedera-accelerator-defi-dex/actions/workflows/deploy-contract-github.yml)
2. Run this workflow `Deploy a contract to testnet using dispatch` with input parameters contract name and type e.g. contract name = `factory` and contract type = `Upgrade`. Both name and type are case sensitive.
3. Monitor the `Deploy a contract to testnet using dispatch` workflow.
---
## `Deploy contracts on testnet using command line`
### New contract (one time setup needed)
1. Go to [./deployment/deploy.ts](./deployment/deploy.ts)
2. Add new contract name in SUPPORTED_CONTRACTS_FOR_DEPLOYMENT
3. Run `npx hardhat run deployment/deploy.ts`
### Existing contract
Run `npx hardhat run deployment/deploy.ts`
Once above command executes, a prompt in terminal displays options to deploy contracts
1. create - Deploys a new logic contract
2. upgrade - Upgrades the existing proxy with new implementation
---
## [Contract Upgrade Strategy](./UPGRADE.md)
---
## `Linter set up` -
- All \*.sol files should be formatted with - NomicFoundation.hardhat-solidity
- Pls verify the default formatter is below under `/Users//Library/Application\ Support/Code/User/settings.json`
- Please enable format on save settings in VS code - Code -> Preferences -> Settings -> Text Editor -> Formatting -> Format On Save
```
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
}
```