Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions packages/bonds/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# etherscan family keys
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
BSCSCAN_TEST_KEY=ABC123ABC123ABC123ABC123ABC123ABC1

# coinmarketcap api key
COIN_MARKETCAP_API_KEY=ABCDE000-0000-0000-0000-000000000

# private key for deployment
KEY_BSC_TEST=abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
KEY_BSC_MAINNET=abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1

REPORT_GAS=true

# fork from morails
FORK_ENABLED=on
FORK_URL=https://speedy-nodes-nyc.moralis.io/xxxxx/bsc/testnet/archive
FORK_BLOCK_NUMBER=123456
FORK_CHAIN_ID=97
FORK_KEY=private key

# client sdk publishing
AWS_ACCESS_KEY_ID= [KEY_ID]
AWS_SECRET_ACCESS_KEY= [ACCESS_KEY]
AWS_S3_BUCKET=duet-node-modules
AWS_REGION=us-east-1
3 changes: 3 additions & 0 deletions packages/bonds/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hardhat.config.ts
scripts
test
214 changes: 214 additions & 0 deletions packages/bonds/.openzeppelin/unknown-30097.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"txHash": "0xc4d3d9ad77baaa62f3429744a1438145239fd53de92596935431d6f91a6195ab"
},
"proxies": [
{
"address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"txHash": "0x05a5342bce8533c1e8c0c143879f0be16f577ebd8e21a795a8267f592e754285",
"kind": "transparent"
},
{
"address": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"txHash": "0xf34695a610bd7dd7482882d9d03e261a4a1b66b7e495a1dd25b3c8b208ee422d",
"kind": "transparent"
},
{
"address": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"txHash": "0x6677aed954ce0eb7b490833a8cd40be54d94486e44ec29d92ad585e9d186641b",
"kind": "transparent"
},
{
"address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"txHash": "0x0b9d065b07870ea0663a9a69bb375f725c5c8c583e1c8434e4939582394ad6ef",
"kind": "transparent"
},
{
"address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"txHash": "0xf6f8bc98e93979751a99f37a256f4ca59a326cbc9316281876ac42cd84e04aff",
"kind": "transparent"
},
{
"address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"txHash": "0xd0dc0b177a74a9907631d9a0e05b3ccdc15e348bb9ec512e8065b0904f89bd9b",
"kind": "transparent"
}
],
"impls": {
"d6dd9459847f37380ff5e7fceffedeebc724a33cca181dec22a0292a171d0642": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"txHash": "0xca8ba640e576e56338d999047475b90a027eae8c57099ed84d8f5e270cc5fa86",
"layout": {
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "admin",
"offset": 2,
"slot": "0",
"type": "t_address",
"contract": "Adminable",
"src": "contracts/libs/Adminable.sol:11"
},
{
"label": "keeper",
"offset": 0,
"slot": "1",
"type": "t_address",
"contract": "Keepable",
"src": "@private/shared/libs/Keepable.sol:7"
},
{
"label": "bondImplementations",
"offset": 0,
"slot": "2",
"type": "t_mapping(t_string_memory_ptr,t_address)",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:24"
},
{
"label": "kindBondsMapping",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_string_memory_ptr,t_array(t_address)dyn_storage)",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:26"
},
{
"label": "seriesBondsMapping",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_string_memory_ptr,t_array(t_address)dyn_storage)",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:28"
},
{
"label": "bondKinds",
"offset": 0,
"slot": "5",
"type": "t_array(t_string_storage)dyn_storage",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:29"
},
{
"label": "bondSeries",
"offset": 0,
"slot": "6",
"type": "t_array(t_string_storage)dyn_storage",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:30"
},
{
"label": "isinBondMapping",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_string_memory_ptr,t_address)",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:33"
},
{
"label": "bondPrices",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_address,t_struct(BondPrice)6000_storage)",
"contract": "BondFactory",
"src": "contracts/BondFactory.sol:36"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_address)dyn_storage": {
"label": "address[]",
"numberOfBytes": "32"
},
"t_array(t_string_storage)dyn_storage": {
"label": "string[]",
"numberOfBytes": "32"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_mapping(t_address,t_struct(BondPrice)6000_storage)": {
"label": "mapping(address => struct IBondFactory.BondPrice)",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_address)": {
"label": "mapping(string => address)",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_array(t_address)dyn_storage)": {
"label": "mapping(string => address[])",
"numberOfBytes": "32"
},
"t_string_memory_ptr": {
"label": "string",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(BondPrice)6000_storage": {
"label": "struct IBondFactory.BondPrice",
"members": [
{
"label": "price",
"type": "t_uint256",
"offset": 0,
"slot": "0"
},
{
"label": "bid",
"type": "t_uint256",
"offset": 0,
"slot": "1"
},
{
"label": "ask",
"type": "t_uint256",
"offset": 0,
"slot": "2"
},
{
"label": "lastUpdated",
"type": "t_uint256",
"offset": 0,
"slot": "3"
}
],
"numberOfBytes": "128"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
3 changes: 3 additions & 0 deletions packages/bonds/.solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
skipFiles: ['contracts/mocks/*'],
}
28 changes: 28 additions & 0 deletions packages/bonds/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": "solhint:recommended",
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "warn",
"not-rely-on-time": [
"off"
],
"compiler-version": [
"error",
"^0.8.9"
],
"no-inline-assembly": [
"off"
],
"func-visibility": [
"warn",
{
"ignoreConstructors": true
}
],
"mark-callable-contracts": [
"off"
]
}
}
2 changes: 2 additions & 0 deletions packages/bonds/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
contracts/mocks
1 change: 1 addition & 0 deletions packages/bonds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# for Accident at 2022-07-15
2 changes: 2 additions & 0 deletions packages/bonds/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import config from '@private/shared/config'
export default config
Loading