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
087dba63
Unverified
Commit
087dba63
authored
Dec 02, 2022
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctb: Split up burn tests
parent
ba5742b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
config.yml
.circleci/config.yml
+5
-1
FuzzBurn.sol
packages/contracts-bedrock/contracts/echidna/FuzzBurn.sol
+10
-7
package.json
packages/contracts-bedrock/package.json
+2
-1
No files found.
.circleci/config.yml
View file @
087dba63
...
@@ -818,7 +818,11 @@ workflows:
...
@@ -818,7 +818,11 @@ workflows:
requires
:
requires
:
-
bedrock-echidna-build
-
bedrock-echidna-build
-
bedrock-echidna-run
:
-
bedrock-echidna-run
:
echidna_target
:
burn
echidna_target
:
"
burn:eth"
requires
:
-
bedrock-echidna-build
-
bedrock-echidna-run
:
echidna_target
:
"
burn:gas"
requires
:
requires
:
-
bedrock-echidna-build
-
bedrock-echidna-build
-
op-bindings-build
:
-
op-bindings-build
:
...
...
packages/contracts-bedrock/contracts/echidna/FuzzBurn.sol
View file @
087dba63
...
@@ -3,9 +3,8 @@ pragma solidity 0.8.15;
...
@@ -3,9 +3,8 @@ pragma solidity 0.8.15;
import { Burn } from "../libraries/Burn.sol";
import { Burn } from "../libraries/Burn.sol";
import { StdUtils } from "forge-std/Test.sol";
import { StdUtils } from "forge-std/Test.sol";
contract EchidnaFuzzBurn is StdUtils {
contract EchidnaFuzzBurn
Eth
is StdUtils {
bool failedEthBurn;
bool failedEthBurn;
bool failedGasBurn;
/**
/**
* @notice Takes an integer amount of eth to burn through the Burn library and
* @notice Takes an integer amount of eth to burn through the Burn library and
...
@@ -27,6 +26,15 @@ contract EchidnaFuzzBurn is StdUtils {
...
@@ -27,6 +26,15 @@ contract EchidnaFuzzBurn is StdUtils {
}
}
}
}
function echidna_burn_eth() public view returns (bool) {
// ASSERTION: The amount burned should always match the amount passed exactly
return !failedEthBurn;
}
}
contract EchidnaFuzzBurnGas is StdUtils {
bool failedGasBurn;
/**
/**
* @notice Takes an integer amount of gas to burn through the Burn library and
* @notice Takes an integer amount of gas to burn through the Burn library and
* updates the contract state if at least that amount of gas was not burned
* updates the contract state if at least that amount of gas was not burned
...
@@ -54,11 +62,6 @@ contract EchidnaFuzzBurn is StdUtils {
...
@@ -54,11 +62,6 @@ contract EchidnaFuzzBurn is StdUtils {
}
}
}
}
function echidna_burn_eth() public view returns (bool) {
// ASSERTION: The amount burned should always match the amount passed exactly
return !failedEthBurn;
}
function echidna_burn_gas() public view returns (bool) {
function echidna_burn_gas() public view returns (bool) {
// ASSERTION: The amount of gas burned should be strictly greater than the
// ASSERTION: The amount of gas burned should be strictly greater than the
// the amount passed as _value (minimum _value + whatever minor overhead to
// the amount passed as _value (minimum _value + whatever minor overhead to
...
...
packages/contracts-bedrock/package.json
View file @
087dba63
...
@@ -39,7 +39,8 @@
...
@@ -39,7 +39,8 @@
"lint"
:
"yarn lint:fix && yarn lint:check"
,
"lint"
:
"yarn lint:fix && yarn lint:check"
,
"typechain"
:
"typechain --target ethers-v5 --out-dir dist/types --glob 'artifacts/!(build-info)/**/+([a-zA-Z0-9_]).json'"
,
"typechain"
:
"typechain --target ethers-v5 --out-dir dist/types --glob 'artifacts/!(build-info)/**/+([a-zA-Z0-9_]).json'"
,
"echidna:aliasing"
:
"echidna-test --contract EchidnaFuzzAddressAliasing --config ./echidna.yaml ."
,
"echidna:aliasing"
:
"echidna-test --contract EchidnaFuzzAddressAliasing --config ./echidna.yaml ."
,
"echidna:burn"
:
"echidna-test --contract EchidnaFuzzBurn --config ./echidna.yaml ."
,
"echidna:burn:gas"
:
"echidna-test --contract EchidnaFuzzBurnGas --config ./echidna.yaml ."
,
"echidna:burn:eth"
:
"echidna-test --contract EchidnaFuzzBurnEth --config ./echidna.yaml ."
,
"echidna:encoding"
:
"echidna-test --contract EchidnaFuzzEncoding --config ./echidna.yaml ."
,
"echidna:encoding"
:
"echidna-test --contract EchidnaFuzzEncoding --config ./echidna.yaml ."
,
"echidna:portal"
:
"echidna-test --contract EchidnaFuzzOptimismPortal --config ./echidna.yaml ."
,
"echidna:portal"
:
"echidna-test --contract EchidnaFuzzOptimismPortal --config ./echidna.yaml ."
,
"echidna:hashing"
:
"echidna-test --contract EchidnaFuzzHashing --config ./echidna.yaml ."
,
"echidna:hashing"
:
"echidna-test --contract EchidnaFuzzHashing --config ./echidna.yaml ."
,
...
...
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