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
2e16f392
Commit
2e16f392
authored
Mar 11, 2021
by
Victor Shih
Committed by
GitHub
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename all instances of push2 to pushTwo and get2 to getTwo (#319)
parent
ab7f4c72
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
OVM_CanonicalTransactionChain.sol
...stic-ethereum/OVM/chain/OVM_CanonicalTransactionChain.sol
+5
-5
OVM_ChainStorageContainer.sol
...timistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol
+6
-6
iOVM_ChainStorageContainer.sol
...mistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol
+3
-3
Lib_RingBuffer.sol
...ts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol
+4
-4
TestLib_RingBuffer.sol
...cts/contracts/test-libraries/utils/TestLib_RingBuffer.sol
+2
-2
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/chain/OVM_CanonicalTransactionChain.sol
View file @
2e16f392
...
...
@@ -313,14 +313,14 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
iOVM_ChainStorageContainer queueRef = queue();
queueRef.push
2
(
queueRef.push
Two
(
transactionHash,
timestampAndBlockNumber
);
// The underlying queue data structure stores 2 elements
// per insertion, so to get the real queue length we need
// to divide by 2 and subtract 1. See the usage of `push
2
(..)`.
// to divide by 2 and subtract 1. See the usage of `push
Two
(..)`.
uint256 queueIndex = queueRef.length() / 2 - 1;
emit TransactionEnqueued(
msg.sender,
...
...
@@ -751,11 +751,11 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
{
// The underlying queue data structure stores 2 elements
// per insertion, so to get the actual desired queue index
// we need to multiply by 2. See the usage of `push
2
(..)`.
// we need to multiply by 2. See the usage of `push
Two
(..)`.
(
bytes32 transactionHash,
bytes32 timestampAndBlockNumber
) = _queueRef.get
2
(uint40(_index * 2));
) = _queueRef.get
Two
(uint40(_index * 2));
uint40 elementTimestamp;
uint40 elementBlockNumber;
...
...
@@ -786,7 +786,7 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
{
// The underlying queue data structure stores 2 elements
// per insertion, so to get the real queue length we need
// to divide by 2. See the usage of `push
2
(..)`.
// to divide by 2. See the usage of `push
Two
(..)`.
return uint40(_queueRef.length() / 2);
}
...
...
packages/contracts/contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol
View file @
2e16f392
...
...
@@ -145,7 +145,7 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
/**
* @inheritdoc iOVM_ChainStorageContainer
*/
function push
2
(
function push
Two
(
bytes32 _objectA,
bytes32 _objectB
)
...
...
@@ -153,13 +153,13 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
public
onlyOwner
{
buffer.push
2
(_objectA, _objectB);
buffer.push
Two
(_objectA, _objectB);
}
/**
* @inheritdoc iOVM_ChainStorageContainer
*/
function push
2
(
function push
Two
(
bytes32 _objectA,
bytes32 _objectB,
bytes27 _globalMetadata
...
...
@@ -168,7 +168,7 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
public
onlyOwner
{
buffer.push
2
(_objectA, _objectB, _globalMetadata);
buffer.push
Two
(_objectA, _objectB, _globalMetadata);
}
/**
...
...
@@ -190,7 +190,7 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
/**
* @inheritdoc iOVM_ChainStorageContainer
*/
function get
2
(
function get
Two
(
uint256 _index
)
override
...
...
@@ -201,7 +201,7 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
bytes32
)
{
return buffer.get
2
(uint40(_index));
return buffer.get
Two
(uint40(_index));
}
/**
...
...
packages/contracts/contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol
View file @
2e16f392
...
...
@@ -70,7 +70,7 @@ interface iOVM_ChainStorageContainer {
* @param _objectA First 32 byte value to insert into the container.
* @param _objectB Second 32 byte value to insert into the container.
*/
function push
2
(
function push
Two
(
bytes32 _objectA,
bytes32 _objectB
)
...
...
@@ -83,7 +83,7 @@ interface iOVM_ChainStorageContainer {
* @param _objectB Second 32 byte value to insert into the container.
* @param _globalMetadata New global metadata for the container.
*/
function push
2
(
function push
Two
(
bytes32 _objectA,
bytes32 _objectB,
bytes27 _globalMetadata
...
...
@@ -110,7 +110,7 @@ interface iOVM_ChainStorageContainer {
* @return 32 byte object value at index `_index`.
* @return 32 byte object value at index `_index + 1`.
*/
function get
2
(
function get
Two
(
uint256 _index
)
external
...
...
packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol
View file @
2e16f392
...
...
@@ -118,7 +118,7 @@ library Lib_RingBuffer {
* @param _valueA Second value to push to the buffer.
* @param _extraData Optional global extra data.
*/
function push
2
(
function push
Two
(
RingBuffer storage _self,
bytes32 _valueA,
bytes32 _valueB,
...
...
@@ -136,7 +136,7 @@ library Lib_RingBuffer {
* @param _valueA First value to push to the buffer.
* @param _valueA Second value to push to the buffer.
*/
function push
2
(
function push
Two
(
RingBuffer storage _self,
bytes32 _valueA,
bytes32 _valueB
...
...
@@ -145,7 +145,7 @@ library Lib_RingBuffer {
{
RingBufferContext memory ctx = _self.getContext();
_self.push
2
(
_self.push
Two
(
_valueA,
_valueB,
ctx.extraData
...
...
@@ -218,7 +218,7 @@ library Lib_RingBuffer {
* @return Value of the element at index `_index`.
* @return Value of the element at index `_index + 1`.
*/
function get
2
(
function get
Two
(
RingBuffer storage _self,
uint256 _index
)
...
...
packages/contracts/contracts/test-libraries/utils/TestLib_RingBuffer.sol
View file @
2e16f392
...
...
@@ -25,14 +25,14 @@ contract TestLib_RingBuffer {
);
}
function push
2
(
function push
Two
(
bytes32 _valueA,
bytes32 _valueB,
bytes27 _extraData
)
public
{
buf.push
2
(
buf.push
Two
(
_valueA,
_valueB,
_extraData
...
...
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