Skip to content

Commit

Permalink
Use modifier for time
Browse files Browse the repository at this point in the history
  • Loading branch information
nolag committed Jan 5, 2024
1 parent 253d06c commit 2180739
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion core/internal/features/ocr2/features_ocr2_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-automation v1.0.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20231130143053-c5102a9c0fb7
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-automation v1.0.1 h1:vVjBFq2Zsz21kPy1Pb0wpjF9zrbJX+zjXphDeeR4XZk=
github.com/smartcontractkit/chainlink-automation v1.0.1/go.mod h1:INSchkV3ntyDdlZKGWA030MPDpp6pbeuiRkRKYFCm2k=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322 h1:jkN1563+NFZPKnZtQfG7s0fuvaDkfQ4jOv7osmQTowg=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39 h1:eDlIKD5zfBro7Y1kiIskAtO/vtuNU9R7RT7qM7rUrec=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 h1:Ju0cxdrzGFwHGDPp16IzkOyX87LZ/kKDFG1A+VSEJHY=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71/go.mod h1:Ppv5X8MTUkkpKdb270dLefjio724vMkCWmSSaWo7CzI=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ=
Expand Down
3 changes: 1 addition & 2 deletions core/services/relay/evm/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ import (
)

// decodeAccountHook allows strings to be converted to [32]byte allowing config to represent them as 0x...
// EpochToTimeHook allows times to be converted to and from integer types
// BigIntHook allows *big.Int to be represented as any integer type or a string and to go back to them.
// Useful for config, or if when a model may use a go type that isn't a *big.Int when Pack expects one.
// Eg: int32 in a go struct from a plugin could require a *big.Int in Pack for int24, if it fits, we shouldn't care.
// SliceToArrayVerifySizeHook verifies that slices have the correct size when converting to an array
// sizeVerifyBigIntHook allows our custom types that verify the number fits in the on-chain type to be converted as-if
// it was a *big.Int
var evmDecoderHooks = []mapstructure.DecodeHookFunc{decodeAccountHook, codec.EpochToTimeHook, codec.BigIntHook, codec.SliceToArrayVerifySizeHook, sizeVerifyBigIntHook}
var evmDecoderHooks = []mapstructure.DecodeHookFunc{decodeAccountHook, codec.BigIntHook, codec.SliceToArrayVerifySizeHook, sizeVerifyBigIntHook}

func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error) {
parsed := &parsedTypes{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704
github.com/smartcontractkit/chainlink-automation v1.0.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1
github.com/smartcontractkit/chainlink-feeds v0.0.0-20231222013040-c93f24a1b105
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-automation v1.0.1 h1:vVjBFq2Zsz21kPy1Pb0wpjF9zrbJX+zjXphDeeR4XZk=
github.com/smartcontractkit/chainlink-automation v1.0.1/go.mod h1:INSchkV3ntyDdlZKGWA030MPDpp6pbeuiRkRKYFCm2k=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322 h1:jkN1563+NFZPKnZtQfG7s0fuvaDkfQ4jOv7osmQTowg=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39 h1:eDlIKD5zfBro7Y1kiIskAtO/vtuNU9R7RT7qM7rUrec=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 h1:Ju0cxdrzGFwHGDPp16IzkOyX87LZ/kKDFG1A+VSEJHY=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71/go.mod h1:Ppv5X8MTUkkpKdb270dLefjio724vMkCWmSSaWo7CzI=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/actions/ocr2_helpers_local.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/segmentio/ksuid v1.0.4
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-automation v1.0.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39
github.com/smartcontractkit/chainlink-testing-framework v1.22.1
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-automation v1.0.1 h1:vVjBFq2Zsz21kPy1Pb0wpjF9zrbJX+zjXphDeeR4XZk=
github.com/smartcontractkit/chainlink-automation v1.0.1/go.mod h1:INSchkV3ntyDdlZKGWA030MPDpp6pbeuiRkRKYFCm2k=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322 h1:jkN1563+NFZPKnZtQfG7s0fuvaDkfQ4jOv7osmQTowg=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240102192919-ec2eb47ea322/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39 h1:eDlIKD5zfBro7Y1kiIskAtO/vtuNU9R7RT7qM7rUrec=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240104215338-34f2ac547e39/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 h1:Ju0cxdrzGFwHGDPp16IzkOyX87LZ/kKDFG1A+VSEJHY=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71/go.mod h1:Ppv5X8MTUkkpKdb270dLefjio724vMkCWmSSaWo7CzI=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ=
Expand Down

0 comments on commit 2180739

Please sign in to comment.