Skip to content

Commit

Permalink
Deploy to Base sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggiano committed Jul 9, 2024
1 parent 1c16b0e commit 5ac5311
Show file tree
Hide file tree
Showing 9 changed files with 920 additions and 416 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ yarn echidna-property
yarn echidna-assertion
```

### Onchain fuzzing

```bash
source .env
FOUNDRY_PROFILE=fork FOUNDRY_INVARIANT_RUNS=0 FOUNDRY_INVARIANT_DEPTH=0 forge test --mc FoundryForkTester -vvvvv --ffi
```

Check the coverage report with

```bash
Expand Down Expand Up @@ -219,9 +226,10 @@ source .env
RPC_URL=$RPC_URL CHAIN_NAME=$CHAIN_NAME DEPLOYER_ADDRESS=$DEPLOYER_ADDRESS yarn deploy-testnet --broadcast
```

## Onchain
### Deployment checklist

```bash
source .env
FOUNDRY_PROFILE=fork FOUNDRY_INVARIANT_RUNS=0 FOUNDRY_INVARIANT_DEPTH=0 forge test --mc FoundryForkTester -vvvvv --ffi
```
1. Deploy
2. Transfer `LINK` tokens to `PriceFeed` contract
3. Grant `KEEPER_ROLE` to keeper bot
4. Grant `BORROW_RATE_UPDATER_ROLE` to updater bot
5. Grant `PAUSER_ROLE` to pauser bot
352 changes: 352 additions & 0 deletions broadcast/Deploy.s.sol/84532/run-1720562015.json

Large diffs are not rendered by default.

661 changes: 257 additions & 404 deletions broadcast/Deploy.s.sol/84532/run-latest.json

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions broadcast/GrantRole.s.sol/84532/run-1720563238.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"transactions": [
{
"hash": "0xd8a0f8e8d055fce2d89a53f6568a33c6e04fd58084b80485628dca630e5c7167",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"function": "grantRole(bytes32,address)",
"arguments": [
"0xfc8737ab85eb45125971625a9ebdb75cc78e01d5c1fa80c4c6e5203f47bc4fab",
"0x023953117D262271d70Dd5d8C96A8Dd327A7A594"
],
"transaction": {
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"gas": "0x13146",
"value": "0x0",
"input": "0x2f2ff15dfc8737ab85eb45125971625a9ebdb75cc78e01d5c1fa80c4c6e5203f47bc4fab000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"nonce": "0x2b",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x15e723",
"logs": [
{
"address": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"topics": [
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
"0xfc8737ab85eb45125971625a9ebdb75cc78e01d5c1fa80c4c6e5203f47bc4fab",
"0x000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"0x000000000000000000000000f7164d2fc05350c75387fa6c0cc4f97634ca9451"
],
"data": "0x",
"blockHash": "0xe18202ef2e0bcd631c6677e6a71f67be2de24b77592028f8eef2502a1eb292b6",
"blockNumber": "0xbd2ba0",
"transactionHash": "0xd8a0f8e8d055fce2d89a53f6568a33c6e04fd58084b80485628dca630e5c7167",
"transactionIndex": "0x5",
"logIndex": "0x1f",
"removed": false
}
],
"logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000000000008000000000080000000000000000000000000000100000000200000000000000000000000000000000000000000000000000000108000000000000010000000000000000000000000000000000000000001000000000080000000000000000000000000000000000000000000000000100000000000000000000002000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0xd8a0f8e8d055fce2d89a53f6568a33c6e04fd58084b80485628dca630e5c7167",
"transactionIndex": "0x5",
"blockHash": "0xe18202ef2e0bcd631c6677e6a71f67be2de24b77592028f8eef2502a1eb292b6",
"blockNumber": "0xbd2ba0",
"gasUsed": "0xdd04",
"effectiveGasPrice": "0x104c3e",
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0x8f45bbea",
"l1GasPrice": "0x4c80a0fc",
"l1GasUsed": "0x6a4"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1720563238,
"chain": 84532,
"commit": "1c16b0e"
}
73 changes: 73 additions & 0 deletions broadcast/GrantRole.s.sol/84532/run-1720563317.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"transactions": [
{
"hash": "0x59da9d668ee2dd2d82be0db89b6a7b73daea91d2e5b25aebc7ae745055c0572e",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"function": "grantRole(bytes32,address)",
"arguments": [
"0x1eae1854c74a696c6de86fd3c6383d5c1e2c33fbc86e1aa6b6c872d95bd24038",
"0x023953117D262271d70Dd5d8C96A8Dd327A7A594"
],
"transaction": {
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"gas": "0x13146",
"value": "0x0",
"input": "0x2f2ff15d1eae1854c74a696c6de86fd3c6383d5c1e2c33fbc86e1aa6b6c872d95bd24038000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"nonce": "0x2c",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x2e0a6a",
"logs": [
{
"address": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"topics": [
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
"0x1eae1854c74a696c6de86fd3c6383d5c1e2c33fbc86e1aa6b6c872d95bd24038",
"0x000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"0x000000000000000000000000f7164d2fc05350c75387fa6c0cc4f97634ca9451"
],
"data": "0x",
"blockHash": "0xde47f0537963436442b9efe53ecda857cce964af85eec4433a66867ad601ce48",
"blockNumber": "0xbd2bc8",
"transactionHash": "0x59da9d668ee2dd2d82be0db89b6a7b73daea91d2e5b25aebc7ae745055c0572e",
"transactionIndex": "0x7",
"logIndex": "0x3e",
"removed": false
}
],
"logsBloom": "0x00000004000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000008000000000080000000000000000000000000000100000000000000000000000000000000080000000000000000000000000000108000000000080010000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000000000000002000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x59da9d668ee2dd2d82be0db89b6a7b73daea91d2e5b25aebc7ae745055c0572e",
"transactionIndex": "0x7",
"blockHash": "0xde47f0537963436442b9efe53ecda857cce964af85eec4433a66867ad601ce48",
"blockNumber": "0xbd2bc8",
"gasUsed": "0xdd04",
"effectiveGasPrice": "0x10cb29",
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0xafd615a9",
"l1GasPrice": "0x5de3f2f1",
"l1GasUsed": "0x6a4"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1720563317,
"chain": 84532,
"commit": "1c16b0e"
}
73 changes: 73 additions & 0 deletions broadcast/GrantRole.s.sol/84532/run-1720563344.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"transactions": [
{
"hash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"function": "grantRole(bytes32,address)",
"arguments": [
"0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a",
"0x023953117D262271d70Dd5d8C96A8Dd327A7A594"
],
"transaction": {
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"gas": "0x13146",
"value": "0x0",
"input": "0x2f2ff15d65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"nonce": "0x2d",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x2d35f7",
"logs": [
{
"address": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"topics": [
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
"0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a",
"0x000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"0x000000000000000000000000f7164d2fc05350c75387fa6c0cc4f97634ca9451"
],
"data": "0x",
"blockHash": "0x0fd74329a3fd91916eb8e618a262ea53d0b3394eaa68e1e2f3141abcc3832e4f",
"blockNumber": "0xbd2bd5",
"transactionHash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionIndex": "0x7",
"logIndex": "0x41",
"removed": false
}
],
"logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000008000000000080000000000000000000000000000100000000000000000000000000000000000008000000000000000000000000108000000000000010000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100002000000000000000002000000000000000000000000000000400000000000000000000000000",
"type": "0x2",
"transactionHash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionIndex": "0x7",
"blockHash": "0x0fd74329a3fd91916eb8e618a262ea53d0b3394eaa68e1e2f3141abcc3832e4f",
"blockNumber": "0xbd2bd5",
"gasUsed": "0xdd04",
"effectiveGasPrice": "0xb76b7",
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0xaf20e195",
"l1GasPrice": "0x5d833154",
"l1GasUsed": "0x6a4"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1720563344,
"chain": 84532,
"commit": "1c16b0e"
}
73 changes: 73 additions & 0 deletions broadcast/GrantRole.s.sol/84532/run-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"transactions": [
{
"hash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"function": "grantRole(bytes32,address)",
"arguments": [
"0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a",
"0x023953117D262271d70Dd5d8C96A8Dd327A7A594"
],
"transaction": {
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"gas": "0x13146",
"value": "0x0",
"input": "0x2f2ff15d65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"nonce": "0x2d",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x2d35f7",
"logs": [
{
"address": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"topics": [
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
"0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a",
"0x000000000000000000000000023953117d262271d70dd5d8c96a8dd327a7a594",
"0x000000000000000000000000f7164d2fc05350c75387fa6c0cc4f97634ca9451"
],
"data": "0x",
"blockHash": "0x0fd74329a3fd91916eb8e618a262ea53d0b3394eaa68e1e2f3141abcc3832e4f",
"blockNumber": "0xbd2bd5",
"transactionHash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionIndex": "0x7",
"logIndex": "0x41",
"removed": false
}
],
"logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000008000000000080000000000000000000000000000100000000000000000000000000000000000008000000000000000000000000108000000000000010000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100002000000000000000002000000000000000000000000000000400000000000000000000000000",
"type": "0x2",
"transactionHash": "0x618d565c3fffc0e732c368c07561d0fbf7e9cc0fd54aee56363cfc1c36a2e427",
"transactionIndex": "0x7",
"blockHash": "0x0fd74329a3fd91916eb8e618a262ea53d0b3394eaa68e1e2f3141abcc3832e4f",
"blockNumber": "0xbd2bd5",
"gasUsed": "0xdd04",
"effectiveGasPrice": "0xb76b7",
"from": "0xf7164d2fc05350c75387fa6c0cc4f97634ca9451",
"to": "0xc2c923bbfd83d3b3a8888f80a9aab193ee5449b6",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0xaf20e195",
"l1GasPrice": "0x5d833154",
"l1GasUsed": "0x6a4"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1720563344,
"chain": 84532,
"commit": "1c16b0e"
}
10 changes: 5 additions & 5 deletions deployments/84532.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"commit": "6d9a33e",
"commit": "1c16b0e",
"deployments": {
"PriceFeed": "0x2269b2A8E66D3E919176562bef8688A2f760aE99",
"Size-implementation": "0x2353D836865Db0911dc68e170fC40E1d84B66228",
"Size-proxy": "0x1b4Da605eB61d005c9dA7fc12A4403D1b3F89D2f"
"PriceFeed": "0x97B848F22Eed0278a32b1F471aAe2EcfD87038Ec",
"Size-implementation": "0xf1C5f1DAB5D081128D11b6cc0303141D735c1A05",
"Size-proxy": "0xc2C923bBfD83d3B3a8888F80a9Aab193eE5449b6"
},
"networkName": "base-sepolia",
"parameters": {
Expand All @@ -12,7 +12,7 @@
"sequencerUptimeFeed": "0x0000000000000000000000000000000000000000",
"usdc": "0x036cbd53842c5426634e7929541ec2318f3dcf7e",
"usdcAggregator": "0xd30e2101a97dcbaebcbc04f14c3f624e67a35165",
"usdcHeartbeat": 1320,
"usdcHeartbeat": 95040,
"variablePool": "0x07ea79f68b2b3df564d0a34f8e19d9b1e339814b",
"weth": "0x4200000000000000000000000000000000000006",
"wethAggregator": "0x4adc67696ba383f43dd60a9e78f2c97fbbfc7cb1",
Expand Down
3 changes: 1 addition & 2 deletions script/GrantRole.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ contract GrantRoleScript is Script {
function run() external {
console.log("GrantRole...");

uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address sizeContractAddress = vm.envAddress("SIZE_CONTRACT_ADDRESS");
address account = vm.envAddress("ACCOUNT");
bytes32 role = keccak256(abi.encodePacked(vm.envString("ROLE")));

Size size = Size(payable(sizeContractAddress));

vm.startBroadcast(deployerPrivateKey);
vm.startBroadcast();
size.grantRole(role, account);
vm.stopBroadcast();
}
Expand Down

0 comments on commit 5ac5311

Please sign in to comment.