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
44e8c095
Commit
44e8c095
authored
Dec 09, 2022
by
Will Cory
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code golf to one function
parent
d5bf9d20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
AttestationStation.sol
...riphery/contracts/universal/op-nft/AttestationStation.sol
+8
-17
No files found.
packages/contracts-periphery/contracts/universal/op-nft/AttestationStation.sol
View file @
44e8c095
...
...
@@ -50,22 +50,6 @@ contract AttestationStation is Semver {
constructor() Semver(0, 0, 1) {}
/**
* @notice Attest to the given data.
* @dev Attests to the given data from the sender.
* @param _about The address of the attestation subject.
* @param _key The key of the attestation.
* @param _val The value of the attestation.
*/
function _attest(
address _about,
bytes32 _key,
bytes memory _val
) private {
attestations[msg.sender][_about][_key] = _val;
emit AttestationCreated(msg.sender, _about, _key, _val);
}
/**
* @notice Attest to the given data.
* @dev Attests to the given data from the sender.
...
...
@@ -74,7 +58,14 @@ contract AttestationStation is Semver {
function attest(AttestationData[] memory _attestations) public {
uint256 length = _attestations.length;
for (uint256 i = 0; i < length; ) {
_attest(_attestations[i].about, _attestations[i].key, _attestations[i].val);
AttestationData memory attestation = _attestations[i];
attestations[msg.sender][attestation.about][attestation.key] = attestation.val;
emit AttestationCreated(
msg.sender,
attestation.about,
attestation.key,
attestation.val
);
unchecked {
++i;
}
...
...
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