Commit d3acfe36 authored by Alina's avatar Alina Committed by GitHub

Remove Unused Code (#125)

* rm unused writeInt

* rm unused constants
parent a9974e8e
......@@ -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
......
......@@ -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.
......
......@@ -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
)
......
......@@ -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)
}
......
......@@ -68,14 +68,6 @@
"in": 100000,
"out": "0x830186a0"
},
"mediumint4": {
"in": "#83729609699884896815286331701780722",
"out": "0x8f102030405060708090a0b0c0d0e0f2"
},
"mediumint5": {
"in": "#105315505618206987246253880190783558935785933862974822347068935681",
"out": "0x9c0100020003000400050006000700080009000a000b000c000d000e01"
},
"emptylist": {
"in": [],
"out": "0xc0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment