-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from decaswap-labs/feat/swapLimitUpdate
Feat/swap limit update
- Loading branch information
Showing
36 changed files
with
1,779 additions
and
1,199 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
[profile.default] | ||
src = "src" | ||
test = "test" | ||
out = "out" | ||
libs = ["lib"] | ||
solc_version = "0.8.28" | ||
via-ir = true | ||
optimizer = true | ||
optimizer_runs = 1000 | ||
|
||
[profile.test] | ||
via-ir = false | ||
|
||
[fmt] | ||
bracket_spacing = true | ||
int_types = "long" | ||
line_length = 120 | ||
multiline_func_header = "all" | ||
number_underscore = "thousands" | ||
quote_style = "double" | ||
tab_width = 4 | ||
wrap_comments = true | ||
|
||
|
||
[invariant] | ||
runs = 4 | ||
runs = 200 | ||
depth = 256 | ||
fail_on_revert = true | ||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options | ||
|
||
[rpc_endpoints] | ||
sepolia = "${RPC_URL}" | ||
sepolia = "${RPC_URL}" |
Submodule forge-std
updated
22 files
+193 −0 | CONTRIBUTING.md | |
+17 −1 | README.md | |
+1 −1 | package.json | |
+12 −1 | scripts/vm.py | |
+4 −0 | src/StdChains.sol | |
+5 −5 | src/StdCheats.sol | |
+104 −0 | src/StdJson.sol | |
+104 −0 | src/StdToml.sol | |
+387 −23 | src/Vm.sol | |
+471 −463 | src/console.sol | |
+2 −2 | src/interfaces/IERC4626.sol | |
+1 −1 | test/StdAssertions.t.sol | |
+16 −15 | test/StdChains.t.sol | |
+10 −10 | test/StdCheats.t.sol | |
+12 −12 | test/StdError.t.sol | |
+1 −1 | test/StdJson.t.sol | |
+4 −14 | test/StdMath.t.sol | |
+5 −5 | test/StdStorage.t.sol | |
+1 −1 | test/StdStyle.t.sol | |
+1 −1 | test/StdToml.t.sol | |
+12 −12 | test/StdUtils.t.sol | |
+9 −6 | test/Vm.t.sol |
Submodule openzeppelin-contracts
updated
488 files
Submodule openzeppelin-contracts-upgradeable
updated
399 files
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 |
---|---|---|
@@ -1,49 +1,49 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "forge-std/Script.sol"; | ||
import "../src/Router.sol"; | ||
import "../src/Pool.sol"; | ||
import "../src/PoolLogic.sol"; | ||
|
||
contract DeployAllContract is Script { | ||
function run() external { | ||
address ZERO_ADDRESS = address(0); | ||
// Fetch the OWNER_ADDRESS from the environment variables | ||
address ownerAddress = vm.envAddress("OWNER_ADDRESS"); | ||
console.log("Owner address:", ownerAddress); | ||
|
||
// Fetch the VAULT_ADDRESS from the environment variables | ||
address vaultAddress = vm.envAddress("VAULT_ADDRESS"); | ||
console.log("Vault address:", vaultAddress); | ||
|
||
// Fetch the PRIVATE_KEY from the environment variables | ||
uint256 privateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
// Start broadcasting transactions | ||
vm.startBroadcast(privateKey); | ||
|
||
// Step 1: Deploy Pool contract | ||
Pool pool = new Pool(vaultAddress, ZERO_ADDRESS, ZERO_ADDRESS); | ||
console.log("Pool deployed to:", address(pool)); | ||
|
||
// Step 2: Deploy PoolLogic contract with Pool address | ||
PoolLogic poolLogic = new PoolLogic(ownerAddress, address(pool)); | ||
console.log("PoolLogic deployed to:", address(poolLogic)); | ||
|
||
// Step 3: Deploy Router contract with Pool address | ||
Router router = new Router(ownerAddress, address(pool)); | ||
console.log("Router deployed to:", address(router)); | ||
|
||
// Step 4: Update Pool contract with Router address | ||
pool.updateRouterAddress(address(router)); | ||
console.log("Router address updated in Pool:", address(router)); | ||
|
||
// Step 5: Update Pool contract with PoolLogic address | ||
pool.updatePoolLogicAddress(address(poolLogic)); | ||
console.log("PoolLogic address updated in Pool:", address(poolLogic)); | ||
|
||
// Stop broadcasting transactions | ||
vm.stopBroadcast(); | ||
} | ||
} | ||
// // SPDX-License-Identifier: MIT | ||
// pragma solidity ^0.8.0; | ||
|
||
// import "forge-std/Script.sol"; | ||
// import "../src/Router.sol"; | ||
// import "../src/Pool.sol"; | ||
// import "../src/PoolLogic.sol"; | ||
|
||
// contract DeployAllContract is Script { | ||
// function run() external { | ||
// address ZERO_ADDRESS = address(0); | ||
// // Fetch the OWNER_ADDRESS from the environment variables | ||
// address ownerAddress = vm.envAddress("OWNER_ADDRESS"); | ||
// console.log("Owner address:", ownerAddress); | ||
|
||
// // Fetch the VAULT_ADDRESS from the environment variables | ||
// address vaultAddress = vm.envAddress("VAULT_ADDRESS"); | ||
// console.log("Vault address:", vaultAddress); | ||
|
||
// // Fetch the PRIVATE_KEY from the environment variables | ||
// uint256 privateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
// // Start broadcasting transactions | ||
// vm.startBroadcast(privateKey); | ||
|
||
// // Step 1: Deploy Pool contract | ||
// Pool pool = new Pool(vaultAddress, ZERO_ADDRESS, ZERO_ADDRESS); | ||
// console.log("Pool deployed to:", address(pool)); | ||
|
||
// // Step 2: Deploy PoolLogic contract with Pool address | ||
// PoolLogic poolLogic = new PoolLogic(ownerAddress, address(pool)); | ||
// console.log("PoolLogic deployed to:", address(poolLogic)); | ||
|
||
// // Step 3: Deploy Router contract with Pool address | ||
// Router router = new Router(ownerAddress, address(pool)); | ||
// console.log("Router deployed to:", address(router)); | ||
|
||
// // Step 4: Update Pool contract with Router address | ||
// pool.updateRouterAddress(address(router)); | ||
// console.log("Router address updated in Pool:", address(router)); | ||
|
||
// // Step 5: Update Pool contract with PoolLogic address | ||
// pool.updatePoolLogicAddress(address(poolLogic)); | ||
// console.log("PoolLogic address updated in Pool:", address(poolLogic)); | ||
|
||
// // Stop broadcasting transactions | ||
// vm.stopBroadcast(); | ||
// } | ||
// } |
Oops, something went wrong.