Skip to content

Commit c35bada

Browse files
committed
doc: clarify where delegated contract gets value
1 parent 18fb002 commit c35bada

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/vm/contracts.libevm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (args *evmCallArgs) env() *environment {
236236
self = args.addr
237237

238238
case DelegateCall:
239-
value = nil // inherited from `args.caller`
239+
value = nil // inherited from `args.caller` inside [Contract.AsDelegate]
240240
fallthrough
241241
case CallCode:
242242
self = args.caller.Address()

core/vm/contracts.libevm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func TestNewStatefulPrecompile(t *testing.T) {
280280
Raw: &rawAddresses,
281281
},
282282
wantReadOnly: false,
283-
wantCallValue: callCallerValue,
283+
wantCallValue: callCallerValue, // Important difference from [vm.EVM.Call]
284284
wantCallType: vm.DelegateCall,
285285
},
286286
{

0 commit comments

Comments
 (0)