Skip to content

Commit

Permalink
init: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alpanaca committed Oct 17, 2022
0 parents commit c7c12a0
Show file tree
Hide file tree
Showing 14 changed files with 7,581 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.sol linguist-language=Solidity
*.vy linguist-language=Python
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode

cache/
out/

artifacts/
cache/
node_modules/
typechain/
13 changes: 13 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/Rari-Capital/solmate
6 changes: 6 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
src = 'solidity/contracts'
out = 'out'
libs = ['lib']
test = 'solidity/tests'
fs_permissions = [{ access = "read-write", path = "./"}]
40 changes: 40 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { config as dotEnvConfig } from "dotenv";
dotEnvConfig();

import "@openzeppelin/hardhat-upgrades";
import "@nomiclabs/hardhat-ethers";
import "@typechain/hardhat";

module.exports = {
defaultNetwork: "hardhat",
networks: {
// rinkeby: {
// url: process.env.RINKEBY_RPC,
// accounts:
// process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
// },
},
solidity: {
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "istanbul",
},
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
typechain: {
outDir: "./typechain",
target: process.env.TYPECHAIN_TARGET || "ethers-v5",
},
mocha: {
timeout: 100000,
},
};
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@alpaca-finance/alpaca-money-market",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"scripts": {
"build:cjs": "tsc -p tsconfig.cjs.json",
"build": "yarn run build:cjs",
"prepublish": "yarn build",
"compile": "hardhat compile && yarn build"
},
"dependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@openzeppelin/hardhat-upgrades": "^1.16.1",
"dotenv": "^16.0.0",
"ethers": "^5.6.1",
"hardhat": "^2.9.1",
"prettier": "^2.6.0",
"prettier-plugin-solidity": "^1.0.0-beta.19"
},
"devDependencies": {
"@typechain/hardhat": "^5.0.0",
"@types/mocha": "^9.1.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
}
15 changes: 15 additions & 0 deletions solidity/tests/Pool.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import { BaseTest } from "./base/BaseTest.sol";

// solhint-disable
contract Pool_Test is BaseTest {

function setUp() external {
}

function testCorrectness_Initialize() external {
assertTrue(true);
}
}
21 changes: 21 additions & 0 deletions solidity/tests/base/BaseTest.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import { DSTest } from "./DSTest.sol";

import { VM } from "../utils/VM.sol";
import { console } from "../utils/console.sol";


contract BaseTest is DSTest {
address internal constant ALICE = address(0x88);
address internal constant BOB = address(0x168);
address internal constant CAT = address(0x99);
address internal constant EVE = address(0x55);

VM internal constant vm = VM(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);

constructor() {
}

}
Loading

0 comments on commit c7c12a0

Please sign in to comment.