babylonchain / babylon-finality-gadget

3 stars 3 forks source link

feat: add queryConsumerChainId #15

Closed bap2pecs closed 4 months ago

bap2pecs commented 4 months ago

Summary

query consumer chain id from the CW contract’s CONFIG state. this is needed to fetch all registered FPs for the consumer chain

I also refactored test a bit to extract common logic to newE2eClientWithStubContract

Test Plan

make test
make run

Note: the stub contract was deployed to Babylon devnet. the exact same contract was deployed to https://www.seiscan.app/atlantic-2/query?contract=sei16ckfmlym6wv5hwptuzpeumen028cu065a77ypj4dp7k56fsmj9hqx6t4gy

the stub code: https://gist.github.com/bap2pecs/dab60fa5371b33ba5fc972d9986118f2