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
9b63875c
Commit
9b63875c
authored
Sep 20, 2020
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set state manager in em.run
parent
c7b4a1a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
OVM_ExecutionManager.sol
...ptimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
+7
-3
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/execution/OVM_ExecutionManager.sol
View file @
9b63875c
...
@@ -117,6 +117,10 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -117,6 +117,10 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
return;
return;
}
}
// Store our OVM_StateManager instance (significantly easier than attempting to pass the address
// around in calldata).
ovmStateManager = iOVM_StateManager(_ovmStateManager);
// Run the transaction, make sure to meter the gas usage.
// Run the transaction, make sure to meter the gas usage.
uint256 gasLimit = gasleft();
uint256 gasLimit = gasleft();
ovmCALL(
ovmCALL(
...
@@ -648,7 +652,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -648,7 +652,6 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
* Public Functions: Execution Safety *
* Public Functions: Execution Safety *
**************************************/
**************************************/
/**
/**
* Performs the logic to create a contract and revert under various potential conditions.
* Performs the logic to create a contract and revert under various potential conditions.
* @dev This function is implemented as `public` because we need to be able to revert a
* @dev This function is implemented as `public` because we need to be able to revert a
...
@@ -739,8 +742,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
...
@@ -739,8 +742,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager {
_setAccountNonce(ovmADDRESS(), 1);
_setAccountNonce(ovmADDRESS(), 1);
// We're stepping into a CREATE or CREATE2, so we need to update ADDRESS to point
// We're stepping into a CREATE or CREATE2, so we need to update ADDRESS to point
// to the contract's associated address.
// to the contract's associated address
and CALLER to point to the previous ADDRESS
.
MessageContext memory nextMessageContext = messageContext;
MessageContext memory nextMessageContext = messageContext;
nextMessageContext.ovmCALLER = messageContext.ovmADDRESS;
nextMessageContext.ovmADDRESS = _contractAddress;
nextMessageContext.ovmADDRESS = _contractAddress;
// Run `safeCREATE` in a new EVM message so that our changes can be reflected even if
// Run `safeCREATE` in a new EVM message so that our changes can be reflected even if
...
...
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