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
d3acfe36
Commit
d3acfe36
authored
Dec 11, 2020
by
Alina
Committed by
GitHub
Dec 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Unused Code (#125)
* rm unused writeInt * rm unused constants
parent
a9974e8e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
43 deletions
+1
-43
Lib_OVMCodec.sol
...acts/optimistic-ethereum/libraries/codec/Lib_OVMCodec.sol
+1
-4
Lib_RLPWriter.sol
...racts/optimistic-ethereum/libraries/rlp/Lib_RLPWriter.sol
+0
-17
TestLib_RLPWriter.sol
...tracts/contracts/test-libraries/rlp/TestLib_RLPWriter.sol
+0
-12
Lib_RLPWriter.spec.ts
...tracts/test/contracts/libraries/rlp/Lib_RLPWriter.spec.ts
+0
-2
Lib_RLPWriter.test.json
...acts/test/data/json/libraries/rlp/Lib_RLPWriter.test.json
+0
-8
No files found.
packages/contracts/contracts/optimistic-ethereum/libraries/codec/Lib_OVMCodec.sol
View file @
d3acfe36
...
...
@@ -18,9 +18,6 @@ library Lib_OVMCodec {
bytes constant internal RLP_NULL_BYTES = hex'80';
bytes constant internal NULL_BYTES = bytes('');
bytes32 constant internal NULL_BYTES32 = bytes32('');
bytes32 constant internal KECCAK256_RLP_NULL_BYTES = keccak256(RLP_NULL_BYTES);
bytes32 constant internal KECCAK256_NULL_BYTES = keccak256(NULL_BYTES);
// Ring buffer IDs
bytes32 constant internal RING_BUFFER_SCC_BATCHES = keccak256("RING_BUFFER_SCC_BATCHES");
...
...
@@ -31,7 +28,7 @@ library Lib_OVMCodec {
/*********
* Enums *
*********/
enum EOASignatureType {
EIP155_TRANSACTON,
ETH_SIGNED_MESSAGE
...
...
packages/contracts/contracts/optimistic-ethereum/libraries/rlp/Lib_RLPWriter.sol
View file @
d3acfe36
...
...
@@ -118,23 +118,6 @@ library Lib_RLPWriter {
return writeBytes(_toBinary(_in));
}
/**
* RLP encodes an int.
* @param _in The int to encode.
* @return _out The RLP encoded int in bytes.
*/
function writeInt(
int _in
)
internal
pure
returns (
bytes memory _out
)
{
return writeUint(uint(_in));
}
/**
* RLP encodes a bool.
* @param _in The bool to encode.
...
...
packages/contracts/contracts/test-libraries/rlp/TestLib_RLPWriter.sol
View file @
d3acfe36
...
...
@@ -71,18 +71,6 @@ contract TestLib_RLPWriter {
return Lib_RLPWriter.writeUint(_in);
}
function writeInt(
int _in
)
public
pure
returns (
bytes memory _out
)
{
return Lib_RLPWriter.writeInt(_in);
}
function writeBool(
bool _in
)
...
...
packages/contracts/test/contracts/libraries/rlp/Lib_RLPWriter.spec.ts
View file @
d3acfe36
...
...
@@ -19,8 +19,6 @@ const encode = async (Lib_RLPWriter: Contract, input: any): Promise<void> => {
return
Lib_RLPWriter
.
writeList
(
elements
)
}
else
if
(
Number
.
isInteger
(
input
))
{
return
Lib_RLPWriter
.
writeUint
(
input
)
}
else
if
(
input
[
0
]
===
'
#
'
)
{
return
Lib_RLPWriter
.
writeInt
(
input
.
slice
(
1
))
}
else
{
return
Lib_RLPWriter
.
writeString
(
input
)
}
...
...
packages/contracts/test/data/json/libraries/rlp/Lib_RLPWriter.test.json
View file @
d3acfe36
...
...
@@ -68,14 +68,6 @@
"in"
:
100000
,
"out"
:
"0x830186a0"
},
"mediumint4"
:
{
"in"
:
"#83729609699884896815286331701780722"
,
"out"
:
"0x8f102030405060708090a0b0c0d0e0f2"
},
"mediumint5"
:
{
"in"
:
"#105315505618206987246253880190783558935785933862974822347068935681"
,
"out"
:
"0x9c0100020003000400050006000700080009000a000b000c000d000e01"
},
"emptylist"
:
{
"in"
:
[],
"out"
:
"0xc0"
...
...
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