File tree Expand file tree Collapse file tree
packages/cre-sdk-examples/src/workflows/log-trigger Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ permissions: {}
44on :
55 pull_request :
66 types : [opened, synchronize, reopened]
7- branches : [capabilities-development]
87 push :
98 branches : [capabilities-development]
109
1110jobs :
1211 validate-submodule :
12+ if : github.event_name == 'push' || github.base_ref == 'capabilities-development'
1313 permissions :
1414 contents : read
1515 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 55 type EVMLog ,
66 getNetwork ,
77 handler ,
8+ logTriggerConfig ,
89 protoBigIntToBigint ,
910 Runner ,
1011 type Runtime ,
@@ -74,11 +75,18 @@ const initWorkflow = (config: Config) => {
7475 return 'success'
7576 }
7677
78+ // keccak256("MessageEmitted(address,uint256,string)")
79+ const MESSAGE_EMITTED_TOPIC =
80+ '0xc799f359194674b273986b8c03283265390f642b631c04e6526b99d0d8f4c38d' as `0x${string } `
81+
7782 return [
7883 handler (
79- evmClient . logTrigger ( {
80- addresses : [ config . evms [ 0 ] . messageEmitterAddress ] ,
81- } ) ,
84+ evmClient . logTrigger (
85+ logTriggerConfig ( {
86+ addresses : [ config . evms [ 0 ] . messageEmitterAddress as `0x${string } `] ,
87+ topics : [ [ MESSAGE_EMITTED_TOPIC ] ] ,
88+ } ) ,
89+ ) ,
8290 onLogTrigger ,
8391 ) ,
8492 ]
You can’t perform that action at this time.
0 commit comments