// Create a subscribe command to watch addLiquidity/addLiquidityETH transactions on Pancakeswa V2.
Create a subscribe command to watch addLiquidity/addLiquidityETH transactions on Pancakeswa V2.
// Create a subscribe command to watch addLiquidity / addLiquidityETH transactions on Pancakeswa V2 .
func createPancadeRouterCommand(baseMsg map[string]interface{}, router common.Address) map[string]interface{} {
	liquidityFilter := map[string]interface{}{
		"status":                  "pending",
		"to":                      router,
		"contractCall.methodName": []string{"addLiquidityETH", "addLiquidity"},
	}
	baseMsg["categoryCode"] = "configs"
	baseMsg["eventCode"] = "put"
	baseMsg["config"] = map[string]interface{}{
		"scope":        router,
		"filters":      []map[string]interface{}{liquidityFilter},
		"watchAddress": true,
	}
	return baseMsg
}
func createPancadeRouterCommand ( baseMsg map [ string ] interface { } , router common . Address ) map [ string ] interface { } { liquidityFilter := map [ string ] interface { } { " " : " " , " " : router , " " : [ ] string { " " , " " } , } baseMsg [ " " ] = " " baseMsg [ " " ] = " " baseMsg [ " " ] = map [ string ] interface { } { " " : router , " " : [ ] map [ string ] interface { } { liquidityFilter } , " " : true , } return baseMsg }
Create a subscribe command to watch addLiquidity/addLiquidityETH transactions on Pancakeswa V2.
Create a subscribe command to watch addLiquidity / addLiquidityETH transactions on Pancakeswa V2 .
// see https://docs.blocknative.com/websocket#configurations