From 7a9ce393cdb14495eeb56507d00b8adf26438746 Mon Sep 17 00:00:00 2001 From: WangXuxin Date: Wed, 27 Apr 2022 10:23:33 +0800 Subject: [PATCH] feat: support @RouteInfo byFunc --- src/main/entry/org/bdware/sc/bean/DefaultRouteRule.java | 3 ++- src/main/entry/org/bdware/sc/bean/RouteInfo.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/entry/org/bdware/sc/bean/DefaultRouteRule.java b/src/main/entry/org/bdware/sc/bean/DefaultRouteRule.java index 1355e0d..cb7ee57 100644 --- a/src/main/entry/org/bdware/sc/bean/DefaultRouteRule.java +++ b/src/main/entry/org/bdware/sc/bean/DefaultRouteRule.java @@ -3,5 +3,6 @@ package org.bdware.sc.bean; public enum DefaultRouteRule { byRequester, byArgHash, - byTarget; + byTarget, + byFunc; } diff --git a/src/main/entry/org/bdware/sc/bean/RouteInfo.java b/src/main/entry/org/bdware/sc/bean/RouteInfo.java index e004d7d..b923ebb 100644 --- a/src/main/entry/org/bdware/sc/bean/RouteInfo.java +++ b/src/main/entry/org/bdware/sc/bean/RouteInfo.java @@ -9,6 +9,8 @@ import java.io.Serializable; public class RouteInfo implements Serializable { public DefaultRouteRule useDefault; + public String funcName; + public static RouteInfo create(AnnotationNode annotationNode, ContractNode contractNode) { RouteInfo info = new RouteInfo(); info.useDefault = null;