@@ -186,7 +186,7 @@ func TestCapabilityConfiguration_Unmarshal(t *testing.T) {
186186
187187 t .Run ("Ocr3Configs" , func (t * testing.T ) {
188188 signer := []byte {0x01 , 0x02 , 0x03 }
189- transmitter := []byte ( "0xabc" )
189+ transmitter := []byte { 0xde , 0xad , 0xbe , 0xef }
190190
191191 raw := mustMarshalProto (t , & capabilitiespb.CapabilityConfig {
192192 Ocr3Configs : map [string ]* capabilitiespb.OCR3Config {
@@ -209,14 +209,41 @@ func TestCapabilityConfiguration_Unmarshal(t *testing.T) {
209209 require .Contains (t , got .Ocr3Configs , "__default__" )
210210 cfg := got .Ocr3Configs ["__default__" ]
211211 assert .Equal (t , []ocrtypes.OnchainPublicKey {signer }, cfg .Signers )
212- assert .Equal (t , []ocrtypes.Account {ocrtypes .Account (transmitter )}, cfg .Transmitters )
212+ assert .Equal (t , []ocrtypes.Account {ocrtypes .Account ("deadbeef" )}, cfg .Transmitters )
213213 assert .Equal (t , uint8 (2 ), cfg .F )
214214 assert .Equal (t , []byte ("onchain" ), cfg .OnchainConfig )
215215 assert .Equal (t , uint64 (5 ), cfg .OffchainConfigVersion )
216216 assert .Equal (t , []byte ("offchain" ), cfg .OffchainConfig )
217217 assert .Equal (t , uint64 (3 ), cfg .ConfigCount )
218218 })
219219
220+ t .Run ("Ocr3Configs normalizes transmitters to hex text" , func (t * testing.T ) {
221+ raw := mustMarshalProto (t , & capabilitiespb.CapabilityConfig {
222+ Ocr3Configs : map [string ]* capabilitiespb.OCR3Config {
223+ "aptos" : {
224+ Transmitters : [][]byte {
225+ {0x00 , 0xff },
226+ []byte ("ascii-bytes" ),
227+ },
228+ },
229+ },
230+ })
231+ cc := CapabilityConfiguration {Config : raw }
232+
233+ got , err := cc .Unmarshal ()
234+ require .NoError (t , err )
235+
236+ require .Contains (t , got .Ocr3Configs , "aptos" )
237+ cfg := got .Ocr3Configs ["aptos" ]
238+ assert .Equal (t ,
239+ []ocrtypes.Account {
240+ ocrtypes .Account ("00ff" ),
241+ ocrtypes .Account ("61736369692d6279746573" ),
242+ },
243+ cfg .Transmitters ,
244+ )
245+ })
246+
220247 t .Run ("OracleFactoryConfigs" , func (t * testing.T ) {
221248 raw := mustMarshalProto (t , & capabilitiespb.CapabilityConfig {
222249 OracleFactoryConfigs : map [string ]* valuespb.Map {
0 commit comments