Commit 5ebc93d3 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update api

parent c09f8572
package api
const (
InvalidParams = "invalid params"
DateOutOfRange = "date out of range"
InternalError = "internal error"
)
package api
import (
"encoding/json"
"net/http"
"time"
"github.com/ethereum/go-ethereum/common"
)
func rpcHandle(w http.ResponseWriter, r *http.Request) {
req := &jsonrpcMessage{}
resp := &jsonrpcMessage{}
if r.Method != "POST" {
w.Write([]byte("method not allowed"))
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
w.Header().Set("Content-Type", "application/json")
contentType := r.Header.Get("Content-Type")
if contentType != "application/json" {
resp.Error = &jsonError{
Code: -32600,
Message: "invalid Content-Type header",
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return
}
err := json.NewDecoder(r.Body).Decode(req)
if err != nil {
resp.Error = &jsonError{
Code: -32603,
Message: err.Error(),
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return
}
if req.Version != "2.0" {
resp.Error = &jsonError{
Code: -32600,
Message: "invalid jsonrpc version",
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return
}
resp.Version = req.Version
resp.ID = req.ID
switch req.Method {
case "getWithdrawProofs":
getWithdrawProofs(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
return
case "getPendingWorkload":
getPendingWorkload(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
return
case "getDailyMerkleNodes":
getDailyMerkleNodes(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
case "getDailyMerkleSumNodes":
getDailyMerkleSumNodes(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
default:
resp.Error = &jsonError{
Code: -32601,
Message: "method not found",
}
_ = json.NewEncoder(w).Encode(resp)
return
}
}
func getWithdrawProofs(params []byte, resp *jsonrpcMessage) {
paramList := make([]string, 0)
err := json.Unmarshal(params, &paramList)
if err != nil || len(paramList) < 1 || len(paramList) > 2 {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
if !common.IsHexAddress(paramList[0]) {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
var date string
if len(paramList) > 1 {
_, err = time.Parse("2006-01-02", paramList[1])
if err != nil {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
date = paramList[1]
}
amount, proofs := validator.GetMerkleProof(common.HexToAddress(paramList[0]), date)
temp := map[string]interface{}{
"amount": amount,
"proofs": proofs,
}
resp.Result, _ = json.Marshal(temp)
return
}
func getPendingWorkload(params []byte, resp *jsonrpcMessage) {
addressList := make([]string, 0)
err := json.Unmarshal(params, &addressList)
if err != nil || len(addressList) != 1 {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
if !common.IsHexAddress(addressList[0]) {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
workload, globalWorkload := validator.GetPendingWorkload(common.HexToAddress(addressList[0]))
temp := map[string]interface{}{
"workload": workload,
"global_workload": globalWorkload,
}
resp.Result, _ = json.Marshal(temp)
return
}
func getDailyMerkleNodes(params []byte, resp *jsonrpcMessage) {
// date string, depth int, rootHash common.Hash
paramList := make([]interface{}, 0)
err := json.Unmarshal(params, &paramList)
if err != nil || len(paramList) < 1 || len(paramList) > 3 {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
var date string
var depth = 1
var rootHash common.Hash
_, err = time.Parse("2006-01-02", paramList[0].(string))
if err != nil {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
date = paramList[0].(string)
if len(paramList) >= 2 {
_depth, ok := paramList[1].(float64)
if !ok {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
depth = int(uint(_depth))
}
if len(paramList) >= 3 {
rootHash = common.HexToHash(paramList[2].(string))
}
nodes := validator.GetDailyMerkleNodes(date, depth, rootHash)
resp.Result, _ = json.Marshal(nodes)
}
func getDailyMerkleSumNodes(params []byte, resp *jsonrpcMessage) {
// date string, depth int, rootHash common.Hash
paramList := make([]interface{}, 0)
err := json.Unmarshal(params, &paramList)
if err != nil || len(paramList) < 1 || len(paramList) > 3 {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
var date string
var depth = 1
var rootHash common.Hash
_, err = time.Parse("2006-01-02", paramList[0].(string))
if err != nil {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
date = paramList[0].(string)
if len(paramList) >= 2 {
_depth, ok := paramList[1].(float64)
if !ok {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
depth = int(uint(_depth))
}
if len(paramList) >= 3 {
rootHash = common.HexToHash(paramList[2].(string))
}
nodes, vals := validator.GetDailyMerkleSumNodes(date, depth, rootHash)
resp.Result, _ = json.Marshal(map[string]interface{}{
"nodes": nodes,
"values": vals,
})
}
package api
import (
"github.com/gin-gonic/gin"
)
func initRouter(engine *gin.Engine) {
g := engine.Group("/api/v1")
g.POST("/workload", getWorkload)
g.POST("/reward", getReward)
g.POST("/record", getRecord)
}
\ No newline at end of file
package api package api
import ( import (
"encoding/json" "fmt"
"net/http" "math/big"
"strconv"
"time" "time"
"validator/claim_monitor"
"validator/core" "validator/core"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
log "github.com/sirupsen/logrus" "github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
) )
var validator *core.Validator var validator *core.Validator
var claimMonitorCli *claim_monitor.Client
var log = logrus.WithField("module", "api")
func rpcHandle(w http.ResponseWriter, r *http.Request) { func getWorkload(c *gin.Context) {
req := &jsonrpcMessage{} // 每天的workload获取
resp := &jsonrpcMessage{} dateList := make([]string, 0)
if err := c.ShouldBindJSON(&dateList); err != nil {
if r.Method != "POST" { c.JSON(200, withError(InvalidParams))
w.Write([]byte("method not allowed"))
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
w.Header().Set("Content-Type", "application/json")
contentType := r.Header.Get("Content-Type")
if contentType != "application/json" {
resp.Error = &jsonError{
Code: -32600,
Message: "invalid Content-Type header",
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return return
} }
err := json.NewDecoder(r.Body).Decode(req) timestampList := make([]uint64, 0)
for _, date := range dateList {
t, err := time.Parse("2006-01-02", date)
if err != nil { if err != nil {
resp.Error = &jsonError{ c.JSON(200, withError(DateOutOfRange))
Code: -32603,
Message: err.Error(),
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return return
} }
utcNow := time.Now().UTC()
if req.Version != "2.0" { if t.After(time.Date(utcNow.Year(), utcNow.Month(), utcNow.Day(), 0, 0, 0, 0, time.UTC)) {
resp.Error = &jsonError{ c.JSON(200, withError(DateOutOfRange))
Code: -32600,
Message: "invalid jsonrpc version",
}
resp.Version = "2.0"
_ = json.NewEncoder(w).Encode(resp)
return return
} }
resp.Version = req.Version
resp.ID = req.ID
switch req.Method { timestampList = append(timestampList, uint64(t.Unix()))
case "getWithdrawProofs":
getWithdrawProofs(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
return
case "getPendingWorkload":
getPendingWorkload(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
return
case "getDailyMerkleNodes":
getDailyMerkleNodes(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
case "getDailyMerkleSumNodes":
getDailyMerkleSumNodes(req.Params, resp)
_ = json.NewEncoder(w).Encode(resp)
default:
resp.Error = &jsonError{
Code: -32601,
Message: "method not found",
} }
_ = json.NewEncoder(w).Encode(resp)
return ret, err := validator.GetWorkload(timestampList)
if err != nil {
log.WithError(err).Error("failed to get workload")
c.JSON(200, withError(InternalError))
} }
c.JSON(200, withSuccess(ret))
} }
func getWithdrawProofs(params []byte, resp *jsonrpcMessage) { func getReward(c *gin.Context) {
paramList := make([]string, 0) // 在这里获取全部,再通过api获取已领取的
err := json.Unmarshal(params, &paramList) tmp := struct {
if err != nil || len(paramList) < 1 || len(paramList) > 2 { Address string `json:"address"`
resp.Error = &jsonError{ }{}
Code: -32602, if err := c.ShouldBindJSON(&tmp); err != nil {
Message: "invalid params", c.JSON(200, withError(InvalidParams))
}
return return
} }
if !common.IsHexAddress(tmp.Address) {
if !common.IsHexAddress(paramList[0]) { c.JSON(200, withError(InvalidParams))
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return return
} }
reward := validator.GetReward(common.HexToAddress(tmp.Address))
ether := big.NewInt(1000000000000000000)
floatReward, _ := new(big.Float).Quo(new(big.Float).SetInt(reward), new(big.Float).SetInt(ether)).Float64()
var date string claimedReward, err := claimMonitorCli.GetClaimedAmount(tmp.Address)
if len(paramList) > 1 {
_, err = time.Parse("2006-01-02", paramList[1])
if err != nil { if err != nil {
resp.Error = &jsonError{ log.WithError(err).Error("failed to get claimed reward")
Code: -32602, c.JSON(200, withError(InternalError))
Message: "invalid params",
}
return return
} }
date = paramList[1] floatClaimedReward, _ := strconv.ParseFloat(claimedReward, 64)
}
amount, proofs := validator.GetMerkleProof(common.HexToAddress(paramList[0]), date) c.JSON(200, withSuccess(gin.H{
"total": fmt.Sprintf("%.6f", floatReward),
temp := map[string]interface{}{ "claimed": claimedReward,
"amount": amount, "unclaimed": fmt.Sprintf("%.6f", floatReward-floatClaimedReward),
"proofs": proofs, }))
}
resp.Result, _ = json.Marshal(temp)
return
} }
func getPendingWorkload(params []byte, resp *jsonrpcMessage) { func getRecord(c *gin.Context) {
addressList := make([]string, 0) // 通过api获取
err := json.Unmarshal(params, &addressList) tmp := struct {
if err != nil || len(addressList) != 1 { Address string `json:"address"`
resp.Error = &jsonError{ Page int `json:"page"`
Code: -32602, PageSize int `json:"pageSize"`
Message: "invalid params", }{}
}
return
}
if !common.IsHexAddress(addressList[0]) { if err := c.ShouldBindJSON(&tmp); err != nil {
resp.Error = &jsonError{ c.JSON(200, withError(InvalidParams))
Code: -32602,
Message: "invalid params",
}
return return
} }
if !common.IsHexAddress(tmp.Address) {
workload, globalWorkload := validator.GetPendingWorkload(common.HexToAddress(addressList[0])) c.JSON(200, withError(InvalidParams))
temp := map[string]interface{}{
"workload": workload,
"global_workload": globalWorkload,
}
resp.Result, _ = json.Marshal(temp)
return
}
func getDailyMerkleNodes(params []byte, resp *jsonrpcMessage) {
// date string, depth int, rootHash common.Hash
paramList := make([]interface{}, 0)
err := json.Unmarshal(params, &paramList)
if err != nil || len(paramList) < 1 || len(paramList) > 3 {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return return
} }
data, err := claimMonitorCli.GetClaimRecord(tmp.Address, tmp.Page, tmp.PageSize)
var date string
var depth = 1
var rootHash common.Hash
_, err = time.Parse("2006-01-02", paramList[0].(string))
if err != nil { if err != nil {
resp.Error = &jsonError{ log.WithError(err).Error("failed to get claim record")
Code: -32602, c.JSON(200, withError(InternalError))
Message: "invalid params",
}
return return
} }
date = paramList[0].(string) c.Data(200, "application/json", data)
if len(paramList) >= 2 {
_depth, ok := paramList[1].(float64)
if !ok {
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
depth = int(uint(_depth))
}
if len(paramList) >= 3 {
rootHash = common.HexToHash(paramList[2].(string))
}
nodes := validator.GetDailyMerkleNodes(date, depth, rootHash)
resp.Result, _ = json.Marshal(nodes)
} }
func getDailyMerkleSumNodes(params []byte, resp *jsonrpcMessage) { func withSuccess(data interface{}) interface{} {
// date string, depth int, rootHash common.Hash return map[string]interface{}{
paramList := make([]interface{}, 0) "code": 0,
err := json.Unmarshal(params, &paramList) "msg": "ok",
if err != nil || len(paramList) < 1 || len(paramList) > 3 { "data": data,
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
} }
return }
}
var date string
var depth = 1
var rootHash common.Hash
_, err = time.Parse("2006-01-02", paramList[0].(string)) func withError(msg string) interface{} {
if err != nil { return map[string]interface{}{
resp.Error = &jsonError{ "code": 1,
Code: -32602, "msg": "",
Message: "invalid params", "error": msg,
}
return
} }
date = paramList[0].(string) }
if len(paramList) >= 2 { func StartServer(listenAddress string, v *core.Validator, c *claim_monitor.Client) {
_depth, ok := paramList[1].(float64) validator = v
if !ok { claimMonitorCli = c
resp.Error = &jsonError{
Code: -32602,
Message: "invalid params",
}
return
}
depth = int(uint(_depth))
}
if len(paramList) >= 3 { engine := gin.Default()
rootHash = common.HexToHash(paramList[2].(string)) engine.Use(cors.Default())
} initRouter(engine)
nodes, vals := validator.GetDailyMerkleSumNodes(date, depth, rootHash) log.WithField("listen", listenAddress).Info("start api server")
resp.Result, _ = json.Marshal(map[string]interface{}{
"nodes": nodes,
"values": vals,
})
}
func StartJSONRPC(listenAddress string, w *core.Validator) { err := engine.Run(listenAddress)
validator = w
http.HandleFunc("/", rpcHandle)
log.WithField("listen", listenAddress).Info("start JSON-RPC server")
err := http.ListenAndServe(listenAddress, nil)
if err != nil { if err != nil {
log.WithError(err).Fatal("failed to start JSON-RPC server") log.WithError(err).Fatal("failed to start api server")
} }
} }
package claim_monitor
import (
"fmt"
"io"
"net/http"
"github.com/tidwall/gjson"
)
type Client struct {
Server string
}
func NewClient(server string) *Client {
return &Client{
Server: server,
}
}
func (cli *Client) GetClaimedAmount(address string) (string, error) {
resp, err := http.DefaultClient.Get(fmt.Sprintf("%s/api/v1/claimed?address=%s", cli.Server, address))
if err != nil {
return "0", err
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
if err != nil {
return "0", err
}
if gjson.Get(string(data), "code").Int() != 0 {
return "0", fmt.Errorf(string(data))
}
return gjson.Get(string(data), "data.claimed").String(), nil
}
func (cli *Client) GetClaimRecord(address string, page, pageSize int) ([]byte, error) {
resp, err := http.DefaultClient.Get(fmt.Sprintf("%s/api/v1/record?address=%s&page=%d&pageSize=%d", cli.Server, address, page, pageSize))
if err != nil {
return nil, err
}
defer resp.Body.Close()
return io.ReadAll(resp.Body)
}
...@@ -34,12 +34,17 @@ var ( ...@@ -34,12 +34,17 @@ var (
Value: "0.0.0.0:20010", Value: "0.0.0.0:20010",
} }
rpcListenAddrFlag = &cli.StringFlag{ apiListenAddrFlag = &cli.StringFlag{
Name: "rpc-listen", Name: "api-listen",
Usage: "The listen address of the jsonrpc server", Usage: "The listen address of the api server",
Value: "0.0.0.0:20012", Value: "0.0.0.0:20012",
} }
claimMonitorServerFlag = &cli.StringFlag{
Name: "claim-monitor-server",
Usage: "The host of the claim monitor server",
}
privateKeyFlag = &cli.StringFlag{ privateKeyFlag = &cli.StringFlag{
Name: "private-key", Name: "private-key",
Usage: "The private key of the account", Usage: "The private key of the account",
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"net/http" "net/http"
"os" "os"
"validator/api" "validator/api"
"validator/claim_monitor"
"validator/conf" "validator/conf"
"validator/core" "validator/core"
"validator/quest" "validator/quest"
...@@ -20,7 +21,8 @@ var ( ...@@ -20,7 +21,8 @@ var (
dataDirFlag, dataDirFlag,
metricsListenAddrFlag, metricsListenAddrFlag,
debugFlag, debugFlag,
rpcListenAddrFlag, apiListenAddrFlag,
claimMonitorServerFlag,
privateKeyFlag, privateKeyFlag,
chainRPCFlag, chainRPCFlag,
storeContractFlag, storeContractFlag,
...@@ -56,7 +58,8 @@ func run(ctx *cli.Context) { ...@@ -56,7 +58,8 @@ func run(ctx *cli.Context) {
cfg := &conf.Config{ cfg := &conf.Config{
MetricsListenAddr: ctx.String(metricsListenAddrFlag.Name), MetricsListenAddr: ctx.String(metricsListenAddrFlag.Name),
Debug: ctx.Bool(debugFlag.Name), Debug: ctx.Bool(debugFlag.Name),
RPCListenAddr: ctx.String(rpcListenAddrFlag.Name), APIListenAddr: ctx.String(apiListenAddrFlag.Name),
ClaimMonitorServer: ctx.String(claimMonitorServerFlag.Name),
PrivateKey: ctx.String(privateKeyFlag.Name), PrivateKey: ctx.String(privateKeyFlag.Name),
ChainRPC: ctx.String(chainRPCFlag.Name), ChainRPC: ctx.String(chainRPCFlag.Name),
StoreContract: ctx.String(storeContractFlag.Name), StoreContract: ctx.String(storeContractFlag.Name),
...@@ -83,7 +86,8 @@ func run(ctx *cli.Context) { ...@@ -83,7 +86,8 @@ func run(ctx *cli.Context) {
w := core.RunValidator(q, cfg) w := core.RunValidator(q, cfg)
// runGrpcServer(cfg.GRPCListenAddr, w) // runGrpcServer(cfg.GRPCListenAddr, w)
runJSONRPCServer(cfg.RPCListenAddr, w) monitorCli := claim_monitor.NewClient(cfg.ClaimMonitorServer)
runAPIServer(cfg.APIListenAddr, w, monitorCli)
select {} select {}
} }
...@@ -97,6 +101,6 @@ func runMetrics(listen string) { ...@@ -97,6 +101,6 @@ func runMetrics(listen string) {
}() }()
} }
func runJSONRPCServer(listen string, w *core.Validator) { func runAPIServer(listen string, w *core.Validator, c *claim_monitor.Client) {
go api.StartJSONRPC(listen, w) go api.StartServer(listen, w, c)
} }
...@@ -3,7 +3,7 @@ package conf ...@@ -3,7 +3,7 @@ package conf
type Config struct { type Config struct {
MetricsListenAddr string MetricsListenAddr string
Debug bool Debug bool
RPCListenAddr string APIListenAddr string
ChainRPC string ChainRPC string
PrivateKey string PrivateKey string
StoreContract string StoreContract string
...@@ -11,6 +11,7 @@ type Config struct { ...@@ -11,6 +11,7 @@ type Config struct {
RewardContract string RewardContract string
DataDir string DataDir string
CommitOffset int CommitOffset int
ClaimMonitorServer string
} }
type QuestConfig struct { type QuestConfig struct {
......
...@@ -4,15 +4,17 @@ data-dir = "./data" ...@@ -4,15 +4,17 @@ data-dir = "./data"
metrics-listen = "0.0.0.0:20010" metrics-listen = "0.0.0.0:20010"
rpc-listen = "0.0.0.0:20012" api-listen = "0.0.0.0:20012"
private-key = "529f4efb80ac534f17d873104c71881c0970dbd5a886f183f63c5c6bb7a1fcd9" private-key = "529f4efb80ac534f17d873104c71881c0970dbd5a886f183f63c5c6bb7a1fcd9"
chain-rpc = "https://dev.rpc.agicoin.ai" chain-rpc = "https://dev.rpc.agicoin.ai"
store-contract = "0xfFb096e2B90324FFcCbaf987BdD724462c0aE18c" store-contract = "0xA0ec84eCa14CD23afD5D7ba973390E83F0Cbe89A"
validator-contract = "0x2A03bA42139860aF46263755f6e5CBAe8195bB92" # 测试版本 不会revert validator-contract = "0x7CBD03ecfA9093F83150E9625A25B00F555c81F7" # 测试版本 不会revert
claim-monitor-server = ""
commit-offset = 3600 # utc + n seconds commit-offset = 3600 # utc + n seconds
......
...@@ -26,11 +26,12 @@ var ( ...@@ -26,11 +26,12 @@ var (
_ = common.Big1 _ = common.Big1
_ = types.BloomLookup _ = types.BloomLookup
_ = event.NewSubscription _ = event.NewSubscription
_ = abi.ConvertType
) )
// ValidatorMetaData contains all meta data concerning the Validator contract. // ValidatorMetaData contains all meta data concerning the Validator contract.
var ValidatorMetaData = &bind.MetaData{ var ValidatorMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dailyDistribution\",\"type\":\"uint256\"}],\"name\":\"DailyDistributionChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"date\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleSumRoot\",\"type\":\"bytes32\"}],\"name\":\"MerkleRootChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleSumRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"dailySubmitCount\",\"type\":\"uint256\"}],\"name\":\"MerkleRootSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"merkleRootThreshold\",\"type\":\"uint256\"}],\"name\":\"MerkleRootThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"ok\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"ValidatorChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"dailyDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleRootMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyMerkleRootSubmitCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dailyMerkleRootSubmitCountMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyMerkleRootSubmittedMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleRootVerifiedMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleSumRootMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDailyDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidatores\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"dailyWorkload\",\"type\":\"uint256\"}],\"name\":\"getWorkloadDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalWorkload\",\"type\":\"uint256\"}],\"name\":\"getWorkloadThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastMerkleRootUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRootThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleSumRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dailyDistribution\",\"type\":\"uint256\"}],\"name\":\"setDailyDistribution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_merkleRootThreshold\",\"type\":\"uint256\"}],\"name\":\"setRootThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ok\",\"type\":\"bool\"}],\"name\":\"setValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_date\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_merkleSumRoot\",\"type\":\"bytes32\"}],\"name\":\"submitMerkleRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dailyReward\",\"type\":\"uint256\"}],\"name\":\"DailyRewardChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"date\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleSumRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalWorkload\",\"type\":\"uint256\"}],\"name\":\"MerkleRootChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleSumRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"dailySubmitCount\",\"type\":\"uint256\"}],\"name\":\"MerkleRootSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"merkleRootThreshold\",\"type\":\"uint256\"}],\"name\":\"MerkleRootThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"ok\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"ValidatorChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleRootMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyMerkleRootSubmitCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dailyMerkleRootSubmitCountMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyMerkleRootSubmittedMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleRootVerifiedMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyMerkleSumRootMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyRewardMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dailyWorkloadMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDailyReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_date\",\"type\":\"uint256\"}],\"name\":\"getRewardByDate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_date\",\"type\":\"uint256\"}],\"name\":\"getWorkloadByDate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"dailyWorkload\",\"type\":\"uint256\"}],\"name\":\"getWorkloadReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastMerkleRootUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRootThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleSumRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dailyReward\",\"type\":\"uint256\"}],\"name\":\"setDailyReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_merkleRootThreshold\",\"type\":\"uint256\"}],\"name\":\"setRootThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ok\",\"type\":\"bool\"}],\"name\":\"setValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_date\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_merkleSumRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_totalWorkload\",\"type\":\"uint256\"}],\"name\":\"submitMerkleRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
} }
// ValidatorABI is the input ABI used to generate the binding from. // ValidatorABI is the input ABI used to generate the binding from.
...@@ -134,11 +135,11 @@ func NewValidatorFilterer(address common.Address, filterer bind.ContractFilterer ...@@ -134,11 +135,11 @@ func NewValidatorFilterer(address common.Address, filterer bind.ContractFilterer
// bindValidator binds a generic wrapper to an already deployed contract. // bindValidator binds a generic wrapper to an already deployed contract.
func bindValidator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { func bindValidator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ValidatorABI)) parsed, err := ValidatorMetaData.GetAbi()
if err != nil { if err != nil {
return nil, err return nil, err
} }
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
} }
// Call invokes the (constant) contract method with params as input values and // Call invokes the (constant) contract method with params as input values and
...@@ -179,37 +180,6 @@ func (_Validator *ValidatorTransactorRaw) Transact(opts *bind.TransactOpts, meth ...@@ -179,37 +180,6 @@ func (_Validator *ValidatorTransactorRaw) Transact(opts *bind.TransactOpts, meth
return _Validator.Contract.contract.Transact(opts, method, params...) return _Validator.Contract.contract.Transact(opts, method, params...)
} }
// DailyDistribution is a free data retrieval call binding the contract method 0xde8f55af.
//
// Solidity: function dailyDistribution() view returns(uint256)
func (_Validator *ValidatorCaller) DailyDistribution(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Validator.contract.Call(opts, &out, "dailyDistribution")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// DailyDistribution is a free data retrieval call binding the contract method 0xde8f55af.
//
// Solidity: function dailyDistribution() view returns(uint256)
func (_Validator *ValidatorSession) DailyDistribution() (*big.Int, error) {
return _Validator.Contract.DailyDistribution(&_Validator.CallOpts)
}
// DailyDistribution is a free data retrieval call binding the contract method 0xde8f55af.
//
// Solidity: function dailyDistribution() view returns(uint256)
func (_Validator *ValidatorCallerSession) DailyDistribution() (*big.Int, error) {
return _Validator.Contract.DailyDistribution(&_Validator.CallOpts)
}
// DailyMerkleRootMap is a free data retrieval call binding the contract method 0xe43d2a0b. // DailyMerkleRootMap is a free data retrieval call binding the contract method 0xe43d2a0b.
// //
// Solidity: function dailyMerkleRootMap(uint256 ) view returns(bytes32) // Solidity: function dailyMerkleRootMap(uint256 ) view returns(bytes32)
...@@ -396,12 +366,43 @@ func (_Validator *ValidatorCallerSession) DailyMerkleSumRootMap(arg0 *big.Int) ( ...@@ -396,12 +366,43 @@ func (_Validator *ValidatorCallerSession) DailyMerkleSumRootMap(arg0 *big.Int) (
return _Validator.Contract.DailyMerkleSumRootMap(&_Validator.CallOpts, arg0) return _Validator.Contract.DailyMerkleSumRootMap(&_Validator.CallOpts, arg0)
} }
// GetDailyDistribution is a free data retrieval call binding the contract method 0xc75c46c8. // DailyReward is a free data retrieval call binding the contract method 0xc964ad45.
//
// Solidity: function dailyReward() view returns(uint256)
func (_Validator *ValidatorCaller) DailyReward(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Validator.contract.Call(opts, &out, "dailyReward")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// DailyReward is a free data retrieval call binding the contract method 0xc964ad45.
//
// Solidity: function dailyReward() view returns(uint256)
func (_Validator *ValidatorSession) DailyReward() (*big.Int, error) {
return _Validator.Contract.DailyReward(&_Validator.CallOpts)
}
// DailyReward is a free data retrieval call binding the contract method 0xc964ad45.
//
// Solidity: function dailyReward() view returns(uint256)
func (_Validator *ValidatorCallerSession) DailyReward() (*big.Int, error) {
return _Validator.Contract.DailyReward(&_Validator.CallOpts)
}
// DailyRewardMap is a free data retrieval call binding the contract method 0xa0576656.
// //
// Solidity: function getDailyDistribution() view returns(uint256) // Solidity: function dailyRewardMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorCaller) GetDailyDistribution(opts *bind.CallOpts) (*big.Int, error) { func (_Validator *ValidatorCaller) DailyRewardMap(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) {
var out []interface{} var out []interface{}
err := _Validator.contract.Call(opts, &out, "getDailyDistribution") err := _Validator.contract.Call(opts, &out, "dailyRewardMap", arg0)
if err != nil { if err != nil {
return *new(*big.Int), err return *new(*big.Int), err
...@@ -413,18 +414,80 @@ func (_Validator *ValidatorCaller) GetDailyDistribution(opts *bind.CallOpts) (*b ...@@ -413,18 +414,80 @@ func (_Validator *ValidatorCaller) GetDailyDistribution(opts *bind.CallOpts) (*b
} }
// GetDailyDistribution is a free data retrieval call binding the contract method 0xc75c46c8. // DailyRewardMap is a free data retrieval call binding the contract method 0xa0576656.
// //
// Solidity: function getDailyDistribution() view returns(uint256) // Solidity: function dailyRewardMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorSession) GetDailyDistribution() (*big.Int, error) { func (_Validator *ValidatorSession) DailyRewardMap(arg0 *big.Int) (*big.Int, error) {
return _Validator.Contract.GetDailyDistribution(&_Validator.CallOpts) return _Validator.Contract.DailyRewardMap(&_Validator.CallOpts, arg0)
} }
// GetDailyDistribution is a free data retrieval call binding the contract method 0xc75c46c8. // DailyRewardMap is a free data retrieval call binding the contract method 0xa0576656.
// //
// Solidity: function getDailyDistribution() view returns(uint256) // Solidity: function dailyRewardMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorCallerSession) GetDailyDistribution() (*big.Int, error) { func (_Validator *ValidatorCallerSession) DailyRewardMap(arg0 *big.Int) (*big.Int, error) {
return _Validator.Contract.GetDailyDistribution(&_Validator.CallOpts) return _Validator.Contract.DailyRewardMap(&_Validator.CallOpts, arg0)
}
// DailyWorkloadMap is a free data retrieval call binding the contract method 0xb2e93afb.
//
// Solidity: function dailyWorkloadMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorCaller) DailyWorkloadMap(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) {
var out []interface{}
err := _Validator.contract.Call(opts, &out, "dailyWorkloadMap", arg0)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// DailyWorkloadMap is a free data retrieval call binding the contract method 0xb2e93afb.
//
// Solidity: function dailyWorkloadMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorSession) DailyWorkloadMap(arg0 *big.Int) (*big.Int, error) {
return _Validator.Contract.DailyWorkloadMap(&_Validator.CallOpts, arg0)
}
// DailyWorkloadMap is a free data retrieval call binding the contract method 0xb2e93afb.
//
// Solidity: function dailyWorkloadMap(uint256 ) view returns(uint256)
func (_Validator *ValidatorCallerSession) DailyWorkloadMap(arg0 *big.Int) (*big.Int, error) {
return _Validator.Contract.DailyWorkloadMap(&_Validator.CallOpts, arg0)
}
// GetDailyReward is a free data retrieval call binding the contract method 0xadda10aa.
//
// Solidity: function getDailyReward() view returns(uint256)
func (_Validator *ValidatorCaller) GetDailyReward(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Validator.contract.Call(opts, &out, "getDailyReward")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// GetDailyReward is a free data retrieval call binding the contract method 0xadda10aa.
//
// Solidity: function getDailyReward() view returns(uint256)
func (_Validator *ValidatorSession) GetDailyReward() (*big.Int, error) {
return _Validator.Contract.GetDailyReward(&_Validator.CallOpts)
}
// GetDailyReward is a free data retrieval call binding the contract method 0xadda10aa.
//
// Solidity: function getDailyReward() view returns(uint256)
func (_Validator *ValidatorCallerSession) GetDailyReward() (*big.Int, error) {
return _Validator.Contract.GetDailyReward(&_Validator.CallOpts)
} }
// GetMerkleRoot is a free data retrieval call binding the contract method 0x49590657. // GetMerkleRoot is a free data retrieval call binding the contract method 0x49590657.
...@@ -458,12 +521,43 @@ func (_Validator *ValidatorCallerSession) GetMerkleRoot() ([32]byte, error) { ...@@ -458,12 +521,43 @@ func (_Validator *ValidatorCallerSession) GetMerkleRoot() ([32]byte, error) {
return _Validator.Contract.GetMerkleRoot(&_Validator.CallOpts) return _Validator.Contract.GetMerkleRoot(&_Validator.CallOpts)
} }
// GetValidatores is a free data retrieval call binding the contract method 0x3f41adbd. // GetRewardByDate is a free data retrieval call binding the contract method 0x06b3e9c6.
//
// Solidity: function getRewardByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorCaller) GetRewardByDate(opts *bind.CallOpts, _date *big.Int) (*big.Int, error) {
var out []interface{}
err := _Validator.contract.Call(opts, &out, "getRewardByDate", _date)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// GetRewardByDate is a free data retrieval call binding the contract method 0x06b3e9c6.
//
// Solidity: function getRewardByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorSession) GetRewardByDate(_date *big.Int) (*big.Int, error) {
return _Validator.Contract.GetRewardByDate(&_Validator.CallOpts, _date)
}
// GetRewardByDate is a free data retrieval call binding the contract method 0x06b3e9c6.
//
// Solidity: function getRewardByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorCallerSession) GetRewardByDate(_date *big.Int) (*big.Int, error) {
return _Validator.Contract.GetRewardByDate(&_Validator.CallOpts, _date)
}
// GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5.
// //
// Solidity: function getValidatores() view returns(address[]) // Solidity: function getValidators() view returns(address[])
func (_Validator *ValidatorCaller) GetValidatores(opts *bind.CallOpts) ([]common.Address, error) { func (_Validator *ValidatorCaller) GetValidators(opts *bind.CallOpts) ([]common.Address, error) {
var out []interface{} var out []interface{}
err := _Validator.contract.Call(opts, &out, "getValidatores") err := _Validator.contract.Call(opts, &out, "getValidators")
if err != nil { if err != nil {
return *new([]common.Address), err return *new([]common.Address), err
...@@ -475,26 +569,26 @@ func (_Validator *ValidatorCaller) GetValidatores(opts *bind.CallOpts) ([]common ...@@ -475,26 +569,26 @@ func (_Validator *ValidatorCaller) GetValidatores(opts *bind.CallOpts) ([]common
} }
// GetValidatores is a free data retrieval call binding the contract method 0x3f41adbd. // GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5.
// //
// Solidity: function getValidatores() view returns(address[]) // Solidity: function getValidators() view returns(address[])
func (_Validator *ValidatorSession) GetValidatores() ([]common.Address, error) { func (_Validator *ValidatorSession) GetValidators() ([]common.Address, error) {
return _Validator.Contract.GetValidatores(&_Validator.CallOpts) return _Validator.Contract.GetValidators(&_Validator.CallOpts)
} }
// GetValidatores is a free data retrieval call binding the contract method 0x3f41adbd. // GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5.
// //
// Solidity: function getValidatores() view returns(address[]) // Solidity: function getValidators() view returns(address[])
func (_Validator *ValidatorCallerSession) GetValidatores() ([]common.Address, error) { func (_Validator *ValidatorCallerSession) GetValidators() ([]common.Address, error) {
return _Validator.Contract.GetValidatores(&_Validator.CallOpts) return _Validator.Contract.GetValidators(&_Validator.CallOpts)
} }
// GetWorkloadDistribution is a free data retrieval call binding the contract method 0x529781db. // GetWorkloadByDate is a free data retrieval call binding the contract method 0xe916eb9e.
// //
// Solidity: function getWorkloadDistribution(uint256 dailyWorkload) view returns(uint256) // Solidity: function getWorkloadByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorCaller) GetWorkloadDistribution(opts *bind.CallOpts, dailyWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorCaller) GetWorkloadByDate(opts *bind.CallOpts, _date *big.Int) (*big.Int, error) {
var out []interface{} var out []interface{}
err := _Validator.contract.Call(opts, &out, "getWorkloadDistribution", dailyWorkload) err := _Validator.contract.Call(opts, &out, "getWorkloadByDate", _date)
if err != nil { if err != nil {
return *new(*big.Int), err return *new(*big.Int), err
...@@ -506,26 +600,26 @@ func (_Validator *ValidatorCaller) GetWorkloadDistribution(opts *bind.CallOpts, ...@@ -506,26 +600,26 @@ func (_Validator *ValidatorCaller) GetWorkloadDistribution(opts *bind.CallOpts,
} }
// GetWorkloadDistribution is a free data retrieval call binding the contract method 0x529781db. // GetWorkloadByDate is a free data retrieval call binding the contract method 0xe916eb9e.
// //
// Solidity: function getWorkloadDistribution(uint256 dailyWorkload) view returns(uint256) // Solidity: function getWorkloadByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorSession) GetWorkloadDistribution(dailyWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorSession) GetWorkloadByDate(_date *big.Int) (*big.Int, error) {
return _Validator.Contract.GetWorkloadDistribution(&_Validator.CallOpts, dailyWorkload) return _Validator.Contract.GetWorkloadByDate(&_Validator.CallOpts, _date)
} }
// GetWorkloadDistribution is a free data retrieval call binding the contract method 0x529781db. // GetWorkloadByDate is a free data retrieval call binding the contract method 0xe916eb9e.
// //
// Solidity: function getWorkloadDistribution(uint256 dailyWorkload) view returns(uint256) // Solidity: function getWorkloadByDate(uint256 _date) view returns(uint256)
func (_Validator *ValidatorCallerSession) GetWorkloadDistribution(dailyWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorCallerSession) GetWorkloadByDate(_date *big.Int) (*big.Int, error) {
return _Validator.Contract.GetWorkloadDistribution(&_Validator.CallOpts, dailyWorkload) return _Validator.Contract.GetWorkloadByDate(&_Validator.CallOpts, _date)
} }
// GetWorkloadThreshold is a free data retrieval call binding the contract method 0x6b8175a0. // GetWorkloadReward is a free data retrieval call binding the contract method 0xb01507ce.
// //
// Solidity: function getWorkloadThreshold(uint256 totalWorkload) view returns(uint256) // Solidity: function getWorkloadReward(uint256 dailyWorkload) view returns(uint256)
func (_Validator *ValidatorCaller) GetWorkloadThreshold(opts *bind.CallOpts, totalWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorCaller) GetWorkloadReward(opts *bind.CallOpts, dailyWorkload *big.Int) (*big.Int, error) {
var out []interface{} var out []interface{}
err := _Validator.contract.Call(opts, &out, "getWorkloadThreshold", totalWorkload) err := _Validator.contract.Call(opts, &out, "getWorkloadReward", dailyWorkload)
if err != nil { if err != nil {
return *new(*big.Int), err return *new(*big.Int), err
...@@ -537,18 +631,18 @@ func (_Validator *ValidatorCaller) GetWorkloadThreshold(opts *bind.CallOpts, tot ...@@ -537,18 +631,18 @@ func (_Validator *ValidatorCaller) GetWorkloadThreshold(opts *bind.CallOpts, tot
} }
// GetWorkloadThreshold is a free data retrieval call binding the contract method 0x6b8175a0. // GetWorkloadReward is a free data retrieval call binding the contract method 0xb01507ce.
// //
// Solidity: function getWorkloadThreshold(uint256 totalWorkload) view returns(uint256) // Solidity: function getWorkloadReward(uint256 dailyWorkload) view returns(uint256)
func (_Validator *ValidatorSession) GetWorkloadThreshold(totalWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorSession) GetWorkloadReward(dailyWorkload *big.Int) (*big.Int, error) {
return _Validator.Contract.GetWorkloadThreshold(&_Validator.CallOpts, totalWorkload) return _Validator.Contract.GetWorkloadReward(&_Validator.CallOpts, dailyWorkload)
} }
// GetWorkloadThreshold is a free data retrieval call binding the contract method 0x6b8175a0. // GetWorkloadReward is a free data retrieval call binding the contract method 0xb01507ce.
// //
// Solidity: function getWorkloadThreshold(uint256 totalWorkload) view returns(uint256) // Solidity: function getWorkloadReward(uint256 dailyWorkload) view returns(uint256)
func (_Validator *ValidatorCallerSession) GetWorkloadThreshold(totalWorkload *big.Int) (*big.Int, error) { func (_Validator *ValidatorCallerSession) GetWorkloadReward(dailyWorkload *big.Int) (*big.Int, error) {
return _Validator.Contract.GetWorkloadThreshold(&_Validator.CallOpts, totalWorkload) return _Validator.Contract.GetWorkloadReward(&_Validator.CallOpts, dailyWorkload)
} }
// IsValidator is a free data retrieval call binding the contract method 0xfacd743b. // IsValidator is a free data retrieval call binding the contract method 0xfacd743b.
...@@ -758,25 +852,25 @@ func (_Validator *ValidatorTransactorSession) RenounceOwnership() (*types.Transa ...@@ -758,25 +852,25 @@ func (_Validator *ValidatorTransactorSession) RenounceOwnership() (*types.Transa
return _Validator.Contract.RenounceOwnership(&_Validator.TransactOpts) return _Validator.Contract.RenounceOwnership(&_Validator.TransactOpts)
} }
// SetDailyDistribution is a paid mutator transaction binding the contract method 0x2911360a. // SetDailyReward is a paid mutator transaction binding the contract method 0x0aa43533.
// //
// Solidity: function setDailyDistribution(uint256 _dailyDistribution) returns() // Solidity: function setDailyReward(uint256 _dailyReward) returns()
func (_Validator *ValidatorTransactor) SetDailyDistribution(opts *bind.TransactOpts, _dailyDistribution *big.Int) (*types.Transaction, error) { func (_Validator *ValidatorTransactor) SetDailyReward(opts *bind.TransactOpts, _dailyReward *big.Int) (*types.Transaction, error) {
return _Validator.contract.Transact(opts, "setDailyDistribution", _dailyDistribution) return _Validator.contract.Transact(opts, "setDailyReward", _dailyReward)
} }
// SetDailyDistribution is a paid mutator transaction binding the contract method 0x2911360a. // SetDailyReward is a paid mutator transaction binding the contract method 0x0aa43533.
// //
// Solidity: function setDailyDistribution(uint256 _dailyDistribution) returns() // Solidity: function setDailyReward(uint256 _dailyReward) returns()
func (_Validator *ValidatorSession) SetDailyDistribution(_dailyDistribution *big.Int) (*types.Transaction, error) { func (_Validator *ValidatorSession) SetDailyReward(_dailyReward *big.Int) (*types.Transaction, error) {
return _Validator.Contract.SetDailyDistribution(&_Validator.TransactOpts, _dailyDistribution) return _Validator.Contract.SetDailyReward(&_Validator.TransactOpts, _dailyReward)
} }
// SetDailyDistribution is a paid mutator transaction binding the contract method 0x2911360a. // SetDailyReward is a paid mutator transaction binding the contract method 0x0aa43533.
// //
// Solidity: function setDailyDistribution(uint256 _dailyDistribution) returns() // Solidity: function setDailyReward(uint256 _dailyReward) returns()
func (_Validator *ValidatorTransactorSession) SetDailyDistribution(_dailyDistribution *big.Int) (*types.Transaction, error) { func (_Validator *ValidatorTransactorSession) SetDailyReward(_dailyReward *big.Int) (*types.Transaction, error) {
return _Validator.Contract.SetDailyDistribution(&_Validator.TransactOpts, _dailyDistribution) return _Validator.Contract.SetDailyReward(&_Validator.TransactOpts, _dailyReward)
} }
// SetRootThreshold is a paid mutator transaction binding the contract method 0x718b08a8. // SetRootThreshold is a paid mutator transaction binding the contract method 0x718b08a8.
...@@ -821,25 +915,25 @@ func (_Validator *ValidatorTransactorSession) SetValidator(addr common.Address, ...@@ -821,25 +915,25 @@ func (_Validator *ValidatorTransactorSession) SetValidator(addr common.Address,
return _Validator.Contract.SetValidator(&_Validator.TransactOpts, addr, ok) return _Validator.Contract.SetValidator(&_Validator.TransactOpts, addr, ok)
} }
// SubmitMerkleRoot is a paid mutator transaction binding the contract method 0x41a88b9d. // SubmitMerkleRoot is a paid mutator transaction binding the contract method 0xed3a4aea.
// //
// Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot) returns() // Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot, uint256 _totalWorkload) returns()
func (_Validator *ValidatorTransactor) SubmitMerkleRoot(opts *bind.TransactOpts, _date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte) (*types.Transaction, error) { func (_Validator *ValidatorTransactor) SubmitMerkleRoot(opts *bind.TransactOpts, _date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte, _totalWorkload *big.Int) (*types.Transaction, error) {
return _Validator.contract.Transact(opts, "submitMerkleRoot", _date, _merkleRoot, _merkleSumRoot) return _Validator.contract.Transact(opts, "submitMerkleRoot", _date, _merkleRoot, _merkleSumRoot, _totalWorkload)
} }
// SubmitMerkleRoot is a paid mutator transaction binding the contract method 0x41a88b9d. // SubmitMerkleRoot is a paid mutator transaction binding the contract method 0xed3a4aea.
// //
// Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot) returns() // Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot, uint256 _totalWorkload) returns()
func (_Validator *ValidatorSession) SubmitMerkleRoot(_date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte) (*types.Transaction, error) { func (_Validator *ValidatorSession) SubmitMerkleRoot(_date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte, _totalWorkload *big.Int) (*types.Transaction, error) {
return _Validator.Contract.SubmitMerkleRoot(&_Validator.TransactOpts, _date, _merkleRoot, _merkleSumRoot) return _Validator.Contract.SubmitMerkleRoot(&_Validator.TransactOpts, _date, _merkleRoot, _merkleSumRoot, _totalWorkload)
} }
// SubmitMerkleRoot is a paid mutator transaction binding the contract method 0x41a88b9d. // SubmitMerkleRoot is a paid mutator transaction binding the contract method 0xed3a4aea.
// //
// Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot) returns() // Solidity: function submitMerkleRoot(uint256 _date, bytes32 _merkleRoot, bytes32 _merkleSumRoot, uint256 _totalWorkload) returns()
func (_Validator *ValidatorTransactorSession) SubmitMerkleRoot(_date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte) (*types.Transaction, error) { func (_Validator *ValidatorTransactorSession) SubmitMerkleRoot(_date *big.Int, _merkleRoot [32]byte, _merkleSumRoot [32]byte, _totalWorkload *big.Int) (*types.Transaction, error) {
return _Validator.Contract.SubmitMerkleRoot(&_Validator.TransactOpts, _date, _merkleRoot, _merkleSumRoot) return _Validator.Contract.SubmitMerkleRoot(&_Validator.TransactOpts, _date, _merkleRoot, _merkleSumRoot, _totalWorkload)
} }
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
...@@ -863,9 +957,9 @@ func (_Validator *ValidatorTransactorSession) TransferOwnership(newOwner common. ...@@ -863,9 +957,9 @@ func (_Validator *ValidatorTransactorSession) TransferOwnership(newOwner common.
return _Validator.Contract.TransferOwnership(&_Validator.TransactOpts, newOwner) return _Validator.Contract.TransferOwnership(&_Validator.TransactOpts, newOwner)
} }
// ValidatorDailyDistributionChangedIterator is returned from FilterDailyDistributionChanged and is used to iterate over the raw logs and unpacked data for DailyDistributionChanged events raised by the Validator contract. // ValidatorDailyRewardChangedIterator is returned from FilterDailyRewardChanged and is used to iterate over the raw logs and unpacked data for DailyRewardChanged events raised by the Validator contract.
type ValidatorDailyDistributionChangedIterator struct { type ValidatorDailyRewardChangedIterator struct {
Event *ValidatorDailyDistributionChanged // Event containing the contract specifics and raw log Event *ValidatorDailyRewardChanged // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data event string // Event name to use for unpacking event data
...@@ -879,7 +973,7 @@ type ValidatorDailyDistributionChangedIterator struct { ...@@ -879,7 +973,7 @@ type ValidatorDailyDistributionChangedIterator struct {
// Next advances the iterator to the subsequent event, returning whether there // Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is // are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure. // returned and Error() can be queried for the exact failure.
func (it *ValidatorDailyDistributionChangedIterator) Next() bool { func (it *ValidatorDailyRewardChangedIterator) Next() bool {
// If the iterator failed, stop iterating // If the iterator failed, stop iterating
if it.fail != nil { if it.fail != nil {
return false return false
...@@ -888,7 +982,7 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool { ...@@ -888,7 +982,7 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool {
if it.done { if it.done {
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(ValidatorDailyDistributionChanged) it.Event = new(ValidatorDailyRewardChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -903,7 +997,7 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool { ...@@ -903,7 +997,7 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event // Iterator still in progress, wait for either a data or an error event
select { select {
case log := <-it.logs: case log := <-it.logs:
it.Event = new(ValidatorDailyDistributionChanged) it.Event = new(ValidatorDailyRewardChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err it.fail = err
return false return false
...@@ -919,41 +1013,41 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool { ...@@ -919,41 +1013,41 @@ func (it *ValidatorDailyDistributionChangedIterator) Next() bool {
} }
// Error returns any retrieval or parsing error occurred during filtering. // Error returns any retrieval or parsing error occurred during filtering.
func (it *ValidatorDailyDistributionChangedIterator) Error() error { func (it *ValidatorDailyRewardChangedIterator) Error() error {
return it.fail return it.fail
} }
// Close terminates the iteration process, releasing any pending underlying // Close terminates the iteration process, releasing any pending underlying
// resources. // resources.
func (it *ValidatorDailyDistributionChangedIterator) Close() error { func (it *ValidatorDailyRewardChangedIterator) Close() error {
it.sub.Unsubscribe() it.sub.Unsubscribe()
return nil return nil
} }
// ValidatorDailyDistributionChanged represents a DailyDistributionChanged event raised by the Validator contract. // ValidatorDailyRewardChanged represents a DailyRewardChanged event raised by the Validator contract.
type ValidatorDailyDistributionChanged struct { type ValidatorDailyRewardChanged struct {
DailyDistribution *big.Int DailyReward *big.Int
Raw types.Log // Blockchain specific contextual infos Raw types.Log // Blockchain specific contextual infos
} }
// FilterDailyDistributionChanged is a free log retrieval operation binding the contract event 0xb3ae8e2fdcbd3e5bc919976d8ad797511092f7b991c4a29813a72b0b09e79458. // FilterDailyRewardChanged is a free log retrieval operation binding the contract event 0xf1649f58e4104d40851477a70db43e4ed6979ae52986533c3bc43abb6642dcfa.
// //
// Solidity: event DailyDistributionChanged(uint256 dailyDistribution) // Solidity: event DailyRewardChanged(uint256 dailyReward)
func (_Validator *ValidatorFilterer) FilterDailyDistributionChanged(opts *bind.FilterOpts) (*ValidatorDailyDistributionChangedIterator, error) { func (_Validator *ValidatorFilterer) FilterDailyRewardChanged(opts *bind.FilterOpts) (*ValidatorDailyRewardChangedIterator, error) {
logs, sub, err := _Validator.contract.FilterLogs(opts, "DailyDistributionChanged") logs, sub, err := _Validator.contract.FilterLogs(opts, "DailyRewardChanged")
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &ValidatorDailyDistributionChangedIterator{contract: _Validator.contract, event: "DailyDistributionChanged", logs: logs, sub: sub}, nil return &ValidatorDailyRewardChangedIterator{contract: _Validator.contract, event: "DailyRewardChanged", logs: logs, sub: sub}, nil
} }
// WatchDailyDistributionChanged is a free log subscription operation binding the contract event 0xb3ae8e2fdcbd3e5bc919976d8ad797511092f7b991c4a29813a72b0b09e79458. // WatchDailyRewardChanged is a free log subscription operation binding the contract event 0xf1649f58e4104d40851477a70db43e4ed6979ae52986533c3bc43abb6642dcfa.
// //
// Solidity: event DailyDistributionChanged(uint256 dailyDistribution) // Solidity: event DailyRewardChanged(uint256 dailyReward)
func (_Validator *ValidatorFilterer) WatchDailyDistributionChanged(opts *bind.WatchOpts, sink chan<- *ValidatorDailyDistributionChanged) (event.Subscription, error) { func (_Validator *ValidatorFilterer) WatchDailyRewardChanged(opts *bind.WatchOpts, sink chan<- *ValidatorDailyRewardChanged) (event.Subscription, error) {
logs, sub, err := _Validator.contract.WatchLogs(opts, "DailyDistributionChanged") logs, sub, err := _Validator.contract.WatchLogs(opts, "DailyRewardChanged")
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -963,8 +1057,8 @@ func (_Validator *ValidatorFilterer) WatchDailyDistributionChanged(opts *bind.Wa ...@@ -963,8 +1057,8 @@ func (_Validator *ValidatorFilterer) WatchDailyDistributionChanged(opts *bind.Wa
select { select {
case log := <-logs: case log := <-logs:
// New log arrived, parse the event and forward to the user // New log arrived, parse the event and forward to the user
event := new(ValidatorDailyDistributionChanged) event := new(ValidatorDailyRewardChanged)
if err := _Validator.contract.UnpackLog(event, "DailyDistributionChanged", log); err != nil { if err := _Validator.contract.UnpackLog(event, "DailyRewardChanged", log); err != nil {
return err return err
} }
event.Raw = log event.Raw = log
...@@ -985,12 +1079,12 @@ func (_Validator *ValidatorFilterer) WatchDailyDistributionChanged(opts *bind.Wa ...@@ -985,12 +1079,12 @@ func (_Validator *ValidatorFilterer) WatchDailyDistributionChanged(opts *bind.Wa
}), nil }), nil
} }
// ParseDailyDistributionChanged is a log parse operation binding the contract event 0xb3ae8e2fdcbd3e5bc919976d8ad797511092f7b991c4a29813a72b0b09e79458. // ParseDailyRewardChanged is a log parse operation binding the contract event 0xf1649f58e4104d40851477a70db43e4ed6979ae52986533c3bc43abb6642dcfa.
// //
// Solidity: event DailyDistributionChanged(uint256 dailyDistribution) // Solidity: event DailyRewardChanged(uint256 dailyReward)
func (_Validator *ValidatorFilterer) ParseDailyDistributionChanged(log types.Log) (*ValidatorDailyDistributionChanged, error) { func (_Validator *ValidatorFilterer) ParseDailyRewardChanged(log types.Log) (*ValidatorDailyRewardChanged, error) {
event := new(ValidatorDailyDistributionChanged) event := new(ValidatorDailyRewardChanged)
if err := _Validator.contract.UnpackLog(event, "DailyDistributionChanged", log); err != nil { if err := _Validator.contract.UnpackLog(event, "DailyRewardChanged", log); err != nil {
return nil, err return nil, err
} }
event.Raw = log event.Raw = log
...@@ -1069,12 +1163,13 @@ type ValidatorMerkleRootChanged struct { ...@@ -1069,12 +1163,13 @@ type ValidatorMerkleRootChanged struct {
Date *big.Int Date *big.Int
MerkleRoot [32]byte MerkleRoot [32]byte
MerkleSumRoot [32]byte MerkleSumRoot [32]byte
TotalWorkload *big.Int
Raw types.Log // Blockchain specific contextual infos Raw types.Log // Blockchain specific contextual infos
} }
// FilterMerkleRootChanged is a free log retrieval operation binding the contract event 0x04c9029ff6e1c93c237a73a6215b410b7d5da15081897c70baa40b4b70c9c5ba. // FilterMerkleRootChanged is a free log retrieval operation binding the contract event 0x508346920f1af9cf4c72254f4a8c35d5ca2c0c8121f2f1a22952b7179d9e352b.
// //
// Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot) // Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot, uint256 totalWorkload)
func (_Validator *ValidatorFilterer) FilterMerkleRootChanged(opts *bind.FilterOpts) (*ValidatorMerkleRootChangedIterator, error) { func (_Validator *ValidatorFilterer) FilterMerkleRootChanged(opts *bind.FilterOpts) (*ValidatorMerkleRootChangedIterator, error) {
logs, sub, err := _Validator.contract.FilterLogs(opts, "MerkleRootChanged") logs, sub, err := _Validator.contract.FilterLogs(opts, "MerkleRootChanged")
...@@ -1084,9 +1179,9 @@ func (_Validator *ValidatorFilterer) FilterMerkleRootChanged(opts *bind.FilterOp ...@@ -1084,9 +1179,9 @@ func (_Validator *ValidatorFilterer) FilterMerkleRootChanged(opts *bind.FilterOp
return &ValidatorMerkleRootChangedIterator{contract: _Validator.contract, event: "MerkleRootChanged", logs: logs, sub: sub}, nil return &ValidatorMerkleRootChangedIterator{contract: _Validator.contract, event: "MerkleRootChanged", logs: logs, sub: sub}, nil
} }
// WatchMerkleRootChanged is a free log subscription operation binding the contract event 0x04c9029ff6e1c93c237a73a6215b410b7d5da15081897c70baa40b4b70c9c5ba. // WatchMerkleRootChanged is a free log subscription operation binding the contract event 0x508346920f1af9cf4c72254f4a8c35d5ca2c0c8121f2f1a22952b7179d9e352b.
// //
// Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot) // Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot, uint256 totalWorkload)
func (_Validator *ValidatorFilterer) WatchMerkleRootChanged(opts *bind.WatchOpts, sink chan<- *ValidatorMerkleRootChanged) (event.Subscription, error) { func (_Validator *ValidatorFilterer) WatchMerkleRootChanged(opts *bind.WatchOpts, sink chan<- *ValidatorMerkleRootChanged) (event.Subscription, error) {
logs, sub, err := _Validator.contract.WatchLogs(opts, "MerkleRootChanged") logs, sub, err := _Validator.contract.WatchLogs(opts, "MerkleRootChanged")
...@@ -1121,9 +1216,9 @@ func (_Validator *ValidatorFilterer) WatchMerkleRootChanged(opts *bind.WatchOpts ...@@ -1121,9 +1216,9 @@ func (_Validator *ValidatorFilterer) WatchMerkleRootChanged(opts *bind.WatchOpts
}), nil }), nil
} }
// ParseMerkleRootChanged is a log parse operation binding the contract event 0x04c9029ff6e1c93c237a73a6215b410b7d5da15081897c70baa40b4b70c9c5ba. // ParseMerkleRootChanged is a log parse operation binding the contract event 0x508346920f1af9cf4c72254f4a8c35d5ca2c0c8121f2f1a22952b7179d9e352b.
// //
// Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot) // Solidity: event MerkleRootChanged(uint256 date, bytes32 merkleRoot, bytes32 merkleSumRoot, uint256 totalWorkload)
func (_Validator *ValidatorFilterer) ParseMerkleRootChanged(log types.Log) (*ValidatorMerkleRootChanged, error) { func (_Validator *ValidatorFilterer) ParseMerkleRootChanged(log types.Log) (*ValidatorMerkleRootChanged, error) {
event := new(ValidatorMerkleRootChanged) event := new(ValidatorMerkleRootChanged)
if err := _Validator.contract.UnpackLog(event, "MerkleRootChanged", log); err != nil { if err := _Validator.contract.UnpackLog(event, "MerkleRootChanged", log); err != nil {
......
...@@ -77,11 +77,29 @@ func (r *ChainRPC) GetNMAddresses() (addrs []common.Address, err error) { ...@@ -77,11 +77,29 @@ func (r *ChainRPC) GetNMAddresses() (addrs []common.Address, err error) {
} }
func (r *ChainRPC) GetWorkloadThreshold(totalWorkload uint64) (threshold *big.Int, err error) { func (r *ChainRPC) GetWorkloadThreshold(totalWorkload uint64) (threshold *big.Int, err error) {
return r.validatorContract.GetWorkloadDistribution(nil, big.NewInt(int64(totalWorkload))) return r.validatorContract.GetWorkloadReward(nil, big.NewInt(int64(totalWorkload)))
}
// GetWeiPerWorkload 给定日期,获取当天的总奖励,总工作量,每工作量奖励
func (r *ChainRPC) GetWeiPerWorkload(timestamp uint64) (reward, workload, weiPerWorkload *big.Int, err error) {
rewardDay, err := r.validatorContract.GetRewardByDate(nil, big.NewInt(int64(timestamp)))
if err != nil {
return
}
workloadDay, err := r.validatorContract.GetWorkloadByDate(nil, big.NewInt(int64(timestamp)))
if err != nil {
return
}
if big.NewInt(0).Cmp(workloadDay) == 0 || big.NewInt(0).Cmp(rewardDay) == 0 {
err = errors.New("workload or reward is zero")
return
}
return rewardDay, workloadDay, big.NewInt(0).Quo(rewardDay, workloadDay), nil
} }
// SubmitProofs 调用合约提交root // SubmitProofs 调用合约提交root
func (r *ChainRPC) SubmitProofs(dateTimestamp int64, merkleSumTreeRoot, merkleTreeRoot common.Hash) (txHash common.Hash, err error) { func (r *ChainRPC) SubmitProofs(dateTimestamp int64, merkleSumTreeRoot, merkleTreeRoot common.Hash, totalWorkload uint64) (txHash common.Hash, err error) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute) ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
opts, err := bind.NewKeyedTransactorWithChainID(r.privateKey, r.chainID) opts, err := bind.NewKeyedTransactorWithChainID(r.privateKey, r.chainID)
...@@ -91,7 +109,7 @@ func (r *ChainRPC) SubmitProofs(dateTimestamp int64, merkleSumTreeRoot, merkleTr ...@@ -91,7 +109,7 @@ func (r *ChainRPC) SubmitProofs(dateTimestamp int64, merkleSumTreeRoot, merkleTr
opts.GasLimit = 500000 opts.GasLimit = 500000
opts.Context = ctx opts.Context = ctx
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
signedTx, err := r.validatorContract.SubmitMerkleRoot(opts, big.NewInt(dateTimestamp), merkleSumTreeRoot, merkleTreeRoot) signedTx, err := r.validatorContract.SubmitMerkleRoot(opts, big.NewInt(dateTimestamp), merkleSumTreeRoot, merkleTreeRoot, big.NewInt(0).SetUint64(totalWorkload))
if err != nil { if err != nil {
log.WithError(err).Error("submit root, call contract failed, retry after 3 seconds") log.WithError(err).Error("submit root, call contract failed, retry after 3 seconds")
time.Sleep(time.Second * 3) time.Sleep(time.Second * 3)
......
...@@ -138,3 +138,31 @@ func (v *Validator) GetDailyMerkleSumNodes(date string, depth int, rootHash comm ...@@ -138,3 +138,31 @@ func (v *Validator) GetDailyMerkleSumNodes(date string, depth int, rootHash comm
} }
return nodesHash, nodesVal return nodesHash, nodesVal
} }
// GetWorkload /api/v1/workload
func (v *Validator) GetWorkload(timestampList []uint64) (ret []map[string]string, err error) {
for _, timestamp := range timestampList {
r, w, wei, err := v.rpc.GetWeiPerWorkload(timestamp)
if err != nil {
return nil, err
}
ret = append(ret, map[string]string{
"date": v.timestampToDate(int64(timestamp)),
"weiPerWorkload": wei.String(),
"reward": w.String(),
"workload": r.String(),
})
}
return ret, nil
}
// GetReward /api/v1/reward
func (v *Validator) GetReward(address common.Address) (reward *big.Int) {
object := v.state.GetMinerObject(address)
if object == nil {
return big.NewInt(0)
}
b, _ := big.NewInt(0).SetString(object.Balance, 10)
return b
}
...@@ -75,7 +75,7 @@ func RunValidator(q *quest.Quest, cfg *conf.Config) *Validator { ...@@ -75,7 +75,7 @@ func RunValidator(q *quest.Quest, cfg *conf.Config) *Validator {
} }
// v.date = 3, 如果当前时间超过提交昨天的时间,需要提交昨天的 // v.date = 3, 如果当前时间超过提交昨天的时间,需要提交昨天的
if v.dateToTimestamp(v.date) < v.yesterdayTimestamp() && if v.dateToTimestamp(v.date) < v.yesterdayTimestamp() &&
time.Now().After(time.Unix(v.todayTimestamp()+int64(cfg.CommitOffset), 0)) { time.Now().UTC().After(time.Unix(v.todayTimestamp()+int64(cfg.CommitOffset), 0)) {
if err = v.SyncDayJob(v.dateToTimestamp(v.date)+86400, true); err != nil { if err = v.SyncDayJob(v.dateToTimestamp(v.date)+86400, true); err != nil {
return nil return nil
} }
...@@ -146,7 +146,7 @@ func (v *Validator) ProcessDayJob() { ...@@ -146,7 +146,7 @@ func (v *Validator) ProcessDayJob() {
}).Debug("process day job") }).Debug("process day job")
v.LoadPendingProofs(v.yesterdayTimestamp(), v.todayTimestamp()) v.LoadPendingProofs(v.yesterdayTimestamp(), v.todayTimestamp())
v.date = v.yesterdayString() v.date = v.yesterdayString()
dayProof := v.Commit() dayProof, totalWorkload := v.Commit()
mstRoot, _, err := v.CommitMST(dayProof) mstRoot, _, err := v.CommitMST(dayProof)
if err != nil { if err != nil {
log.WithError(err).Error("failed to commit merkle sum tree") log.WithError(err).Error("failed to commit merkle sum tree")
...@@ -158,7 +158,7 @@ func (v *Validator) ProcessDayJob() { ...@@ -158,7 +158,7 @@ func (v *Validator) ProcessDayJob() {
log.WithError(err).Error("failed to commit merkle tree") log.WithError(err).Error("failed to commit merkle tree")
return return
} }
txHash, err := v.rpc.SubmitProofs(v.dateToTimestamp(v.date), mstRoot, mtRoot) txHash, err := v.rpc.SubmitProofs(v.dateToTimestamp(v.date), mstRoot, mtRoot, totalWorkload)
if err != nil { if err != nil {
log.WithError(err).Error("submit proofs") log.WithError(err).Error("submit proofs")
return return
...@@ -190,7 +190,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err ...@@ -190,7 +190,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err
}).Debug("sync day job") }).Debug("sync day job")
v.LoadPendingProofs(dateTimestamp, dateTimestamp+86400) v.LoadPendingProofs(dateTimestamp, dateTimestamp+86400)
v.date = v.timestampToDate(dateTimestamp) v.date = v.timestampToDate(dateTimestamp)
dayProof := v.Commit() dayProof, totalWorkload := v.Commit()
mstRoot, _, err := v.CommitMST(dayProof) mstRoot, _, err := v.CommitMST(dayProof)
if err != nil { if err != nil {
log.WithError(err).Error("failed to commit merkle sum tree") log.WithError(err).Error("failed to commit merkle sum tree")
...@@ -204,7 +204,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err ...@@ -204,7 +204,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err
} }
var txHash common.Hash var txHash common.Hash
if commitToChain { if commitToChain {
txHash, err = v.rpc.SubmitProofs(dateTimestamp, mstRoot, mtRoot) txHash, err = v.rpc.SubmitProofs(dateTimestamp, mstRoot, mtRoot, totalWorkload)
if err != nil { if err != nil {
log.WithError(err).Error("submit proofs") log.WithError(err).Error("submit proofs")
return return
...@@ -226,7 +226,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err ...@@ -226,7 +226,7 @@ func (v *Validator) SyncDayJob(dateTimestamp int64, commitToChain bool) (err err
} }
// Commit statedb提交 // Commit statedb提交
func (v *Validator) Commit() (dayProofs map[common.Address]*validatorv1.ValidatedProof) { func (v *Validator) Commit() (dayProofs map[common.Address]*validatorv1.ValidatedProof, totalWorkload uint64) {
st := time.Now() st := time.Now()
proof, totalWorkload := v.RefreshPendingProof() proof, totalWorkload := v.RefreshPendingProof()
balancePerWorkload, err := v.rpc.GetWorkloadThreshold(totalWorkload) balancePerWorkload, err := v.rpc.GetWorkloadThreshold(totalWorkload)
...@@ -259,7 +259,7 @@ func (v *Validator) Commit() (dayProofs map[common.Address]*validatorv1.Validate ...@@ -259,7 +259,7 @@ func (v *Validator) Commit() (dayProofs map[common.Address]*validatorv1.Validate
return return
} }
v.state, _ = NewStateDB(v.lvdb, root) v.state, _ = NewStateDB(v.lvdb, root)
return proof return proof, totalWorkload
} }
func (v *Validator) SealProof(miner common.Address, proof *validatorv1.ValidatedProof) (err error) { func (v *Validator) SealProof(miner common.Address, proof *validatorv1.ValidatedProof) (err error) {
...@@ -298,7 +298,7 @@ func (v *Validator) RefreshPendingProof() (proof map[common.Address]*validatorv1 ...@@ -298,7 +298,7 @@ func (v *Validator) RefreshPendingProof() (proof map[common.Address]*validatorv1
func (v *Validator) Ticker() { func (v *Validator) Ticker() {
executionTime := time.Unix(v.todayTimestamp()+86400+int64(v.cfg.CommitOffset), 0) executionTime := time.Unix(v.todayTimestamp()+86400+int64(v.cfg.CommitOffset), 0)
// executionTime := time.Now().Add(time.Second * 3) for test // executionTime := time.Now().Add(time.Second * 3) for test
waitTime := executionTime.Sub(time.Now()) waitTime := executionTime.Sub(time.Now().UTC())
timer := time.NewTimer(waitTime) timer := time.NewTimer(waitTime)
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"execution_time": executionTime.UTC().String(), "execution_time": executionTime.UTC().String(),
...@@ -308,7 +308,7 @@ func (v *Validator) Ticker() { ...@@ -308,7 +308,7 @@ func (v *Validator) Ticker() {
<-timer.C <-timer.C
v.ProcessDayJob() v.ProcessDayJob()
executionTime = executionTime.Add(v.duration()) executionTime = executionTime.Add(v.duration())
waitTime = executionTime.Sub(time.Now()) waitTime = executionTime.Sub(time.Now().UTC())
timer.Reset(waitTime) timer.Reset(waitTime)
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"execution_time": executionTime.UTC().String(), "execution_time": executionTime.UTC().String(),
...@@ -373,7 +373,10 @@ func (v *Validator) yesterdayTimestamp() int64 { ...@@ -373,7 +373,10 @@ func (v *Validator) yesterdayTimestamp() int64 {
} }
func (v *Validator) dateToTimestamp(date string) int64 { func (v *Validator) dateToTimestamp(date string) int64 {
t, _ := time.ParseInLocation("2006-01-02", date, time.UTC) t, err := time.ParseInLocation("2006-01-02", date, time.UTC)
if err != nil {
return 0
}
return t.Unix() return t.Unix()
} }
......
...@@ -5,11 +5,14 @@ go 1.21 ...@@ -5,11 +5,14 @@ go 1.21
require ( require (
github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/ethereum/go-ethereum v1.13.5-0.20231027145059-2d7dba024d76 github.com/ethereum/go-ethereum v1.13.5-0.20231027145059-2d7dba024d76
github.com/gin-contrib/cors v1.7.2
github.com/gin-gonic/gin v1.9.1
github.com/gogo/protobuf v1.3.2 github.com/gogo/protobuf v1.3.2
github.com/odysseus/odysseus-protocol v0.0.0-00010101000000-000000000000 github.com/odysseus/odysseus-protocol v0.0.0-00010101000000-000000000000
github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_golang v1.18.0
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
github.com/tidwall/gjson v1.17.1
github.com/urfave/cli/v2 v2.27.1 github.com/urfave/cli/v2 v2.27.1
gorm.io/driver/postgres v1.5.6 gorm.io/driver/postgres v1.5.6
gorm.io/gorm v1.25.7 gorm.io/gorm v1.25.7
...@@ -22,8 +25,12 @@ require ( ...@@ -22,8 +25,12 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect github.com/bits-and-blooms/bitset v1.7.0 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/cp v1.1.1 // indirect github.com/cespare/cp v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
...@@ -37,10 +44,16 @@ require ( ...@@ -37,10 +44,16 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect github.com/go-stack/stack v1.8.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
...@@ -53,14 +66,20 @@ require ( ...@@ -53,14 +66,20 @@ require (
github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/compress v1.17.6 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/kr/pretty v0.3.1 // indirect github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onsi/gomega v1.30.0 // indirect github.com/onsi/gomega v1.30.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect github.com/prometheus/common v0.47.0 // indirect
...@@ -70,21 +89,26 @@ require ( ...@@ -70,21 +89,26 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/supranational/blst v0.3.11 // indirect github.com/supranational/blst v0.3.11 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect github.com/tklauser/numcpus v0.6.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.20.0 // indirect golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.15.0 // indirect golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.6.0 // indirect golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.18.0 // indirect golang.org/x/tools v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/grpc v1.60.1 // indirect google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect
) )
......
...@@ -26,6 +26,10 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf ...@@ -26,6 +26,10 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf
github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU=
github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
...@@ -35,6 +39,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR ...@@ -35,6 +39,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4=
...@@ -95,14 +103,22 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 ...@@ -95,14 +103,22 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c=
github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0=
github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ=
github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw=
github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
...@@ -110,12 +126,22 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop ...@@ -110,12 +126,22 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
...@@ -205,6 +231,8 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= ...@@ -205,6 +231,8 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
...@@ -219,6 +247,10 @@ github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 ...@@ -219,6 +247,10 @@ github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
...@@ -233,6 +265,8 @@ github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awS ...@@ -233,6 +265,8 @@ github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awS
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
...@@ -262,9 +296,12 @@ github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iP ...@@ -262,9 +296,12 @@ github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iP
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
...@@ -289,6 +326,8 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9 ...@@ -289,6 +326,8 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
...@@ -338,28 +377,45 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM ...@@ -338,28 +377,45 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4=
github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs=
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=
github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
...@@ -383,6 +439,9 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec ...@@ -383,6 +439,9 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc=
golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
...@@ -391,8 +450,8 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh ...@@ -391,8 +450,8 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
...@@ -427,8 +486,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT ...@@ -427,8 +486,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
...@@ -476,8 +535,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= ...@@ -476,8 +535,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
...@@ -540,8 +599,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD ...@@ -540,8 +599,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
...@@ -573,5 +632,7 @@ gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A= ...@@ -573,5 +632,7 @@ gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A=
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment