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
0541e0cd
Commit
0541e0cd
authored
Sep 30, 2020
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed up ExecutionManager tests
parent
66a1932e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
139 additions
and
193 deletions
+139
-193
package.json
packages/contracts/package.json
+1
-1
run.spec.ts
.../contracts/OVM/execution/OVM_ExecutionManager/run.spec.ts
+0
-1
OVM_SafetyChecker.spec.ts
...ts/test/contracts/OVM/execution/OVM_SafetyChecker.spec.ts
+1
-1
OVM_FraudVerifier.spec.ts
...test/contracts/OVM/verification/OVM_FraudVerifier.spec.ts
+104
-133
Lib_EthMerkleTrie.spec.ts
...s/test/contracts/libraries/trie/Lib_EthMerkleTrie.spec.ts
+0
-9
Lib_SecureMerkleTrie.spec.ts
...est/contracts/libraries/trie/Lib_SecureMerkleTrie.spec.ts
+0
-9
index.ts
packages/contracts/test/data/index.ts
+0
-2
Lib_EthMerkleTrie.test.json
...test/data/json/libraries/trie/Lib_EthMerkleTrie.test.json
+0
-32
Lib_SecureMerkleTrie.test.json
...t/data/json/libraries/trie/Lib_SecureMerkleTrie.test.json
+0
-5
batches.ts
packages/contracts/test/helpers/dummy/batches.ts
+18
-0
index.ts
packages/contracts/test/helpers/dummy/index.ts
+2
-0
transactions.ts
packages/contracts/test/helpers/dummy/transactions.ts
+13
-0
No files found.
packages/contracts/package.json
View file @
0541e0cd
...
...
@@ -9,7 +9,7 @@
"build:contracts"
:
"buidler compile"
,
"build:copy"
:
"copyfiles -u 2
\"
contracts/optimistic-ethereum/**/*.sol
\"
\"
build/contracts
\"
"
,
"test"
:
"yarn run test:contracts"
,
"test:contracts"
:
"buidler test
\"
test/contracts/libraries/trie/Lib_MerkleTrie.spec.ts
\"
--show-stack-traces"
,
"test:contracts"
:
"buidler test --show-stack-traces"
,
"lint"
:
"tslint --format stylish --project ."
,
"fix"
:
"prettier --config prettier-config.json --write
\"
buidler.config.ts
\"
\"
{src,test}/**/*.ts
\"
"
,
"clean"
:
"rm -rf ./artifacts ./build ./cache"
...
...
packages/contracts/test/contracts/OVM/execution/OVM_ExecutionManager/run.spec.ts
View file @
0541e0cd
...
...
@@ -71,7 +71,6 @@ const test_run: TestDefinition = {
parameters
:
[
{
name
:
'
run => ovmCALL(ADDRESS_1) => ovmADDRESS
'
,
focus
:
true
,
steps
:
[
{
functionName
:
'
run
'
,
...
...
packages/contracts/test/contracts/OVM/execution/OVM_SafetyChecker.spec.ts
View file @
0541e0cd
...
...
@@ -17,7 +17,7 @@ describe('OVM_SafetyChecker', () => {
OVM_SafetyChecker
=
await
Factory__OVM_SafetyChecker
.
deploy
()
})
describe
(
'
isBytecodeSafe()
'
,
()
=>
{
describe
.
skip
(
'
isBytecodeSafe()
'
,
()
=>
{
for
(
const
testName
of
Object
.
keys
(
SAFETY_CHECKER_TEST_JSON
))
{
const
test
=
SAFETY_CHECKER_TEST_JSON
[
testName
]
it
(
`should correctly classify:
${
testName
}
`
,
async
()
=>
{
...
...
packages/contracts/test/contracts/OVM/verification/OVM_FraudVerifier.spec.ts
View file @
0541e0cd
This diff is collapsed.
Click to expand it.
packages/contracts/test/contracts/libraries/trie/Lib_EthMerkleTrie.spec.ts
deleted
100644 → 0
View file @
66a1932e
/* Internal Imports */
import
{
Lib_EthMerkleTrie_TEST_JSON
}
from
'
../../../data
'
import
{
runJsonTest
}
from
'
../../../helpers
'
describe
(
'
Lib_EthMerkleTrie
'
,
()
=>
{
describe
(
'
JSON tests
'
,
()
=>
{
runJsonTest
(
'
TestLib_EthMerkleTrie
'
,
Lib_EthMerkleTrie_TEST_JSON
)
})
})
packages/contracts/test/contracts/libraries/trie/Lib_SecureMerkleTrie.spec.ts
deleted
100644 → 0
View file @
66a1932e
/* Internal Imports */
import
{
Lib_SecureMerkleTrie_TEST_JSON
}
from
'
../../../data
'
import
{
runJsonTest
}
from
'
../../../helpers
'
describe
(
'
Lib_SecureMerkleTrie
'
,
()
=>
{
describe
(
'
JSON tests
'
,
()
=>
{
runJsonTest
(
'
TestLib_SecureMerkleTrie
'
,
Lib_SecureMerkleTrie_TEST_JSON
)
})
})
packages/contracts/test/data/index.ts
View file @
0541e0cd
...
...
@@ -3,7 +3,5 @@ export { tests as Lib_Bytes32Utils_TEST_JSON } from './json/libraries/utils/Lib_
export
{
tests
as
Lib_BytesUtils_TEST_JSON
}
from
'
./json/libraries/utils/Lib_BytesUtils.test.json
'
export
{
tests
as
Lib_ECDSAUtils_TEST_JSON
}
from
'
./json/libraries/utils/Lib_ECDSAUtils.test.json
'
export
{
tests
as
Lib_MerkleTrie_TEST_JSON
}
from
'
./json/libraries/trie/Lib_MerkleTrie.test.json
'
export
{
tests
as
Lib_SecureMerkleTrie_TEST_JSON
}
from
'
./json/libraries/trie/Lib_SecureMerkleTrie.test.json
'
export
{
tests
as
Lib_EthMerkleTrie_TEST_JSON
}
from
'
./json/libraries/trie/Lib_EthMerkleTrie.test.json
'
export
{
tests
as
CREATE2_TEST_JSON
}
from
'
./json/create2.test.json
'
export
{
tests
as
SAFETY_CHECKER_TEST_JSON
}
from
'
./json/safety-checker.test.json
'
packages/contracts/test/data/json/libraries/trie/Lib_EthMerkleTrie.test.json
deleted
100644 → 0
View file @
66a1932e
{
"tests"
:
{
"proveAccountStorageSlotValue"
:
{
"single account, single storage slot"
:
{
},
"single account, multiple storage slots"
:
{
},
"multiple accounts, multiple storage slots"
:
{
}
},
"updateAccountStorageSlotValue"
:
{
"single account, single storage slot"
:
{
},
"single account, multiple storage slots"
:
{
},
"multiple accounts, multiple storage slots"
:
{
}
},
"proveAccountState"
:
{
"account within trie with a single account"
:
{
},
"account within trie with multiple accounts"
:
{
}
},
"updateAccountState"
:
{
"account within trie with a single account"
:
{
},
"account within trie with multiple accounts"
:
{
}
}
}
}
\ No newline at end of file
packages/contracts/test/data/json/libraries/trie/Lib_SecureMerkleTrie.test.json
deleted
100644 → 0
View file @
66a1932e
{
"tests"
:
{
}
}
\ No newline at end of file
packages/contracts/test/helpers/dummy/batches.ts
0 → 100644
View file @
0541e0cd
import
{
NULL_BYTES32
}
from
'
../constants
'
export
const
DUMMY_BATCH_HEADERS
=
[
{
batchIndex
:
0
,
batchRoot
:
NULL_BYTES32
,
batchSize
:
0
,
prevTotalElements
:
0
,
extraData
:
NULL_BYTES32
,
},
]
export
const
DUMMY_BATCH_PROOFS
=
[
{
index
:
0
,
siblings
:
[
NULL_BYTES32
],
},
]
packages/contracts/test/helpers/dummy/index.ts
View file @
0541e0cd
...
...
@@ -2,3 +2,5 @@ export * from './accounts'
export
*
from
'
./bytes32
'
export
*
from
'
./context
'
export
*
from
'
./bytecode
'
export
*
from
'
./batches
'
export
*
from
'
./transactions
'
packages/contracts/test/helpers/dummy/transactions.ts
0 → 100644
View file @
0541e0cd
import
{
ZERO_ADDRESS
,
NULL_BYTES32
}
from
'
../constants
'
export
const
DUMMY_OVM_TRANSACTIONS
=
[
{
timestamp
:
0
,
number
:
0
,
l1QueueOrigin
:
0
,
l1Txorigin
:
ZERO_ADDRESS
,
entrypoint
:
ZERO_ADDRESS
,
gasLimit
:
0
,
data
:
NULL_BYTES32
,
},
]
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