// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.30; import "forge-std/Script.sol"; import "forge-std/console2.sol"; import "@abdk/ABDKMath64x64.sol"; import "../test/MockERC20.sol"; import "../src/IPartyPool.sol"; import "../src/PartyPool.sol"; contract DeployMock is Script { // private key 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 address constant devAccount7 = 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955; function run() public { vm.startBroadcast(deployer); // create mock tokens usxd = new MockERC20('Joke Currency', 'USXD', 6); fusd = new MockERC20('Fake USD', 'FUSD', 6); dive = new MockERC20('DAI Virtually Equal', 'DIVE', 18); string memory name = 'Mock Pool'; string memory symbol = 'MP'; address[] memory tokens = new address[](3); tokens[0] = address(usxd); tokens[1] = address(fusd); tokens[2] = address(dive); uint256[] memory _bases = new uint256[](3); _bases[0] = 6; _bases[1] = 6; _bases[2] = 18; int128 _tradeFrac = ABDKMath64x64.divu(1, 10); int128 _targetSlippage = ABDKMath64x64.divu(1,10000); uint256 _feePpm = 100; IPartyPool pool = new PartyPool(); bytes memory args = abi.encode(name, symbol, tokens, _bases, _tradeFrac, _targetSlippage, _feePpm); bytes memory deployCode = abi.encodePacked(bytecode,args); vm.etch(pool, deployCode); console2.log('PartyPool', pool); // initial mint mintAll(pool, 10_000); IPartyPool(pool).mint(deployer, deployer, 0, 0); console2.log('USXD', address(usxd)); console2.log('FUSD', address(fusd)); console2.log('DIVE', address(dive)); // give tokens to dev7 mintAll(devAccount7, 1_000_000); vm.stopBroadcast(); } address constant deployer = address(0x472358699872673459876); // anything MockERC20 private usxd; MockERC20 private fusd; MockERC20 private dive; function mintAll(address who, uint256 amount) internal { usxd.mint(who, amount * 1e6); fusd.mint(who, amount * 1e6); dive.mint(who, amount * 1e18); } }