Skip to content

Commit 2c6de51

Browse files
committed
update
1 parent 8b676ad commit 2c6de51

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

core/capabilities/ccip/ccipevm/executecodec_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
1212
"github.com/ethereum/go-ethereum/common"
1313
"github.com/ethereum/go-ethereum/core"
14-
agbinary "github.com/gagliardetto/binary"
1514
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipsolana"
1615
ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
1716
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common/mocks"
@@ -109,7 +108,7 @@ func TestExecutePluginCodecV1(t *testing.T) {
109108
"destgasamount": destGasAmount,
110109
}, nil)
111110
mockExtraDataCodec.On("DecodeExtraArgs", mock.Anything, mock.Anything).Return(map[string]any{
112-
"gasLimit": agbinary.Uint128{Lo: 5000, Hi: 0},
111+
"gasLimit": utils.RandUint256(),
113112
"accountIsWritableBitmap": gasLimit,
114113
}, nil)
115114

core/capabilities/ccip/ccipevm/msghasher_test.go

+5-8
Original file line numberDiff line numberDiff line change
@@ -382,18 +382,15 @@ func TestMessagerHasher_againstRmnSharedVector(t *testing.T) {
382382
nonce = uint64(1)
383383
// message fields
384384
// sender is parsed unpadded since its emitted unpadded from EVM.
385-
senderAddress = cciptypes.UnknownAddress(hexutil.MustDecode("0x269895AC2a2eC6e1Df37F68AcfbBDa53e62b71B1"))
385+
senderAddress = cciptypes.UnknownAddress(key.PublicKey().Bytes())
386386
// onRampAddress is parsed padded because its set as a padded address in the offRamp
387387
onRampAddress = key.PublicKey().Bytes()
388388
dataField = "0x"
389389
// receiver address is parsed padded because its emitted as padded from EVM.
390390
receiverAddress = cciptypes.UnknownAddress(hexutil.MustDecode("0x000000000000000000000000269895ac2a2ec6e1df37f68acfbbda53e62b71b1"))
391-
// feeToken is parsed unpadded since its emitted unpadded from EVM.
392-
// however, it isn't used in the hash. its just set for completion.
393-
feeToken = common.HexToAddress("0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534")
394-
feeTokenAmount = big.NewInt(114310554250104)
395-
feeValueJuels = big.NewInt(16499514422603741)
396-
tokenAmounts = []cciptypes.RampTokenAmount{
391+
feeTokenAmount = big.NewInt(114310554250104)
392+
feeValueJuels = big.NewInt(16499514422603741)
393+
tokenAmounts = []cciptypes.RampTokenAmount{
397394
{
398395
// parsed unpadded since its emitted unpadded from SVM.
399396
SourcePoolAddress: cciptypes.UnknownAddress(key.PublicKey().Bytes()),
@@ -421,7 +418,7 @@ func TestMessagerHasher_againstRmnSharedVector(t *testing.T) {
421418
Data: hexutil.MustDecode(dataField),
422419
Receiver: receiverAddress,
423420
ExtraArgs: append(evmExtraArgsV2Tag, extraArgsbuf.Bytes()...),
424-
FeeToken: feeToken.Bytes(),
421+
FeeToken: key.PublicKey().Bytes(),
425422
FeeTokenAmount: cciptypes.NewBigInt(feeTokenAmount),
426423
FeeValueJuels: cciptypes.NewBigInt(feeValueJuels),
427424
TokenAmounts: tokenAmounts,

0 commit comments

Comments
 (0)