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
04107df0
Commit
04107df0
authored
Jan 19, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctp: simplify station
parent
4c64a581
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
33 deletions
+18
-33
.gas-snapshot
packages/contracts-periphery/.gas-snapshot
+13
-13
AttestationStation.sol
...riphery/contracts/universal/op-nft/AttestationStation.sol
+5
-20
No files found.
packages/contracts-periphery/.gas-snapshot
View file @
04107df0
...
...
@@ -10,23 +10,23 @@ AssetReceiverTest:test_withdrawERC20withAmount() (gas: 182146)
AssetReceiverTest:test_withdrawERC721() (gas: 49097)
AssetReceiverTest:test_withdrawETH() (gas: 26179)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 26108)
AssetReceiverTest:test_attest_bulk() (gas: 61
4443
)
AssetReceiverTest:test_attest_individual() (gas: 5
41558
)
AssetReceiverTest:test_attest_single() (gas: 5
61966
)
AssetReceiverTest:test_attest_bulk() (gas: 61
1440
)
AssetReceiverTest:test_attest_individual() (gas: 5
38514
)
AssetReceiverTest:test_attest_single() (gas: 5
58962
)
OptimistTest:test_optimist_baseURI() (gas: 116809)
OptimistTest:test_optimist_burn() (gas: 7752
5
)
OptimistTest:test_optimist_burn() (gas: 7752
6
)
OptimistTest:test_optimist_initialize() (gas: 23095)
OptimistTest:test_optimist_is_on_allow_list() (gas: 5261
5
)
OptimistTest:test_optimist_mint_already_minted() (gas: 9891
0
)
OptimistTest:test_optimist_mint_happy_path() (gas: 9917
4
)
OptimistTest:test_optimist_is_on_allow_list() (gas: 5261
6
)
OptimistTest:test_optimist_mint_already_minted() (gas: 9891
1
)
OptimistTest:test_optimist_mint_happy_path() (gas: 9917
5
)
OptimistTest:test_optimist_mint_no_attestation() (gas: 15897)
OptimistTest:test_optimist_mint_secondary_minter() (gas: 10057
5
)
OptimistTest:test_optimist_sbt_approve() (gas: 9728
3
)
OptimistTest:test_optimist_sbt_transfer() (gas: 10233
0
)
OptimistTest:test_optimist_set_approval_for_all() (gas: 10090
6
)
OptimistTest:test_optimist_mint_secondary_minter() (gas: 10057
6
)
OptimistTest:test_optimist_sbt_approve() (gas: 9728
4
)
OptimistTest:test_optimist_sbt_transfer() (gas: 10233
1
)
OptimistTest:test_optimist_set_approval_for_all() (gas: 10090
7
)
OptimistTest:test_optimist_supports_interface() (gas: 5797)
OptimistTest:test_optimist_token_id_of_owner() (gas: 9504
4
)
OptimistTest:test_optimist_token_uri() (gas: 2139
49
)
OptimistTest:test_optimist_token_id_of_owner() (gas: 9504
5
)
OptimistTest:test_optimist_token_uri() (gas: 2139
50
)
TransactorTest:testFail_CALL() (gas: 15658)
TransactorTest:testFail_DELEGATECALLL() (gas: 15632)
TransactorTest:test_CALL() (gas: 26977)
...
...
packages/contracts-periphery/contracts/universal/op-nft/AttestationStation.sol
View file @
04107df0
...
...
@@ -59,8 +59,10 @@ contract AttestationStation is Semver {
address _about,
bytes32 _key,
bytes memory _val
) external {
_attest(_about, _key, _val);
) public {
attestations[msg.sender][_about][_key] = _val;
emit AttestationCreated(msg.sender, _about, _key, _val);
}
/**
...
...
@@ -73,28 +75,11 @@ contract AttestationStation is Semver {
for (uint256 i = 0; i < length; ) {
AttestationData memory attestation = _attestations[i];
_
attest(attestation.about, attestation.key, attestation.val);
attest(attestation.about, attestation.key, attestation.val);
unchecked {
++i;
}
}
}
/**
* @notice Internal function that stores the attestation in a mapping.
*
* @param _about Address that the attestation is about.
* @param _key A key used to namespace the attestation.
* @param _val An arbitrary value stored as part of the attestation.
*/
function _attest(
address _about,
bytes32 _key,
bytes memory _val
) internal {
attestations[msg.sender][_about][_key] = _val;
emit AttestationCreated(msg.sender, _about, _key, _val);
}
}
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