Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
arlosiggio committed Sep 12, 2024
0 parents commit 8790c9e
Show file tree
Hide file tree
Showing 4,977 changed files with 7,737,019 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
11 changes: 11 additions & 0 deletions DeXe00/patched/DeXe/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = false
[*.js]
indent_size = 2
max_line_length = 120
[*.sol]
indent_size = 4
max_line_length = 99
9 changes: 9 additions & 0 deletions DeXe00/patched/DeXe/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PRIVATE_KEY = "YOUR PRIVATE KEY"
INFURA_KEY = "INFURA PROJECT ID"
ETHERSCAN_KEY = "ETHERSCAN API KEY"
BSCSCAN_KEY = "BSCSCAN API KEY"
COINMARKETCAP_KEY = "COINMARKETCAP API KEY"

# Available targets: 'ethers-v5', 'truffle-v5' and 'web3-v1'
# By default 'ethers-v5'
TYPECHAIN_TARGET = "TYPECHAIN TARGET"
30 changes: 30 additions & 0 deletions DeXe00/patched/DeXe/.github/workflows/test-smart-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "test-smart-contracts"

on:
push:
branches:
- master
pull_request:
branches:
- master
- dev

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "16.18.x"
cache: npm

- name: Install packages
run: npm install

- name: Run tests
run: npm run test
13 changes: 13 additions & 0 deletions DeXe00/patched/DeXe/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
.env
.DS_Store

# Hardhat files
cache
artifacts
coverage.json
coverage

# Typechain generated files
generated-types
generated-markups
4 changes: 4 additions & 0 deletions DeXe00/patched/DeXe/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint-fix && git add -u
21 changes: 21 additions & 0 deletions DeXe00/patched/DeXe/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 99,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.js",
"options": {
"printWidth": 120,
"tabWidth": 2
}
}
]
}
4 changes: 4 additions & 0 deletions DeXe00/patched/DeXe/.solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
skipFiles: ["interfaces/", "mock/"],
configureYulOptimizer: true,
};
14 changes: 14 additions & 0 deletions DeXe00/patched/DeXe/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"reentrancy": "off",
"prettier/prettier": "off",
"modifier-name-mixedcase": "off",
"no-empty-blocks": "off",
"func-visibility": "off",
"max-states-count": "off",
"not-rely-on-time": "off",
"compiler-version": "off"
}
}
Empty file added DeXe00/patched/DeXe/README.md
Empty file.
Binary file added DeXe00/patched/DeXe/audits/certik-2023-05-04.pdf
Binary file not shown.
83 changes: 83 additions & 0 deletions DeXe00/patched/DeXe/contracts/core/ContractsRegistry.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";

import "@dlsl/dev-modules/contracts-registry/presets/OwnableContractsRegistry.sol";

import "../interfaces/core/IContractsRegistry.sol";

contract ContractsRegistry is IContractsRegistry, OwnableContractsRegistry, UUPSUpgradeable {
string public constant USER_REGISTRY_NAME = "USER_REGISTRY";

string public constant POOL_FACTORY_NAME = "POOL_FACTORY";
string public constant POOL_REGISTRY_NAME = "POOL_REGISTRY";

string public constant DEXE_NAME = "DEXE";
string public constant USD_NAME = "USD";
string public constant BABT_NAME = "BABT";

string public constant PRICE_FEED_NAME = "PRICE_FEED";
string public constant UNISWAP_V2_ROUTER_NAME = "UNISWAP_V2_ROUTER";
string public constant UNISWAP_V2_FACTORY_NAME = "UNISWAP_V2_FACTORY";

string public constant INSURANCE_NAME = "INSURANCE";
string public constant TREASURY_NAME = "TREASURY";
string public constant DIVIDENDS_NAME = "DIVIDENDS";

string public constant CORE_PROPERTIES_NAME = "CORE_PROPERTIES";

function getUserRegistryContract() external view override returns (address) {
return getContract(USER_REGISTRY_NAME);
}

function getPoolFactoryContract() external view override returns (address) {
return getContract(POOL_FACTORY_NAME);
}

function getPoolRegistryContract() external view override returns (address) {
return getContract(POOL_REGISTRY_NAME);
}

function getDEXEContract() external view override returns (address) {
return getContract(DEXE_NAME);
}

function getUSDContract() external view override returns (address) {
return getContract(USD_NAME);
}

function getPriceFeedContract() external view override returns (address) {
return getContract(PRICE_FEED_NAME);
}

function getUniswapV2RouterContract() external view override returns (address) {
return getContract(UNISWAP_V2_ROUTER_NAME);
}

function getUniswapV2FactoryContract() external view override returns (address) {
return getContract(UNISWAP_V2_FACTORY_NAME);
}

function getInsuranceContract() external view override returns (address) {
return getContract(INSURANCE_NAME);
}

function getTreasuryContract() external view override returns (address) {
return getContract(TREASURY_NAME);
}

function getDividendsContract() external view override returns (address) {
return getContract(DIVIDENDS_NAME);
}

function getCorePropertiesContract() external view override returns (address) {
return getContract(CORE_PROPERTIES_NAME);
}

function getBABTContract() external view override returns (address) {
return getContract(BABT_NAME);
}

function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
}
Loading

0 comments on commit 8790c9e

Please sign in to comment.