Skip to content

Commit

Permalink
Merge pull request #87 from bandohq/chore/configure-script
Browse files Browse the repository at this point in the history
CHORE - Create configuration script per chain
  • Loading branch information
luisgj authored Dec 19, 2024
2 parents a2f564b + 20a95fe commit 938c5db
Show file tree
Hide file tree
Showing 10 changed files with 285 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PRIVATE_KEY=<your private key>

ENVIROMENT=test
CREATE3_FACTORY_ADDRESS=0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1 # Public CREATE3 factory address

# Mainnet RPCs
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: create env file
run: |
touch .env
echo ENVIRONMENT=test >> .env
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install packages
Expand Down
120 changes: 60 additions & 60 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"FulfillableRegistryProxy": {
"arbitrum": {
"bsc-testnet": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xbFfd65600a7D15f1D4e6e2B8eeca583204748E50",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:47:20",
"TIMESTAMP": "2024-12-05 18:58:57",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000fce257357e88bad8994a02af021edfead70c89a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/proxy/FulfillableRegistryProxy.sol",
"CONTRACT_NAME": "FulfillableRegistryProxy"
}
]
}
},
"bsc-testnet": {
"arbitrum": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xbFfd65600a7D15f1D4e6e2B8eeca583204748E50",
"ADDRESS": "0xbc3512E1072C95E998Bb13c00d2F08048b1Ba311",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:58:57",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000fce257357e88bad8994a02af021edfead70c89a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"TIMESTAMP": "2024-12-18 17:59:20",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000e873c736da1d47425d51b3b251dd88171519a47500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/proxy/FulfillableRegistryProxy.sol",
"CONTRACT_NAME": "FulfillableRegistryProxy"
Expand All @@ -34,31 +34,31 @@
}
},
"FulfillableRegistry": {
"arbitrum": {
"bsc-testnet": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xfCE257357e88BaD8994A02aF021EdFead70C89A0",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:47:20",
"TIMESTAMP": "2024-12-05 18:58:57",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/periphery/registry/FulfillableRegistryV1.sol",
"CONTRACT_NAME": "FulfillableRegistryV1"
}
]
}
},
"bsc-testnet": {
"arbitrum": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xfCE257357e88BaD8994A02aF021EdFead70C89A0",
"ADDRESS": "0xE873C736da1d47425D51b3B251dd88171519a475",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:58:57",
"TIMESTAMP": "2024-12-18 17:59:20",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/periphery/registry/FulfillableRegistryV1.sol",
"CONTRACT_NAME": "FulfillableRegistryV1"
Expand All @@ -68,32 +68,32 @@
}
},
"ERC20TokenRegistryProxy": {
"arbitrum": {
"bsc-testnet": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xbae783a06905F0c5B28450AeA36D075DE5F0b732",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:48:41",
"TIMESTAMP": "2024-12-05 19:05:31",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000008626aefbdbb23d100cf4d0d31ac9200310f3decc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/proxy/ERC20TokenRegistryProxy.sol",
"CONTRACT_NAME": "ERC20TokenRegistryProxy"
}
]
}
},
"bsc-testnet": {
"arbitrum": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xbae783a06905F0c5B28450AeA36D075DE5F0b732",
"ADDRESS": "0xB00A282a309958BA8cb6d8C266c05dF57C07A486",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 19:05:31",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000008626aefbdbb23d100cf4d0d31ac9200310f3decc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"TIMESTAMP": "2024-12-18 19:05:31",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/proxy/ERC20TokenRegistryProxy.sol",
"CONTRACT_NAME": "ERC20TokenRegistryProxy"
}
Expand All @@ -102,32 +102,32 @@
}
},
"ERC20TokenRegistry": {
"arbitrum": {
"bsc-testnet": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0x8626AefbDbB23D100Cf4D0D31Ac9200310F3DECC",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:48:41",
"TIMESTAMP": "2024-12-05 19:05:31",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/periphery/registry/ERC20TokenRegistryV1.sol",
"CONTRACT_NAME": "ERC20TokenRegistryV1"
}
]
}
},
"bsc-testnet": {
"arbitrum": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0x8626AefbDbB23D100Cf4D0D31Ac9200310F3DECC",
"ADDRESS": "0x343d9B83e016E193d7729d547619761a0607832B",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 19:05:31",
"TIMESTAMP": "2024-12-18 19:05:31",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"VERIFIED": "false",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "true",
"CONTRACT_FILE_PATH": "contracts/periphery/registry/ERC20TokenRegistryV1.sol",
"CONTRACT_NAME": "ERC20TokenRegistryV1"
}
Expand All @@ -140,11 +140,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0xf92C7f0725eb6d000862bfa617F12A09d82b1670",
"ADDRESS": "0x0EEef62a8909F747b7303Ce7D484396C9378D630",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:51:05",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000005d5f3128012d8b84d124eee67f865311db6b398900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"TIMESTAMP": "2024-12-18 18:27:22",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000006c6a9b139ad79d34571b61a9ff87fb780f95134800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/proxy/BandoERC20FulfillableProxy.sol",
"CONTRACT_NAME": "BandoERC20FulfillableProxy"
Expand All @@ -158,11 +158,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0x5D5f3128012D8b84D124EEe67f865311Db6b3989",
"ADDRESS": "0x6C6a9B139AD79d34571b61A9fF87Fb780F951348",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:51:05",
"TIMESTAMP": "2024-12-18 18:27:22",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/BandoERC20FulfillableV1.sol",
"CONTRACT_NAME": "BandoERC20FulfillableV1"
Expand All @@ -176,11 +176,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0x0F012f079974d1D87a95750AE1bd527CF7f73dA7",
"ADDRESS": "0x3421BB01939ACD1214C44b553fD05aabD7a43361",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:52:02",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000da94a1968e5982df19b934ea38840d91983ab7db00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"TIMESTAMP": "2024-12-18 18:28:18",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000003f3996536518c836eccf10c35e335cf4d3a241f900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/proxy/BandoFulfillableProxy.sol",
"CONTRACT_NAME": "BandoFulfillableProxy"
Expand All @@ -194,11 +194,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0xdA94A1968e5982Df19b934eA38840d91983AB7dB",
"ADDRESS": "0x3F3996536518c836EccF10c35E335Cf4d3a241F9",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:52:02",
"TIMESTAMP": "2024-12-18 18:28:18",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/BandoFulfillableV1.sol",
"CONTRACT_NAME": "BandoFulfillableV1"
Expand All @@ -212,11 +212,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0xcbe5EaE3eC7825E986C1Ed7ee0A97cDCf48dD013",
"ADDRESS": "0x234bb8e566243765E91BeDA3e2313d34616ed7D0",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:53:15",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000bf42e33ce69053ee3de89569fad4629da5e671cd00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"TIMESTAMP": "2024-12-18 18:28:46",
"CONSTRUCTOR_ARGS": "0x00000000000000000000000090c10d3e1f7c3195b65ebfc2198f62662516d10800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/proxy/BandoFulfillmentManagerProxy.sol",
"CONTRACT_NAME": "BandoFulfillmentManagerProxy"
Expand All @@ -230,11 +230,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0xBF42E33Ce69053Ee3dE89569FAd4629DA5e671Cd",
"ADDRESS": "0x90c10d3E1f7C3195b65ebFC2198f62662516d108",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:53:15",
"TIMESTAMP": "2024-12-18 18:28:46",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/BandoFulfillmentManagerV1.sol",
"CONTRACT_NAME": "BandoFulfillmentManagerV1"
Expand All @@ -248,11 +248,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0x918162696EB2f91D58332Efc73e1b25909090967",
"ADDRESS": "0x15C5BbD8611F065c4f37b173AB14fcb568FC61bC",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:53:59",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000f5779f22e04efca0f7bf5d6bc4458b78bb58247e00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713555",
"TIMESTAMP": "2024-12-18 18:29:24",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000005b938360a2495133af6bc8cbcacd838edb59c42700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000004c244916a0f0b4a54aa8377655b156d48f083aa500000000000000000000000000000000000000000000000000000000",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/proxy/BandoRouterProxy.sol",
"CONTRACT_NAME": "BandoRouterProxy"
Expand All @@ -266,11 +266,11 @@
"staging": {
"1.0.0": [
{
"ADDRESS": "0xF5779F22e04EFcA0F7bf5D6BC4458b78bb58247E",
"ADDRESS": "0x5B938360a2495133aF6bc8cbCaCD838EdB59C427",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-12-05 18:53:59",
"TIMESTAMP": "2024-12-18 18:29:24",
"CONSTRUCTOR_ARGS": "0x",
"SALT": "27182818284590452353602874713555",
"SALT": "27182818284590452353602874713556",
"VERIFIED": "false",
"CONTRACT_FILE_PATH": "contracts/BandoRouterV1.sol",
"CONTRACT_NAME": "BandoRouterV1"
Expand Down
24 changes: 12 additions & 12 deletions deployments/arbitrum.staging.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"FulfillableRegistryProxy": "0xbFfd65600a7D15f1D4e6e2B8eeca583204748E50",
"FulfillableRegistry": "0xfCE257357e88BaD8994A02aF021EdFead70C89A0",
"ERC20TokenRegistryProxy": "0xbae783a06905F0c5B28450AeA36D075DE5F0b732",
"ERC20TokenRegistry": "0x8626AefbDbB23D100Cf4D0D31Ac9200310F3DECC",
"BandoERC20FulfillableProxy": "0xf92C7f0725eb6d000862bfa617F12A09d82b1670",
"BandoERC20Fulfillable": "0x5D5f3128012D8b84D124EEe67f865311Db6b3989",
"BandoFulfillableProxy": "0x0F012f079974d1D87a95750AE1bd527CF7f73dA7",
"BandoFulfillable": "0xdA94A1968e5982Df19b934eA38840d91983AB7dB",
"BandoFulfillmentManagerProxy": "0xcbe5EaE3eC7825E986C1Ed7ee0A97cDCf48dD013",
"BandoFulfillmentManager": "0xBF42E33Ce69053Ee3dE89569FAd4629DA5e671Cd",
"BandoRouterProxy": "0x918162696EB2f91D58332Efc73e1b25909090967",
"BandoRouter": "0xF5779F22e04EFcA0F7bf5D6BC4458b78bb58247E"
"FulfillableRegistryProxy": "0xbc3512E1072C95E998Bb13c00d2F08048b1Ba311",
"FulfillableRegistry": "0xE873C736da1d47425D51b3B251dd88171519a475",
"ERC20TokenRegistryProxy": "0xB00A282a309958BA8cb6d8C266c05dF57C07A486",
"ERC20TokenRegistry": "0x343d9B83e016E193d7729d547619761a0607832B",
"BandoERC20FulfillableProxy": "0x0EEef62a8909F747b7303Ce7D484396C9378D630",
"BandoERC20Fulfillable": "0x6C6a9B139AD79d34571b61A9fF87Fb780F951348",
"BandoFulfillableProxy": "0x3421BB01939ACD1214C44b553fD05aabD7a43361",
"BandoFulfillable": "0x3F3996536518c836EccF10c35E335Cf4d3a241F9",
"BandoFulfillmentManagerProxy": "0x234bb8e566243765E91BeDA3e2313d34616ed7D0",
"BandoFulfillmentManager": "0x90c10d3E1f7C3195b65ebFC2198f62662516d108",
"BandoRouterProxy": "0x15C5BbD8611F065c4f37b173AB14fcb568FC61bC",
"BandoRouter": "0x5B938360a2495133aF6bc8cbCaCD838EdB59C427"
}
14 changes: 14 additions & 0 deletions deployments/arbitrum.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"FulfillableRegistryProxy": "0xbFfd65600a7D15f1D4e6e2B8eeca583204748E50",
"FulfillableRegistry": "0xfCE257357e88BaD8994A02aF021EdFead70C89A0",
"ERC20TokenRegistryProxy": "0xbae783a06905F0c5B28450AeA36D075DE5F0b732",
"ERC20TokenRegistry": "0x8626AefbDbB23D100Cf4D0D31Ac9200310F3DECC",
"BandoERC20FulfillableProxy": "0xf92C7f0725eb6d000862bfa617F12A09d82b1670",
"BandoERC20Fulfillable": "0x5D5f3128012D8b84D124EEe67f865311Db6b3989",
"BandoFulfillableProxy": "0x0F012f079974d1D87a95750AE1bd527CF7f73dA7",
"BandoFulfillable": "0xdA94A1968e5982Df19b934eA38840d91983AB7dB",
"BandoFulfillmentManagerProxy": "0xcbe5EaE3eC7825E986C1Ed7ee0A97cDCf48dD013",
"BandoFulfillmentManager": "0xBF42E33Ce69053Ee3dE89569FAd4629DA5e671Cd",
"BandoRouterProxy": "0x918162696EB2f91D58332Efc73e1b25909090967",
"BandoRouter": "0xF5779F22e04EFcA0F7bf5D6BC4458b78bb58247E"
}
35 changes: 31 additions & 4 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
require("@nomicfoundation/hardhat-toolbox");
require('@openzeppelin/hardhat-upgrades');
require("@nomicfoundation/hardhat-foundry");

require("dotenv").config();
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.28",
};

const createConfig = (env) => {
if(env != 'test') {
const privateKey = env === 'prod' ? process.env.PRIVATE_KEY_PRODUCTION : process.env.PRIVATE_KEY;
return {
solidity: "0.8.28",
networks: {
arbitrum: {
url: process.env.ETH_NODE_URI_ARBITRUM,
accounts: [privateKey],
protocolOwner: 'tbd',
managerOwner: 'tbd',
tokenRegistryOwner: 'tbd',
}
// Add more networks here
}
}
} else {
return {
solidity: "0.8.28",
networks: {
hardhat: {
chainId: 1337
}
}
}
}
}

module.exports = createConfig(process.env.ENVIRONMENT);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dependencies": {
"@openzeppelin/contracts": "^5.0.2",
"@openzeppelin/contracts-upgradeable": "^5.0.2",
"dotenv": "^16.4.7",
"ethers": "^6.10.0",
"solregex": "^0.3.1",
"web3": "^4.14.0"
Expand Down
Loading

0 comments on commit 938c5db

Please sign in to comment.