Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: initial repo setup #1

Merged
merged 4 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ multiline_func_header = 'params_first'
sort_imports = true

[profile.default]
solc_version = '0.8.23'
solc_version = '0.8.25'
libs = ['node_modules']
optimizer_runs = 10_000

Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"name": "solidity-foundry-boilerplate",
"name": "op-usdc",
"version": "1.0.0",
"description": "Production ready Solidity boilerplate with Foundry",
"homepage": "https://github.com/defi-wonderland/solidity-foundry-boilerplate#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/defi-wonderland/solidity-foundry-boilerplate.git"
},
"description": "opUSDC, a USDC bridge for any op-chain's canonical bridge",
"license": "MIT",
"author": "Wonderland",
"scripts": {
Expand Down
29 changes: 2 additions & 27 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.25;

import {Greeter} from 'contracts/Greeter.sol';
import {Script} from 'forge-std/Script.sol';
import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';

contract Deploy is Script {
struct DeploymentParams {
string greeting;
IERC20 token;
}

/// @notice Deployment parameters for each chain
mapping(uint256 _chainId => DeploymentParams _params) internal _deploymentParams;

function setUp() public {
// Mainnet
_deploymentParams[1] = DeploymentParams('Hello, Mainnet!', IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2));

// Sepolia
_deploymentParams[11_155_111] =
DeploymentParams('Hello, Sepolia!', IERC20(0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6));
}

function run() public {
DeploymentParams memory _params = _deploymentParams[block.chainid];

vm.startBroadcast();
new Greeter(_params.greeting, _params.token);
vm.stopBroadcast();
}
// TODO: Setup
}
59 changes: 0 additions & 59 deletions src/contracts/Greeter.sol

This file was deleted.

6 changes: 6 additions & 0 deletions src/contracts/OpUSDCBridgeAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import {IOpUSDCBridgeAdapter} from 'interfaces/IOpUSDCBridgeAdapter.sol';

contract OpUSDCBridgeAdapter is IOpUSDCBridgeAdapter {}
6 changes: 6 additions & 0 deletions src/contracts/OpUSDCFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import {IOpUSDCLockbox} from 'interfaces/IOpUSDCLockbox.sol';

contract OpUSDCFactory is IOpUSDCLockbox {}
6 changes: 6 additions & 0 deletions src/contracts/OpUSDCLockbox.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import {IOpUSDCLockbox} from 'interfaces/IOpUSDCLockbox.sol';

contract OpUSDCLockbox is IOpUSDCLockbox {}
74 changes: 0 additions & 74 deletions src/interfaces/IGreeter.sol

This file was deleted.

4 changes: 4 additions & 0 deletions src/interfaces/IOpUSDCBridgeAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

interface IOpUSDCBridgeAdapter {}
4 changes: 4 additions & 0 deletions src/interfaces/IOpUSDCFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

interface IOpUSDCFactory {}
4 changes: 4 additions & 0 deletions src/interfaces/IOpUSDCLockbox.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

interface IOpUSDCLockbox {}
16 changes: 0 additions & 16 deletions test/integration/Greeter.t.sol

This file was deleted.

19 changes: 3 additions & 16 deletions test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.25;

import {Greeter, IGreeter} from 'contracts/Greeter.sol';
import {Test} from 'forge-std/Test.sol';
import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';

contract IntegrationBase is Test {
uint256 internal constant _FORK_BLOCK = 18_920_905;
// TODO: Setup

string internal _initialGreeting = 'hola';
address internal _user = makeAddr('user');
address internal _owner = makeAddr('owner');
address internal _daiWhale = 0x42f8CA49E88A8fd8F0bfA2C739e648468b8f9dec;
IERC20 internal _dai = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F);
IGreeter internal _greeter;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), _FORK_BLOCK);
vm.prank(_owner);
_greeter = new Greeter(_initialGreeting, _dai);
}
function setUp() public {}
}
101 changes: 0 additions & 101 deletions test/unit/Greeter.t.sol

This file was deleted.

Loading
Loading