Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
afd30b41
Commit
afd30b41
authored
Feb 01, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctp: cleanup foundry test setUp
parent
d228e672
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
36 deletions
+19
-36
.gas-snapshot
packages/contracts-periphery/.gas-snapshot
+15
-15
AssetReceiver.t.sol
...cts-periphery/contracts/foundry-tests/AssetReceiver.t.sol
+1
-5
AttestationStation.t.sol
...eriphery/contracts/foundry-tests/AttestationStation.t.sol
+1
-5
Optimist.t.sol
...ontracts-periphery/contracts/foundry-tests/Optimist.t.sol
+1
-6
Transactor.t.sol
...tracts-periphery/contracts/foundry-tests/Transactor.t.sol
+1
-5
No files found.
packages/contracts-periphery/.gas-snapshot
View file @
afd30b41
...
...
@@ -4,15 +4,15 @@ AssetReceiverTest:testFail_withdrawERC721() (gas: 55908)
AssetReceiverTest:testFail_withdrawETH() (gas: 10457)
AssetReceiverTest:testFail_withdrawETHwithAmount() (gas: 10594)
AssetReceiverTest:test_constructor() (gas: 9794)
AssetReceiverTest:test_receive() (gas:
18860
)
AssetReceiverTest:test_withdrawERC20() (gas: 18
3064
)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 18
2146
)
AssetReceiverTest:test_withdrawERC721() (gas:
4909
7)
AssetReceiverTest:test_withdrawETH() (gas: 2
6179
)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 2
6108
)
AssetReceiverTest:test_attest_bulk() (gas: 6114
40
)
AssetReceiverTest:test_attest_individual() (gas: 5385
14
)
AssetReceiverTest:test_attest_single() (gas: 5589
62
)
AssetReceiverTest:test_receive() (gas:
20787
)
AssetReceiverTest:test_withdrawERC20() (gas: 18
5351
)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 18
4431
)
AssetReceiverTest:test_withdrawERC721() (gas:
5138
7)
AssetReceiverTest:test_withdrawETH() (gas: 2
8551
)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 2
8480
)
AssetReceiverTest:test_attest_bulk() (gas: 6114
17
)
AssetReceiverTest:test_attest_individual() (gas: 5385
36
)
AssetReceiverTest:test_attest_single() (gas: 5589
39
)
CheckBalanceHighTest:testFuzz_check_fails(address,uint256) (runs: 256, μ: 12352, ~: 12382)
CheckBalanceHighTest:testFuzz_check_succeeds(address,uint256) (runs: 256, μ: 10284, ~: 10284)
CheckBalanceLowTest:testFuzz_check_fails(address,uint256) (runs: 256, μ: 10262, ~: 10262)
...
...
@@ -45,7 +45,7 @@ OptimistTest:test_optimist_baseURI() (gas: 116809)
OptimistTest:test_optimist_burn() (gas: 77526)
OptimistTest:test_optimist_initialize() (gas: 23095)
OptimistTest:test_optimist_is_on_allow_list() (gas: 52616)
OptimistTest:test_optimist_mint_already_minted() (gas: 98
911
)
OptimistTest:test_optimist_mint_already_minted() (gas: 98
823
)
OptimistTest:test_optimist_mint_happy_path() (gas: 99175)
OptimistTest:test_optimist_mint_no_attestation() (gas: 15897)
OptimistTest:test_optimist_mint_secondary_minter() (gas: 100576)
...
...
@@ -54,9 +54,9 @@ OptimistTest:test_optimist_sbt_transfer() (gas: 102331)
OptimistTest:test_optimist_set_approval_for_all() (gas: 100907)
OptimistTest:test_optimist_supports_interface() (gas: 5797)
OptimistTest:test_optimist_token_id_of_owner() (gas: 95045)
OptimistTest:test_optimist_token_uri() (gas: 2139
50
)
TransactorTest:testFail_CALL() (gas: 156
58
)
OptimistTest:test_optimist_token_uri() (gas: 2139
72
)
TransactorTest:testFail_CALL() (gas: 156
36
)
TransactorTest:testFail_DELEGATECALLL() (gas: 15632)
TransactorTest:test_CALL() (gas: 269
77
)
TransactorTest:test_DELEGATECALL() (gas: 211
22
)
TransactorTest:test_constructor() (gas: 97
8
2)
TransactorTest:test_CALL() (gas: 269
69
)
TransactorTest:test_DELEGATECALL() (gas: 211
89
)
TransactorTest:test_constructor() (gas: 97
7
2)
packages/contracts-periphery/contracts/foundry-tests/AssetReceiver.t.sol
View file @
afd30b41
...
...
@@ -32,7 +32,7 @@ contract AssetReceiver_Initializer is Test {
uint256 id
);
function
_
setUp() public {
function setUp() public {
// Deploy ERC20 and ERC721 tokens
testERC20 = new TestERC20();
testERC721 = new TestERC721();
...
...
@@ -53,10 +53,6 @@ contract AssetReceiver_Initializer is Test {
}
contract AssetReceiverTest is AssetReceiver_Initializer {
function setUp() public {
super._setUp();
}
// Tests if the owner was set correctly during deploy
function test_constructor() external {
assertEq(address(alice), assetReceiver.owner());
...
...
packages/contracts-periphery/contracts/foundry-tests/AttestationStation.t.sol
View file @
afd30b41
...
...
@@ -11,7 +11,7 @@ contract AssetReceiver_Initializer is Test {
address bob = address(256);
address sally = address(512);
function
_
setUp() public {
function setUp() public {
// Give alice and bob some ETH
vm.deal(alice_attestor, 1 ether);
...
...
@@ -22,10 +22,6 @@ contract AssetReceiver_Initializer is Test {
}
contract AssetReceiverTest is AssetReceiver_Initializer {
function setUp() public {
super._setUp();
}
event AttestationCreated(
address indexed creator,
address indexed about,
...
...
packages/contracts-periphery/contracts/foundry-tests/Optimist.t.sol
View file @
afd30b41
...
...
@@ -47,7 +47,7 @@ contract Optimist_Initializer is Test {
attestationStation.attest(attestationData);
}
function
_
setUp() public {
function setUp() public {
// Give alice and bob and sally some ETH
vm.deal(alice_admin, 1 ether);
vm.deal(bob, 1 ether);
...
...
@@ -68,11 +68,6 @@ contract Optimist_Initializer is Test {
}
contract OptimistTest is Optimist_Initializer {
function setUp() public {
super._setUp();
_initializeContracts();
}
function test_optimist_initialize() external {
// expect name to be set
assertEq(optimist.name(), name);
...
...
packages/contracts-periphery/contracts/foundry-tests/Transactor.t.sol
View file @
afd30b41
...
...
@@ -15,7 +15,7 @@ contract Transactor_Initializer is Test {
Reverter reverter;
CallRecorder callRecorded;
function
_
setUp() public {
function setUp() public {
// Deploy Reverter and CallRecorder helper contracts
reverter = new Reverter();
callRecorded = new CallRecorder();
...
...
@@ -34,10 +34,6 @@ contract Transactor_Initializer is Test {
}
contract TransactorTest is Transactor_Initializer {
function setUp() public {
super._setUp();
}
// Tests if the owner was set correctly during deploy
function test_constructor() external {
assertEq(address(alice), transactor.owner());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment