diff --git a/foundry.toml b/foundry.toml index 8fbcc88..9d4aa1a 100644 --- a/foundry.toml +++ b/foundry.toml @@ -4,7 +4,9 @@ out = 'out' libs = ['lib'] # Ankr RPC endpoints (https://www.ankr.com/rpc/) -rpc_endpoints = { eth = "https://rpc.ankr.com/eth", optimism = "https://rpc.ankr.com/optimism", fantom = "https://rpc.ankr.com/fantom", arbitrum = "https://rpc.ankr.com/arbitrum", bsc = "https://rpc.ankr.com/bsc", moonriver = "https://moonriver.public.blastapi.io", gnosis = "https://rpc.ankr.com/gnosis", Avalanche = "https://rpc.ankr.com/avalanche", polygon = "https://rpc.ankr.com/polygon", celo = "https://rpc.ankr.com/celo", solana = "https://rpc.ankr.com/solana", IoTeX = "https://rpc.ankr.com/iotex", harmony = "https://rpc.ankr.com/harmony", aptos = "https://rpc.ankr.com/http/aptos/v1", tron = "https://rpc.ankr.com/http/tron", near = "https://rpc.ankr.com/near", klaytn = "https://rpc.ankr.com/klaytn", filecoin = "https://rpc.ankr.com/filecoin", nervos = "https://rpc.ankr.com/nervos", bttc = "https://rpc.ankr.com/bttc", syscoin = "https://rpc.ankr.com/syscoin", arbitrumnova = "https://rpc.ankr.com/arbitrumnova", secretnetwork = "https://rpc.ankr.com/scrt" } - +[rpc_endpoints] +eth = "${ETH_ALCHEMY_API}" +gnosis = "${GNOSIS_ALCHEMY_API}" +polygon = "${POLYGON_ALCHEMY_API}" # See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/src/tokens/examples/TokenExampleManipulation.sol b/src/tokens/examples/TokenExampleManipulation.sol index 7c21e15..ee5f9c9 100644 --- a/src/tokens/examples/TokenExampleManipulation.sol +++ b/src/tokens/examples/TokenExampleManipulation.sol @@ -4,6 +4,6 @@ import "../Tokens.sol"; contract TokenExampleManipulation is Tokens { function manipulateTokenBalance() external { - deal(EthereumTokens.USDC, address(this), 1 ether); + deal(EthereumTokens.WETH, address(this), 1 ether); } } diff --git a/test/examples/PriceManipulationExample.t.sol b/test/examples/PriceManipulationExample.t.sol index 2b7fd22..b1342bf 100644 --- a/test/examples/PriceManipulationExample.t.sol +++ b/test/examples/PriceManipulationExample.t.sol @@ -10,7 +10,7 @@ contract PriceManipulationExampleTest is Test { PriceManipulationExample public attackContract; function setUp() public { - mainnetFork = vm.createFork("eth"); + mainnetFork = vm.createFork("eth", 18464488); vm.selectFork(mainnetFork); attackContract = new PriceManipulationExample(); diff --git a/test/examples/TokensExample.t.sol b/test/examples/TokensExample.t.sol index ddff608..5c44fbf 100644 --- a/test/examples/TokensExample.t.sol +++ b/test/examples/TokensExample.t.sol @@ -17,8 +17,8 @@ contract TokensExampleTest is Test { } function testTokenManipulation() public { - console.log("Balance before:", EthereumTokens.USDC.balanceOf(address(tokenExample))); + console.log("Balance before:", EthereumTokens.WETH.balanceOf(address(tokenExample))); tokenExample.manipulateTokenBalance(); - console.log("Balance after:", EthereumTokens.USDC.balanceOf(address(tokenExample))); + console.log("Balance after:", EthereumTokens.WETH.balanceOf(address(tokenExample))); } } diff --git a/test/pocs/DFXFinanceBugfixReview.t.sol b/test/pocs/DFXFinanceBugfixReview.t.sol index d418530..0663861 100644 --- a/test/pocs/DFXFinanceBugfixReview.t.sol +++ b/test/pocs/DFXFinanceBugfixReview.t.sol @@ -12,7 +12,7 @@ contract DFXFinanceBugfixReviewTest is PoC { IERC20 EURS = IERC20(0xE111178A87A3BFf0c8d18DECBa5798827539Ae99); function setUp() public { - vm.createSelectFork("https://rpc.ankr.com/polygon", 42064500); + vm.createSelectFork("polygon", 42064500); attackContract = new DFXFinanceBugfixReview(); tokens.push(PolygonTokens.USDC);