complete checkin for juan; config tweaks & mock tweaks
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
/.env
|
||||
/gen
|
||||
/lib
|
||||
/foundry.toml
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#cd ../contract
|
||||
|
||||
#./bin/build.sh
|
||||
anvil -f arbitrum_ankr --chain-id 1338 &
|
||||
anvil -f arbitrum_mock --chain-id 1338 &
|
||||
# todo check anvil result
|
||||
ANVIL_PID=$!
|
||||
sleep 2
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
#./bin/build.sh
|
||||
forge test -vvvv --fork-url arbitrum_ankr "$@"
|
||||
forge test -vvvv --fork-url arbitrum_test "$@"
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
* similarly to `uint?` types, there are value types `bytes1`, `bytes2`, ..., `bytes32` which is 256 bits. `bytes` by itself is an alias for the dynamic array `byte[]`
|
||||
* do not use `string` type. use `bytes` instead. for reasons.
|
||||
* arrays have three types: dynamic storage array, dynamic memory array, and static array.
|
||||
* all arrays in storage (contract or struct members) start as 0-length and may only be extended by `contractArray.push(item)` one at a time. remove with `pop()`. a storage array referenced inside a function as `Foo[] storage myArray = contractArray;` results in a reference to the storage area.
|
||||
* all arrays in storage (contract members) start as 0-length and may only be extended by `contractArray.push(item)` one at a time. remove with `pop()`. a storage array referenced inside a function as `Foo[] storage myArray = contractArray;` results in a reference to the storage area.
|
||||
* dynamic memory arrays `Foo[] memory myArray = new Foo[](length);` only this c++ style allocation is available for dynamic memory arrays, and the length must be known at creation time. you must then set each member of the array separately, in a loop.
|
||||
* static memory arrays `Foo[4] memory myArray = [foo1, foo2, foo3, foo4];` the length of the array is part of the type information, and it is not possible to cast a dynamic array to a static one or vice-versa.
|
||||
* static arrays `Foo[4] memory myArray = [foo1, foo2, foo3, foo4];` the length of the array is part of the type information, and it is not possible to cast a dynamic array to a static one or vice-versa.
|
||||
* functions have two different types: views and transactions.
|
||||
* a view is read-only and may be completed instantly off-chain. its return values are immediately available to whatever client invoked the call.
|
||||
* transactions make changes to chain data. the return values from a transaction function are not written to chain, but they are immediately useable by other code that calls into that function from the same transaction.
|
||||
|
||||
@@ -23,8 +23,5 @@ stackAllocation = true
|
||||
optimizerSteps = 'dhfoD[xarrscLMcCTU]uljmul'
|
||||
|
||||
[profile.default.rpc_endpoints]
|
||||
# todo put these into a secrets file
|
||||
arbitrum_alchemy='https://arb-mainnet.g.alchemy.com/v2/L0eaUwWEoWzszCK9EhqHdl_p7VHStkaC'
|
||||
arbitrum_ankr='https://rpc.ankr.com/arbitrum/056ed471570655a3bb77cf31b9e3576658d63d2acb88911f84e7acaf211b55ac'
|
||||
arbitrum_publicnode='https://arbitrum-one.publicnode.com'
|
||||
arbitrum_quicknode='https://muddy-methodical-sheet.arbitrum-mainnet.discover.quiknode.pro/9e24248720b067953db96d462c8dd131a0a234b0/'
|
||||
arbitrum_mock='...'
|
||||
arbitrum_test='...'
|
||||
@@ -17,7 +17,7 @@ contract Deploy is Script {
|
||||
Dexorder dexorder = new Dexorder();
|
||||
MockEnv mock = new MockEnv();
|
||||
vm.stopBroadcast();
|
||||
console2.log('VaultDeployer');
|
||||
console2.log('Factory');
|
||||
console2.log(address(deployer));
|
||||
console2.log('QueryHelper');
|
||||
console2.log(address(query));
|
||||
|
||||
@@ -16,7 +16,5 @@ library Constants {
|
||||
= ISwapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564);
|
||||
|
||||
|
||||
// Swap statuses
|
||||
bytes32 internal constant SWAP_OK = ''; // fastest comparison
|
||||
// other errors may be passed through from Uniswap
|
||||
bytes32 internal constant SWAP_OK = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user