generated from zerosnacks/solidity-template
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/contract packages #57
Open
cryptickoan
wants to merge
14
commits into
development
Choose a base branch
from
feat/contract-packages
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4e2e8b9
Moved ABIs into src folder
cryptickoan 6274feb
Updating ABI output
cryptickoan 7c7005c
Update gitignore
cryptickoan 47251e7
Initiating packages
cryptickoan 0a48a07
Installing package dependencies
cryptickoan 2a39cf3
Create scripts to automate package related tasks
cryptickoan 1c695a3
remove extra space
zerosnacks d59a7d0
apply linting and clean up
zerosnacks a21d18d
use scripts:abis syntax over prepare:abis
zerosnacks df37c02
Move abi scripts
cryptickoan 5dd243e
Update README
cryptickoan b0e2d23
Update abi imports
cryptickoan 2f28218
Fixed imports
cryptickoan 6dbe0e8
minor cleanup
zerosnacks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Typechain Fuse Arbitrum Contracts | ||
|
||
This is package contains an ethers interface of all arbitrum contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { FuseSafeLiquidatorArbitrum__factory } from "@fuse-v1/arbitrum"; | ||
|
||
const contract = FuseSafeLiquidatorArbitrum__factory.connect( | ||
contractAddress, | ||
web3Provider | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "@fuse-v1/arbitrum", | ||
"version": "1.0.2", | ||
"types": "./dist/types/index.d.ts", | ||
"exports": { | ||
"require": "./dist/cjs/index.js", | ||
"import": "./dist/esm/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"devDependencies": {}, | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Typechain Fuse Core Contracts | ||
|
||
This is package contains an ethers interface of all core contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { RewardsDistributorDelegate__factory } from "@fuse-v1/core"; | ||
|
||
const contract = RewardsDistributorDelegate__factory.connect( | ||
contractAddress, | ||
web3Provider | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@fuse-v1/core", | ||
"version": "1.0.2", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"description": "This is package contains an ethers interface of all core contracts in the fuse-v1 repository.", | ||
"main": "index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Typechain Fuse Liquidator Contracts | ||
|
||
This is package contains an ethers interface of all liquidator contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { UniswapLpTokenLiquidator__factory } from "@fuse-v1/liquidators"; | ||
|
||
const contract = UniswapLpTokenLiquidator__factory.connect( | ||
liquidatorAddress, | ||
web3Provider | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@fuse-v1/liquidators", | ||
"version": "1.0.3", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Typechain Fuse Oracle Contracts | ||
|
||
This is package contains an ethers interface of all oracle contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { PriceOracle__factory } from "@fuse-v1/oracles"; | ||
|
||
const contract = PriceOracle__factory.connect(oracleAddress, web3Provider); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@fuse-v1/oracles", | ||
"version": "1.0.2", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Typechain Fuse Periphery Contracts | ||
|
||
This is package contains an ethers interface of all periphery contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { FusePoolDirectory__factory } from "@fuse-v1/periphery"; | ||
|
||
const contract = FusePoolDirectory__factory.connect( | ||
contractAddress, | ||
web3Provider | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@fuse-v1/periphery", | ||
"version": "1.0.2", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
tsconfig-base.json | ||
tsconfig-cjs.json | ||
tsconfig-esm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Typechain Fuse Utility Contracts | ||
|
||
This is package contains an ethers interface of all utility contracts in the fuse-v1 repository. | ||
|
||
For more information, visit the [repository](https://github.com/Rari-Capital/fuse-v1). | ||
|
||
## Usage | ||
|
||
```js | ||
import { InitializableClones__factory } from "@fuse-v1/utils"; | ||
|
||
const contract = InitializableClones__factory.connect( | ||
contractAddress, | ||
web3Provider | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@fuse-v1/utils", | ||
"version": "1.0.2", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Rari-Capital/fuse-v1.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Rari-Capital/fuse-v1/issues" | ||
}, | ||
"homepage": "https://github.com/Rari-Capital/fuse-v1#readme", | ||
"dependencies": { | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"ethers": "^5.6.8", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
GREEN='\033[0;32m' | ||
NOCOLOR='\033[0m' | ||
YELLOW='\033[1;33m' | ||
echo "${YELLOW}===========================================================" | ||
echo "4/4 Creating package.jsons" | ||
echo "===========================================================${NOCOLOR}" | ||
|
||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/arbitrum/dist/cjs/package.json | ||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/core/dist/cjs/package.json | ||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/liquidators/dist/cjs/package.json | ||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/oracles/dist/cjs/package.json | ||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/periphery/dist/cjs/package.json | ||
cat ./abi/scripts/after-build/cjs.json >> ./abi/packages/utils/dist/cjs/package.json | ||
|
||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/arbitrum/dist/esm/package.json | ||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/core/dist/esm/package.json | ||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/liquidators/dist/esm/package.json | ||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/oracles/dist/esm/package.json | ||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/periphery/dist/esm/package.json | ||
cat ./abi/scripts/after-build/esm.json >> ./abi/packages/utils/dist/esm/package.json | ||
|
||
echo "${GREEN}===========================================================" | ||
echo "Packages created successfully!" | ||
echo "===========================================================${NOCOLOR}\a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"declarationDir": "dist/types", | ||
"esModuleInterop": true, | ||
"inlineSourceMap": false, | ||
"lib": ["esnext"], | ||
"listEmittedFiles": false, | ||
"listFiles": false, | ||
"moduleResolution": "node", | ||
"noFallthroughCasesInSwitch": true, | ||
"pretty": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"traceResolution": false | ||
}, | ||
"compileOnSave": false, | ||
"exclude": ["node_modules"], | ||
"include": ["src"] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to add a description for each package