Skip to content

Commit

Permalink
Merge pull request #2279 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
Add dev & sys to contract
  • Loading branch information
ucwong authored Mar 2, 2025
2 parents f1ae95b + 84e7f5a commit b28c7a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/vm/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ type Contract struct {
CodeHash common.Hash
Input []byte

// is the execution frame represented by this object a contract deployment
IsDeployment bool
IsSystemCall bool

Gas uint64
value *big.Int

Expand Down
1 change: 1 addition & 0 deletions core/vm/cvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func (cvm *CVM) Call(caller common.Address, addr common.Address, input []byte, g
ret, err = nil, nil // gas is unchanged
} else {
contract := NewContract(caller, addr, value, gas, cvm.jumpDests)
contract.IsSystemCall = isSystemCall(caller)
contract.SetCallCode(cvm.resolveCodeHash(addr), code)
ret, err = cvm.interpreter.Run(contract, input, false)
gas = contract.Gas
Expand Down

0 comments on commit b28c7a3

Please sign in to comment.