From 6d78c14be91c64730fe8bcf7a546ad737bacb780 Mon Sep 17 00:00:00 2001 From: Sulejman Sarajlija <3107367+Sulejman@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:15:18 +0200 Subject: [PATCH] update to latest state --- .env.example | 12 + .github/workflows/docker-publish.yml | 103 + .gitignore | 4 +- Dockerfile | 33 +- build-docker.sh | 2 +- build.sh | 3 +- cmd/main.go | 3 + config/settings.example.json | 11 - config/settings.go | 132 +- go.mod | 3 +- go.sum | 69 + init_processes.sh | 7 - pkgs/clients/reporting.go | 72 + pkgs/contract/contract/abi.json | 2503 ++++++++++-- pkgs/contract/contract/contract.go | 5270 +++++++++++++++++++++----- pkgs/helpers/chain.go | 81 +- pkgs/helpers/contract.go | 2 +- pkgs/helpers/database.go | 3 +- pkgs/helpers/errors.go | 6 + pkgs/helpers/ipfs.go | 6 + pkgs/helpers/merkle.go | 3 + pm2.config.js | 22 - run-dev.sh | 17 + run.sh | 1 + validator_autofill.sh | 54 - 25 files changed, 6914 insertions(+), 1508 deletions(-) create mode 100644 .env.example create mode 100644 .github/workflows/docker-publish.yml delete mode 100644 config/settings.example.json delete mode 100755 init_processes.sh create mode 100644 pkgs/clients/reporting.go delete mode 100644 pm2.config.js create mode 100755 run-dev.sh create mode 100755 run.sh delete mode 100755 validator_autofill.sh diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..04d08ae --- /dev/null +++ b/.env.example @@ -0,0 +1,12 @@ +SIGNER_ACCOUNT_PRIVATE_KEY= +PROST_RPC_URL= +PROTOCOL_STATE_CONTRACT= +REDIS_HOST= +REDIS_PORT= +IPFS_URL= +IPFS_API_KEY= +IPFS_API_SECRET= +BATCH_SUBMISSION_LIMIT= +BLOCK_TIME= +DATA_MARKET_CONTRACT= +SLACK_REPORTING_URL= \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..a7a6b99 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,103 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + release: + types: ['published'] + push: + branches: [ "main", "dockerify"] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ "main" ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: powerloom/validator-alpha + + +jobs: + build: + + runs-on: + group: larger-runners + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + # Install the cosign tool except on PR + # https://github.com/sigstore/cosign-installer + #- name: Install cosign + # if: github.event_name != 'pull_request' + # uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0 + # with: + # cosign-release: 'v1.11.0' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + + # Workaround: https://github.com/docker/build-push-action/issues/461 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a + with: + context: . + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + + # Sign the resulting Docker image digest except on PRs. + # This will only write to the public Rekor transparency log when the Docker + # repository is public to avoid leaking data. If you would like to publish + # transparency data even for private images, pass --force to cosign below. + # https://github.com/sigstore/cosign + # - name: Sign the published Docker image + # if: ${{ github.event_name != 'pull_request' }} + # env: + # COSIGN_EXPERIMENTAL: "true" + # # This step uses the identity token to provision an ephemeral certificate + # # against the sigstore community Fulcio instance. + # run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} diff --git a/.gitignore b/.gitignore index 6d6dd1e..047bf9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -.idea/ -*/settings.json +*.env +*.iml diff --git a/Dockerfile b/Dockerfile index 3db8d1f..d09ba7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,26 @@ -FROM golang:alpine3.17 +# Use the official Golang image as the build environment +FROM golang:1.22 as builder -ENV GO111MODULE=on +# Set the working directory inside the container +WORKDIR /app -RUN rm -rf /var/cache/apk/* && \ - rm -rf /tmp/* +# Copy go.mod and go.sum files to the working directory +COPY go.mod go.sum ./ -RUN apk update && apk add --no-cache ethtool nodejs npm bash gcc musl-dev libc-dev curl libffi-dev vim nano ca-certificates protoc +# Download the dependencies +RUN go mod download -RUN npm install pm2 -g -RUN pm2 install pm2-logrotate && pm2 set pm2-logrotate:compress true && pm2 set pm2-logrotate:retain 7 +# Copy the rest of the application code to the working directory +COPY . . -WORKDIR /src -COPY go.mod go.sum ./ -RUN go mod download +# Build the Go application +RUN CGO_ENABLED=0 GOOS=linux go build -o /validator ./cmd/main.go -# EXPOSE 9000 +# Use a minimal base image +FROM scratch -COPY . . -RUN chmod +x build.sh -RUN ./build.sh +# Copy the binary from the builder stage +COPY --from=builder /validator /validator -RUN chmod +x init_processes.sh +# Command to run the application +CMD ["/validator"] diff --git a/build-docker.sh b/build-docker.sh index a20e173..24fab4f 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -1 +1 @@ -docker build -t powerloom-submission-validator . \ No newline at end of file +docker build -t proto-submission-validator . --no-cache diff --git a/build.sh b/build.sh index bb81ab8..f9eacbc 100755 --- a/build.sh +++ b/build.sh @@ -1,2 +1,3 @@ +#bash scripts/generate.sh cd cmd -go build . \ No newline at end of file +go build . diff --git a/cmd/main.go b/cmd/main.go index 21bb9cd..04d33d0 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -2,7 +2,9 @@ package main import ( "sync" + "time" "validator/config" + "validator/pkgs/clients" "validator/pkgs/helpers" ) @@ -11,6 +13,7 @@ func main() { helpers.InitLogger() config.LoadConfig() + clients.InitializeReportingClient(config.SettingsObj.SlackReportingUrl, 60*time.Second) helpers.ConfigureClient() helpers.ConfigureContractInstance() helpers.RedisClient = helpers.NewRedisClient() diff --git a/config/settings.example.json b/config/settings.example.json deleted file mode 100644 index bc42e7a..0000000 --- a/config/settings.example.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ClientUrl": "PROST_RPC_URL", - "ContractAddress": "PROTOCOL_STATE_CONTRACT", - "RedisHost": "REDIS_HOST", - "RedisPort": "REDIS_PORT", - "IPFSUrl": "IPFS_URL", - "SignerAccountAddress": "SIGNER_ACCOUNT_ADDRESS", - "PrivateKey": "SIGNER_ACCOUNT_PRIVATE_KEY", - "ChainID": "PROST_CHAIN_ID", - "BatchSubmissionLimit": "BATCH_SUBMISSION_LIMIT" -} \ No newline at end of file diff --git a/config/settings.go b/config/settings.go index 7fcf869..ebfbdfb 100644 --- a/config/settings.go +++ b/config/settings.go @@ -2,53 +2,127 @@ package config import ( "crypto/ecdsa" - "encoding/json" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" log "github.com/sirupsen/logrus" "os" - "strings" + "strconv" ) var SettingsObj *Settings type Settings struct { - ClientUrl string `json:"ClientUrl"` - ContractAddress string `json:"ContractAddress"` - RedisHost string `json:"RedisHost"` - RedisPort string `json:"RedisPort"` - IPFSUrl string `json:"IPFSUrl"` - SignerAccountAddressStr string `json:"SignerAccountAddress"` - SignerAccountAddress common.Address - PrivateKeyStr string `json:"PrivateKey"` - PrivateKey *ecdsa.PrivateKey - ChainID int `json:"ChainID"` - BlockTime int `json:"BlockTime"` - BatchSubmissionLimit int `json:"BatchSubmissionLimit"` + ClientUrl string + ContractAddress string + DataMarketAddress common.Address + RedisHost string + RedisPort string + IPFSUrl string + SignerAccountAddress common.Address + PrivateKey *ecdsa.PrivateKey + ChainID int + BlockTime int + BatchSubmissionLimit int + SlackReportingUrl string + RedisDB int } func LoadConfig() { - //file, err := os.Open("/Users/mukundrawat/power2/validator-alpha/config/settings.json") - file, err := os.Open(strings.TrimSuffix(os.Getenv("CONFIG_PATH"), "/") + "/config/settings.json") - if err != nil { - log.Fatalf("Failed to open config file: %v", err) + var err error + + missingEnvVars := []string{} + + requiredEnvVars := []string{ + "PROST_RPC_URL", + "PROTOCOL_STATE_CONTRACT", + "REDIS_HOST", + "REDIS_DB", + "REDIS_PORT", + "IPFS_URL", + "DATA_MARKET_CONTRACT", + "SIGNER_ACCOUNT_PRIVATE_KEY", + "BATCH_SUBMISSION_LIMIT", + "PROST_CHAIN_ID", + "BLOCK_TIME", + "SLACK_REPORTING_URL", } - defer func(file *os.File) { - err = file.Close() - if err != nil { - log.Errorf("Unable to close file: %s", err.Error()) + + for envVar := range requiredEnvVars { + if getEnv(requiredEnvVars[envVar], "") == "" { + missingEnvVars = append(missingEnvVars, requiredEnvVars[envVar]) } - }(file) + } + + if len(missingEnvVars) > 0 { + log.Fatalf("Missing required environment variables: %v", missingEnvVars) + } - decoder := json.NewDecoder(file) - config := Settings{} - err = decoder.Decode(&config) + config := Settings{ + ClientUrl: getEnv("PROST_RPC_URL", ""), + ContractAddress: getEnv("PROTOCOL_STATE_CONTRACT", ""), + RedisHost: getEnv("REDIS_HOST", ""), + RedisPort: getEnv("REDIS_PORT", ""), + IPFSUrl: getEnv("IPFS_URL", ""), + SlackReportingUrl: getEnv("SLACK_REPORTING_URL", ""), + } + + config.ChainID, err = strconv.Atoi(getEnv("PROST_CHAIN_ID", "")) if err != nil { - log.Fatalf("Failed to decode config file: %v", err) + log.Fatalf("PROST_CHAIN_ID is not a valid integer") } - config.SignerAccountAddress = common.HexToAddress(config.SignerAccountAddressStr) - config.PrivateKey, _ = crypto.HexToECDSA(config.PrivateKeyStr) + config.BlockTime, err = strconv.Atoi(getEnv("BLOCK_TIME", "")) + if err != nil { + log.Fatalf("BLOCK_TIME is not a valid integer") + } + + config.BatchSubmissionLimit, err = strconv.Atoi(getEnv("BATCH_SUBMISSION_LIMIT", "")) + if err != nil { + log.Fatalf("BATCH_SUBMISSION_LIMIT is not a valid integer") + } + + config.PrivateKey, err = crypto.HexToECDSA(getEnv("SIGNER_ACCOUNT_PRIVATE_KEY", "")) + if err != nil { + log.Fatalf("SIGNER_ACCOUNT_PRIVATE_KEY is not a valid private key") + } + + config.RedisDB, err = strconv.Atoi(getEnv("REDIS_DB", "")) + if err != nil { + log.Fatalf("REDIS_DB is not a valid integer") + } + + // get signer address from private key + config.SignerAccountAddress = crypto.PubkeyToAddress(config.PrivateKey.PublicKey) + + config.DataMarketAddress = common.HexToAddress(getEnv("DATA_MARKET_CONTRACT", "")) + + log.Infoln("Configuration loaded successfully") + log.Infoln("Client URL: ", config.ClientUrl) + log.Infoln("Contract Address: ", config.ContractAddress) + log.Infoln("Redis Host: ", config.RedisHost) + log.Infoln("Redis Port: ", config.RedisPort) + log.Infoln("Redis DB: ", config.RedisDB) + log.Infoln("IPFS URL: ", config.IPFSUrl) + log.Infoln("Chain ID: ", config.ChainID) + log.Infoln("Block Time: ", config.BlockTime) + log.Infoln("Batch Submission Limit: ", config.BatchSubmissionLimit) + log.Infoln("Signer Account Address: ", config.SignerAccountAddress.Hex()) + log.Infoln("Data Market Address: ", config.DataMarketAddress.Hex()) + log.Infoln("Slack Reporting URL: ", config.SlackReportingUrl) SettingsObj = &config } + +func getEnv(key, defaultValue string) string { + value := os.Getenv(key) + if value == "" { + return defaultValue + } + return value +} + +func checkOptionalEnvVar(value, key string) { + if value == "" { + log.Warnf("Optional environment variable %s is not set", key) + } +} diff --git a/go.mod b/go.mod index 386ef3f..8623e26 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,9 @@ module validator -go 1.20 +go 1.22 require ( + github.com/cenkalti/backoff/v4 v4.2.0 github.com/ethereum/go-ethereum v1.13.12 github.com/go-redis/redis/v8 v8.11.5 github.com/ipfs/go-ipfs-api v0.7.0 diff --git a/go.sum b/go.sum index 61fc82f..451d5d8 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,15 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -14,24 +17,37 @@ github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2y github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= 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/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -40,6 +56,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= @@ -47,35 +64,49 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/ipfs/boxo v0.12.0 h1:AXHg/1ONZdRQHQLgG5JHsSC3XoE4DjCAMgK+asZvUcQ= github.com/ipfs/boxo v0.12.0/go.mod h1:xAnfiU6PtxWCnRqu7dcXQ10bB5/kvI1kXRotuGqGBhg= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -83,15 +114,21 @@ github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LK github.com/ipfs/go-ipfs-api v0.7.0 h1:CMBNCUl0b45coC+lQCXEVpMhwoqjiaCwUIrM+coYW2Q= github.com/ipfs/go-ipfs-api v0.7.0/go.mod h1:AIxsTNB0+ZhkqIfTZpdZ0VR/cpX5zrXjATa3prSay3g= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 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/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= @@ -99,15 +136,21 @@ github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnF github.com/libp2p/go-libp2p v0.26.3 h1:6g/psubqwdaBqNNoidbRKSTBEYgaOuKBhHl8Q5tO+PM= github.com/libp2p/go-libp2p v0.26.3/go.mod h1:x75BN32YbwuY0Awm2Uix4d4KOz+/4piInkp4Wr3yOo8= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= 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= @@ -132,20 +175,33 @@ github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqd github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergerad/incremental-merkle-tree v0.0.0-20230715063941-db79af0c6c68 h1:rWmg+/vRrWRWVsuG0BeTLX7QqBdjR2erY9X6g/L/aKE= github.com/sergerad/incremental-merkle-tree v0.0.0-20230715063941-db79af0c6c68/go.mod h1:PtQNNXYnJzHvVGY+VALmPmGh/DpO/YAb0vLxPCuifY4= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= @@ -155,19 +211,25 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 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/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= 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/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= 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/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= @@ -175,6 +237,7 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUU golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -187,7 +250,9 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -196,10 +261,14 @@ google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cn google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= diff --git a/init_processes.sh b/init_processes.sh deleted file mode 100755 index 53d0f35..0000000 --- a/init_processes.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo 'starting pm2...'; - -pm2 start pm2.config.js - -pm2 logs --lines 1000 diff --git a/pkgs/clients/reporting.go b/pkgs/clients/reporting.go new file mode 100644 index 0000000..1aace2a --- /dev/null +++ b/pkgs/clients/reporting.go @@ -0,0 +1,72 @@ +package clients + +import ( + "bytes" + "crypto/tls" + "encoding/json" + "fmt" + log "github.com/sirupsen/logrus" + "net/http" + "time" +) + +var reportingClient *ReportingService + +type ReportingService struct { + url string + client *http.Client +} + +func InitializeReportingClient(url string, timeout time.Duration) { + reportingClient = &ReportingService{ + url: url, client: &http.Client{Timeout: timeout, Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}}, + } +} + +type ValidatorAlert struct { + ProcessName string `json:"process_name"` + ErrorMsg string `json:"error_msg"` + Timestamp string `json:"timestamp"` + Severity string `json:"severity"` +} + +func (s ValidatorAlert) String() string { + return fmt.Sprintf("ProcessName: %s, ErrorMsg: %s, Timestamp: %s, Severity: %s", + s.ProcessName, s.ErrorMsg, s.Timestamp, s.Severity) +} + +// sendPostRequest sends a POST request to the specified URL +func SendFailureNotification(processName, errorMsg, timestamp, severity string) { + + issue := ValidatorAlert{ + processName, + errorMsg, + timestamp, + severity, + } + + jsonData, err := json.Marshal(issue) + log.Debugln("Sending notification: ", string(jsonData)) + if err != nil { + log.Errorln("Unable to marshal notification: ", issue) + return + } + req, err := http.NewRequest("POST", reportingClient.url, bytes.NewBuffer(jsonData)) + if err != nil { + log.Errorln("Error creating request: ", err) + } + + req.Header.Set("Content-Type", "application/json") + + // Send the request + resp, err := reportingClient.client.Do(req) + if err != nil { + log.Errorf("Error sending request for issue %s: %s\n", issue.String(), err) + // Handle error in case of failure + return + } + defer resp.Body.Close() + + // Here you can handle response or further actions + log.Debugln("Reporting service response status: ", resp.Status) +} diff --git a/pkgs/contract/contract/abi.json b/pkgs/contract/contract/abi.json index 14ebae3..053beab 100644 --- a/pkgs/contract/contract/abi.json +++ b/pkgs/contract/contract/abi.json @@ -1,29 +1,113 @@ [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, { "inputs": [ { - "internalType": "uint8", - "name": "epochSize", - "type": "uint8" - }, + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" }, { - "internalType": "uint256", - "name": "sourceChainBlockTime", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "adminAddress", + "type": "address" }, { + "indexed": false, "internalType": "bool", - "name": "useBlockNumberAsEpochId", + "name": "allowed", "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "AdminsUpdated", + "type": "event" }, { "anonymous": false, @@ -31,27 +115,15 @@ { "indexed": true, "internalType": "address", - "name": "snapshotterAddr", + "name": "dataMarketAddress", "type": "address" }, - { - "indexed": false, - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, { "indexed": true, "internalType": "uint256", "name": "epochId", "type": "uint256" }, - { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" - }, { "indexed": false, "internalType": "uint256", @@ -59,7 +131,7 @@ "type": "uint256" } ], - "name": "DelayedSnapshotSubmitted", + "name": "BatchSubmissionsCompleted", "type": "event" }, { @@ -67,20 +139,26 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "snapshotterAddress", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "begin", + "name": "slotId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "end", + "name": "dayId", "type": "uint256" }, { @@ -90,7 +168,7 @@ "type": "uint256" } ], - "name": "EpochReleased", + "name": "DailyTaskCompletedEvent", "type": "event" }, { @@ -99,42 +177,72 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "ownerAddress", "type": "address" }, { - "indexed": true, + "indexed": false, + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + }, + { + "indexed": false, "internalType": "address", - "name": "newOwner", + "name": "protocolState", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "dataMarketAddress", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "DataMarketCreated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "uint256", + "name": "dayId", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "enableEpochId", + "name": "timestamp", "type": "uint256" } ], - "name": "ProjectsUpdated", + "name": "DayStartedEvent", "type": "event" }, { @@ -142,14 +250,20 @@ "inputs": [ { "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "epochId", + "name": "batchId", "type": "uint256" }, { "indexed": true, "internalType": "uint256", - "name": "batchId", + "name": "epochId", "type": "uint256" }, { @@ -157,14 +271,26 @@ "internalType": "uint256", "name": "timestamp", "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "validatorAddr", + "type": "address" } ], - "name": "SnapshotBatchFinalized", + "name": "DelayedAttestationSubmitted", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, { "indexed": false, "internalType": "uint256", @@ -190,98 +316,1411 @@ "type": "uint256" } ], - "name": "SnapshotBatchSubmitted", + "name": "DelayedBatchSubmitted", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "snapshotterAddr", + "type": "address" + }, { "indexed": false, + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "DelayedSnapshotSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, "internalType": "address", - "name": "validatorAddress", + "name": "dataMarketAddress", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, { "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" } ], - "name": "ValidatorsUpdated", + "name": "EpochReleased", "type": "event" }, { - "anonymous": false, + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "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": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectType", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "enableEpochId", + "type": "uint256" + } + ], + "name": "ProjectTypeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "projects", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "status", + "type": "bool[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "enableEpochId", + "type": "uint256" + } + ], + "name": "ProjectsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sequencerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "SequencersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "validatorAddr", + "type": "address" + } + ], + "name": "SnapshotBatchAttestationSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotBatchFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "batchCid", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotBatchSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epochEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "TriggerBatchResubmission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "ValidatorAttestationsInvalidated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "validatorAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "ValidatorsUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "EPOCH_SIZE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "SOURCE_CHAIN_BLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "SOURCE_CHAIN_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "USE_BLOCK_NUMBER_AS_EPOCH_ID", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "allSnapshotters", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectType", + "type": "string" + } + ], + "name": "allowedProjectTypes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_slotIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "_snapshotterAddresses", + "type": "address[]" + } + ], + "name": "assignSnapshotterToSlotBulk", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "attestationSubmissionWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "attestationsReceived", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" + } + ], + "name": "attestationsReceivedCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdAttestationStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "idx", + "type": "uint256" + } + ], + "name": "batchIdDivergentValidators", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdSequencerAttestation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdToProjects", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "batchSubmissionWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "checkDynamicConsensusAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "day", + "type": "uint256" + } + ], + "name": "checkSlotTaskStatusForDay", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + } + ], + "name": "createDataMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "currentBatchId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "currentEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "dailySnapshotQuota", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dataMarketCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + } + ], + "name": "dataMarketEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dataMarketFactory", + "outputs": [ + { + "internalType": "contract DataMarketFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "dataMarketId", + "type": "uint8" + } + ], + "name": "dataMarketIdToAddress", + "outputs": [ + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "dataMarkets", + "outputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "dayCounter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "deploymentBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "endBatchSubmissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "epochIdToBatchIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "epochInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochEnd", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "epochManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "epochsInADay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "forceCompleteConsensusAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "forceSkipEpoch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getEpochManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getSequencerId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "snapshotterAddress", + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", "type": "address" - }, + } + ], + "name": "getSequencers", + "outputs": [ { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "address[]", + "name": "", + "type": "address[]" } ], - "name": "allSnapshottersUpdated", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "snapshotterAddress", + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", "type": "address" }, { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "uint256", + "name": "slotId", + "type": "uint256" } ], - "name": "masterSnapshottersUpdated", - "type": "event" + "name": "getSlotInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "snapshotterAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rewardPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentDaySnapshotCount", + "type": "uint256" + } + ], + "internalType": "struct PowerloomDataMarket.SlotInfo", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - }, - { - "indexed": false, "internalType": "uint256", - "name": "enableEpochId", + "name": "slotId", "type": "uint256" } ], - "name": "pretestProjectsUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DeploymentBlockNumber", + "name": "getSlotRewards", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "rewards", "type": "uint256" } ], @@ -289,13 +1728,19 @@ "type": "function" }, { - "inputs": [], - "name": "EPOCH_SIZE", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getTotalSequencersCount", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "stateMutability": "view", @@ -303,7 +1748,7 @@ }, { "inputs": [], - "name": "SOURCE_CHAIN_BLOCK_TIME", + "name": "getTotalSnapshotterCount", "outputs": [ { "internalType": "uint256", @@ -315,8 +1760,14 @@ "type": "function" }, { - "inputs": [], - "name": "SOURCE_CHAIN_ID", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getTotalValidatorsCount", "outputs": [ { "internalType": "uint256", @@ -328,13 +1779,19 @@ "type": "function" }, { - "inputs": [], - "name": "USE_BLOCK_NUMBER_AS_EPOCH_ID", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getValidators", "outputs": [ { - "internalType": "bool", + "internalType": "address[]", "name": "", - "type": "bool" + "type": "address[]" } ], "stateMutability": "view", @@ -344,27 +1801,21 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "initialOwner", "type": "address" } ], - "name": "allSnapshotters", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { "internalType": "string", @@ -372,12 +1823,12 @@ "type": "string" } ], - "name": "attestationFinalizedStatus", + "name": "lastFinalizedSnapshot", "outputs": [ { - "internalType": "bool", - "name": "finalized", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -386,46 +1837,68 @@ { "inputs": [ { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { - "internalType": "address", - "name": "validatorAddr", - "type": "address" + "internalType": "uint256", + "name": "_dayCounter", + "type": "uint256" } ], - "name": "attestationsReceived", - "outputs": [ + "name": "loadCurrentDay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dayId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "snapshotCount", + "type": "uint256" } ], - "stateMutability": "view", + "name": "loadSlotSubmissions", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", "name": "batchId", "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "rootHash", - "type": "bytes32" } ], - "name": "attestationsReceivedCount", + "name": "maxAttestationFinalizedRootHash", "outputs": [ { - "internalType": "uint256", - "name": "count", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], "stateMutability": "view", @@ -433,18 +1906,23 @@ }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", "name": "batchId", "type": "uint256" } ], - "name": "batchIdAttestationStatus", + "name": "maxAttestationsCount", "outputs": [ { - "internalType": "bool", - "name": "status", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -453,21 +1931,26 @@ { "inputs": [ { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" }, { "internalType": "uint256", - "name": "", + "name": "epochId", "type": "uint256" } ], - "name": "batchIdToProjects", + "name": "maxSnapshotsCid", "outputs": [ { "internalType": "string", - "name": "projectids", + "name": "", "type": "string" } ], @@ -475,52 +1958,88 @@ "type": "function" }, { - "inputs": [], - "name": "currentEpoch", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "minAttestationsForConsensus", "outputs": [ { "internalType": "uint256", - "name": "begin", + "name": "", "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "end", - "type": "uint256" - }, + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "minSubmissionsForConsensus", + "outputs": [ { "internalType": "uint256", - "name": "epochId", + "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + } + ], + "name": "projectFirstEpochId", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "epochInfo", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", "outputs": [ { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blocknumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochEnd", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], "stateMutability": "view", @@ -528,6 +2047,11 @@ }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", "name": "begin", @@ -539,40 +2063,27 @@ "type": "uint256" } ], - "name": "forceSkipEpoch", + "name": "releaseEpoch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getMasterSnapshotters", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getSnapshotters", - "outputs": [ + "inputs": [ { - "internalType": "address[]", - "name": "", - "type": "address[]" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalMasterSnapshotterCount", + "name": "rewardBasePoints", "outputs": [ { "internalType": "uint256", @@ -584,39 +2095,50 @@ "type": "function" }, { - "inputs": [], - "name": "getTotalSnapshotterCount", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "rewardsEnabled", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "getTotalValidatorsCount", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "_sequencerId", + "type": "string" } ], - "stateMutability": "view", + "name": "setSequencerId", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getValidators", + "name": "slotCounter", "outputs": [ { - "internalType": "address[]", + "internalType": "uint256", "name": "", - "type": "address[]" + "type": "uint256" } ], "stateMutability": "view", @@ -625,16 +2147,21 @@ { "inputs": [ { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" } ], - "name": "lastFinalizedSnapshot", + "name": "slotRewardPoints", "outputs": [ { "internalType": "uint256", - "name": "epochId", + "name": "", "type": "uint256" } ], @@ -644,17 +2171,17 @@ { "inputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "name": "masterSnapshotters", + "name": "slotRewards", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -664,16 +2191,16 @@ "inputs": [ { "internalType": "uint256", - "name": "batchId", + "name": "slotId", "type": "uint256" } ], - "name": "maxAttestationFinalizedRootHash", + "name": "slotSnapshotterMapping", "outputs": [ { - "internalType": "bytes32", - "name": "rootHash", - "type": "bytes32" + "internalType": "address", + "name": "", + "type": "address" } ], "stateMutability": "view", @@ -681,17 +2208,27 @@ }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", - "name": "batchId", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dayId", "type": "uint256" } ], - "name": "maxAttestationsCount", + "name": "slotSubmissionCount", "outputs": [ { "internalType": "uint256", - "name": "count", + "name": "", "type": "uint256" } ], @@ -700,31 +2237,52 @@ }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "string", - "name": "", + "name": "projectId", "type": "string" }, { "internalType": "uint256", - "name": "", + "name": "epochId", "type": "uint256" } ], - "name": "maxSnapshotsCid", + "name": "snapshotStatus", "outputs": [ + { + "internalType": "enum PowerloomDataMarket.SnapshotStatus", + "name": "status", + "type": "uint8" + }, { "internalType": "string", - "name": "", + "name": "snapshotCid", "type": "string" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "minSubmissionsForConsensus", + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "snapshotSubmissionWindow", "outputs": [ { "internalType": "uint256", @@ -737,10 +2295,10 @@ }, { "inputs": [], - "name": "owner", + "name": "snapshotterState", "outputs": [ { - "internalType": "address", + "internalType": "contract SnapshotterState", "name": "", "type": "address" } @@ -750,68 +2308,198 @@ }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" + } + ], + "name": "submitBatchAttestation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, { "internalType": "string", "name": "projectId", "type": "string" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + } + ], + "internalType": "struct PowerloomDataMarket.Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], - "name": "projectFirstEpochId", - "outputs": [ + "name": "submitSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "batchCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "string[]", + "name": "projectIds", + "type": "string[]" + }, { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" + "internalType": "string[]", + "name": "snapshotCids", + "type": "string[]" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" } ], - "stateMutability": "view", + "name": "submitSubmissionBatch", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "messageHash", - "type": "bytes32" + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "internalType": "bool", + "name": "enabled", + "type": "bool" } ], - "name": "recoverAddress", - "outputs": [ + "name": "toggleDataMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", "type": "address" } ], - "stateMutability": "pure", + "name": "toggleFallback", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "begin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" } ], - "name": "releaseEpoch", + "name": "toggleRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -819,69 +2507,86 @@ { "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "enum PowerloomDataMarket.Role", + "name": "role", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_addresses", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_status", + "type": "bool[]" } ], - "name": "snapshotStatus", - "outputs": [ + "name": "updateAddresses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "enum PowerloomProtocolState.SnapshotStatus", - "name": "status", - "type": "uint8" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { "internalType": "string", - "name": "snapshotCid", + "name": "_projectType", "type": "string" }, { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" + "internalType": "bool", + "name": "_status", + "type": "bool" } ], - "stateMutability": "view", + "name": "updateAllowedProjectType", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "snapshotSubmissionWindow", - "outputs": [ + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "newattestationSubmissionWindow", "type": "uint256" } ], - "stateMutability": "view", + "name": "updateAttestationSubmissionWindow", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { "internalType": "uint256", - "name": "epochId", + "name": "newbatchSubmissionWindow", "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "finalizedCidsRootHash", - "type": "bytes32" } ], - "name": "submitBatchAttestation", + "name": "updateBatchSubmissionWindow", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -889,32 +2594,17 @@ { "inputs": [ { - "internalType": "string", - "name": "batchCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { "internalType": "uint256", - "name": "epochId", + "name": "_dailySnapshotQuota", "type": "uint256" - }, - { - "internalType": "string[]", - "name": "projectIds", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "snapshotCids", - "type": "string[]" } ], - "name": "submitSubmissionBatch", + "name": "updateDailySnapshotQuota", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -923,11 +2613,11 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "_address", "type": "address" } ], - "name": "transferOwnership", + "name": "updateDataMarketFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -935,26 +2625,31 @@ { "inputs": [ { - "internalType": "address[]", - "name": "_snapshotters", - "type": "address[]" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { - "internalType": "bool[]", - "name": "_status", - "type": "bool[]" + "internalType": "address", + "name": "_address", + "type": "address" } ], - "name": "updateAllSnapshotters", + "name": "updateEpochManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "address[]", - "name": "_snapshotters", + "name": "_fallbackNodes", "type": "address[]" }, { @@ -963,33 +2658,43 @@ "type": "bool[]" } ], - "name": "updateMasterSnapshotters", + "name": "updateFallbackNodes", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", - "name": "_minSubmissionsForConsensus", + "name": "_minAttestationsForConsensus", "type": "uint256" } ], - "name": "updateMinSnapshottersForConsensus", + "name": "updateMinAttestationsForConsensus", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, { "internalType": "uint256", - "name": "newsnapshotSubmissionWindow", + "name": "_minSubmissionsForConsensus", "type": "uint256" } ], - "name": "updateSnapshotSubmissionWindow", + "name": "updateMinSnapshottersForConsensus", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -997,9 +2702,14 @@ { "inputs": [ { - "internalType": "address[]", - "name": "_validators", - "type": "address[]" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string[]", + "name": "_projects", + "type": "string[]" }, { "internalType": "bool[]", @@ -1007,7 +2717,7 @@ "type": "bool[]" } ], - "name": "updateValidators", + "name": "updateProjects", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1015,67 +2725,96 @@ { "inputs": [ { - "internalType": "string", - "name": "snapshotCid", - "type": "string" + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { "internalType": "uint256", - "name": "epochId", + "name": "newRewardBasePoints", "type": "uint256" + } + ], + "name": "updateRewardBasePoints", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "uint256[]", + "name": "slotIds", + "type": "uint256[]" }, { - "components": [ - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "internalType": "struct PowerloomProtocolState.Request", - "name": "request", - "type": "tuple" + "internalType": "uint256[]", + "name": "submissionsList", + "type": "uint256[]" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "internalType": "uint256", + "name": "day", + "type": "uint256" + } + ], + "name": "updateRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" }, + { + "internalType": "uint256", + "name": "newsnapshotSubmissionWindow", + "type": "uint256" + } + ], + "name": "updateSnapshotSubmissionWindow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "signer", + "name": "_address", "type": "address" } ], - "name": "verify", - "outputs": [ + "name": "updateSnapshotterState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "stateMutability": "view", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" } ] \ No newline at end of file diff --git a/pkgs/contract/contract/contract.go b/pkgs/contract/contract/contract.go index 01f4e1b..8a282d7 100644 --- a/pkgs/contract/contract/contract.go +++ b/pkgs/contract/contract/contract.go @@ -29,17 +29,26 @@ var ( _ = abi.ConvertType ) -// PowerloomProtocolStateRequest is an auto generated low-level Go binding around an user-defined struct. -type PowerloomProtocolStateRequest struct { +// PowerloomDataMarketRequest is an auto generated low-level Go binding around an user-defined struct. +type PowerloomDataMarketRequest struct { + SlotId *big.Int Deadline *big.Int SnapshotCid string EpochId *big.Int ProjectId string } +// PowerloomDataMarketSlotInfo is an auto generated low-level Go binding around an user-defined struct. +type PowerloomDataMarketSlotInfo struct { + SlotId *big.Int + SnapshotterAddress common.Address + RewardPoints *big.Int + CurrentDaySnapshotCount *big.Int +} + // ContractMetaData contains all meta data concerning the Contract contract. var ContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"epochSize\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainBlockTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"useBlockNumberAsEpochId\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"snapshotterAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DelayedSnapshotSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"EpochReleased\",\"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\":false,\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"enableEpochId\",\"type\":\"uint256\"}],\"name\":\"ProjectsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotBatchFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"batchCid\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotBatchSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"ValidatorsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"snapshotterAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"allSnapshottersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"snapshotterAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"masterSnapshottersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"enableEpochId\",\"type\":\"uint256\"}],\"name\":\"pretestProjectsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DeploymentBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EPOCH_SIZE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOURCE_CHAIN_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOURCE_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USE_BLOCK_NUMBER_AS_EPOCH_ID\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allSnapshotters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"name\":\"attestationFinalizedStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"finalized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"validatorAddr\",\"type\":\"address\"}],\"name\":\"attestationsReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"attestationsReceivedCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"batchIdAttestationStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"batchIdToProjects\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"projectids\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"epochInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocknumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochEnd\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"forceSkipEpoch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMasterSnapshotters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSnapshotters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalMasterSnapshotterCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalSnapshotterCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalValidatorsCount\",\"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\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"name\":\"lastFinalizedSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"masterSnapshotters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"maxAttestationFinalizedRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"maxAttestationsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"maxSnapshotsCid\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minSubmissionsForConsensus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"name\":\"projectFirstEpochId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"recoverAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"releaseEpoch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshotStatus\",\"outputs\":[{\"internalType\":\"enumPowerloomProtocolState.SnapshotStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotSubmissionWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"finalizedCidsRootHash\",\"type\":\"bytes32\"}],\"name\":\"submitBatchAttestation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"batchCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string[]\",\"name\":\"projectIds\",\"type\":\"string[]\"},{\"internalType\":\"string[]\",\"name\":\"snapshotCids\",\"type\":\"string[]\"}],\"name\":\"submitSubmissionBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_snapshotters\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateAllSnapshotters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_snapshotters\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateMasterSnapshotters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minSubmissionsForConsensus\",\"type\":\"uint256\"}],\"name\":\"updateMinSnapshottersForConsensus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newsnapshotSubmissionWindow\",\"type\":\"uint256\"}],\"name\":\"updateSnapshotSubmissionWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_validators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateValidators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"internalType\":\"structPowerloomProtocolState.Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AdminsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"BatchSubmissionsCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"snapshotterAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dayId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DailyTaskCompletedEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"epochSize\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceChainBlockTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"useBlockNumberAsEpochId\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolState\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"}],\"name\":\"DataMarketCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dayId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DayStartedEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"validatorAddr\",\"type\":\"address\"}],\"name\":\"DelayedAttestationSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"batchCid\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DelayedBatchSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"snapshotterAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"DelayedSnapshotSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"EpochReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"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\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"projectType\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"enableEpochId\",\"type\":\"uint256\"}],\"name\":\"ProjectTypeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"projects\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"status\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"enableEpochId\",\"type\":\"uint256\"}],\"name\":\"ProjectsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"SequencersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"validatorAddr\",\"type\":\"address\"}],\"name\":\"SnapshotBatchAttestationSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotBatchFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"batchCid\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotBatchSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epochEnd\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotFinalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"TriggerBatchResubmission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"ValidatorAttestationsInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"ValidatorsUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"EPOCH_SIZE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"SOURCE_CHAIN_BLOCK_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"SOURCE_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_INTERFACE_VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"USE_BLOCK_NUMBER_AS_EPOCH_ID\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"allSnapshotters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"projectType\",\"type\":\"string\"}],\"name\":\"allowedProjectTypes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_slotIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"_snapshotterAddresses\",\"type\":\"address[]\"}],\"name\":\"assignSnapshotterToSlotBulk\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"attestationSubmissionWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"attestationsReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"finalizedCidsRootHash\",\"type\":\"bytes32\"}],\"name\":\"attestationsReceivedCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"batchIdAttestationStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"batchIdDivergentValidators\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"batchIdSequencerAttestation\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"batchIdToProjects\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"batchSubmissionWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"checkDynamicConsensusAttestations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"checkSlotTaskStatusForDay\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"epochSize\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainBlockTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"useBlockNumberAsEpochId\",\"type\":\"bool\"}],\"name\":\"createDataMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"currentBatchId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"dailySnapshotQuota\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataMarketCount\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"}],\"name\":\"dataMarketEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataMarketFactory\",\"outputs\":[{\"internalType\":\"contractDataMarketFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"dataMarketId\",\"type\":\"uint8\"}],\"name\":\"dataMarketIdToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dataMarkets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"epochSize\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sourceChainBlockTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"useBlockNumberAsEpochId\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"dayCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"deploymentBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"endBatchSubmissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"epochIdToBatchIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"epochInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blocknumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochEnd\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"epochManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"epochsInADay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"forceCompleteConsensusAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"forceSkipEpoch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getEpochManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getSequencerId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getSequencers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"}],\"name\":\"getSlotInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"snapshotterAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rewardPoints\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentDaySnapshotCount\",\"type\":\"uint256\"}],\"internalType\":\"structPowerloomDataMarket.SlotInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"}],\"name\":\"getSlotRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getTotalSequencersCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalSnapshotterCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getTotalValidatorsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"getValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"name\":\"lastFinalizedSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_dayCounter\",\"type\":\"uint256\"}],\"name\":\"loadCurrentDay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dayId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"snapshotCount\",\"type\":\"uint256\"}],\"name\":\"loadSlotSubmissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"maxAttestationFinalizedRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"}],\"name\":\"maxAttestationsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"maxSnapshotsCid\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"minAttestationsForConsensus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"minSubmissionsForConsensus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"name\":\"projectFirstEpochId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"begin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"releaseEpoch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"rewardBasePoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"rewardsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_sequencerId\",\"type\":\"string\"}],\"name\":\"setSequencerId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slotCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"}],\"name\":\"slotRewardPoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"slotRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"}],\"name\":\"slotSnapshotterMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dayId\",\"type\":\"uint256\"}],\"name\":\"slotSubmissionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"}],\"name\":\"snapshotStatus\",\"outputs\":[{\"internalType\":\"enumPowerloomDataMarket.SnapshotStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"snapshotSubmissionWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotterState\",\"outputs\":[{\"internalType\":\"contractSnapshotterState\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"finalizedCidsRootHash\",\"type\":\"bytes32\"}],\"name\":\"submitBatchAttestation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"slotId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"snapshotCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"projectId\",\"type\":\"string\"}],\"internalType\":\"structPowerloomDataMarket.Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"submitSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"batchCid\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"batchId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochId\",\"type\":\"uint256\"},{\"internalType\":\"string[]\",\"name\":\"projectIds\",\"type\":\"string[]\"},{\"internalType\":\"string[]\",\"name\":\"snapshotCids\",\"type\":\"string[]\"},{\"internalType\":\"bytes32\",\"name\":\"finalizedCidsRootHash\",\"type\":\"bytes32\"}],\"name\":\"submitSubmissionBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dataMarketAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"toggleDataMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"toggleFallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"}],\"name\":\"toggleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"enumPowerloomDataMarket.Role\",\"name\":\"role\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_projectType\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"updateAllowedProjectType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newattestationSubmissionWindow\",\"type\":\"uint256\"}],\"name\":\"updateAttestationSubmissionWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newbatchSubmissionWindow\",\"type\":\"uint256\"}],\"name\":\"updateBatchSubmissionWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_dailySnapshotQuota\",\"type\":\"uint256\"}],\"name\":\"updateDailySnapshotQuota\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"updateDataMarketFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"updateEpochManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_fallbackNodes\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateFallbackNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minAttestationsForConsensus\",\"type\":\"uint256\"}],\"name\":\"updateMinAttestationsForConsensus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minSubmissionsForConsensus\",\"type\":\"uint256\"}],\"name\":\"updateMinSnapshottersForConsensus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"_projects\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"_status\",\"type\":\"bool[]\"}],\"name\":\"updateProjects\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newRewardBasePoints\",\"type\":\"uint256\"}],\"name\":\"updateRewardBasePoints\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"slotIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"submissionsList\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"updateRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractPowerloomDataMarket\",\"name\":\"dataMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newsnapshotSubmissionWindow\",\"type\":\"uint256\"}],\"name\":\"updateSnapshotSubmissionWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"updateSnapshotterState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } // ContractABI is the input ABI used to generate the binding from. @@ -188,74 +197,74 @@ func (_Contract *ContractTransactorRaw) Transact(opts *bind.TransactOpts, method return _Contract.Contract.contract.Transact(opts, method, params...) } -// DeploymentBlockNumber is a free data retrieval call binding the contract method 0xb1288f71. +// EPOCHSIZE is a free data retrieval call binding the contract method 0xc12c2aa9. // -// Solidity: function DeploymentBlockNumber() view returns(uint256) -func (_Contract *ContractCaller) DeploymentBlockNumber(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function EPOCH_SIZE(address dataMarket) view returns(uint8) +func (_Contract *ContractCaller) EPOCHSIZE(opts *bind.CallOpts, dataMarket common.Address) (uint8, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "DeploymentBlockNumber") + err := _Contract.contract.Call(opts, &out, "EPOCH_SIZE", dataMarket) if err != nil { - return *new(*big.Int), err + return *new(uint8), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } -// DeploymentBlockNumber is a free data retrieval call binding the contract method 0xb1288f71. +// EPOCHSIZE is a free data retrieval call binding the contract method 0xc12c2aa9. // -// Solidity: function DeploymentBlockNumber() view returns(uint256) -func (_Contract *ContractSession) DeploymentBlockNumber() (*big.Int, error) { - return _Contract.Contract.DeploymentBlockNumber(&_Contract.CallOpts) +// Solidity: function EPOCH_SIZE(address dataMarket) view returns(uint8) +func (_Contract *ContractSession) EPOCHSIZE(dataMarket common.Address) (uint8, error) { + return _Contract.Contract.EPOCHSIZE(&_Contract.CallOpts, dataMarket) } -// DeploymentBlockNumber is a free data retrieval call binding the contract method 0xb1288f71. +// EPOCHSIZE is a free data retrieval call binding the contract method 0xc12c2aa9. // -// Solidity: function DeploymentBlockNumber() view returns(uint256) -func (_Contract *ContractCallerSession) DeploymentBlockNumber() (*big.Int, error) { - return _Contract.Contract.DeploymentBlockNumber(&_Contract.CallOpts) +// Solidity: function EPOCH_SIZE(address dataMarket) view returns(uint8) +func (_Contract *ContractCallerSession) EPOCHSIZE(dataMarket common.Address) (uint8, error) { + return _Contract.Contract.EPOCHSIZE(&_Contract.CallOpts, dataMarket) } -// EPOCHSIZE is a free data retrieval call binding the contract method 0x62656003. +// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x0f34e6a9. // -// Solidity: function EPOCH_SIZE() view returns(uint8) -func (_Contract *ContractCaller) EPOCHSIZE(opts *bind.CallOpts) (uint8, error) { +// Solidity: function SOURCE_CHAIN_BLOCK_TIME(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) SOURCECHAINBLOCKTIME(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "EPOCH_SIZE") + err := _Contract.contract.Call(opts, &out, "SOURCE_CHAIN_BLOCK_TIME", dataMarket) if err != nil { - return *new(uint8), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// EPOCHSIZE is a free data retrieval call binding the contract method 0x62656003. +// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x0f34e6a9. // -// Solidity: function EPOCH_SIZE() view returns(uint8) -func (_Contract *ContractSession) EPOCHSIZE() (uint8, error) { - return _Contract.Contract.EPOCHSIZE(&_Contract.CallOpts) +// Solidity: function SOURCE_CHAIN_BLOCK_TIME(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) SOURCECHAINBLOCKTIME(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SOURCECHAINBLOCKTIME(&_Contract.CallOpts, dataMarket) } -// EPOCHSIZE is a free data retrieval call binding the contract method 0x62656003. +// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x0f34e6a9. // -// Solidity: function EPOCH_SIZE() view returns(uint8) -func (_Contract *ContractCallerSession) EPOCHSIZE() (uint8, error) { - return _Contract.Contract.EPOCHSIZE(&_Contract.CallOpts) +// Solidity: function SOURCE_CHAIN_BLOCK_TIME(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) SOURCECHAINBLOCKTIME(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SOURCECHAINBLOCKTIME(&_Contract.CallOpts, dataMarket) } -// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x351b6155. +// SOURCECHAINID is a free data retrieval call binding the contract method 0x40e29707. // -// Solidity: function SOURCE_CHAIN_BLOCK_TIME() view returns(uint256) -func (_Contract *ContractCaller) SOURCECHAINBLOCKTIME(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function SOURCE_CHAIN_ID(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) SOURCECHAINID(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "SOURCE_CHAIN_BLOCK_TIME") + err := _Contract.contract.Call(opts, &out, "SOURCE_CHAIN_ID", dataMarket) if err != nil { return *new(*big.Int), err @@ -267,57 +276,57 @@ func (_Contract *ContractCaller) SOURCECHAINBLOCKTIME(opts *bind.CallOpts) (*big } -// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x351b6155. +// SOURCECHAINID is a free data retrieval call binding the contract method 0x40e29707. // -// Solidity: function SOURCE_CHAIN_BLOCK_TIME() view returns(uint256) -func (_Contract *ContractSession) SOURCECHAINBLOCKTIME() (*big.Int, error) { - return _Contract.Contract.SOURCECHAINBLOCKTIME(&_Contract.CallOpts) +// Solidity: function SOURCE_CHAIN_ID(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) SOURCECHAINID(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SOURCECHAINID(&_Contract.CallOpts, dataMarket) } -// SOURCECHAINBLOCKTIME is a free data retrieval call binding the contract method 0x351b6155. +// SOURCECHAINID is a free data retrieval call binding the contract method 0x40e29707. // -// Solidity: function SOURCE_CHAIN_BLOCK_TIME() view returns(uint256) -func (_Contract *ContractCallerSession) SOURCECHAINBLOCKTIME() (*big.Int, error) { - return _Contract.Contract.SOURCECHAINBLOCKTIME(&_Contract.CallOpts) +// Solidity: function SOURCE_CHAIN_ID(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) SOURCECHAINID(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SOURCECHAINID(&_Contract.CallOpts, dataMarket) } -// SOURCECHAINID is a free data retrieval call binding the contract method 0x74be2150. +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. // -// Solidity: function SOURCE_CHAIN_ID() view returns(uint256) -func (_Contract *ContractCaller) SOURCECHAINID(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Contract *ContractCaller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "SOURCE_CHAIN_ID") + err := _Contract.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") if err != nil { - return *new(*big.Int), err + return *new(string), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } -// SOURCECHAINID is a free data retrieval call binding the contract method 0x74be2150. +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. // -// Solidity: function SOURCE_CHAIN_ID() view returns(uint256) -func (_Contract *ContractSession) SOURCECHAINID() (*big.Int, error) { - return _Contract.Contract.SOURCECHAINID(&_Contract.CallOpts) +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Contract *ContractSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Contract.Contract.UPGRADEINTERFACEVERSION(&_Contract.CallOpts) } -// SOURCECHAINID is a free data retrieval call binding the contract method 0x74be2150. +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. // -// Solidity: function SOURCE_CHAIN_ID() view returns(uint256) -func (_Contract *ContractCallerSession) SOURCECHAINID() (*big.Int, error) { - return _Contract.Contract.SOURCECHAINID(&_Contract.CallOpts) +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Contract *ContractCallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Contract.Contract.UPGRADEINTERFACEVERSION(&_Contract.CallOpts) } -// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x2d46247b. +// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x865fb4eb. // -// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID() view returns(bool) -func (_Contract *ContractCaller) USEBLOCKNUMBERASEPOCHID(opts *bind.CallOpts) (bool, error) { +// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID(address dataMarket) view returns(bool) +func (_Contract *ContractCaller) USEBLOCKNUMBERASEPOCHID(opts *bind.CallOpts, dataMarket common.Address) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "USE_BLOCK_NUMBER_AS_EPOCH_ID") + err := _Contract.contract.Call(opts, &out, "USE_BLOCK_NUMBER_AS_EPOCH_ID", dataMarket) if err != nil { return *new(bool), err @@ -329,26 +338,26 @@ func (_Contract *ContractCaller) USEBLOCKNUMBERASEPOCHID(opts *bind.CallOpts) (b } -// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x2d46247b. +// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x865fb4eb. // -// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID() view returns(bool) -func (_Contract *ContractSession) USEBLOCKNUMBERASEPOCHID() (bool, error) { - return _Contract.Contract.USEBLOCKNUMBERASEPOCHID(&_Contract.CallOpts) +// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID(address dataMarket) view returns(bool) +func (_Contract *ContractSession) USEBLOCKNUMBERASEPOCHID(dataMarket common.Address) (bool, error) { + return _Contract.Contract.USEBLOCKNUMBERASEPOCHID(&_Contract.CallOpts, dataMarket) } -// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x2d46247b. +// USEBLOCKNUMBERASEPOCHID is a free data retrieval call binding the contract method 0x865fb4eb. // -// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID() view returns(bool) -func (_Contract *ContractCallerSession) USEBLOCKNUMBERASEPOCHID() (bool, error) { - return _Contract.Contract.USEBLOCKNUMBERASEPOCHID(&_Contract.CallOpts) +// Solidity: function USE_BLOCK_NUMBER_AS_EPOCH_ID(address dataMarket) view returns(bool) +func (_Contract *ContractCallerSession) USEBLOCKNUMBERASEPOCHID(dataMarket common.Address) (bool, error) { + return _Contract.Contract.USEBLOCKNUMBERASEPOCHID(&_Contract.CallOpts, dataMarket) } // AllSnapshotters is a free data retrieval call binding the contract method 0x3d15d0f4. // -// Solidity: function allSnapshotters(address ) view returns(bool) -func (_Contract *ContractCaller) AllSnapshotters(opts *bind.CallOpts, arg0 common.Address) (bool, error) { +// Solidity: function allSnapshotters(address addr) view returns(bool) +func (_Contract *ContractCaller) AllSnapshotters(opts *bind.CallOpts, addr common.Address) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "allSnapshotters", arg0) + err := _Contract.contract.Call(opts, &out, "allSnapshotters", addr) if err != nil { return *new(bool), err @@ -362,24 +371,24 @@ func (_Contract *ContractCaller) AllSnapshotters(opts *bind.CallOpts, arg0 commo // AllSnapshotters is a free data retrieval call binding the contract method 0x3d15d0f4. // -// Solidity: function allSnapshotters(address ) view returns(bool) -func (_Contract *ContractSession) AllSnapshotters(arg0 common.Address) (bool, error) { - return _Contract.Contract.AllSnapshotters(&_Contract.CallOpts, arg0) +// Solidity: function allSnapshotters(address addr) view returns(bool) +func (_Contract *ContractSession) AllSnapshotters(addr common.Address) (bool, error) { + return _Contract.Contract.AllSnapshotters(&_Contract.CallOpts, addr) } // AllSnapshotters is a free data retrieval call binding the contract method 0x3d15d0f4. // -// Solidity: function allSnapshotters(address ) view returns(bool) -func (_Contract *ContractCallerSession) AllSnapshotters(arg0 common.Address) (bool, error) { - return _Contract.Contract.AllSnapshotters(&_Contract.CallOpts, arg0) +// Solidity: function allSnapshotters(address addr) view returns(bool) +func (_Contract *ContractCallerSession) AllSnapshotters(addr common.Address) (bool, error) { + return _Contract.Contract.AllSnapshotters(&_Contract.CallOpts, addr) } -// AttestationFinalizedStatus is a free data retrieval call binding the contract method 0xbfefe303. +// AllowedProjectTypes is a free data retrieval call binding the contract method 0xc17b3434. // -// Solidity: function attestationFinalizedStatus(uint256 epochId, string projectId) view returns(bool finalized) -func (_Contract *ContractCaller) AttestationFinalizedStatus(opts *bind.CallOpts, epochId *big.Int, projectId string) (bool, error) { +// Solidity: function allowedProjectTypes(address dataMarket, string projectType) view returns(bool) +func (_Contract *ContractCaller) AllowedProjectTypes(opts *bind.CallOpts, dataMarket common.Address, projectType string) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "attestationFinalizedStatus", epochId, projectId) + err := _Contract.contract.Call(opts, &out, "allowedProjectTypes", dataMarket, projectType) if err != nil { return *new(bool), err @@ -391,374 +400,336 @@ func (_Contract *ContractCaller) AttestationFinalizedStatus(opts *bind.CallOpts, } -// AttestationFinalizedStatus is a free data retrieval call binding the contract method 0xbfefe303. +// AllowedProjectTypes is a free data retrieval call binding the contract method 0xc17b3434. // -// Solidity: function attestationFinalizedStatus(uint256 epochId, string projectId) view returns(bool finalized) -func (_Contract *ContractSession) AttestationFinalizedStatus(epochId *big.Int, projectId string) (bool, error) { - return _Contract.Contract.AttestationFinalizedStatus(&_Contract.CallOpts, epochId, projectId) +// Solidity: function allowedProjectTypes(address dataMarket, string projectType) view returns(bool) +func (_Contract *ContractSession) AllowedProjectTypes(dataMarket common.Address, projectType string) (bool, error) { + return _Contract.Contract.AllowedProjectTypes(&_Contract.CallOpts, dataMarket, projectType) } -// AttestationFinalizedStatus is a free data retrieval call binding the contract method 0xbfefe303. +// AllowedProjectTypes is a free data retrieval call binding the contract method 0xc17b3434. // -// Solidity: function attestationFinalizedStatus(uint256 epochId, string projectId) view returns(bool finalized) -func (_Contract *ContractCallerSession) AttestationFinalizedStatus(epochId *big.Int, projectId string) (bool, error) { - return _Contract.Contract.AttestationFinalizedStatus(&_Contract.CallOpts, epochId, projectId) +// Solidity: function allowedProjectTypes(address dataMarket, string projectType) view returns(bool) +func (_Contract *ContractCallerSession) AllowedProjectTypes(dataMarket common.Address, projectType string) (bool, error) { + return _Contract.Contract.AllowedProjectTypes(&_Contract.CallOpts, dataMarket, projectType) } -// AttestationsReceived is a free data retrieval call binding the contract method 0x33420a0c. +// AttestationSubmissionWindow is a free data retrieval call binding the contract method 0xe1d5fbce. // -// Solidity: function attestationsReceived(uint256 batchId, address validatorAddr) view returns(bool) -func (_Contract *ContractCaller) AttestationsReceived(opts *bind.CallOpts, batchId *big.Int, validatorAddr common.Address) (bool, error) { +// Solidity: function attestationSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) AttestationSubmissionWindow(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "attestationsReceived", batchId, validatorAddr) + err := _Contract.contract.Call(opts, &out, "attestationSubmissionWindow", dataMarket) if err != nil { - return *new(bool), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// AttestationsReceived is a free data retrieval call binding the contract method 0x33420a0c. +// AttestationSubmissionWindow is a free data retrieval call binding the contract method 0xe1d5fbce. // -// Solidity: function attestationsReceived(uint256 batchId, address validatorAddr) view returns(bool) -func (_Contract *ContractSession) AttestationsReceived(batchId *big.Int, validatorAddr common.Address) (bool, error) { - return _Contract.Contract.AttestationsReceived(&_Contract.CallOpts, batchId, validatorAddr) +// Solidity: function attestationSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) AttestationSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.AttestationSubmissionWindow(&_Contract.CallOpts, dataMarket) } -// AttestationsReceived is a free data retrieval call binding the contract method 0x33420a0c. +// AttestationSubmissionWindow is a free data retrieval call binding the contract method 0xe1d5fbce. // -// Solidity: function attestationsReceived(uint256 batchId, address validatorAddr) view returns(bool) -func (_Contract *ContractCallerSession) AttestationsReceived(batchId *big.Int, validatorAddr common.Address) (bool, error) { - return _Contract.Contract.AttestationsReceived(&_Contract.CallOpts, batchId, validatorAddr) +// Solidity: function attestationSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) AttestationSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.AttestationSubmissionWindow(&_Contract.CallOpts, dataMarket) } -// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x66f94346. +// AttestationsReceived is a free data retrieval call binding the contract method 0xb09c5e2f. // -// Solidity: function attestationsReceivedCount(uint256 batchId, bytes32 rootHash) view returns(uint256 count) -func (_Contract *ContractCaller) AttestationsReceivedCount(opts *bind.CallOpts, batchId *big.Int, rootHash [32]byte) (*big.Int, error) { +// Solidity: function attestationsReceived(address dataMarket, uint256 batchId, address validator) view returns(bool) +func (_Contract *ContractCaller) AttestationsReceived(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int, validator common.Address) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "attestationsReceivedCount", batchId, rootHash) + err := _Contract.contract.Call(opts, &out, "attestationsReceived", dataMarket, batchId, validator) if err != nil { - return *new(*big.Int), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x66f94346. +// AttestationsReceived is a free data retrieval call binding the contract method 0xb09c5e2f. // -// Solidity: function attestationsReceivedCount(uint256 batchId, bytes32 rootHash) view returns(uint256 count) -func (_Contract *ContractSession) AttestationsReceivedCount(batchId *big.Int, rootHash [32]byte) (*big.Int, error) { - return _Contract.Contract.AttestationsReceivedCount(&_Contract.CallOpts, batchId, rootHash) +// Solidity: function attestationsReceived(address dataMarket, uint256 batchId, address validator) view returns(bool) +func (_Contract *ContractSession) AttestationsReceived(dataMarket common.Address, batchId *big.Int, validator common.Address) (bool, error) { + return _Contract.Contract.AttestationsReceived(&_Contract.CallOpts, dataMarket, batchId, validator) } -// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x66f94346. +// AttestationsReceived is a free data retrieval call binding the contract method 0xb09c5e2f. // -// Solidity: function attestationsReceivedCount(uint256 batchId, bytes32 rootHash) view returns(uint256 count) -func (_Contract *ContractCallerSession) AttestationsReceivedCount(batchId *big.Int, rootHash [32]byte) (*big.Int, error) { - return _Contract.Contract.AttestationsReceivedCount(&_Contract.CallOpts, batchId, rootHash) +// Solidity: function attestationsReceived(address dataMarket, uint256 batchId, address validator) view returns(bool) +func (_Contract *ContractCallerSession) AttestationsReceived(dataMarket common.Address, batchId *big.Int, validator common.Address) (bool, error) { + return _Contract.Contract.AttestationsReceived(&_Contract.CallOpts, dataMarket, batchId, validator) } -// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xa047977d. +// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x97b0b79f. // -// Solidity: function batchIdAttestationStatus(uint256 batchId) view returns(bool status) -func (_Contract *ContractCaller) BatchIdAttestationStatus(opts *bind.CallOpts, batchId *big.Int) (bool, error) { +// Solidity: function attestationsReceivedCount(address dataMarket, uint256 batchId, bytes32 finalizedCidsRootHash) view returns(uint256) +func (_Contract *ContractCaller) AttestationsReceivedCount(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int, finalizedCidsRootHash [32]byte) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "batchIdAttestationStatus", batchId) + err := _Contract.contract.Call(opts, &out, "attestationsReceivedCount", dataMarket, batchId, finalizedCidsRootHash) if err != nil { - return *new(bool), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xa047977d. +// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x97b0b79f. // -// Solidity: function batchIdAttestationStatus(uint256 batchId) view returns(bool status) -func (_Contract *ContractSession) BatchIdAttestationStatus(batchId *big.Int) (bool, error) { - return _Contract.Contract.BatchIdAttestationStatus(&_Contract.CallOpts, batchId) +// Solidity: function attestationsReceivedCount(address dataMarket, uint256 batchId, bytes32 finalizedCidsRootHash) view returns(uint256) +func (_Contract *ContractSession) AttestationsReceivedCount(dataMarket common.Address, batchId *big.Int, finalizedCidsRootHash [32]byte) (*big.Int, error) { + return _Contract.Contract.AttestationsReceivedCount(&_Contract.CallOpts, dataMarket, batchId, finalizedCidsRootHash) } -// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xa047977d. +// AttestationsReceivedCount is a free data retrieval call binding the contract method 0x97b0b79f. // -// Solidity: function batchIdAttestationStatus(uint256 batchId) view returns(bool status) -func (_Contract *ContractCallerSession) BatchIdAttestationStatus(batchId *big.Int) (bool, error) { - return _Contract.Contract.BatchIdAttestationStatus(&_Contract.CallOpts, batchId) +// Solidity: function attestationsReceivedCount(address dataMarket, uint256 batchId, bytes32 finalizedCidsRootHash) view returns(uint256) +func (_Contract *ContractCallerSession) AttestationsReceivedCount(dataMarket common.Address, batchId *big.Int, finalizedCidsRootHash [32]byte) (*big.Int, error) { + return _Contract.Contract.AttestationsReceivedCount(&_Contract.CallOpts, dataMarket, batchId, finalizedCidsRootHash) } -// BatchIdToProjects is a free data retrieval call binding the contract method 0x510c9f4c. +// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xd4e1a3d1. // -// Solidity: function batchIdToProjects(uint256 batchId, uint256 ) view returns(string projectids) -func (_Contract *ContractCaller) BatchIdToProjects(opts *bind.CallOpts, batchId *big.Int, arg1 *big.Int) (string, error) { +// Solidity: function batchIdAttestationStatus(address dataMarket, uint256 batchId) view returns(bool) +func (_Contract *ContractCaller) BatchIdAttestationStatus(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "batchIdToProjects", batchId, arg1) + err := _Contract.contract.Call(opts, &out, "batchIdAttestationStatus", dataMarket, batchId) if err != nil { - return *new(string), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(string)).(*string) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// BatchIdToProjects is a free data retrieval call binding the contract method 0x510c9f4c. +// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xd4e1a3d1. // -// Solidity: function batchIdToProjects(uint256 batchId, uint256 ) view returns(string projectids) -func (_Contract *ContractSession) BatchIdToProjects(batchId *big.Int, arg1 *big.Int) (string, error) { - return _Contract.Contract.BatchIdToProjects(&_Contract.CallOpts, batchId, arg1) +// Solidity: function batchIdAttestationStatus(address dataMarket, uint256 batchId) view returns(bool) +func (_Contract *ContractSession) BatchIdAttestationStatus(dataMarket common.Address, batchId *big.Int) (bool, error) { + return _Contract.Contract.BatchIdAttestationStatus(&_Contract.CallOpts, dataMarket, batchId) } -// BatchIdToProjects is a free data retrieval call binding the contract method 0x510c9f4c. +// BatchIdAttestationStatus is a free data retrieval call binding the contract method 0xd4e1a3d1. // -// Solidity: function batchIdToProjects(uint256 batchId, uint256 ) view returns(string projectids) -func (_Contract *ContractCallerSession) BatchIdToProjects(batchId *big.Int, arg1 *big.Int) (string, error) { - return _Contract.Contract.BatchIdToProjects(&_Contract.CallOpts, batchId, arg1) +// Solidity: function batchIdAttestationStatus(address dataMarket, uint256 batchId) view returns(bool) +func (_Contract *ContractCallerSession) BatchIdAttestationStatus(dataMarket common.Address, batchId *big.Int) (bool, error) { + return _Contract.Contract.BatchIdAttestationStatus(&_Contract.CallOpts, dataMarket, batchId) } -// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. +// BatchIdDivergentValidators is a free data retrieval call binding the contract method 0x52ec368a. // -// Solidity: function currentEpoch() view returns(uint256 begin, uint256 end, uint256 epochId) -func (_Contract *ContractCaller) CurrentEpoch(opts *bind.CallOpts) (struct { - Begin *big.Int - End *big.Int - EpochId *big.Int -}, error) { +// Solidity: function batchIdDivergentValidators(address dataMarket, uint256 batchId, uint256 idx) view returns(address) +func (_Contract *ContractCaller) BatchIdDivergentValidators(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int, idx *big.Int) (common.Address, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "currentEpoch") + err := _Contract.contract.Call(opts, &out, "batchIdDivergentValidators", dataMarket, batchId, idx) - outstruct := new(struct { - Begin *big.Int - End *big.Int - EpochId *big.Int - }) if err != nil { - return *outstruct, err + return *new(common.Address), err } - outstruct.Begin = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.End = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.EpochId = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - return *outstruct, err + return out0, err } -// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. +// BatchIdDivergentValidators is a free data retrieval call binding the contract method 0x52ec368a. // -// Solidity: function currentEpoch() view returns(uint256 begin, uint256 end, uint256 epochId) -func (_Contract *ContractSession) CurrentEpoch() (struct { - Begin *big.Int - End *big.Int - EpochId *big.Int -}, error) { - return _Contract.Contract.CurrentEpoch(&_Contract.CallOpts) +// Solidity: function batchIdDivergentValidators(address dataMarket, uint256 batchId, uint256 idx) view returns(address) +func (_Contract *ContractSession) BatchIdDivergentValidators(dataMarket common.Address, batchId *big.Int, idx *big.Int) (common.Address, error) { + return _Contract.Contract.BatchIdDivergentValidators(&_Contract.CallOpts, dataMarket, batchId, idx) } -// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. +// BatchIdDivergentValidators is a free data retrieval call binding the contract method 0x52ec368a. // -// Solidity: function currentEpoch() view returns(uint256 begin, uint256 end, uint256 epochId) -func (_Contract *ContractCallerSession) CurrentEpoch() (struct { - Begin *big.Int - End *big.Int - EpochId *big.Int -}, error) { - return _Contract.Contract.CurrentEpoch(&_Contract.CallOpts) +// Solidity: function batchIdDivergentValidators(address dataMarket, uint256 batchId, uint256 idx) view returns(address) +func (_Contract *ContractCallerSession) BatchIdDivergentValidators(dataMarket common.Address, batchId *big.Int, idx *big.Int) (common.Address, error) { + return _Contract.Contract.BatchIdDivergentValidators(&_Contract.CallOpts, dataMarket, batchId, idx) } -// EpochInfo is a free data retrieval call binding the contract method 0x3894228e. +// BatchIdSequencerAttestation is a free data retrieval call binding the contract method 0x2564a9a6. // -// Solidity: function epochInfo(uint256 ) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) -func (_Contract *ContractCaller) EpochInfo(opts *bind.CallOpts, arg0 *big.Int) (struct { - Timestamp *big.Int - Blocknumber *big.Int - EpochEnd *big.Int -}, error) { +// Solidity: function batchIdSequencerAttestation(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractCaller) BatchIdSequencerAttestation(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int) ([32]byte, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "epochInfo", arg0) + err := _Contract.contract.Call(opts, &out, "batchIdSequencerAttestation", dataMarket, batchId) - outstruct := new(struct { - Timestamp *big.Int - Blocknumber *big.Int - EpochEnd *big.Int - }) if err != nil { - return *outstruct, err + return *new([32]byte), err } - outstruct.Timestamp = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Blocknumber = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.EpochEnd = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - return *outstruct, err + return out0, err } -// EpochInfo is a free data retrieval call binding the contract method 0x3894228e. +// BatchIdSequencerAttestation is a free data retrieval call binding the contract method 0x2564a9a6. // -// Solidity: function epochInfo(uint256 ) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) -func (_Contract *ContractSession) EpochInfo(arg0 *big.Int) (struct { - Timestamp *big.Int - Blocknumber *big.Int - EpochEnd *big.Int -}, error) { - return _Contract.Contract.EpochInfo(&_Contract.CallOpts, arg0) +// Solidity: function batchIdSequencerAttestation(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractSession) BatchIdSequencerAttestation(dataMarket common.Address, batchId *big.Int) ([32]byte, error) { + return _Contract.Contract.BatchIdSequencerAttestation(&_Contract.CallOpts, dataMarket, batchId) } -// EpochInfo is a free data retrieval call binding the contract method 0x3894228e. +// BatchIdSequencerAttestation is a free data retrieval call binding the contract method 0x2564a9a6. // -// Solidity: function epochInfo(uint256 ) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) -func (_Contract *ContractCallerSession) EpochInfo(arg0 *big.Int) (struct { - Timestamp *big.Int - Blocknumber *big.Int - EpochEnd *big.Int -}, error) { - return _Contract.Contract.EpochInfo(&_Contract.CallOpts, arg0) +// Solidity: function batchIdSequencerAttestation(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractCallerSession) BatchIdSequencerAttestation(dataMarket common.Address, batchId *big.Int) ([32]byte, error) { + return _Contract.Contract.BatchIdSequencerAttestation(&_Contract.CallOpts, dataMarket, batchId) } -// GetMasterSnapshotters is a free data retrieval call binding the contract method 0x90110313. +// BatchIdToProjects is a free data retrieval call binding the contract method 0xda648f92. // -// Solidity: function getMasterSnapshotters() view returns(address[]) -func (_Contract *ContractCaller) GetMasterSnapshotters(opts *bind.CallOpts) ([]common.Address, error) { +// Solidity: function batchIdToProjects(address dataMarket, uint256 batchId) view returns(string[]) +func (_Contract *ContractCaller) BatchIdToProjects(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int) ([]string, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getMasterSnapshotters") + err := _Contract.contract.Call(opts, &out, "batchIdToProjects", dataMarket, batchId) if err != nil { - return *new([]common.Address), err + return *new([]string), err } - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) return out0, err } -// GetMasterSnapshotters is a free data retrieval call binding the contract method 0x90110313. +// BatchIdToProjects is a free data retrieval call binding the contract method 0xda648f92. // -// Solidity: function getMasterSnapshotters() view returns(address[]) -func (_Contract *ContractSession) GetMasterSnapshotters() ([]common.Address, error) { - return _Contract.Contract.GetMasterSnapshotters(&_Contract.CallOpts) +// Solidity: function batchIdToProjects(address dataMarket, uint256 batchId) view returns(string[]) +func (_Contract *ContractSession) BatchIdToProjects(dataMarket common.Address, batchId *big.Int) ([]string, error) { + return _Contract.Contract.BatchIdToProjects(&_Contract.CallOpts, dataMarket, batchId) } -// GetMasterSnapshotters is a free data retrieval call binding the contract method 0x90110313. +// BatchIdToProjects is a free data retrieval call binding the contract method 0xda648f92. // -// Solidity: function getMasterSnapshotters() view returns(address[]) -func (_Contract *ContractCallerSession) GetMasterSnapshotters() ([]common.Address, error) { - return _Contract.Contract.GetMasterSnapshotters(&_Contract.CallOpts) +// Solidity: function batchIdToProjects(address dataMarket, uint256 batchId) view returns(string[]) +func (_Contract *ContractCallerSession) BatchIdToProjects(dataMarket common.Address, batchId *big.Int) ([]string, error) { + return _Contract.Contract.BatchIdToProjects(&_Contract.CallOpts, dataMarket, batchId) } -// GetSnapshotters is a free data retrieval call binding the contract method 0x8deed336. +// BatchSubmissionWindow is a free data retrieval call binding the contract method 0x4d9c25d4. // -// Solidity: function getSnapshotters() view returns(address[]) -func (_Contract *ContractCaller) GetSnapshotters(opts *bind.CallOpts) ([]common.Address, error) { +// Solidity: function batchSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) BatchSubmissionWindow(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getSnapshotters") + err := _Contract.contract.Call(opts, &out, "batchSubmissionWindow", dataMarket) if err != nil { - return *new([]common.Address), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// GetSnapshotters is a free data retrieval call binding the contract method 0x8deed336. +// BatchSubmissionWindow is a free data retrieval call binding the contract method 0x4d9c25d4. // -// Solidity: function getSnapshotters() view returns(address[]) -func (_Contract *ContractSession) GetSnapshotters() ([]common.Address, error) { - return _Contract.Contract.GetSnapshotters(&_Contract.CallOpts) +// Solidity: function batchSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) BatchSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.BatchSubmissionWindow(&_Contract.CallOpts, dataMarket) } -// GetSnapshotters is a free data retrieval call binding the contract method 0x8deed336. +// BatchSubmissionWindow is a free data retrieval call binding the contract method 0x4d9c25d4. // -// Solidity: function getSnapshotters() view returns(address[]) -func (_Contract *ContractCallerSession) GetSnapshotters() ([]common.Address, error) { - return _Contract.Contract.GetSnapshotters(&_Contract.CallOpts) +// Solidity: function batchSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) BatchSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.BatchSubmissionWindow(&_Contract.CallOpts, dataMarket) } -// GetTotalMasterSnapshotterCount is a free data retrieval call binding the contract method 0xd551672b. +// CheckDynamicConsensusAttestations is a free data retrieval call binding the contract method 0x20cfff83. // -// Solidity: function getTotalMasterSnapshotterCount() view returns(uint256) -func (_Contract *ContractCaller) GetTotalMasterSnapshotterCount(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function checkDynamicConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) view returns(bool) +func (_Contract *ContractCaller) CheckDynamicConsensusAttestations(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int, epochId *big.Int) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getTotalMasterSnapshotterCount") + err := _Contract.contract.Call(opts, &out, "checkDynamicConsensusAttestations", dataMarket, batchId, epochId) if err != nil { - return *new(*big.Int), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// GetTotalMasterSnapshotterCount is a free data retrieval call binding the contract method 0xd551672b. +// CheckDynamicConsensusAttestations is a free data retrieval call binding the contract method 0x20cfff83. // -// Solidity: function getTotalMasterSnapshotterCount() view returns(uint256) -func (_Contract *ContractSession) GetTotalMasterSnapshotterCount() (*big.Int, error) { - return _Contract.Contract.GetTotalMasterSnapshotterCount(&_Contract.CallOpts) +// Solidity: function checkDynamicConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) view returns(bool) +func (_Contract *ContractSession) CheckDynamicConsensusAttestations(dataMarket common.Address, batchId *big.Int, epochId *big.Int) (bool, error) { + return _Contract.Contract.CheckDynamicConsensusAttestations(&_Contract.CallOpts, dataMarket, batchId, epochId) } -// GetTotalMasterSnapshotterCount is a free data retrieval call binding the contract method 0xd551672b. +// CheckDynamicConsensusAttestations is a free data retrieval call binding the contract method 0x20cfff83. // -// Solidity: function getTotalMasterSnapshotterCount() view returns(uint256) -func (_Contract *ContractCallerSession) GetTotalMasterSnapshotterCount() (*big.Int, error) { - return _Contract.Contract.GetTotalMasterSnapshotterCount(&_Contract.CallOpts) +// Solidity: function checkDynamicConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) view returns(bool) +func (_Contract *ContractCallerSession) CheckDynamicConsensusAttestations(dataMarket common.Address, batchId *big.Int, epochId *big.Int) (bool, error) { + return _Contract.Contract.CheckDynamicConsensusAttestations(&_Contract.CallOpts, dataMarket, batchId, epochId) } -// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// CheckSlotTaskStatusForDay is a free data retrieval call binding the contract method 0xc00d0f9c. // -// Solidity: function getTotalSnapshotterCount() view returns(uint256) -func (_Contract *ContractCaller) GetTotalSnapshotterCount(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function checkSlotTaskStatusForDay(address dataMarket, uint256 slotId, uint256 day) view returns(bool) +func (_Contract *ContractCaller) CheckSlotTaskStatusForDay(opts *bind.CallOpts, dataMarket common.Address, slotId *big.Int, day *big.Int) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getTotalSnapshotterCount") + err := _Contract.contract.Call(opts, &out, "checkSlotTaskStatusForDay", dataMarket, slotId, day) if err != nil { - return *new(*big.Int), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// CheckSlotTaskStatusForDay is a free data retrieval call binding the contract method 0xc00d0f9c. // -// Solidity: function getTotalSnapshotterCount() view returns(uint256) -func (_Contract *ContractSession) GetTotalSnapshotterCount() (*big.Int, error) { - return _Contract.Contract.GetTotalSnapshotterCount(&_Contract.CallOpts) +// Solidity: function checkSlotTaskStatusForDay(address dataMarket, uint256 slotId, uint256 day) view returns(bool) +func (_Contract *ContractSession) CheckSlotTaskStatusForDay(dataMarket common.Address, slotId *big.Int, day *big.Int) (bool, error) { + return _Contract.Contract.CheckSlotTaskStatusForDay(&_Contract.CallOpts, dataMarket, slotId, day) } -// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// CheckSlotTaskStatusForDay is a free data retrieval call binding the contract method 0xc00d0f9c. // -// Solidity: function getTotalSnapshotterCount() view returns(uint256) -func (_Contract *ContractCallerSession) GetTotalSnapshotterCount() (*big.Int, error) { - return _Contract.Contract.GetTotalSnapshotterCount(&_Contract.CallOpts) +// Solidity: function checkSlotTaskStatusForDay(address dataMarket, uint256 slotId, uint256 day) view returns(bool) +func (_Contract *ContractCallerSession) CheckSlotTaskStatusForDay(dataMarket common.Address, slotId *big.Int, day *big.Int) (bool, error) { + return _Contract.Contract.CheckSlotTaskStatusForDay(&_Contract.CallOpts, dataMarket, slotId, day) } -// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0x983d52e7. +// CurrentBatchId is a free data retrieval call binding the contract method 0x5edba3d3. // -// Solidity: function getTotalValidatorsCount() view returns(uint256) -func (_Contract *ContractCaller) GetTotalValidatorsCount(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function currentBatchId(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) CurrentBatchId(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getTotalValidatorsCount") + err := _Contract.contract.Call(opts, &out, "currentBatchId", dataMarket) if err != nil { return *new(*big.Int), err @@ -770,57 +741,76 @@ func (_Contract *ContractCaller) GetTotalValidatorsCount(opts *bind.CallOpts) (* } -// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0x983d52e7. +// CurrentBatchId is a free data retrieval call binding the contract method 0x5edba3d3. // -// Solidity: function getTotalValidatorsCount() view returns(uint256) -func (_Contract *ContractSession) GetTotalValidatorsCount() (*big.Int, error) { - return _Contract.Contract.GetTotalValidatorsCount(&_Contract.CallOpts) +// Solidity: function currentBatchId(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) CurrentBatchId(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.CurrentBatchId(&_Contract.CallOpts, dataMarket) } -// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0x983d52e7. +// CurrentBatchId is a free data retrieval call binding the contract method 0x5edba3d3. // -// Solidity: function getTotalValidatorsCount() view returns(uint256) -func (_Contract *ContractCallerSession) GetTotalValidatorsCount() (*big.Int, error) { - return _Contract.Contract.GetTotalValidatorsCount(&_Contract.CallOpts) +// Solidity: function currentBatchId(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) CurrentBatchId(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.CurrentBatchId(&_Contract.CallOpts, dataMarket) } -// GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. +// CurrentEpoch is a free data retrieval call binding the contract method 0x0736e19f. // -// Solidity: function getValidators() view returns(address[]) -func (_Contract *ContractCaller) GetValidators(opts *bind.CallOpts) ([]common.Address, error) { +// Solidity: function currentEpoch(address dataMarket) view returns(uint256 begin, uint256 end, uint256 epochId) +func (_Contract *ContractCaller) CurrentEpoch(opts *bind.CallOpts, dataMarket common.Address) (struct { + Begin *big.Int + End *big.Int + EpochId *big.Int +}, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "getValidators") + err := _Contract.contract.Call(opts, &out, "currentEpoch", dataMarket) + outstruct := new(struct { + Begin *big.Int + End *big.Int + EpochId *big.Int + }) if err != nil { - return *new([]common.Address), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + outstruct.Begin = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.End = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.EpochId = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - return out0, err + return *outstruct, err } -// GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. +// CurrentEpoch is a free data retrieval call binding the contract method 0x0736e19f. // -// Solidity: function getValidators() view returns(address[]) -func (_Contract *ContractSession) GetValidators() ([]common.Address, error) { - return _Contract.Contract.GetValidators(&_Contract.CallOpts) +// Solidity: function currentEpoch(address dataMarket) view returns(uint256 begin, uint256 end, uint256 epochId) +func (_Contract *ContractSession) CurrentEpoch(dataMarket common.Address) (struct { + Begin *big.Int + End *big.Int + EpochId *big.Int +}, error) { + return _Contract.Contract.CurrentEpoch(&_Contract.CallOpts, dataMarket) } -// GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. +// CurrentEpoch is a free data retrieval call binding the contract method 0x0736e19f. // -// Solidity: function getValidators() view returns(address[]) -func (_Contract *ContractCallerSession) GetValidators() ([]common.Address, error) { - return _Contract.Contract.GetValidators(&_Contract.CallOpts) +// Solidity: function currentEpoch(address dataMarket) view returns(uint256 begin, uint256 end, uint256 epochId) +func (_Contract *ContractCallerSession) CurrentEpoch(dataMarket common.Address) (struct { + Begin *big.Int + End *big.Int + EpochId *big.Int +}, error) { + return _Contract.Contract.CurrentEpoch(&_Contract.CallOpts, dataMarket) } -// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0x4ea16b0a. +// DailySnapshotQuota is a free data retrieval call binding the contract method 0x095cb210. // -// Solidity: function lastFinalizedSnapshot(string projectId) view returns(uint256 epochId) -func (_Contract *ContractCaller) LastFinalizedSnapshot(opts *bind.CallOpts, projectId string) (*big.Int, error) { +// Solidity: function dailySnapshotQuota(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) DailySnapshotQuota(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "lastFinalizedSnapshot", projectId) + err := _Contract.contract.Call(opts, &out, "dailySnapshotQuota", dataMarket) if err != nil { return *new(*big.Int), err @@ -832,212 +822,256 @@ func (_Contract *ContractCaller) LastFinalizedSnapshot(opts *bind.CallOpts, proj } -// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0x4ea16b0a. +// DailySnapshotQuota is a free data retrieval call binding the contract method 0x095cb210. // -// Solidity: function lastFinalizedSnapshot(string projectId) view returns(uint256 epochId) -func (_Contract *ContractSession) LastFinalizedSnapshot(projectId string) (*big.Int, error) { - return _Contract.Contract.LastFinalizedSnapshot(&_Contract.CallOpts, projectId) +// Solidity: function dailySnapshotQuota(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) DailySnapshotQuota(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DailySnapshotQuota(&_Contract.CallOpts, dataMarket) } -// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0x4ea16b0a. +// DailySnapshotQuota is a free data retrieval call binding the contract method 0x095cb210. // -// Solidity: function lastFinalizedSnapshot(string projectId) view returns(uint256 epochId) -func (_Contract *ContractCallerSession) LastFinalizedSnapshot(projectId string) (*big.Int, error) { - return _Contract.Contract.LastFinalizedSnapshot(&_Contract.CallOpts, projectId) +// Solidity: function dailySnapshotQuota(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) DailySnapshotQuota(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DailySnapshotQuota(&_Contract.CallOpts, dataMarket) } -// MasterSnapshotters is a free data retrieval call binding the contract method 0x34b739d9. +// DataMarketCount is a free data retrieval call binding the contract method 0xef829a3d. // -// Solidity: function masterSnapshotters(address ) view returns(bool) -func (_Contract *ContractCaller) MasterSnapshotters(opts *bind.CallOpts, arg0 common.Address) (bool, error) { +// Solidity: function dataMarketCount() view returns(uint8) +func (_Contract *ContractCaller) DataMarketCount(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "masterSnapshotters", arg0) + err := _Contract.contract.Call(opts, &out, "dataMarketCount") if err != nil { - return *new(bool), err + return *new(uint8), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } -// MasterSnapshotters is a free data retrieval call binding the contract method 0x34b739d9. +// DataMarketCount is a free data retrieval call binding the contract method 0xef829a3d. // -// Solidity: function masterSnapshotters(address ) view returns(bool) -func (_Contract *ContractSession) MasterSnapshotters(arg0 common.Address) (bool, error) { - return _Contract.Contract.MasterSnapshotters(&_Contract.CallOpts, arg0) +// Solidity: function dataMarketCount() view returns(uint8) +func (_Contract *ContractSession) DataMarketCount() (uint8, error) { + return _Contract.Contract.DataMarketCount(&_Contract.CallOpts) } -// MasterSnapshotters is a free data retrieval call binding the contract method 0x34b739d9. +// DataMarketCount is a free data retrieval call binding the contract method 0xef829a3d. // -// Solidity: function masterSnapshotters(address ) view returns(bool) -func (_Contract *ContractCallerSession) MasterSnapshotters(arg0 common.Address) (bool, error) { - return _Contract.Contract.MasterSnapshotters(&_Contract.CallOpts, arg0) +// Solidity: function dataMarketCount() view returns(uint8) +func (_Contract *ContractCallerSession) DataMarketCount() (uint8, error) { + return _Contract.Contract.DataMarketCount(&_Contract.CallOpts) } -// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0xcc542228. +// DataMarketEnabled is a free data retrieval call binding the contract method 0x75fd5c7c. // -// Solidity: function maxAttestationFinalizedRootHash(uint256 batchId) view returns(bytes32 rootHash) -func (_Contract *ContractCaller) MaxAttestationFinalizedRootHash(opts *bind.CallOpts, batchId *big.Int) ([32]byte, error) { +// Solidity: function dataMarketEnabled(address dataMarketAddress) view returns(bool) +func (_Contract *ContractCaller) DataMarketEnabled(opts *bind.CallOpts, dataMarketAddress common.Address) (bool, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "maxAttestationFinalizedRootHash", batchId) + err := _Contract.contract.Call(opts, &out, "dataMarketEnabled", dataMarketAddress) if err != nil { - return *new([32]byte), err + return *new(bool), err } - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) return out0, err } -// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0xcc542228. +// DataMarketEnabled is a free data retrieval call binding the contract method 0x75fd5c7c. // -// Solidity: function maxAttestationFinalizedRootHash(uint256 batchId) view returns(bytes32 rootHash) -func (_Contract *ContractSession) MaxAttestationFinalizedRootHash(batchId *big.Int) ([32]byte, error) { - return _Contract.Contract.MaxAttestationFinalizedRootHash(&_Contract.CallOpts, batchId) +// Solidity: function dataMarketEnabled(address dataMarketAddress) view returns(bool) +func (_Contract *ContractSession) DataMarketEnabled(dataMarketAddress common.Address) (bool, error) { + return _Contract.Contract.DataMarketEnabled(&_Contract.CallOpts, dataMarketAddress) } -// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0xcc542228. +// DataMarketEnabled is a free data retrieval call binding the contract method 0x75fd5c7c. // -// Solidity: function maxAttestationFinalizedRootHash(uint256 batchId) view returns(bytes32 rootHash) -func (_Contract *ContractCallerSession) MaxAttestationFinalizedRootHash(batchId *big.Int) ([32]byte, error) { - return _Contract.Contract.MaxAttestationFinalizedRootHash(&_Contract.CallOpts, batchId) +// Solidity: function dataMarketEnabled(address dataMarketAddress) view returns(bool) +func (_Contract *ContractCallerSession) DataMarketEnabled(dataMarketAddress common.Address) (bool, error) { + return _Contract.Contract.DataMarketEnabled(&_Contract.CallOpts, dataMarketAddress) } -// MaxAttestationsCount is a free data retrieval call binding the contract method 0x30c8ecb2. +// DataMarketFactory is a free data retrieval call binding the contract method 0x5a5c908b. // -// Solidity: function maxAttestationsCount(uint256 batchId) view returns(uint256 count) -func (_Contract *ContractCaller) MaxAttestationsCount(opts *bind.CallOpts, batchId *big.Int) (*big.Int, error) { +// Solidity: function dataMarketFactory() view returns(address) +func (_Contract *ContractCaller) DataMarketFactory(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "maxAttestationsCount", batchId) + err := _Contract.contract.Call(opts, &out, "dataMarketFactory") if err != nil { - return *new(*big.Int), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -// MaxAttestationsCount is a free data retrieval call binding the contract method 0x30c8ecb2. +// DataMarketFactory is a free data retrieval call binding the contract method 0x5a5c908b. // -// Solidity: function maxAttestationsCount(uint256 batchId) view returns(uint256 count) -func (_Contract *ContractSession) MaxAttestationsCount(batchId *big.Int) (*big.Int, error) { - return _Contract.Contract.MaxAttestationsCount(&_Contract.CallOpts, batchId) +// Solidity: function dataMarketFactory() view returns(address) +func (_Contract *ContractSession) DataMarketFactory() (common.Address, error) { + return _Contract.Contract.DataMarketFactory(&_Contract.CallOpts) } -// MaxAttestationsCount is a free data retrieval call binding the contract method 0x30c8ecb2. +// DataMarketFactory is a free data retrieval call binding the contract method 0x5a5c908b. // -// Solidity: function maxAttestationsCount(uint256 batchId) view returns(uint256 count) -func (_Contract *ContractCallerSession) MaxAttestationsCount(batchId *big.Int) (*big.Int, error) { - return _Contract.Contract.MaxAttestationsCount(&_Contract.CallOpts, batchId) +// Solidity: function dataMarketFactory() view returns(address) +func (_Contract *ContractCallerSession) DataMarketFactory() (common.Address, error) { + return _Contract.Contract.DataMarketFactory(&_Contract.CallOpts) } -// MaxSnapshotsCid is a free data retrieval call binding the contract method 0xc2b97d4c. +// DataMarketIdToAddress is a free data retrieval call binding the contract method 0x0857b13f. // -// Solidity: function maxSnapshotsCid(string , uint256 ) view returns(string) -func (_Contract *ContractCaller) MaxSnapshotsCid(opts *bind.CallOpts, arg0 string, arg1 *big.Int) (string, error) { +// Solidity: function dataMarketIdToAddress(uint8 dataMarketId) view returns(address dataMarketAddress) +func (_Contract *ContractCaller) DataMarketIdToAddress(opts *bind.CallOpts, dataMarketId uint8) (common.Address, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "maxSnapshotsCid", arg0, arg1) + err := _Contract.contract.Call(opts, &out, "dataMarketIdToAddress", dataMarketId) if err != nil { - return *new(string), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new(string)).(*string) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -// MaxSnapshotsCid is a free data retrieval call binding the contract method 0xc2b97d4c. +// DataMarketIdToAddress is a free data retrieval call binding the contract method 0x0857b13f. // -// Solidity: function maxSnapshotsCid(string , uint256 ) view returns(string) -func (_Contract *ContractSession) MaxSnapshotsCid(arg0 string, arg1 *big.Int) (string, error) { - return _Contract.Contract.MaxSnapshotsCid(&_Contract.CallOpts, arg0, arg1) +// Solidity: function dataMarketIdToAddress(uint8 dataMarketId) view returns(address dataMarketAddress) +func (_Contract *ContractSession) DataMarketIdToAddress(dataMarketId uint8) (common.Address, error) { + return _Contract.Contract.DataMarketIdToAddress(&_Contract.CallOpts, dataMarketId) } -// MaxSnapshotsCid is a free data retrieval call binding the contract method 0xc2b97d4c. +// DataMarketIdToAddress is a free data retrieval call binding the contract method 0x0857b13f. // -// Solidity: function maxSnapshotsCid(string , uint256 ) view returns(string) -func (_Contract *ContractCallerSession) MaxSnapshotsCid(arg0 string, arg1 *big.Int) (string, error) { - return _Contract.Contract.MaxSnapshotsCid(&_Contract.CallOpts, arg0, arg1) +// Solidity: function dataMarketIdToAddress(uint8 dataMarketId) view returns(address dataMarketAddress) +func (_Contract *ContractCallerSession) DataMarketIdToAddress(dataMarketId uint8) (common.Address, error) { + return _Contract.Contract.DataMarketIdToAddress(&_Contract.CallOpts, dataMarketId) } -// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x66752e1e. +// DataMarkets is a free data retrieval call binding the contract method 0x5f9abf70. // -// Solidity: function minSubmissionsForConsensus() view returns(uint256) -func (_Contract *ContractCaller) MinSubmissionsForConsensus(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function dataMarkets(address ) view returns(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, bool enabled, address dataMarketAddress, uint256 createdAt) +func (_Contract *ContractCaller) DataMarkets(opts *bind.CallOpts, arg0 common.Address) (struct { + OwnerAddress common.Address + EpochSize uint8 + SourceChainId *big.Int + SourceChainBlockTime *big.Int + UseBlockNumberAsEpochId bool + Enabled bool + DataMarketAddress common.Address + CreatedAt *big.Int +}, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "minSubmissionsForConsensus") + err := _Contract.contract.Call(opts, &out, "dataMarkets", arg0) + outstruct := new(struct { + OwnerAddress common.Address + EpochSize uint8 + SourceChainId *big.Int + SourceChainBlockTime *big.Int + UseBlockNumberAsEpochId bool + Enabled bool + DataMarketAddress common.Address + CreatedAt *big.Int + }) if err != nil { - return *new(*big.Int), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.OwnerAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.EpochSize = *abi.ConvertType(out[1], new(uint8)).(*uint8) + outstruct.SourceChainId = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.SourceChainBlockTime = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.UseBlockNumberAsEpochId = *abi.ConvertType(out[4], new(bool)).(*bool) + outstruct.Enabled = *abi.ConvertType(out[5], new(bool)).(*bool) + outstruct.DataMarketAddress = *abi.ConvertType(out[6], new(common.Address)).(*common.Address) + outstruct.CreatedAt = *abi.ConvertType(out[7], new(*big.Int)).(**big.Int) - return out0, err + return *outstruct, err } -// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x66752e1e. +// DataMarkets is a free data retrieval call binding the contract method 0x5f9abf70. // -// Solidity: function minSubmissionsForConsensus() view returns(uint256) -func (_Contract *ContractSession) MinSubmissionsForConsensus() (*big.Int, error) { - return _Contract.Contract.MinSubmissionsForConsensus(&_Contract.CallOpts) +// Solidity: function dataMarkets(address ) view returns(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, bool enabled, address dataMarketAddress, uint256 createdAt) +func (_Contract *ContractSession) DataMarkets(arg0 common.Address) (struct { + OwnerAddress common.Address + EpochSize uint8 + SourceChainId *big.Int + SourceChainBlockTime *big.Int + UseBlockNumberAsEpochId bool + Enabled bool + DataMarketAddress common.Address + CreatedAt *big.Int +}, error) { + return _Contract.Contract.DataMarkets(&_Contract.CallOpts, arg0) } -// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x66752e1e. +// DataMarkets is a free data retrieval call binding the contract method 0x5f9abf70. // -// Solidity: function minSubmissionsForConsensus() view returns(uint256) -func (_Contract *ContractCallerSession) MinSubmissionsForConsensus() (*big.Int, error) { - return _Contract.Contract.MinSubmissionsForConsensus(&_Contract.CallOpts) +// Solidity: function dataMarkets(address ) view returns(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, bool enabled, address dataMarketAddress, uint256 createdAt) +func (_Contract *ContractCallerSession) DataMarkets(arg0 common.Address) (struct { + OwnerAddress common.Address + EpochSize uint8 + SourceChainId *big.Int + SourceChainBlockTime *big.Int + UseBlockNumberAsEpochId bool + Enabled bool + DataMarketAddress common.Address + CreatedAt *big.Int +}, error) { + return _Contract.Contract.DataMarkets(&_Contract.CallOpts, arg0) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// DayCounter is a free data retrieval call binding the contract method 0x02143405. // -// Solidity: function owner() view returns(address) -func (_Contract *ContractCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function dayCounter(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) DayCounter(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "owner") + err := _Contract.contract.Call(opts, &out, "dayCounter", dataMarket) if err != nil { - return *new(common.Address), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// DayCounter is a free data retrieval call binding the contract method 0x02143405. // -// Solidity: function owner() view returns(address) -func (_Contract *ContractSession) Owner() (common.Address, error) { - return _Contract.Contract.Owner(&_Contract.CallOpts) +// Solidity: function dayCounter(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) DayCounter(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DayCounter(&_Contract.CallOpts, dataMarket) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// DayCounter is a free data retrieval call binding the contract method 0x02143405. // -// Solidity: function owner() view returns(address) -func (_Contract *ContractCallerSession) Owner() (common.Address, error) { - return _Contract.Contract.Owner(&_Contract.CallOpts) +// Solidity: function dayCounter(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) DayCounter(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DayCounter(&_Contract.CallOpts, dataMarket) } -// ProjectFirstEpochId is a free data retrieval call binding the contract method 0xfa30dbe0. +// DeploymentBlockNumber is a free data retrieval call binding the contract method 0x06b8d494. // -// Solidity: function projectFirstEpochId(string projectId) view returns(uint256 epochId) -func (_Contract *ContractCaller) ProjectFirstEpochId(opts *bind.CallOpts, projectId string) (*big.Int, error) { +// Solidity: function deploymentBlockNumber(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) DeploymentBlockNumber(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "projectFirstEpochId", projectId) + err := _Contract.contract.Call(opts, &out, "deploymentBlockNumber", dataMarket) if err != nil { return *new(*big.Int), err @@ -1049,397 +1083,3595 @@ func (_Contract *ContractCaller) ProjectFirstEpochId(opts *bind.CallOpts, projec } -// ProjectFirstEpochId is a free data retrieval call binding the contract method 0xfa30dbe0. +// DeploymentBlockNumber is a free data retrieval call binding the contract method 0x06b8d494. // -// Solidity: function projectFirstEpochId(string projectId) view returns(uint256 epochId) -func (_Contract *ContractSession) ProjectFirstEpochId(projectId string) (*big.Int, error) { - return _Contract.Contract.ProjectFirstEpochId(&_Contract.CallOpts, projectId) +// Solidity: function deploymentBlockNumber(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) DeploymentBlockNumber(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DeploymentBlockNumber(&_Contract.CallOpts, dataMarket) } -// ProjectFirstEpochId is a free data retrieval call binding the contract method 0xfa30dbe0. +// DeploymentBlockNumber is a free data retrieval call binding the contract method 0x06b8d494. // -// Solidity: function projectFirstEpochId(string projectId) view returns(uint256 epochId) -func (_Contract *ContractCallerSession) ProjectFirstEpochId(projectId string) (*big.Int, error) { - return _Contract.Contract.ProjectFirstEpochId(&_Contract.CallOpts, projectId) +// Solidity: function deploymentBlockNumber(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) DeploymentBlockNumber(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.DeploymentBlockNumber(&_Contract.CallOpts, dataMarket) } -// RecoverAddress is a free data retrieval call binding the contract method 0xc655d7aa. +// EpochIdToBatchIds is a free data retrieval call binding the contract method 0xe72eeb97. // -// Solidity: function recoverAddress(bytes32 messageHash, bytes signature) pure returns(address) -func (_Contract *ContractCaller) RecoverAddress(opts *bind.CallOpts, messageHash [32]byte, signature []byte) (common.Address, error) { +// Solidity: function epochIdToBatchIds(address dataMarket, uint256 epochId) view returns(uint256[]) +func (_Contract *ContractCaller) EpochIdToBatchIds(opts *bind.CallOpts, dataMarket common.Address, epochId *big.Int) ([]*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "recoverAddress", messageHash, signature) + err := _Contract.contract.Call(opts, &out, "epochIdToBatchIds", dataMarket, epochId) if err != nil { - return *new(common.Address), err + return *new([]*big.Int), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) return out0, err } -// RecoverAddress is a free data retrieval call binding the contract method 0xc655d7aa. +// EpochIdToBatchIds is a free data retrieval call binding the contract method 0xe72eeb97. // -// Solidity: function recoverAddress(bytes32 messageHash, bytes signature) pure returns(address) -func (_Contract *ContractSession) RecoverAddress(messageHash [32]byte, signature []byte) (common.Address, error) { - return _Contract.Contract.RecoverAddress(&_Contract.CallOpts, messageHash, signature) +// Solidity: function epochIdToBatchIds(address dataMarket, uint256 epochId) view returns(uint256[]) +func (_Contract *ContractSession) EpochIdToBatchIds(dataMarket common.Address, epochId *big.Int) ([]*big.Int, error) { + return _Contract.Contract.EpochIdToBatchIds(&_Contract.CallOpts, dataMarket, epochId) } -// RecoverAddress is a free data retrieval call binding the contract method 0xc655d7aa. +// EpochIdToBatchIds is a free data retrieval call binding the contract method 0xe72eeb97. // -// Solidity: function recoverAddress(bytes32 messageHash, bytes signature) pure returns(address) -func (_Contract *ContractCallerSession) RecoverAddress(messageHash [32]byte, signature []byte) (common.Address, error) { - return _Contract.Contract.RecoverAddress(&_Contract.CallOpts, messageHash, signature) +// Solidity: function epochIdToBatchIds(address dataMarket, uint256 epochId) view returns(uint256[]) +func (_Contract *ContractCallerSession) EpochIdToBatchIds(dataMarket common.Address, epochId *big.Int) ([]*big.Int, error) { + return _Contract.Contract.EpochIdToBatchIds(&_Contract.CallOpts, dataMarket, epochId) } -// SnapshotStatus is a free data retrieval call binding the contract method 0x3aaf384d. +// EpochInfo is a free data retrieval call binding the contract method 0xc9ab0c83. // -// Solidity: function snapshotStatus(string , uint256 ) view returns(uint8 status, string snapshotCid, uint256 timestamp) -func (_Contract *ContractCaller) SnapshotStatus(opts *bind.CallOpts, arg0 string, arg1 *big.Int) (struct { - Status uint8 - SnapshotCid string +// Solidity: function epochInfo(address dataMarket, uint256 epochId) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) +func (_Contract *ContractCaller) EpochInfo(opts *bind.CallOpts, dataMarket common.Address, epochId *big.Int) (struct { Timestamp *big.Int + Blocknumber *big.Int + EpochEnd *big.Int }, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "snapshotStatus", arg0, arg1) + err := _Contract.contract.Call(opts, &out, "epochInfo", dataMarket, epochId) outstruct := new(struct { - Status uint8 - SnapshotCid string Timestamp *big.Int + Blocknumber *big.Int + EpochEnd *big.Int }) if err != nil { return *outstruct, err } - outstruct.Status = *abi.ConvertType(out[0], new(uint8)).(*uint8) - outstruct.SnapshotCid = *abi.ConvertType(out[1], new(string)).(*string) - outstruct.Timestamp = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Timestamp = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Blocknumber = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.EpochEnd = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) return *outstruct, err } -// SnapshotStatus is a free data retrieval call binding the contract method 0x3aaf384d. +// EpochInfo is a free data retrieval call binding the contract method 0xc9ab0c83. // -// Solidity: function snapshotStatus(string , uint256 ) view returns(uint8 status, string snapshotCid, uint256 timestamp) -func (_Contract *ContractSession) SnapshotStatus(arg0 string, arg1 *big.Int) (struct { - Status uint8 - SnapshotCid string +// Solidity: function epochInfo(address dataMarket, uint256 epochId) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) +func (_Contract *ContractSession) EpochInfo(dataMarket common.Address, epochId *big.Int) (struct { Timestamp *big.Int + Blocknumber *big.Int + EpochEnd *big.Int }, error) { - return _Contract.Contract.SnapshotStatus(&_Contract.CallOpts, arg0, arg1) + return _Contract.Contract.EpochInfo(&_Contract.CallOpts, dataMarket, epochId) } -// SnapshotStatus is a free data retrieval call binding the contract method 0x3aaf384d. +// EpochInfo is a free data retrieval call binding the contract method 0xc9ab0c83. // -// Solidity: function snapshotStatus(string , uint256 ) view returns(uint8 status, string snapshotCid, uint256 timestamp) -func (_Contract *ContractCallerSession) SnapshotStatus(arg0 string, arg1 *big.Int) (struct { - Status uint8 - SnapshotCid string +// Solidity: function epochInfo(address dataMarket, uint256 epochId) view returns(uint256 timestamp, uint256 blocknumber, uint256 epochEnd) +func (_Contract *ContractCallerSession) EpochInfo(dataMarket common.Address, epochId *big.Int) (struct { Timestamp *big.Int + Blocknumber *big.Int + EpochEnd *big.Int }, error) { - return _Contract.Contract.SnapshotStatus(&_Contract.CallOpts, arg0, arg1) + return _Contract.Contract.EpochInfo(&_Contract.CallOpts, dataMarket, epochId) } -// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0x059080f6. +// EpochManager is a free data retrieval call binding the contract method 0x0d5a7a52. // -// Solidity: function snapshotSubmissionWindow() view returns(uint256) -func (_Contract *ContractCaller) SnapshotSubmissionWindow(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function epochManager(address dataMarket) view returns(address) +func (_Contract *ContractCaller) EpochManager(opts *bind.CallOpts, dataMarket common.Address) (common.Address, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "snapshotSubmissionWindow") + err := _Contract.contract.Call(opts, &out, "epochManager", dataMarket) if err != nil { - return *new(*big.Int), err + return *new(common.Address), err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } -// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0x059080f6. +// EpochManager is a free data retrieval call binding the contract method 0x0d5a7a52. // -// Solidity: function snapshotSubmissionWindow() view returns(uint256) -func (_Contract *ContractSession) SnapshotSubmissionWindow() (*big.Int, error) { - return _Contract.Contract.SnapshotSubmissionWindow(&_Contract.CallOpts) +// Solidity: function epochManager(address dataMarket) view returns(address) +func (_Contract *ContractSession) EpochManager(dataMarket common.Address) (common.Address, error) { + return _Contract.Contract.EpochManager(&_Contract.CallOpts, dataMarket) } -// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0x059080f6. +// EpochManager is a free data retrieval call binding the contract method 0x0d5a7a52. // -// Solidity: function snapshotSubmissionWindow() view returns(uint256) -func (_Contract *ContractCallerSession) SnapshotSubmissionWindow() (*big.Int, error) { - return _Contract.Contract.SnapshotSubmissionWindow(&_Contract.CallOpts) +// Solidity: function epochManager(address dataMarket) view returns(address) +func (_Contract *ContractCallerSession) EpochManager(dataMarket common.Address) (common.Address, error) { + return _Contract.Contract.EpochManager(&_Contract.CallOpts, dataMarket) } -// Verify is a free data retrieval call binding the contract method 0xc22e1a53. +// EpochsInADay is a free data retrieval call binding the contract method 0x0a1b7227. // -// Solidity: function verify(string snapshotCid, uint256 epochId, string projectId, (uint256,string,uint256,string) request, bytes signature, address signer) view returns(bool) -func (_Contract *ContractCaller) Verify(opts *bind.CallOpts, snapshotCid string, epochId *big.Int, projectId string, request PowerloomProtocolStateRequest, signature []byte, signer common.Address) (bool, error) { +// Solidity: function epochsInADay(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) EpochsInADay(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { var out []interface{} - err := _Contract.contract.Call(opts, &out, "verify", snapshotCid, epochId, projectId, request, signature, signer) + err := _Contract.contract.Call(opts, &out, "epochsInADay", dataMarket) if err != nil { - return *new(bool), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// Verify is a free data retrieval call binding the contract method 0xc22e1a53. +// EpochsInADay is a free data retrieval call binding the contract method 0x0a1b7227. // -// Solidity: function verify(string snapshotCid, uint256 epochId, string projectId, (uint256,string,uint256,string) request, bytes signature, address signer) view returns(bool) -func (_Contract *ContractSession) Verify(snapshotCid string, epochId *big.Int, projectId string, request PowerloomProtocolStateRequest, signature []byte, signer common.Address) (bool, error) { - return _Contract.Contract.Verify(&_Contract.CallOpts, snapshotCid, epochId, projectId, request, signature, signer) +// Solidity: function epochsInADay(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) EpochsInADay(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.EpochsInADay(&_Contract.CallOpts, dataMarket) } -// Verify is a free data retrieval call binding the contract method 0xc22e1a53. +// EpochsInADay is a free data retrieval call binding the contract method 0x0a1b7227. // -// Solidity: function verify(string snapshotCid, uint256 epochId, string projectId, (uint256,string,uint256,string) request, bytes signature, address signer) view returns(bool) -func (_Contract *ContractCallerSession) Verify(snapshotCid string, epochId *big.Int, projectId string, request PowerloomProtocolStateRequest, signature []byte, signer common.Address) (bool, error) { - return _Contract.Contract.Verify(&_Contract.CallOpts, snapshotCid, epochId, projectId, request, signature, signer) +// Solidity: function epochsInADay(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) EpochsInADay(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.EpochsInADay(&_Contract.CallOpts, dataMarket) } -// ForceSkipEpoch is a paid mutator transaction binding the contract method 0xf537a3e2. +// GetEpochManager is a free data retrieval call binding the contract method 0x6ce4f26c. // -// Solidity: function forceSkipEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractTransactor) ForceSkipEpoch(opts *bind.TransactOpts, begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "forceSkipEpoch", begin, end) -} +// Solidity: function getEpochManager(address dataMarket) view returns(address) +func (_Contract *ContractCaller) GetEpochManager(opts *bind.CallOpts, dataMarket common.Address) (common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getEpochManager", dataMarket) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err -// ForceSkipEpoch is a paid mutator transaction binding the contract method 0xf537a3e2. -// -// Solidity: function forceSkipEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractSession) ForceSkipEpoch(begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.Contract.ForceSkipEpoch(&_Contract.TransactOpts, begin, end) } -// ForceSkipEpoch is a paid mutator transaction binding the contract method 0xf537a3e2. +// GetEpochManager is a free data retrieval call binding the contract method 0x6ce4f26c. // -// Solidity: function forceSkipEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractTransactorSession) ForceSkipEpoch(begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.Contract.ForceSkipEpoch(&_Contract.TransactOpts, begin, end) +// Solidity: function getEpochManager(address dataMarket) view returns(address) +func (_Contract *ContractSession) GetEpochManager(dataMarket common.Address) (common.Address, error) { + return _Contract.Contract.GetEpochManager(&_Contract.CallOpts, dataMarket) } -// ReleaseEpoch is a paid mutator transaction binding the contract method 0x132c290f. +// GetEpochManager is a free data retrieval call binding the contract method 0x6ce4f26c. // -// Solidity: function releaseEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractTransactor) ReleaseEpoch(opts *bind.TransactOpts, begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "releaseEpoch", begin, end) +// Solidity: function getEpochManager(address dataMarket) view returns(address) +func (_Contract *ContractCallerSession) GetEpochManager(dataMarket common.Address) (common.Address, error) { + return _Contract.Contract.GetEpochManager(&_Contract.CallOpts, dataMarket) } -// ReleaseEpoch is a paid mutator transaction binding the contract method 0x132c290f. +// GetSequencerId is a free data retrieval call binding the contract method 0x1c7d13a6. // -// Solidity: function releaseEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractSession) ReleaseEpoch(begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.Contract.ReleaseEpoch(&_Contract.TransactOpts, begin, end) +// Solidity: function getSequencerId(address dataMarket) view returns(string) +func (_Contract *ContractCaller) GetSequencerId(opts *bind.CallOpts, dataMarket common.Address) (string, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getSequencerId", dataMarket) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + } -// ReleaseEpoch is a paid mutator transaction binding the contract method 0x132c290f. +// GetSequencerId is a free data retrieval call binding the contract method 0x1c7d13a6. // -// Solidity: function releaseEpoch(uint256 begin, uint256 end) returns() -func (_Contract *ContractTransactorSession) ReleaseEpoch(begin *big.Int, end *big.Int) (*types.Transaction, error) { - return _Contract.Contract.ReleaseEpoch(&_Contract.TransactOpts, begin, end) +// Solidity: function getSequencerId(address dataMarket) view returns(string) +func (_Contract *ContractSession) GetSequencerId(dataMarket common.Address) (string, error) { + return _Contract.Contract.GetSequencerId(&_Contract.CallOpts, dataMarket) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// GetSequencerId is a free data retrieval call binding the contract method 0x1c7d13a6. // -// Solidity: function renounceOwnership() returns() -func (_Contract *ContractTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "renounceOwnership") +// Solidity: function getSequencerId(address dataMarket) view returns(string) +func (_Contract *ContractCallerSession) GetSequencerId(dataMarket common.Address) (string, error) { + return _Contract.Contract.GetSequencerId(&_Contract.CallOpts, dataMarket) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// GetSequencers is a free data retrieval call binding the contract method 0x6b0ad9ac. // -// Solidity: function renounceOwnership() returns() -func (_Contract *ContractSession) RenounceOwnership() (*types.Transaction, error) { - return _Contract.Contract.RenounceOwnership(&_Contract.TransactOpts) +// Solidity: function getSequencers(address dataMarket) view returns(address[]) +func (_Contract *ContractCaller) GetSequencers(opts *bind.CallOpts, dataMarket common.Address) ([]common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getSequencers", dataMarket) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// GetSequencers is a free data retrieval call binding the contract method 0x6b0ad9ac. // -// Solidity: function renounceOwnership() returns() -func (_Contract *ContractTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Contract.Contract.RenounceOwnership(&_Contract.TransactOpts) +// Solidity: function getSequencers(address dataMarket) view returns(address[]) +func (_Contract *ContractSession) GetSequencers(dataMarket common.Address) ([]common.Address, error) { + return _Contract.Contract.GetSequencers(&_Contract.CallOpts, dataMarket) } -// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x70dfe736. +// GetSequencers is a free data retrieval call binding the contract method 0x6b0ad9ac. // -// Solidity: function submitBatchAttestation(uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() -func (_Contract *ContractTransactor) SubmitBatchAttestation(opts *bind.TransactOpts, batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "submitBatchAttestation", batchId, epochId, finalizedCidsRootHash) +// Solidity: function getSequencers(address dataMarket) view returns(address[]) +func (_Contract *ContractCallerSession) GetSequencers(dataMarket common.Address) ([]common.Address, error) { + return _Contract.Contract.GetSequencers(&_Contract.CallOpts, dataMarket) } -// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x70dfe736. +// GetSlotInfo is a free data retrieval call binding the contract method 0xc367e244. // -// Solidity: function submitBatchAttestation(uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() -func (_Contract *ContractSession) SubmitBatchAttestation(batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { - return _Contract.Contract.SubmitBatchAttestation(&_Contract.TransactOpts, batchId, epochId, finalizedCidsRootHash) +// Solidity: function getSlotInfo(address dataMarket, uint256 slotId) view returns((uint256,address,uint256,uint256)) +func (_Contract *ContractCaller) GetSlotInfo(opts *bind.CallOpts, dataMarket common.Address, slotId *big.Int) (PowerloomDataMarketSlotInfo, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getSlotInfo", dataMarket, slotId) + + if err != nil { + return *new(PowerloomDataMarketSlotInfo), err + } + + out0 := *abi.ConvertType(out[0], new(PowerloomDataMarketSlotInfo)).(*PowerloomDataMarketSlotInfo) + + return out0, err + } -// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x70dfe736. +// GetSlotInfo is a free data retrieval call binding the contract method 0xc367e244. // -// Solidity: function submitBatchAttestation(uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() -func (_Contract *ContractTransactorSession) SubmitBatchAttestation(batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { - return _Contract.Contract.SubmitBatchAttestation(&_Contract.TransactOpts, batchId, epochId, finalizedCidsRootHash) +// Solidity: function getSlotInfo(address dataMarket, uint256 slotId) view returns((uint256,address,uint256,uint256)) +func (_Contract *ContractSession) GetSlotInfo(dataMarket common.Address, slotId *big.Int) (PowerloomDataMarketSlotInfo, error) { + return _Contract.Contract.GetSlotInfo(&_Contract.CallOpts, dataMarket, slotId) } -// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xca467e62. +// GetSlotInfo is a free data retrieval call binding the contract method 0xc367e244. // -// Solidity: function submitSubmissionBatch(string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids) returns() -func (_Contract *ContractTransactor) SubmitSubmissionBatch(opts *bind.TransactOpts, batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "submitSubmissionBatch", batchCid, batchId, epochId, projectIds, snapshotCids) +// Solidity: function getSlotInfo(address dataMarket, uint256 slotId) view returns((uint256,address,uint256,uint256)) +func (_Contract *ContractCallerSession) GetSlotInfo(dataMarket common.Address, slotId *big.Int) (PowerloomDataMarketSlotInfo, error) { + return _Contract.Contract.GetSlotInfo(&_Contract.CallOpts, dataMarket, slotId) } -// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xca467e62. +// GetSlotRewards is a free data retrieval call binding the contract method 0x9ab1013d. // -// Solidity: function submitSubmissionBatch(string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids) returns() -func (_Contract *ContractSession) SubmitSubmissionBatch(batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string) (*types.Transaction, error) { - return _Contract.Contract.SubmitSubmissionBatch(&_Contract.TransactOpts, batchCid, batchId, epochId, projectIds, snapshotCids) +// Solidity: function getSlotRewards(uint256 slotId) view returns(uint256 rewards) +func (_Contract *ContractCaller) GetSlotRewards(opts *bind.CallOpts, slotId *big.Int) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getSlotRewards", slotId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetSlotRewards is a free data retrieval call binding the contract method 0x9ab1013d. +// +// Solidity: function getSlotRewards(uint256 slotId) view returns(uint256 rewards) +func (_Contract *ContractSession) GetSlotRewards(slotId *big.Int) (*big.Int, error) { + return _Contract.Contract.GetSlotRewards(&_Contract.CallOpts, slotId) +} + +// GetSlotRewards is a free data retrieval call binding the contract method 0x9ab1013d. +// +// Solidity: function getSlotRewards(uint256 slotId) view returns(uint256 rewards) +func (_Contract *ContractCallerSession) GetSlotRewards(slotId *big.Int) (*big.Int, error) { + return _Contract.Contract.GetSlotRewards(&_Contract.CallOpts, slotId) +} + +// GetTotalSequencersCount is a free data retrieval call binding the contract method 0x665ebe8c. +// +// Solidity: function getTotalSequencersCount(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) GetTotalSequencersCount(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getTotalSequencersCount", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalSequencersCount is a free data retrieval call binding the contract method 0x665ebe8c. +// +// Solidity: function getTotalSequencersCount(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) GetTotalSequencersCount(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.GetTotalSequencersCount(&_Contract.CallOpts, dataMarket) +} + +// GetTotalSequencersCount is a free data retrieval call binding the contract method 0x665ebe8c. +// +// Solidity: function getTotalSequencersCount(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) GetTotalSequencersCount(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.GetTotalSequencersCount(&_Contract.CallOpts, dataMarket) +} + +// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// +// Solidity: function getTotalSnapshotterCount() view returns(uint256) +func (_Contract *ContractCaller) GetTotalSnapshotterCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getTotalSnapshotterCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// +// Solidity: function getTotalSnapshotterCount() view returns(uint256) +func (_Contract *ContractSession) GetTotalSnapshotterCount() (*big.Int, error) { + return _Contract.Contract.GetTotalSnapshotterCount(&_Contract.CallOpts) +} + +// GetTotalSnapshotterCount is a free data retrieval call binding the contract method 0x92ae6f66. +// +// Solidity: function getTotalSnapshotterCount() view returns(uint256) +func (_Contract *ContractCallerSession) GetTotalSnapshotterCount() (*big.Int, error) { + return _Contract.Contract.GetTotalSnapshotterCount(&_Contract.CallOpts) +} + +// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0xc2acc6a3. +// +// Solidity: function getTotalValidatorsCount(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) GetTotalValidatorsCount(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getTotalValidatorsCount", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0xc2acc6a3. +// +// Solidity: function getTotalValidatorsCount(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) GetTotalValidatorsCount(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.GetTotalValidatorsCount(&_Contract.CallOpts, dataMarket) +} + +// GetTotalValidatorsCount is a free data retrieval call binding the contract method 0xc2acc6a3. +// +// Solidity: function getTotalValidatorsCount(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) GetTotalValidatorsCount(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.GetTotalValidatorsCount(&_Contract.CallOpts, dataMarket) +} + +// GetValidators is a free data retrieval call binding the contract method 0xff8744a6. +// +// Solidity: function getValidators(address dataMarket) view returns(address[]) +func (_Contract *ContractCaller) GetValidators(opts *bind.CallOpts, dataMarket common.Address) ([]common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "getValidators", dataMarket) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetValidators is a free data retrieval call binding the contract method 0xff8744a6. +// +// Solidity: function getValidators(address dataMarket) view returns(address[]) +func (_Contract *ContractSession) GetValidators(dataMarket common.Address) ([]common.Address, error) { + return _Contract.Contract.GetValidators(&_Contract.CallOpts, dataMarket) +} + +// GetValidators is a free data retrieval call binding the contract method 0xff8744a6. +// +// Solidity: function getValidators(address dataMarket) view returns(address[]) +func (_Contract *ContractCallerSession) GetValidators(dataMarket common.Address) ([]common.Address, error) { + return _Contract.Contract.GetValidators(&_Contract.CallOpts, dataMarket) +} + +// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0xded2465b. +// +// Solidity: function lastFinalizedSnapshot(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractCaller) LastFinalizedSnapshot(opts *bind.CallOpts, dataMarket common.Address, projectId string) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "lastFinalizedSnapshot", dataMarket, projectId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0xded2465b. +// +// Solidity: function lastFinalizedSnapshot(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractSession) LastFinalizedSnapshot(dataMarket common.Address, projectId string) (*big.Int, error) { + return _Contract.Contract.LastFinalizedSnapshot(&_Contract.CallOpts, dataMarket, projectId) +} + +// LastFinalizedSnapshot is a free data retrieval call binding the contract method 0xded2465b. +// +// Solidity: function lastFinalizedSnapshot(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractCallerSession) LastFinalizedSnapshot(dataMarket common.Address, projectId string) (*big.Int, error) { + return _Contract.Contract.LastFinalizedSnapshot(&_Contract.CallOpts, dataMarket, projectId) +} + +// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0x320eeed2. +// +// Solidity: function maxAttestationFinalizedRootHash(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractCaller) MaxAttestationFinalizedRootHash(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int) ([32]byte, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "maxAttestationFinalizedRootHash", dataMarket, batchId) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0x320eeed2. +// +// Solidity: function maxAttestationFinalizedRootHash(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractSession) MaxAttestationFinalizedRootHash(dataMarket common.Address, batchId *big.Int) ([32]byte, error) { + return _Contract.Contract.MaxAttestationFinalizedRootHash(&_Contract.CallOpts, dataMarket, batchId) +} + +// MaxAttestationFinalizedRootHash is a free data retrieval call binding the contract method 0x320eeed2. +// +// Solidity: function maxAttestationFinalizedRootHash(address dataMarket, uint256 batchId) view returns(bytes32) +func (_Contract *ContractCallerSession) MaxAttestationFinalizedRootHash(dataMarket common.Address, batchId *big.Int) ([32]byte, error) { + return _Contract.Contract.MaxAttestationFinalizedRootHash(&_Contract.CallOpts, dataMarket, batchId) +} + +// MaxAttestationsCount is a free data retrieval call binding the contract method 0x3230df83. +// +// Solidity: function maxAttestationsCount(address dataMarket, uint256 batchId) view returns(uint256) +func (_Contract *ContractCaller) MaxAttestationsCount(opts *bind.CallOpts, dataMarket common.Address, batchId *big.Int) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "maxAttestationsCount", dataMarket, batchId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxAttestationsCount is a free data retrieval call binding the contract method 0x3230df83. +// +// Solidity: function maxAttestationsCount(address dataMarket, uint256 batchId) view returns(uint256) +func (_Contract *ContractSession) MaxAttestationsCount(dataMarket common.Address, batchId *big.Int) (*big.Int, error) { + return _Contract.Contract.MaxAttestationsCount(&_Contract.CallOpts, dataMarket, batchId) +} + +// MaxAttestationsCount is a free data retrieval call binding the contract method 0x3230df83. +// +// Solidity: function maxAttestationsCount(address dataMarket, uint256 batchId) view returns(uint256) +func (_Contract *ContractCallerSession) MaxAttestationsCount(dataMarket common.Address, batchId *big.Int) (*big.Int, error) { + return _Contract.Contract.MaxAttestationsCount(&_Contract.CallOpts, dataMarket, batchId) +} + +// MaxSnapshotsCid is a free data retrieval call binding the contract method 0x7e9ce892. +// +// Solidity: function maxSnapshotsCid(address dataMarket, string projectId, uint256 epochId) view returns(string) +func (_Contract *ContractCaller) MaxSnapshotsCid(opts *bind.CallOpts, dataMarket common.Address, projectId string, epochId *big.Int) (string, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "maxSnapshotsCid", dataMarket, projectId, epochId) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// MaxSnapshotsCid is a free data retrieval call binding the contract method 0x7e9ce892. +// +// Solidity: function maxSnapshotsCid(address dataMarket, string projectId, uint256 epochId) view returns(string) +func (_Contract *ContractSession) MaxSnapshotsCid(dataMarket common.Address, projectId string, epochId *big.Int) (string, error) { + return _Contract.Contract.MaxSnapshotsCid(&_Contract.CallOpts, dataMarket, projectId, epochId) +} + +// MaxSnapshotsCid is a free data retrieval call binding the contract method 0x7e9ce892. +// +// Solidity: function maxSnapshotsCid(address dataMarket, string projectId, uint256 epochId) view returns(string) +func (_Contract *ContractCallerSession) MaxSnapshotsCid(dataMarket common.Address, projectId string, epochId *big.Int) (string, error) { + return _Contract.Contract.MaxSnapshotsCid(&_Contract.CallOpts, dataMarket, projectId, epochId) +} + +// MinAttestationsForConsensus is a free data retrieval call binding the contract method 0xb3d95efa. +// +// Solidity: function minAttestationsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) MinAttestationsForConsensus(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "minAttestationsForConsensus", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinAttestationsForConsensus is a free data retrieval call binding the contract method 0xb3d95efa. +// +// Solidity: function minAttestationsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) MinAttestationsForConsensus(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.MinAttestationsForConsensus(&_Contract.CallOpts, dataMarket) +} + +// MinAttestationsForConsensus is a free data retrieval call binding the contract method 0xb3d95efa. +// +// Solidity: function minAttestationsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) MinAttestationsForConsensus(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.MinAttestationsForConsensus(&_Contract.CallOpts, dataMarket) +} + +// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x0984dbd2. +// +// Solidity: function minSubmissionsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) MinSubmissionsForConsensus(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "minSubmissionsForConsensus", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x0984dbd2. +// +// Solidity: function minSubmissionsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) MinSubmissionsForConsensus(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.MinSubmissionsForConsensus(&_Contract.CallOpts, dataMarket) +} + +// MinSubmissionsForConsensus is a free data retrieval call binding the contract method 0x0984dbd2. +// +// Solidity: function minSubmissionsForConsensus(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) MinSubmissionsForConsensus(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.MinSubmissionsForConsensus(&_Contract.CallOpts, dataMarket) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Contract *ContractCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Contract *ContractSession) Owner() (common.Address, error) { + return _Contract.Contract.Owner(&_Contract.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Contract *ContractCallerSession) Owner() (common.Address, error) { + return _Contract.Contract.Owner(&_Contract.CallOpts) +} + +// ProjectFirstEpochId is a free data retrieval call binding the contract method 0x4242614c. +// +// Solidity: function projectFirstEpochId(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractCaller) ProjectFirstEpochId(opts *bind.CallOpts, dataMarket common.Address, projectId string) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "projectFirstEpochId", dataMarket, projectId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ProjectFirstEpochId is a free data retrieval call binding the contract method 0x4242614c. +// +// Solidity: function projectFirstEpochId(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractSession) ProjectFirstEpochId(dataMarket common.Address, projectId string) (*big.Int, error) { + return _Contract.Contract.ProjectFirstEpochId(&_Contract.CallOpts, dataMarket, projectId) +} + +// ProjectFirstEpochId is a free data retrieval call binding the contract method 0x4242614c. +// +// Solidity: function projectFirstEpochId(address dataMarket, string projectId) view returns(uint256) +func (_Contract *ContractCallerSession) ProjectFirstEpochId(dataMarket common.Address, projectId string) (*big.Int, error) { + return _Contract.Contract.ProjectFirstEpochId(&_Contract.CallOpts, dataMarket, projectId) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Contract *ContractCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Contract *ContractSession) ProxiableUUID() ([32]byte, error) { + return _Contract.Contract.ProxiableUUID(&_Contract.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Contract *ContractCallerSession) ProxiableUUID() ([32]byte, error) { + return _Contract.Contract.ProxiableUUID(&_Contract.CallOpts) +} + +// RewardBasePoints is a free data retrieval call binding the contract method 0x7f59285a. +// +// Solidity: function rewardBasePoints(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) RewardBasePoints(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "rewardBasePoints", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RewardBasePoints is a free data retrieval call binding the contract method 0x7f59285a. +// +// Solidity: function rewardBasePoints(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) RewardBasePoints(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.RewardBasePoints(&_Contract.CallOpts, dataMarket) +} + +// RewardBasePoints is a free data retrieval call binding the contract method 0x7f59285a. +// +// Solidity: function rewardBasePoints(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) RewardBasePoints(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.RewardBasePoints(&_Contract.CallOpts, dataMarket) +} + +// RewardsEnabled is a free data retrieval call binding the contract method 0x83450d26. +// +// Solidity: function rewardsEnabled(address dataMarket) view returns(bool) +func (_Contract *ContractCaller) RewardsEnabled(opts *bind.CallOpts, dataMarket common.Address) (bool, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "rewardsEnabled", dataMarket) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// RewardsEnabled is a free data retrieval call binding the contract method 0x83450d26. +// +// Solidity: function rewardsEnabled(address dataMarket) view returns(bool) +func (_Contract *ContractSession) RewardsEnabled(dataMarket common.Address) (bool, error) { + return _Contract.Contract.RewardsEnabled(&_Contract.CallOpts, dataMarket) +} + +// RewardsEnabled is a free data retrieval call binding the contract method 0x83450d26. +// +// Solidity: function rewardsEnabled(address dataMarket) view returns(bool) +func (_Contract *ContractCallerSession) RewardsEnabled(dataMarket common.Address) (bool, error) { + return _Contract.Contract.RewardsEnabled(&_Contract.CallOpts, dataMarket) +} + +// SlotCounter is a free data retrieval call binding the contract method 0xe59a4105. +// +// Solidity: function slotCounter() view returns(uint256) +func (_Contract *ContractCaller) SlotCounter(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "slotCounter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SlotCounter is a free data retrieval call binding the contract method 0xe59a4105. +// +// Solidity: function slotCounter() view returns(uint256) +func (_Contract *ContractSession) SlotCounter() (*big.Int, error) { + return _Contract.Contract.SlotCounter(&_Contract.CallOpts) +} + +// SlotCounter is a free data retrieval call binding the contract method 0xe59a4105. +// +// Solidity: function slotCounter() view returns(uint256) +func (_Contract *ContractCallerSession) SlotCounter() (*big.Int, error) { + return _Contract.Contract.SlotCounter(&_Contract.CallOpts) +} + +// SlotRewardPoints is a free data retrieval call binding the contract method 0x9a2458a6. +// +// Solidity: function slotRewardPoints(address dataMarket, uint256 slotId) view returns(uint256) +func (_Contract *ContractCaller) SlotRewardPoints(opts *bind.CallOpts, dataMarket common.Address, slotId *big.Int) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "slotRewardPoints", dataMarket, slotId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SlotRewardPoints is a free data retrieval call binding the contract method 0x9a2458a6. +// +// Solidity: function slotRewardPoints(address dataMarket, uint256 slotId) view returns(uint256) +func (_Contract *ContractSession) SlotRewardPoints(dataMarket common.Address, slotId *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotRewardPoints(&_Contract.CallOpts, dataMarket, slotId) +} + +// SlotRewardPoints is a free data retrieval call binding the contract method 0x9a2458a6. +// +// Solidity: function slotRewardPoints(address dataMarket, uint256 slotId) view returns(uint256) +func (_Contract *ContractCallerSession) SlotRewardPoints(dataMarket common.Address, slotId *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotRewardPoints(&_Contract.CallOpts, dataMarket, slotId) +} + +// SlotRewards is a free data retrieval call binding the contract method 0x53e28269. +// +// Solidity: function slotRewards(uint256 ) view returns(uint256) +func (_Contract *ContractCaller) SlotRewards(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "slotRewards", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SlotRewards is a free data retrieval call binding the contract method 0x53e28269. +// +// Solidity: function slotRewards(uint256 ) view returns(uint256) +func (_Contract *ContractSession) SlotRewards(arg0 *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotRewards(&_Contract.CallOpts, arg0) +} + +// SlotRewards is a free data retrieval call binding the contract method 0x53e28269. +// +// Solidity: function slotRewards(uint256 ) view returns(uint256) +func (_Contract *ContractCallerSession) SlotRewards(arg0 *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotRewards(&_Contract.CallOpts, arg0) +} + +// SlotSnapshotterMapping is a free data retrieval call binding the contract method 0x948a463e. +// +// Solidity: function slotSnapshotterMapping(uint256 slotId) view returns(address) +func (_Contract *ContractCaller) SlotSnapshotterMapping(opts *bind.CallOpts, slotId *big.Int) (common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "slotSnapshotterMapping", slotId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SlotSnapshotterMapping is a free data retrieval call binding the contract method 0x948a463e. +// +// Solidity: function slotSnapshotterMapping(uint256 slotId) view returns(address) +func (_Contract *ContractSession) SlotSnapshotterMapping(slotId *big.Int) (common.Address, error) { + return _Contract.Contract.SlotSnapshotterMapping(&_Contract.CallOpts, slotId) +} + +// SlotSnapshotterMapping is a free data retrieval call binding the contract method 0x948a463e. +// +// Solidity: function slotSnapshotterMapping(uint256 slotId) view returns(address) +func (_Contract *ContractCallerSession) SlotSnapshotterMapping(slotId *big.Int) (common.Address, error) { + return _Contract.Contract.SlotSnapshotterMapping(&_Contract.CallOpts, slotId) +} + +// SlotSubmissionCount is a free data retrieval call binding the contract method 0x7f9ee950. +// +// Solidity: function slotSubmissionCount(address dataMarket, uint256 slotId, uint256 dayId) view returns(uint256) +func (_Contract *ContractCaller) SlotSubmissionCount(opts *bind.CallOpts, dataMarket common.Address, slotId *big.Int, dayId *big.Int) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "slotSubmissionCount", dataMarket, slotId, dayId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SlotSubmissionCount is a free data retrieval call binding the contract method 0x7f9ee950. +// +// Solidity: function slotSubmissionCount(address dataMarket, uint256 slotId, uint256 dayId) view returns(uint256) +func (_Contract *ContractSession) SlotSubmissionCount(dataMarket common.Address, slotId *big.Int, dayId *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotSubmissionCount(&_Contract.CallOpts, dataMarket, slotId, dayId) +} + +// SlotSubmissionCount is a free data retrieval call binding the contract method 0x7f9ee950. +// +// Solidity: function slotSubmissionCount(address dataMarket, uint256 slotId, uint256 dayId) view returns(uint256) +func (_Contract *ContractCallerSession) SlotSubmissionCount(dataMarket common.Address, slotId *big.Int, dayId *big.Int) (*big.Int, error) { + return _Contract.Contract.SlotSubmissionCount(&_Contract.CallOpts, dataMarket, slotId, dayId) +} + +// SnapshotStatus is a free data retrieval call binding the contract method 0x1f588588. +// +// Solidity: function snapshotStatus(address dataMarket, string projectId, uint256 epochId) view returns(uint8 status, string snapshotCid, uint256 timestamp) +func (_Contract *ContractCaller) SnapshotStatus(opts *bind.CallOpts, dataMarket common.Address, projectId string, epochId *big.Int) (struct { + Status uint8 + SnapshotCid string + Timestamp *big.Int +}, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "snapshotStatus", dataMarket, projectId, epochId) + + outstruct := new(struct { + Status uint8 + SnapshotCid string + Timestamp *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Status = *abi.ConvertType(out[0], new(uint8)).(*uint8) + outstruct.SnapshotCid = *abi.ConvertType(out[1], new(string)).(*string) + outstruct.Timestamp = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// SnapshotStatus is a free data retrieval call binding the contract method 0x1f588588. +// +// Solidity: function snapshotStatus(address dataMarket, string projectId, uint256 epochId) view returns(uint8 status, string snapshotCid, uint256 timestamp) +func (_Contract *ContractSession) SnapshotStatus(dataMarket common.Address, projectId string, epochId *big.Int) (struct { + Status uint8 + SnapshotCid string + Timestamp *big.Int +}, error) { + return _Contract.Contract.SnapshotStatus(&_Contract.CallOpts, dataMarket, projectId, epochId) +} + +// SnapshotStatus is a free data retrieval call binding the contract method 0x1f588588. +// +// Solidity: function snapshotStatus(address dataMarket, string projectId, uint256 epochId) view returns(uint8 status, string snapshotCid, uint256 timestamp) +func (_Contract *ContractCallerSession) SnapshotStatus(dataMarket common.Address, projectId string, epochId *big.Int) (struct { + Status uint8 + SnapshotCid string + Timestamp *big.Int +}, error) { + return _Contract.Contract.SnapshotStatus(&_Contract.CallOpts, dataMarket, projectId, epochId) +} + +// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0xf3354db0. +// +// Solidity: function snapshotSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCaller) SnapshotSubmissionWindow(opts *bind.CallOpts, dataMarket common.Address) (*big.Int, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "snapshotSubmissionWindow", dataMarket) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0xf3354db0. +// +// Solidity: function snapshotSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractSession) SnapshotSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SnapshotSubmissionWindow(&_Contract.CallOpts, dataMarket) +} + +// SnapshotSubmissionWindow is a free data retrieval call binding the contract method 0xf3354db0. +// +// Solidity: function snapshotSubmissionWindow(address dataMarket) view returns(uint256) +func (_Contract *ContractCallerSession) SnapshotSubmissionWindow(dataMarket common.Address) (*big.Int, error) { + return _Contract.Contract.SnapshotSubmissionWindow(&_Contract.CallOpts, dataMarket) +} + +// SnapshotterState is a free data retrieval call binding the contract method 0x342050cc. +// +// Solidity: function snapshotterState() view returns(address) +func (_Contract *ContractCaller) SnapshotterState(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Contract.contract.Call(opts, &out, "snapshotterState") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SnapshotterState is a free data retrieval call binding the contract method 0x342050cc. +// +// Solidity: function snapshotterState() view returns(address) +func (_Contract *ContractSession) SnapshotterState() (common.Address, error) { + return _Contract.Contract.SnapshotterState(&_Contract.CallOpts) +} + +// SnapshotterState is a free data retrieval call binding the contract method 0x342050cc. +// +// Solidity: function snapshotterState() view returns(address) +func (_Contract *ContractCallerSession) SnapshotterState() (common.Address, error) { + return _Contract.Contract.SnapshotterState(&_Contract.CallOpts) +} + +// AssignSnapshotterToSlotBulk is a paid mutator transaction binding the contract method 0x066522b0. +// +// Solidity: function assignSnapshotterToSlotBulk(uint256[] _slotIds, address[] _snapshotterAddresses) returns() +func (_Contract *ContractTransactor) AssignSnapshotterToSlotBulk(opts *bind.TransactOpts, _slotIds []*big.Int, _snapshotterAddresses []common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "assignSnapshotterToSlotBulk", _slotIds, _snapshotterAddresses) +} + +// AssignSnapshotterToSlotBulk is a paid mutator transaction binding the contract method 0x066522b0. +// +// Solidity: function assignSnapshotterToSlotBulk(uint256[] _slotIds, address[] _snapshotterAddresses) returns() +func (_Contract *ContractSession) AssignSnapshotterToSlotBulk(_slotIds []*big.Int, _snapshotterAddresses []common.Address) (*types.Transaction, error) { + return _Contract.Contract.AssignSnapshotterToSlotBulk(&_Contract.TransactOpts, _slotIds, _snapshotterAddresses) +} + +// AssignSnapshotterToSlotBulk is a paid mutator transaction binding the contract method 0x066522b0. +// +// Solidity: function assignSnapshotterToSlotBulk(uint256[] _slotIds, address[] _snapshotterAddresses) returns() +func (_Contract *ContractTransactorSession) AssignSnapshotterToSlotBulk(_slotIds []*big.Int, _snapshotterAddresses []common.Address) (*types.Transaction, error) { + return _Contract.Contract.AssignSnapshotterToSlotBulk(&_Contract.TransactOpts, _slotIds, _snapshotterAddresses) +} + +// CreateDataMarket is a paid mutator transaction binding the contract method 0x1dbc586b. +// +// Solidity: function createDataMarket(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId) returns(address) +func (_Contract *ContractTransactor) CreateDataMarket(opts *bind.TransactOpts, ownerAddress common.Address, epochSize uint8, sourceChainId *big.Int, sourceChainBlockTime *big.Int, useBlockNumberAsEpochId bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "createDataMarket", ownerAddress, epochSize, sourceChainId, sourceChainBlockTime, useBlockNumberAsEpochId) +} + +// CreateDataMarket is a paid mutator transaction binding the contract method 0x1dbc586b. +// +// Solidity: function createDataMarket(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId) returns(address) +func (_Contract *ContractSession) CreateDataMarket(ownerAddress common.Address, epochSize uint8, sourceChainId *big.Int, sourceChainBlockTime *big.Int, useBlockNumberAsEpochId bool) (*types.Transaction, error) { + return _Contract.Contract.CreateDataMarket(&_Contract.TransactOpts, ownerAddress, epochSize, sourceChainId, sourceChainBlockTime, useBlockNumberAsEpochId) +} + +// CreateDataMarket is a paid mutator transaction binding the contract method 0x1dbc586b. +// +// Solidity: function createDataMarket(address ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId) returns(address) +func (_Contract *ContractTransactorSession) CreateDataMarket(ownerAddress common.Address, epochSize uint8, sourceChainId *big.Int, sourceChainBlockTime *big.Int, useBlockNumberAsEpochId bool) (*types.Transaction, error) { + return _Contract.Contract.CreateDataMarket(&_Contract.TransactOpts, ownerAddress, epochSize, sourceChainId, sourceChainBlockTime, useBlockNumberAsEpochId) +} + +// EndBatchSubmissions is a paid mutator transaction binding the contract method 0x6ee55d73. +// +// Solidity: function endBatchSubmissions(address dataMarket, uint256 epochId) returns() +func (_Contract *ContractTransactor) EndBatchSubmissions(opts *bind.TransactOpts, dataMarket common.Address, epochId *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "endBatchSubmissions", dataMarket, epochId) +} + +// EndBatchSubmissions is a paid mutator transaction binding the contract method 0x6ee55d73. +// +// Solidity: function endBatchSubmissions(address dataMarket, uint256 epochId) returns() +func (_Contract *ContractSession) EndBatchSubmissions(dataMarket common.Address, epochId *big.Int) (*types.Transaction, error) { + return _Contract.Contract.EndBatchSubmissions(&_Contract.TransactOpts, dataMarket, epochId) +} + +// EndBatchSubmissions is a paid mutator transaction binding the contract method 0x6ee55d73. +// +// Solidity: function endBatchSubmissions(address dataMarket, uint256 epochId) returns() +func (_Contract *ContractTransactorSession) EndBatchSubmissions(dataMarket common.Address, epochId *big.Int) (*types.Transaction, error) { + return _Contract.Contract.EndBatchSubmissions(&_Contract.TransactOpts, dataMarket, epochId) +} + +// ForceCompleteConsensusAttestations is a paid mutator transaction binding the contract method 0x05237c1b. +// +// Solidity: function forceCompleteConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) returns() +func (_Contract *ContractTransactor) ForceCompleteConsensusAttestations(opts *bind.TransactOpts, dataMarket common.Address, batchId *big.Int, epochId *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "forceCompleteConsensusAttestations", dataMarket, batchId, epochId) +} + +// ForceCompleteConsensusAttestations is a paid mutator transaction binding the contract method 0x05237c1b. +// +// Solidity: function forceCompleteConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) returns() +func (_Contract *ContractSession) ForceCompleteConsensusAttestations(dataMarket common.Address, batchId *big.Int, epochId *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ForceCompleteConsensusAttestations(&_Contract.TransactOpts, dataMarket, batchId, epochId) +} + +// ForceCompleteConsensusAttestations is a paid mutator transaction binding the contract method 0x05237c1b. +// +// Solidity: function forceCompleteConsensusAttestations(address dataMarket, uint256 batchId, uint256 epochId) returns() +func (_Contract *ContractTransactorSession) ForceCompleteConsensusAttestations(dataMarket common.Address, batchId *big.Int, epochId *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ForceCompleteConsensusAttestations(&_Contract.TransactOpts, dataMarket, batchId, epochId) +} + +// ForceSkipEpoch is a paid mutator transaction binding the contract method 0x27856ff3. +// +// Solidity: function forceSkipEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractTransactor) ForceSkipEpoch(opts *bind.TransactOpts, dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "forceSkipEpoch", dataMarket, begin, end) +} + +// ForceSkipEpoch is a paid mutator transaction binding the contract method 0x27856ff3. +// +// Solidity: function forceSkipEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractSession) ForceSkipEpoch(dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ForceSkipEpoch(&_Contract.TransactOpts, dataMarket, begin, end) +} + +// ForceSkipEpoch is a paid mutator transaction binding the contract method 0x27856ff3. +// +// Solidity: function forceSkipEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractTransactorSession) ForceSkipEpoch(dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ForceSkipEpoch(&_Contract.TransactOpts, dataMarket, begin, end) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Contract *ContractTransactor) Initialize(opts *bind.TransactOpts, initialOwner common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "initialize", initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Contract *ContractSession) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _Contract.Contract.Initialize(&_Contract.TransactOpts, initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Contract *ContractTransactorSession) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _Contract.Contract.Initialize(&_Contract.TransactOpts, initialOwner) +} + +// LoadCurrentDay is a paid mutator transaction binding the contract method 0x59c60b30. +// +// Solidity: function loadCurrentDay(address dataMarket, uint256 _dayCounter) returns() +func (_Contract *ContractTransactor) LoadCurrentDay(opts *bind.TransactOpts, dataMarket common.Address, _dayCounter *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "loadCurrentDay", dataMarket, _dayCounter) +} + +// LoadCurrentDay is a paid mutator transaction binding the contract method 0x59c60b30. +// +// Solidity: function loadCurrentDay(address dataMarket, uint256 _dayCounter) returns() +func (_Contract *ContractSession) LoadCurrentDay(dataMarket common.Address, _dayCounter *big.Int) (*types.Transaction, error) { + return _Contract.Contract.LoadCurrentDay(&_Contract.TransactOpts, dataMarket, _dayCounter) +} + +// LoadCurrentDay is a paid mutator transaction binding the contract method 0x59c60b30. +// +// Solidity: function loadCurrentDay(address dataMarket, uint256 _dayCounter) returns() +func (_Contract *ContractTransactorSession) LoadCurrentDay(dataMarket common.Address, _dayCounter *big.Int) (*types.Transaction, error) { + return _Contract.Contract.LoadCurrentDay(&_Contract.TransactOpts, dataMarket, _dayCounter) +} + +// LoadSlotSubmissions is a paid mutator transaction binding the contract method 0xa1ac8af0. +// +// Solidity: function loadSlotSubmissions(address dataMarket, uint256 slotId, uint256 dayId, uint256 snapshotCount) returns() +func (_Contract *ContractTransactor) LoadSlotSubmissions(opts *bind.TransactOpts, dataMarket common.Address, slotId *big.Int, dayId *big.Int, snapshotCount *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "loadSlotSubmissions", dataMarket, slotId, dayId, snapshotCount) +} + +// LoadSlotSubmissions is a paid mutator transaction binding the contract method 0xa1ac8af0. +// +// Solidity: function loadSlotSubmissions(address dataMarket, uint256 slotId, uint256 dayId, uint256 snapshotCount) returns() +func (_Contract *ContractSession) LoadSlotSubmissions(dataMarket common.Address, slotId *big.Int, dayId *big.Int, snapshotCount *big.Int) (*types.Transaction, error) { + return _Contract.Contract.LoadSlotSubmissions(&_Contract.TransactOpts, dataMarket, slotId, dayId, snapshotCount) +} + +// LoadSlotSubmissions is a paid mutator transaction binding the contract method 0xa1ac8af0. +// +// Solidity: function loadSlotSubmissions(address dataMarket, uint256 slotId, uint256 dayId, uint256 snapshotCount) returns() +func (_Contract *ContractTransactorSession) LoadSlotSubmissions(dataMarket common.Address, slotId *big.Int, dayId *big.Int, snapshotCount *big.Int) (*types.Transaction, error) { + return _Contract.Contract.LoadSlotSubmissions(&_Contract.TransactOpts, dataMarket, slotId, dayId, snapshotCount) +} + +// ReleaseEpoch is a paid mutator transaction binding the contract method 0x09517cb6. +// +// Solidity: function releaseEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractTransactor) ReleaseEpoch(opts *bind.TransactOpts, dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "releaseEpoch", dataMarket, begin, end) +} + +// ReleaseEpoch is a paid mutator transaction binding the contract method 0x09517cb6. +// +// Solidity: function releaseEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractSession) ReleaseEpoch(dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ReleaseEpoch(&_Contract.TransactOpts, dataMarket, begin, end) +} + +// ReleaseEpoch is a paid mutator transaction binding the contract method 0x09517cb6. +// +// Solidity: function releaseEpoch(address dataMarket, uint256 begin, uint256 end) returns() +func (_Contract *ContractTransactorSession) ReleaseEpoch(dataMarket common.Address, begin *big.Int, end *big.Int) (*types.Transaction, error) { + return _Contract.Contract.ReleaseEpoch(&_Contract.TransactOpts, dataMarket, begin, end) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Contract *ContractTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Contract *ContractSession) RenounceOwnership() (*types.Transaction, error) { + return _Contract.Contract.RenounceOwnership(&_Contract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Contract *ContractTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Contract.Contract.RenounceOwnership(&_Contract.TransactOpts) +} + +// SetSequencerId is a paid mutator transaction binding the contract method 0x79d01175. +// +// Solidity: function setSequencerId(address dataMarket, string _sequencerId) returns() +func (_Contract *ContractTransactor) SetSequencerId(opts *bind.TransactOpts, dataMarket common.Address, _sequencerId string) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "setSequencerId", dataMarket, _sequencerId) +} + +// SetSequencerId is a paid mutator transaction binding the contract method 0x79d01175. +// +// Solidity: function setSequencerId(address dataMarket, string _sequencerId) returns() +func (_Contract *ContractSession) SetSequencerId(dataMarket common.Address, _sequencerId string) (*types.Transaction, error) { + return _Contract.Contract.SetSequencerId(&_Contract.TransactOpts, dataMarket, _sequencerId) +} + +// SetSequencerId is a paid mutator transaction binding the contract method 0x79d01175. +// +// Solidity: function setSequencerId(address dataMarket, string _sequencerId) returns() +func (_Contract *ContractTransactorSession) SetSequencerId(dataMarket common.Address, _sequencerId string) (*types.Transaction, error) { + return _Contract.Contract.SetSequencerId(&_Contract.TransactOpts, dataMarket, _sequencerId) +} + +// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x31632255. +// +// Solidity: function submitBatchAttestation(address dataMarket, uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractTransactor) SubmitBatchAttestation(opts *bind.TransactOpts, dataMarket common.Address, batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "submitBatchAttestation", dataMarket, batchId, epochId, finalizedCidsRootHash) +} + +// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x31632255. +// +// Solidity: function submitBatchAttestation(address dataMarket, uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractSession) SubmitBatchAttestation(dataMarket common.Address, batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitBatchAttestation(&_Contract.TransactOpts, dataMarket, batchId, epochId, finalizedCidsRootHash) +} + +// SubmitBatchAttestation is a paid mutator transaction binding the contract method 0x31632255. +// +// Solidity: function submitBatchAttestation(address dataMarket, uint256 batchId, uint256 epochId, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractTransactorSession) SubmitBatchAttestation(dataMarket common.Address, batchId *big.Int, epochId *big.Int, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitBatchAttestation(&_Contract.TransactOpts, dataMarket, batchId, epochId, finalizedCidsRootHash) +} + +// SubmitSnapshot is a paid mutator transaction binding the contract method 0x5678a9d5. +// +// Solidity: function submitSnapshot(address dataMarket, uint256 slotId, string snapshotCid, uint256 epochId, string projectId, (uint256,uint256,string,uint256,string) request, bytes signature) returns() +func (_Contract *ContractTransactor) SubmitSnapshot(opts *bind.TransactOpts, dataMarket common.Address, slotId *big.Int, snapshotCid string, epochId *big.Int, projectId string, request PowerloomDataMarketRequest, signature []byte) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "submitSnapshot", dataMarket, slotId, snapshotCid, epochId, projectId, request, signature) +} + +// SubmitSnapshot is a paid mutator transaction binding the contract method 0x5678a9d5. +// +// Solidity: function submitSnapshot(address dataMarket, uint256 slotId, string snapshotCid, uint256 epochId, string projectId, (uint256,uint256,string,uint256,string) request, bytes signature) returns() +func (_Contract *ContractSession) SubmitSnapshot(dataMarket common.Address, slotId *big.Int, snapshotCid string, epochId *big.Int, projectId string, request PowerloomDataMarketRequest, signature []byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitSnapshot(&_Contract.TransactOpts, dataMarket, slotId, snapshotCid, epochId, projectId, request, signature) +} + +// SubmitSnapshot is a paid mutator transaction binding the contract method 0x5678a9d5. +// +// Solidity: function submitSnapshot(address dataMarket, uint256 slotId, string snapshotCid, uint256 epochId, string projectId, (uint256,uint256,string,uint256,string) request, bytes signature) returns() +func (_Contract *ContractTransactorSession) SubmitSnapshot(dataMarket common.Address, slotId *big.Int, snapshotCid string, epochId *big.Int, projectId string, request PowerloomDataMarketRequest, signature []byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitSnapshot(&_Contract.TransactOpts, dataMarket, slotId, snapshotCid, epochId, projectId, request, signature) +} + +// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xc19e74d9. +// +// Solidity: function submitSubmissionBatch(address dataMarket, string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractTransactor) SubmitSubmissionBatch(opts *bind.TransactOpts, dataMarket common.Address, batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "submitSubmissionBatch", dataMarket, batchCid, batchId, epochId, projectIds, snapshotCids, finalizedCidsRootHash) +} + +// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xc19e74d9. +// +// Solidity: function submitSubmissionBatch(address dataMarket, string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractSession) SubmitSubmissionBatch(dataMarket common.Address, batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitSubmissionBatch(&_Contract.TransactOpts, dataMarket, batchCid, batchId, epochId, projectIds, snapshotCids, finalizedCidsRootHash) +} + +// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xc19e74d9. +// +// Solidity: function submitSubmissionBatch(address dataMarket, string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids, bytes32 finalizedCidsRootHash) returns() +func (_Contract *ContractTransactorSession) SubmitSubmissionBatch(dataMarket common.Address, batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string, finalizedCidsRootHash [32]byte) (*types.Transaction, error) { + return _Contract.Contract.SubmitSubmissionBatch(&_Contract.TransactOpts, dataMarket, batchCid, batchId, epochId, projectIds, snapshotCids, finalizedCidsRootHash) +} + +// ToggleDataMarket is a paid mutator transaction binding the contract method 0xb34aebca. +// +// Solidity: function toggleDataMarket(address dataMarketAddress, bool enabled) returns() +func (_Contract *ContractTransactor) ToggleDataMarket(opts *bind.TransactOpts, dataMarketAddress common.Address, enabled bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "toggleDataMarket", dataMarketAddress, enabled) +} + +// ToggleDataMarket is a paid mutator transaction binding the contract method 0xb34aebca. +// +// Solidity: function toggleDataMarket(address dataMarketAddress, bool enabled) returns() +func (_Contract *ContractSession) ToggleDataMarket(dataMarketAddress common.Address, enabled bool) (*types.Transaction, error) { + return _Contract.Contract.ToggleDataMarket(&_Contract.TransactOpts, dataMarketAddress, enabled) +} + +// ToggleDataMarket is a paid mutator transaction binding the contract method 0xb34aebca. +// +// Solidity: function toggleDataMarket(address dataMarketAddress, bool enabled) returns() +func (_Contract *ContractTransactorSession) ToggleDataMarket(dataMarketAddress common.Address, enabled bool) (*types.Transaction, error) { + return _Contract.Contract.ToggleDataMarket(&_Contract.TransactOpts, dataMarketAddress, enabled) +} + +// ToggleFallback is a paid mutator transaction binding the contract method 0x32f6f519. +// +// Solidity: function toggleFallback(address dataMarket) returns() +func (_Contract *ContractTransactor) ToggleFallback(opts *bind.TransactOpts, dataMarket common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "toggleFallback", dataMarket) +} + +// ToggleFallback is a paid mutator transaction binding the contract method 0x32f6f519. +// +// Solidity: function toggleFallback(address dataMarket) returns() +func (_Contract *ContractSession) ToggleFallback(dataMarket common.Address) (*types.Transaction, error) { + return _Contract.Contract.ToggleFallback(&_Contract.TransactOpts, dataMarket) +} + +// ToggleFallback is a paid mutator transaction binding the contract method 0x32f6f519. +// +// Solidity: function toggleFallback(address dataMarket) returns() +func (_Contract *ContractTransactorSession) ToggleFallback(dataMarket common.Address) (*types.Transaction, error) { + return _Contract.Contract.ToggleFallback(&_Contract.TransactOpts, dataMarket) +} + +// ToggleRewards is a paid mutator transaction binding the contract method 0x71746644. +// +// Solidity: function toggleRewards(address dataMarket) returns() +func (_Contract *ContractTransactor) ToggleRewards(opts *bind.TransactOpts, dataMarket common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "toggleRewards", dataMarket) +} + +// ToggleRewards is a paid mutator transaction binding the contract method 0x71746644. +// +// Solidity: function toggleRewards(address dataMarket) returns() +func (_Contract *ContractSession) ToggleRewards(dataMarket common.Address) (*types.Transaction, error) { + return _Contract.Contract.ToggleRewards(&_Contract.TransactOpts, dataMarket) +} + +// ToggleRewards is a paid mutator transaction binding the contract method 0x71746644. +// +// Solidity: function toggleRewards(address dataMarket) returns() +func (_Contract *ContractTransactorSession) ToggleRewards(dataMarket common.Address) (*types.Transaction, error) { + return _Contract.Contract.ToggleRewards(&_Contract.TransactOpts, dataMarket) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Contract *ContractTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Contract *ContractSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Contract.Contract.TransferOwnership(&_Contract.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Contract *ContractTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Contract.Contract.TransferOwnership(&_Contract.TransactOpts, newOwner) +} + +// UpdateAddresses is a paid mutator transaction binding the contract method 0x8d3bcb5a. +// +// Solidity: function updateAddresses(address dataMarket, uint8 role, address[] _addresses, bool[] _status) returns() +func (_Contract *ContractTransactor) UpdateAddresses(opts *bind.TransactOpts, dataMarket common.Address, role uint8, _addresses []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateAddresses", dataMarket, role, _addresses, _status) +} + +// UpdateAddresses is a paid mutator transaction binding the contract method 0x8d3bcb5a. +// +// Solidity: function updateAddresses(address dataMarket, uint8 role, address[] _addresses, bool[] _status) returns() +func (_Contract *ContractSession) UpdateAddresses(dataMarket common.Address, role uint8, _addresses []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateAddresses(&_Contract.TransactOpts, dataMarket, role, _addresses, _status) +} + +// UpdateAddresses is a paid mutator transaction binding the contract method 0x8d3bcb5a. +// +// Solidity: function updateAddresses(address dataMarket, uint8 role, address[] _addresses, bool[] _status) returns() +func (_Contract *ContractTransactorSession) UpdateAddresses(dataMarket common.Address, role uint8, _addresses []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateAddresses(&_Contract.TransactOpts, dataMarket, role, _addresses, _status) +} + +// UpdateAllowedProjectType is a paid mutator transaction binding the contract method 0xb1a3f28d. +// +// Solidity: function updateAllowedProjectType(address dataMarket, string _projectType, bool _status) returns() +func (_Contract *ContractTransactor) UpdateAllowedProjectType(opts *bind.TransactOpts, dataMarket common.Address, _projectType string, _status bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateAllowedProjectType", dataMarket, _projectType, _status) +} + +// UpdateAllowedProjectType is a paid mutator transaction binding the contract method 0xb1a3f28d. +// +// Solidity: function updateAllowedProjectType(address dataMarket, string _projectType, bool _status) returns() +func (_Contract *ContractSession) UpdateAllowedProjectType(dataMarket common.Address, _projectType string, _status bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateAllowedProjectType(&_Contract.TransactOpts, dataMarket, _projectType, _status) +} + +// UpdateAllowedProjectType is a paid mutator transaction binding the contract method 0xb1a3f28d. +// +// Solidity: function updateAllowedProjectType(address dataMarket, string _projectType, bool _status) returns() +func (_Contract *ContractTransactorSession) UpdateAllowedProjectType(dataMarket common.Address, _projectType string, _status bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateAllowedProjectType(&_Contract.TransactOpts, dataMarket, _projectType, _status) +} + +// UpdateAttestationSubmissionWindow is a paid mutator transaction binding the contract method 0x89afe86a. +// +// Solidity: function updateAttestationSubmissionWindow(address dataMarket, uint256 newattestationSubmissionWindow) returns() +func (_Contract *ContractTransactor) UpdateAttestationSubmissionWindow(opts *bind.TransactOpts, dataMarket common.Address, newattestationSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateAttestationSubmissionWindow", dataMarket, newattestationSubmissionWindow) +} + +// UpdateAttestationSubmissionWindow is a paid mutator transaction binding the contract method 0x89afe86a. +// +// Solidity: function updateAttestationSubmissionWindow(address dataMarket, uint256 newattestationSubmissionWindow) returns() +func (_Contract *ContractSession) UpdateAttestationSubmissionWindow(dataMarket common.Address, newattestationSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateAttestationSubmissionWindow(&_Contract.TransactOpts, dataMarket, newattestationSubmissionWindow) +} + +// UpdateAttestationSubmissionWindow is a paid mutator transaction binding the contract method 0x89afe86a. +// +// Solidity: function updateAttestationSubmissionWindow(address dataMarket, uint256 newattestationSubmissionWindow) returns() +func (_Contract *ContractTransactorSession) UpdateAttestationSubmissionWindow(dataMarket common.Address, newattestationSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateAttestationSubmissionWindow(&_Contract.TransactOpts, dataMarket, newattestationSubmissionWindow) +} + +// UpdateBatchSubmissionWindow is a paid mutator transaction binding the contract method 0xd72e07fd. +// +// Solidity: function updateBatchSubmissionWindow(address dataMarket, uint256 newbatchSubmissionWindow) returns() +func (_Contract *ContractTransactor) UpdateBatchSubmissionWindow(opts *bind.TransactOpts, dataMarket common.Address, newbatchSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateBatchSubmissionWindow", dataMarket, newbatchSubmissionWindow) +} + +// UpdateBatchSubmissionWindow is a paid mutator transaction binding the contract method 0xd72e07fd. +// +// Solidity: function updateBatchSubmissionWindow(address dataMarket, uint256 newbatchSubmissionWindow) returns() +func (_Contract *ContractSession) UpdateBatchSubmissionWindow(dataMarket common.Address, newbatchSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateBatchSubmissionWindow(&_Contract.TransactOpts, dataMarket, newbatchSubmissionWindow) +} + +// UpdateBatchSubmissionWindow is a paid mutator transaction binding the contract method 0xd72e07fd. +// +// Solidity: function updateBatchSubmissionWindow(address dataMarket, uint256 newbatchSubmissionWindow) returns() +func (_Contract *ContractTransactorSession) UpdateBatchSubmissionWindow(dataMarket common.Address, newbatchSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateBatchSubmissionWindow(&_Contract.TransactOpts, dataMarket, newbatchSubmissionWindow) +} + +// UpdateDailySnapshotQuota is a paid mutator transaction binding the contract method 0xeb4c8b89. +// +// Solidity: function updateDailySnapshotQuota(address dataMarket, uint256 _dailySnapshotQuota) returns() +func (_Contract *ContractTransactor) UpdateDailySnapshotQuota(opts *bind.TransactOpts, dataMarket common.Address, _dailySnapshotQuota *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateDailySnapshotQuota", dataMarket, _dailySnapshotQuota) +} + +// UpdateDailySnapshotQuota is a paid mutator transaction binding the contract method 0xeb4c8b89. +// +// Solidity: function updateDailySnapshotQuota(address dataMarket, uint256 _dailySnapshotQuota) returns() +func (_Contract *ContractSession) UpdateDailySnapshotQuota(dataMarket common.Address, _dailySnapshotQuota *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateDailySnapshotQuota(&_Contract.TransactOpts, dataMarket, _dailySnapshotQuota) +} + +// UpdateDailySnapshotQuota is a paid mutator transaction binding the contract method 0xeb4c8b89. +// +// Solidity: function updateDailySnapshotQuota(address dataMarket, uint256 _dailySnapshotQuota) returns() +func (_Contract *ContractTransactorSession) UpdateDailySnapshotQuota(dataMarket common.Address, _dailySnapshotQuota *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateDailySnapshotQuota(&_Contract.TransactOpts, dataMarket, _dailySnapshotQuota) +} + +// UpdateDataMarketFactory is a paid mutator transaction binding the contract method 0xb48753eb. +// +// Solidity: function updateDataMarketFactory(address _address) returns() +func (_Contract *ContractTransactor) UpdateDataMarketFactory(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateDataMarketFactory", _address) +} + +// UpdateDataMarketFactory is a paid mutator transaction binding the contract method 0xb48753eb. +// +// Solidity: function updateDataMarketFactory(address _address) returns() +func (_Contract *ContractSession) UpdateDataMarketFactory(_address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateDataMarketFactory(&_Contract.TransactOpts, _address) +} + +// UpdateDataMarketFactory is a paid mutator transaction binding the contract method 0xb48753eb. +// +// Solidity: function updateDataMarketFactory(address _address) returns() +func (_Contract *ContractTransactorSession) UpdateDataMarketFactory(_address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateDataMarketFactory(&_Contract.TransactOpts, _address) +} + +// UpdateEpochManager is a paid mutator transaction binding the contract method 0x6e81f234. +// +// Solidity: function updateEpochManager(address dataMarket, address _address) returns() +func (_Contract *ContractTransactor) UpdateEpochManager(opts *bind.TransactOpts, dataMarket common.Address, _address common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateEpochManager", dataMarket, _address) +} + +// UpdateEpochManager is a paid mutator transaction binding the contract method 0x6e81f234. +// +// Solidity: function updateEpochManager(address dataMarket, address _address) returns() +func (_Contract *ContractSession) UpdateEpochManager(dataMarket common.Address, _address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateEpochManager(&_Contract.TransactOpts, dataMarket, _address) +} + +// UpdateEpochManager is a paid mutator transaction binding the contract method 0x6e81f234. +// +// Solidity: function updateEpochManager(address dataMarket, address _address) returns() +func (_Contract *ContractTransactorSession) UpdateEpochManager(dataMarket common.Address, _address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateEpochManager(&_Contract.TransactOpts, dataMarket, _address) +} + +// UpdateFallbackNodes is a paid mutator transaction binding the contract method 0x50304b62. +// +// Solidity: function updateFallbackNodes(address dataMarket, address[] _fallbackNodes, bool[] _status) returns() +func (_Contract *ContractTransactor) UpdateFallbackNodes(opts *bind.TransactOpts, dataMarket common.Address, _fallbackNodes []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateFallbackNodes", dataMarket, _fallbackNodes, _status) +} + +// UpdateFallbackNodes is a paid mutator transaction binding the contract method 0x50304b62. +// +// Solidity: function updateFallbackNodes(address dataMarket, address[] _fallbackNodes, bool[] _status) returns() +func (_Contract *ContractSession) UpdateFallbackNodes(dataMarket common.Address, _fallbackNodes []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateFallbackNodes(&_Contract.TransactOpts, dataMarket, _fallbackNodes, _status) +} + +// UpdateFallbackNodes is a paid mutator transaction binding the contract method 0x50304b62. +// +// Solidity: function updateFallbackNodes(address dataMarket, address[] _fallbackNodes, bool[] _status) returns() +func (_Contract *ContractTransactorSession) UpdateFallbackNodes(dataMarket common.Address, _fallbackNodes []common.Address, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateFallbackNodes(&_Contract.TransactOpts, dataMarket, _fallbackNodes, _status) +} + +// UpdateMinAttestationsForConsensus is a paid mutator transaction binding the contract method 0xe4578d51. +// +// Solidity: function updateMinAttestationsForConsensus(address dataMarket, uint256 _minAttestationsForConsensus) returns() +func (_Contract *ContractTransactor) UpdateMinAttestationsForConsensus(opts *bind.TransactOpts, dataMarket common.Address, _minAttestationsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateMinAttestationsForConsensus", dataMarket, _minAttestationsForConsensus) +} + +// UpdateMinAttestationsForConsensus is a paid mutator transaction binding the contract method 0xe4578d51. +// +// Solidity: function updateMinAttestationsForConsensus(address dataMarket, uint256 _minAttestationsForConsensus) returns() +func (_Contract *ContractSession) UpdateMinAttestationsForConsensus(dataMarket common.Address, _minAttestationsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateMinAttestationsForConsensus(&_Contract.TransactOpts, dataMarket, _minAttestationsForConsensus) +} + +// UpdateMinAttestationsForConsensus is a paid mutator transaction binding the contract method 0xe4578d51. +// +// Solidity: function updateMinAttestationsForConsensus(address dataMarket, uint256 _minAttestationsForConsensus) returns() +func (_Contract *ContractTransactorSession) UpdateMinAttestationsForConsensus(dataMarket common.Address, _minAttestationsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateMinAttestationsForConsensus(&_Contract.TransactOpts, dataMarket, _minAttestationsForConsensus) +} + +// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x3cb782cd. +// +// Solidity: function updateMinSnapshottersForConsensus(address dataMarket, uint256 _minSubmissionsForConsensus) returns() +func (_Contract *ContractTransactor) UpdateMinSnapshottersForConsensus(opts *bind.TransactOpts, dataMarket common.Address, _minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateMinSnapshottersForConsensus", dataMarket, _minSubmissionsForConsensus) +} + +// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x3cb782cd. +// +// Solidity: function updateMinSnapshottersForConsensus(address dataMarket, uint256 _minSubmissionsForConsensus) returns() +func (_Contract *ContractSession) UpdateMinSnapshottersForConsensus(dataMarket common.Address, _minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateMinSnapshottersForConsensus(&_Contract.TransactOpts, dataMarket, _minSubmissionsForConsensus) +} + +// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x3cb782cd. +// +// Solidity: function updateMinSnapshottersForConsensus(address dataMarket, uint256 _minSubmissionsForConsensus) returns() +func (_Contract *ContractTransactorSession) UpdateMinSnapshottersForConsensus(dataMarket common.Address, _minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateMinSnapshottersForConsensus(&_Contract.TransactOpts, dataMarket, _minSubmissionsForConsensus) +} + +// UpdateProjects is a paid mutator transaction binding the contract method 0x0589852d. +// +// Solidity: function updateProjects(address dataMarket, string[] _projects, bool[] _status) returns() +func (_Contract *ContractTransactor) UpdateProjects(opts *bind.TransactOpts, dataMarket common.Address, _projects []string, _status []bool) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateProjects", dataMarket, _projects, _status) +} + +// UpdateProjects is a paid mutator transaction binding the contract method 0x0589852d. +// +// Solidity: function updateProjects(address dataMarket, string[] _projects, bool[] _status) returns() +func (_Contract *ContractSession) UpdateProjects(dataMarket common.Address, _projects []string, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateProjects(&_Contract.TransactOpts, dataMarket, _projects, _status) +} + +// UpdateProjects is a paid mutator transaction binding the contract method 0x0589852d. +// +// Solidity: function updateProjects(address dataMarket, string[] _projects, bool[] _status) returns() +func (_Contract *ContractTransactorSession) UpdateProjects(dataMarket common.Address, _projects []string, _status []bool) (*types.Transaction, error) { + return _Contract.Contract.UpdateProjects(&_Contract.TransactOpts, dataMarket, _projects, _status) +} + +// UpdateRewardBasePoints is a paid mutator transaction binding the contract method 0x7195df15. +// +// Solidity: function updateRewardBasePoints(address dataMarket, uint256 newRewardBasePoints) returns() +func (_Contract *ContractTransactor) UpdateRewardBasePoints(opts *bind.TransactOpts, dataMarket common.Address, newRewardBasePoints *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateRewardBasePoints", dataMarket, newRewardBasePoints) +} + +// UpdateRewardBasePoints is a paid mutator transaction binding the contract method 0x7195df15. +// +// Solidity: function updateRewardBasePoints(address dataMarket, uint256 newRewardBasePoints) returns() +func (_Contract *ContractSession) UpdateRewardBasePoints(dataMarket common.Address, newRewardBasePoints *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateRewardBasePoints(&_Contract.TransactOpts, dataMarket, newRewardBasePoints) +} + +// UpdateRewardBasePoints is a paid mutator transaction binding the contract method 0x7195df15. +// +// Solidity: function updateRewardBasePoints(address dataMarket, uint256 newRewardBasePoints) returns() +func (_Contract *ContractTransactorSession) UpdateRewardBasePoints(dataMarket common.Address, newRewardBasePoints *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateRewardBasePoints(&_Contract.TransactOpts, dataMarket, newRewardBasePoints) +} + +// UpdateRewards is a paid mutator transaction binding the contract method 0x7d2bd53d. +// +// Solidity: function updateRewards(address dataMarket, uint256[] slotIds, uint256[] submissionsList, uint256 day) returns() +func (_Contract *ContractTransactor) UpdateRewards(opts *bind.TransactOpts, dataMarket common.Address, slotIds []*big.Int, submissionsList []*big.Int, day *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateRewards", dataMarket, slotIds, submissionsList, day) +} + +// UpdateRewards is a paid mutator transaction binding the contract method 0x7d2bd53d. +// +// Solidity: function updateRewards(address dataMarket, uint256[] slotIds, uint256[] submissionsList, uint256 day) returns() +func (_Contract *ContractSession) UpdateRewards(dataMarket common.Address, slotIds []*big.Int, submissionsList []*big.Int, day *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateRewards(&_Contract.TransactOpts, dataMarket, slotIds, submissionsList, day) +} + +// UpdateRewards is a paid mutator transaction binding the contract method 0x7d2bd53d. +// +// Solidity: function updateRewards(address dataMarket, uint256[] slotIds, uint256[] submissionsList, uint256 day) returns() +func (_Contract *ContractTransactorSession) UpdateRewards(dataMarket common.Address, slotIds []*big.Int, submissionsList []*big.Int, day *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateRewards(&_Contract.TransactOpts, dataMarket, slotIds, submissionsList, day) +} + +// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0xa02c3e9b. +// +// Solidity: function updateSnapshotSubmissionWindow(address dataMarket, uint256 newsnapshotSubmissionWindow) returns() +func (_Contract *ContractTransactor) UpdateSnapshotSubmissionWindow(opts *bind.TransactOpts, dataMarket common.Address, newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateSnapshotSubmissionWindow", dataMarket, newsnapshotSubmissionWindow) +} + +// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0xa02c3e9b. +// +// Solidity: function updateSnapshotSubmissionWindow(address dataMarket, uint256 newsnapshotSubmissionWindow) returns() +func (_Contract *ContractSession) UpdateSnapshotSubmissionWindow(dataMarket common.Address, newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateSnapshotSubmissionWindow(&_Contract.TransactOpts, dataMarket, newsnapshotSubmissionWindow) +} + +// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0xa02c3e9b. +// +// Solidity: function updateSnapshotSubmissionWindow(address dataMarket, uint256 newsnapshotSubmissionWindow) returns() +func (_Contract *ContractTransactorSession) UpdateSnapshotSubmissionWindow(dataMarket common.Address, newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { + return _Contract.Contract.UpdateSnapshotSubmissionWindow(&_Contract.TransactOpts, dataMarket, newsnapshotSubmissionWindow) +} + +// UpdateSnapshotterState is a paid mutator transaction binding the contract method 0xc9742dc1. +// +// Solidity: function updateSnapshotterState(address _address) returns() +func (_Contract *ContractTransactor) UpdateSnapshotterState(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "updateSnapshotterState", _address) +} + +// UpdateSnapshotterState is a paid mutator transaction binding the contract method 0xc9742dc1. +// +// Solidity: function updateSnapshotterState(address _address) returns() +func (_Contract *ContractSession) UpdateSnapshotterState(_address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateSnapshotterState(&_Contract.TransactOpts, _address) +} + +// UpdateSnapshotterState is a paid mutator transaction binding the contract method 0xc9742dc1. +// +// Solidity: function updateSnapshotterState(address _address) returns() +func (_Contract *ContractTransactorSession) UpdateSnapshotterState(_address common.Address) (*types.Transaction, error) { + return _Contract.Contract.UpdateSnapshotterState(&_Contract.TransactOpts, _address) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Contract *ContractTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Contract *ContractSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Contract.Contract.UpgradeToAndCall(&_Contract.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Contract *ContractTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Contract.Contract.UpgradeToAndCall(&_Contract.TransactOpts, newImplementation, data) +} + +// ContractAdminsUpdatedIterator is returned from FilterAdminsUpdated and is used to iterate over the raw logs and unpacked data for AdminsUpdated events raised by the Contract contract. +type ContractAdminsUpdatedIterator struct { + Event *ContractAdminsUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractAdminsUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractAdminsUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractAdminsUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractAdminsUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractAdminsUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractAdminsUpdated represents a AdminsUpdated event raised by the Contract contract. +type ContractAdminsUpdated struct { + DataMarketAddress common.Address + AdminAddress common.Address + Allowed bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminsUpdated is a free log retrieval operation binding the contract event 0xcde1efc8de533d8d3476a1e5f7423ea506a579776fc27e7d5f963f6c6018ca39. +// +// Solidity: event AdminsUpdated(address indexed dataMarketAddress, address adminAddress, bool allowed) +func (_Contract *ContractFilterer) FilterAdminsUpdated(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractAdminsUpdatedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "AdminsUpdated", dataMarketAddressRule) + if err != nil { + return nil, err + } + return &ContractAdminsUpdatedIterator{contract: _Contract.contract, event: "AdminsUpdated", logs: logs, sub: sub}, nil +} + +// WatchAdminsUpdated is a free log subscription operation binding the contract event 0xcde1efc8de533d8d3476a1e5f7423ea506a579776fc27e7d5f963f6c6018ca39. +// +// Solidity: event AdminsUpdated(address indexed dataMarketAddress, address adminAddress, bool allowed) +func (_Contract *ContractFilterer) WatchAdminsUpdated(opts *bind.WatchOpts, sink chan<- *ContractAdminsUpdated, dataMarketAddress []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "AdminsUpdated", dataMarketAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractAdminsUpdated) + if err := _Contract.contract.UnpackLog(event, "AdminsUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminsUpdated is a log parse operation binding the contract event 0xcde1efc8de533d8d3476a1e5f7423ea506a579776fc27e7d5f963f6c6018ca39. +// +// Solidity: event AdminsUpdated(address indexed dataMarketAddress, address adminAddress, bool allowed) +func (_Contract *ContractFilterer) ParseAdminsUpdated(log types.Log) (*ContractAdminsUpdated, error) { + event := new(ContractAdminsUpdated) + if err := _Contract.contract.UnpackLog(event, "AdminsUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractBatchSubmissionsCompletedIterator is returned from FilterBatchSubmissionsCompleted and is used to iterate over the raw logs and unpacked data for BatchSubmissionsCompleted events raised by the Contract contract. +type ContractBatchSubmissionsCompletedIterator struct { + Event *ContractBatchSubmissionsCompleted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractBatchSubmissionsCompletedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractBatchSubmissionsCompleted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractBatchSubmissionsCompleted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractBatchSubmissionsCompletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractBatchSubmissionsCompletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractBatchSubmissionsCompleted represents a BatchSubmissionsCompleted event raised by the Contract contract. +type ContractBatchSubmissionsCompleted struct { + DataMarketAddress common.Address + EpochId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBatchSubmissionsCompleted is a free log retrieval operation binding the contract event 0x5ed90e6a0e12831302fecf13a2cc6f7e9439fed821340d0bddc4ae305dbf9c30. +// +// Solidity: event BatchSubmissionsCompleted(address indexed dataMarketAddress, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterBatchSubmissionsCompleted(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int) (*ContractBatchSubmissionsCompletedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "BatchSubmissionsCompleted", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return &ContractBatchSubmissionsCompletedIterator{contract: _Contract.contract, event: "BatchSubmissionsCompleted", logs: logs, sub: sub}, nil +} + +// WatchBatchSubmissionsCompleted is a free log subscription operation binding the contract event 0x5ed90e6a0e12831302fecf13a2cc6f7e9439fed821340d0bddc4ae305dbf9c30. +// +// Solidity: event BatchSubmissionsCompleted(address indexed dataMarketAddress, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchBatchSubmissionsCompleted(opts *bind.WatchOpts, sink chan<- *ContractBatchSubmissionsCompleted, dataMarketAddress []common.Address, epochId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "BatchSubmissionsCompleted", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractBatchSubmissionsCompleted) + if err := _Contract.contract.UnpackLog(event, "BatchSubmissionsCompleted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBatchSubmissionsCompleted is a log parse operation binding the contract event 0x5ed90e6a0e12831302fecf13a2cc6f7e9439fed821340d0bddc4ae305dbf9c30. +// +// Solidity: event BatchSubmissionsCompleted(address indexed dataMarketAddress, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseBatchSubmissionsCompleted(log types.Log) (*ContractBatchSubmissionsCompleted, error) { + event := new(ContractBatchSubmissionsCompleted) + if err := _Contract.contract.UnpackLog(event, "BatchSubmissionsCompleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDailyTaskCompletedEventIterator is returned from FilterDailyTaskCompletedEvent and is used to iterate over the raw logs and unpacked data for DailyTaskCompletedEvent events raised by the Contract contract. +type ContractDailyTaskCompletedEventIterator struct { + Event *ContractDailyTaskCompletedEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDailyTaskCompletedEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDailyTaskCompletedEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDailyTaskCompletedEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDailyTaskCompletedEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDailyTaskCompletedEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDailyTaskCompletedEvent represents a DailyTaskCompletedEvent event raised by the Contract contract. +type ContractDailyTaskCompletedEvent struct { + DataMarketAddress common.Address + SnapshotterAddress common.Address + SlotId *big.Int + DayId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDailyTaskCompletedEvent is a free log retrieval operation binding the contract event 0x7da483c8dd175f1c370a23b17545e19c0584cf3960d991202e216e6cf95b7a3d. +// +// Solidity: event DailyTaskCompletedEvent(address indexed dataMarketAddress, address snapshotterAddress, uint256 slotId, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterDailyTaskCompletedEvent(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractDailyTaskCompletedEventIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DailyTaskCompletedEvent", dataMarketAddressRule) + if err != nil { + return nil, err + } + return &ContractDailyTaskCompletedEventIterator{contract: _Contract.contract, event: "DailyTaskCompletedEvent", logs: logs, sub: sub}, nil +} + +// WatchDailyTaskCompletedEvent is a free log subscription operation binding the contract event 0x7da483c8dd175f1c370a23b17545e19c0584cf3960d991202e216e6cf95b7a3d. +// +// Solidity: event DailyTaskCompletedEvent(address indexed dataMarketAddress, address snapshotterAddress, uint256 slotId, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchDailyTaskCompletedEvent(opts *bind.WatchOpts, sink chan<- *ContractDailyTaskCompletedEvent, dataMarketAddress []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DailyTaskCompletedEvent", dataMarketAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDailyTaskCompletedEvent) + if err := _Contract.contract.UnpackLog(event, "DailyTaskCompletedEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDailyTaskCompletedEvent is a log parse operation binding the contract event 0x7da483c8dd175f1c370a23b17545e19c0584cf3960d991202e216e6cf95b7a3d. +// +// Solidity: event DailyTaskCompletedEvent(address indexed dataMarketAddress, address snapshotterAddress, uint256 slotId, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseDailyTaskCompletedEvent(log types.Log) (*ContractDailyTaskCompletedEvent, error) { + event := new(ContractDailyTaskCompletedEvent) + if err := _Contract.contract.UnpackLog(event, "DailyTaskCompletedEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDataMarketCreatedIterator is returned from FilterDataMarketCreated and is used to iterate over the raw logs and unpacked data for DataMarketCreated events raised by the Contract contract. +type ContractDataMarketCreatedIterator struct { + Event *ContractDataMarketCreated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDataMarketCreatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDataMarketCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDataMarketCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDataMarketCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDataMarketCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDataMarketCreated represents a DataMarketCreated event raised by the Contract contract. +type ContractDataMarketCreated struct { + OwnerAddress common.Address + EpochSize uint8 + SourceChainId *big.Int + SourceChainBlockTime *big.Int + UseBlockNumberAsEpochId bool + ProtocolState common.Address + DataMarketAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDataMarketCreated is a free log retrieval operation binding the contract event 0x4ac24bfdd2a01328b05db8f3587611f1d37fd01718e1edaa23a75ec91d71f517. +// +// Solidity: event DataMarketCreated(address indexed ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, address protocolState, address dataMarketAddress) +func (_Contract *ContractFilterer) FilterDataMarketCreated(opts *bind.FilterOpts, ownerAddress []common.Address) (*ContractDataMarketCreatedIterator, error) { + + var ownerAddressRule []interface{} + for _, ownerAddressItem := range ownerAddress { + ownerAddressRule = append(ownerAddressRule, ownerAddressItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DataMarketCreated", ownerAddressRule) + if err != nil { + return nil, err + } + return &ContractDataMarketCreatedIterator{contract: _Contract.contract, event: "DataMarketCreated", logs: logs, sub: sub}, nil +} + +// WatchDataMarketCreated is a free log subscription operation binding the contract event 0x4ac24bfdd2a01328b05db8f3587611f1d37fd01718e1edaa23a75ec91d71f517. +// +// Solidity: event DataMarketCreated(address indexed ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, address protocolState, address dataMarketAddress) +func (_Contract *ContractFilterer) WatchDataMarketCreated(opts *bind.WatchOpts, sink chan<- *ContractDataMarketCreated, ownerAddress []common.Address) (event.Subscription, error) { + + var ownerAddressRule []interface{} + for _, ownerAddressItem := range ownerAddress { + ownerAddressRule = append(ownerAddressRule, ownerAddressItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DataMarketCreated", ownerAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDataMarketCreated) + if err := _Contract.contract.UnpackLog(event, "DataMarketCreated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDataMarketCreated is a log parse operation binding the contract event 0x4ac24bfdd2a01328b05db8f3587611f1d37fd01718e1edaa23a75ec91d71f517. +// +// Solidity: event DataMarketCreated(address indexed ownerAddress, uint8 epochSize, uint256 sourceChainId, uint256 sourceChainBlockTime, bool useBlockNumberAsEpochId, address protocolState, address dataMarketAddress) +func (_Contract *ContractFilterer) ParseDataMarketCreated(log types.Log) (*ContractDataMarketCreated, error) { + event := new(ContractDataMarketCreated) + if err := _Contract.contract.UnpackLog(event, "DataMarketCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDayStartedEventIterator is returned from FilterDayStartedEvent and is used to iterate over the raw logs and unpacked data for DayStartedEvent events raised by the Contract contract. +type ContractDayStartedEventIterator struct { + Event *ContractDayStartedEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDayStartedEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDayStartedEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDayStartedEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDayStartedEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDayStartedEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDayStartedEvent represents a DayStartedEvent event raised by the Contract contract. +type ContractDayStartedEvent struct { + DataMarketAddress common.Address + DayId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDayStartedEvent is a free log retrieval operation binding the contract event 0x9bf380fe36617cd5d995968abb4ae6d3657a763c126535d590b4503ff2542426. +// +// Solidity: event DayStartedEvent(address indexed dataMarketAddress, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterDayStartedEvent(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractDayStartedEventIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DayStartedEvent", dataMarketAddressRule) + if err != nil { + return nil, err + } + return &ContractDayStartedEventIterator{contract: _Contract.contract, event: "DayStartedEvent", logs: logs, sub: sub}, nil +} + +// WatchDayStartedEvent is a free log subscription operation binding the contract event 0x9bf380fe36617cd5d995968abb4ae6d3657a763c126535d590b4503ff2542426. +// +// Solidity: event DayStartedEvent(address indexed dataMarketAddress, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchDayStartedEvent(opts *bind.WatchOpts, sink chan<- *ContractDayStartedEvent, dataMarketAddress []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DayStartedEvent", dataMarketAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDayStartedEvent) + if err := _Contract.contract.UnpackLog(event, "DayStartedEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDayStartedEvent is a log parse operation binding the contract event 0x9bf380fe36617cd5d995968abb4ae6d3657a763c126535d590b4503ff2542426. +// +// Solidity: event DayStartedEvent(address indexed dataMarketAddress, uint256 dayId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseDayStartedEvent(log types.Log) (*ContractDayStartedEvent, error) { + event := new(ContractDayStartedEvent) + if err := _Contract.contract.UnpackLog(event, "DayStartedEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDelayedAttestationSubmittedIterator is returned from FilterDelayedAttestationSubmitted and is used to iterate over the raw logs and unpacked data for DelayedAttestationSubmitted events raised by the Contract contract. +type ContractDelayedAttestationSubmittedIterator struct { + Event *ContractDelayedAttestationSubmitted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDelayedAttestationSubmittedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDelayedAttestationSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDelayedAttestationSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDelayedAttestationSubmittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDelayedAttestationSubmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDelayedAttestationSubmitted represents a DelayedAttestationSubmitted event raised by the Contract contract. +type ContractDelayedAttestationSubmitted struct { + DataMarketAddress common.Address + BatchId *big.Int + EpochId *big.Int + Timestamp *big.Int + ValidatorAddr common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelayedAttestationSubmitted is a free log retrieval operation binding the contract event 0x4fd04f28641379ddef7bacd546c5e698814831a1c0772236c460aa42b029aa31. +// +// Solidity: event DelayedAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) FilterDelayedAttestationSubmitted(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int, validatorAddr []common.Address) (*ContractDelayedAttestationSubmittedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + var validatorAddrRule []interface{} + for _, validatorAddrItem := range validatorAddr { + validatorAddrRule = append(validatorAddrRule, validatorAddrItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DelayedAttestationSubmitted", dataMarketAddressRule, epochIdRule, validatorAddrRule) + if err != nil { + return nil, err + } + return &ContractDelayedAttestationSubmittedIterator{contract: _Contract.contract, event: "DelayedAttestationSubmitted", logs: logs, sub: sub}, nil +} + +// WatchDelayedAttestationSubmitted is a free log subscription operation binding the contract event 0x4fd04f28641379ddef7bacd546c5e698814831a1c0772236c460aa42b029aa31. +// +// Solidity: event DelayedAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) WatchDelayedAttestationSubmitted(opts *bind.WatchOpts, sink chan<- *ContractDelayedAttestationSubmitted, dataMarketAddress []common.Address, epochId []*big.Int, validatorAddr []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + var validatorAddrRule []interface{} + for _, validatorAddrItem := range validatorAddr { + validatorAddrRule = append(validatorAddrRule, validatorAddrItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DelayedAttestationSubmitted", dataMarketAddressRule, epochIdRule, validatorAddrRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDelayedAttestationSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedAttestationSubmitted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelayedAttestationSubmitted is a log parse operation binding the contract event 0x4fd04f28641379ddef7bacd546c5e698814831a1c0772236c460aa42b029aa31. +// +// Solidity: event DelayedAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) ParseDelayedAttestationSubmitted(log types.Log) (*ContractDelayedAttestationSubmitted, error) { + event := new(ContractDelayedAttestationSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedAttestationSubmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDelayedBatchSubmittedIterator is returned from FilterDelayedBatchSubmitted and is used to iterate over the raw logs and unpacked data for DelayedBatchSubmitted events raised by the Contract contract. +type ContractDelayedBatchSubmittedIterator struct { + Event *ContractDelayedBatchSubmitted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDelayedBatchSubmittedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDelayedBatchSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDelayedBatchSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDelayedBatchSubmittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDelayedBatchSubmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDelayedBatchSubmitted represents a DelayedBatchSubmitted event raised by the Contract contract. +type ContractDelayedBatchSubmitted struct { + DataMarketAddress common.Address + BatchId *big.Int + BatchCid string + EpochId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelayedBatchSubmitted is a free log retrieval operation binding the contract event 0xf2de85dca20817401360fd386051732f208a7508ed4ffa7c15686979da276ec6. +// +// Solidity: event DelayedBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterDelayedBatchSubmitted(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int) (*ContractDelayedBatchSubmittedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DelayedBatchSubmitted", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return &ContractDelayedBatchSubmittedIterator{contract: _Contract.contract, event: "DelayedBatchSubmitted", logs: logs, sub: sub}, nil +} + +// WatchDelayedBatchSubmitted is a free log subscription operation binding the contract event 0xf2de85dca20817401360fd386051732f208a7508ed4ffa7c15686979da276ec6. +// +// Solidity: event DelayedBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchDelayedBatchSubmitted(opts *bind.WatchOpts, sink chan<- *ContractDelayedBatchSubmitted, dataMarketAddress []common.Address, epochId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DelayedBatchSubmitted", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDelayedBatchSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedBatchSubmitted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelayedBatchSubmitted is a log parse operation binding the contract event 0xf2de85dca20817401360fd386051732f208a7508ed4ffa7c15686979da276ec6. +// +// Solidity: event DelayedBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseDelayedBatchSubmitted(log types.Log) (*ContractDelayedBatchSubmitted, error) { + event := new(ContractDelayedBatchSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedBatchSubmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractDelayedSnapshotSubmittedIterator is returned from FilterDelayedSnapshotSubmitted and is used to iterate over the raw logs and unpacked data for DelayedSnapshotSubmitted events raised by the Contract contract. +type ContractDelayedSnapshotSubmittedIterator struct { + Event *ContractDelayedSnapshotSubmitted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractDelayedSnapshotSubmittedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractDelayedSnapshotSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractDelayedSnapshotSubmitted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractDelayedSnapshotSubmittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractDelayedSnapshotSubmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractDelayedSnapshotSubmitted represents a DelayedSnapshotSubmitted event raised by the Contract contract. +type ContractDelayedSnapshotSubmitted struct { + DataMarketAddress common.Address + SnapshotterAddr common.Address + SlotId *big.Int + SnapshotCid string + EpochId *big.Int + ProjectId string + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelayedSnapshotSubmitted is a free log retrieval operation binding the contract event 0x3857c02d90218ce4e6decef6b24babba8e0d8331c159392de06c1ce2c7a2d3be. +// +// Solidity: event DelayedSnapshotSubmitted(address indexed dataMarketAddress, address indexed snapshotterAddr, uint256 slotId, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterDelayedSnapshotSubmitted(opts *bind.FilterOpts, dataMarketAddress []common.Address, snapshotterAddr []common.Address, epochId []*big.Int) (*ContractDelayedSnapshotSubmittedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var snapshotterAddrRule []interface{} + for _, snapshotterAddrItem := range snapshotterAddr { + snapshotterAddrRule = append(snapshotterAddrRule, snapshotterAddrItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "DelayedSnapshotSubmitted", dataMarketAddressRule, snapshotterAddrRule, epochIdRule) + if err != nil { + return nil, err + } + return &ContractDelayedSnapshotSubmittedIterator{contract: _Contract.contract, event: "DelayedSnapshotSubmitted", logs: logs, sub: sub}, nil +} + +// WatchDelayedSnapshotSubmitted is a free log subscription operation binding the contract event 0x3857c02d90218ce4e6decef6b24babba8e0d8331c159392de06c1ce2c7a2d3be. +// +// Solidity: event DelayedSnapshotSubmitted(address indexed dataMarketAddress, address indexed snapshotterAddr, uint256 slotId, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchDelayedSnapshotSubmitted(opts *bind.WatchOpts, sink chan<- *ContractDelayedSnapshotSubmitted, dataMarketAddress []common.Address, snapshotterAddr []common.Address, epochId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var snapshotterAddrRule []interface{} + for _, snapshotterAddrItem := range snapshotterAddr { + snapshotterAddrRule = append(snapshotterAddrRule, snapshotterAddrItem) + } + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "DelayedSnapshotSubmitted", dataMarketAddressRule, snapshotterAddrRule, epochIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractDelayedSnapshotSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedSnapshotSubmitted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelayedSnapshotSubmitted is a log parse operation binding the contract event 0x3857c02d90218ce4e6decef6b24babba8e0d8331c159392de06c1ce2c7a2d3be. +// +// Solidity: event DelayedSnapshotSubmitted(address indexed dataMarketAddress, address indexed snapshotterAddr, uint256 slotId, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseDelayedSnapshotSubmitted(log types.Log) (*ContractDelayedSnapshotSubmitted, error) { + event := new(ContractDelayedSnapshotSubmitted) + if err := _Contract.contract.UnpackLog(event, "DelayedSnapshotSubmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractEpochReleasedIterator is returned from FilterEpochReleased and is used to iterate over the raw logs and unpacked data for EpochReleased events raised by the Contract contract. +type ContractEpochReleasedIterator struct { + Event *ContractEpochReleased // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractEpochReleasedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractEpochReleased) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractEpochReleased) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractEpochReleasedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractEpochReleasedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractEpochReleased represents a EpochReleased event raised by the Contract contract. +type ContractEpochReleased struct { + DataMarketAddress common.Address + EpochId *big.Int + Begin *big.Int + End *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// SubmitSubmissionBatch is a paid mutator transaction binding the contract method 0xca467e62. +// FilterEpochReleased is a free log retrieval operation binding the contract event 0xf7d2257d4a1c445138ab52bd3c22425bfed29da81d0173961c697dc14fcba60c. // -// Solidity: function submitSubmissionBatch(string batchCid, uint256 batchId, uint256 epochId, string[] projectIds, string[] snapshotCids) returns() -func (_Contract *ContractTransactorSession) SubmitSubmissionBatch(batchCid string, batchId *big.Int, epochId *big.Int, projectIds []string, snapshotCids []string) (*types.Transaction, error) { - return _Contract.Contract.SubmitSubmissionBatch(&_Contract.TransactOpts, batchCid, batchId, epochId, projectIds, snapshotCids) +// Solidity: event EpochReleased(address indexed dataMarketAddress, uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) +func (_Contract *ContractFilterer) FilterEpochReleased(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int) (*ContractEpochReleasedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "EpochReleased", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return &ContractEpochReleasedIterator{contract: _Contract.contract, event: "EpochReleased", logs: logs, sub: sub}, nil } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// WatchEpochReleased is a free log subscription operation binding the contract event 0xf7d2257d4a1c445138ab52bd3c22425bfed29da81d0173961c697dc14fcba60c. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_Contract *ContractTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "transferOwnership", newOwner) +// Solidity: event EpochReleased(address indexed dataMarketAddress, uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) +func (_Contract *ContractFilterer) WatchEpochReleased(opts *bind.WatchOpts, sink chan<- *ContractEpochReleased, dataMarketAddress []common.Address, epochId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "EpochReleased", dataMarketAddressRule, epochIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractEpochReleased) + if err := _Contract.contract.UnpackLog(event, "EpochReleased", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// ParseEpochReleased is a log parse operation binding the contract event 0xf7d2257d4a1c445138ab52bd3c22425bfed29da81d0173961c697dc14fcba60c. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_Contract *ContractSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Contract.Contract.TransferOwnership(&_Contract.TransactOpts, newOwner) +// Solidity: event EpochReleased(address indexed dataMarketAddress, uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) +func (_Contract *ContractFilterer) ParseEpochReleased(log types.Log) (*ContractEpochReleased, error) { + event := new(ContractEpochReleased) + if err := _Contract.contract.UnpackLog(event, "EpochReleased", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Contract contract. +type ContractInitializedIterator struct { + Event *ContractInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractInitialized represents a Initialized event raised by the Contract contract. +type ContractInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Contract *ContractFilterer) FilterInitialized(opts *bind.FilterOpts) (*ContractInitializedIterator, error) { + + logs, sub, err := _Contract.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ContractInitializedIterator{contract: _Contract.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Contract *ContractFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ContractInitialized) (event.Subscription, error) { + + logs, sub, err := _Contract.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractInitialized) + if err := _Contract.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Contract *ContractFilterer) ParseInitialized(log types.Log) (*ContractInitialized, error) { + event := new(ContractInitialized) + if err := _Contract.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Contract contract. +type ContractOwnershipTransferredIterator struct { + Event *ContractOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Contract *ContractTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Contract.Contract.TransferOwnership(&_Contract.TransactOpts, newOwner) +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractOwnershipTransferredIterator) Error() error { + return it.fail } -// UpdateAllSnapshotters is a paid mutator transaction binding the contract method 0xa88d5a46. -// -// Solidity: function updateAllSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractTransactor) UpdateAllSnapshotters(opts *bind.TransactOpts, _snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "updateAllSnapshotters", _snapshotters, _status) +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil } -// UpdateAllSnapshotters is a paid mutator transaction binding the contract method 0xa88d5a46. -// -// Solidity: function updateAllSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractSession) UpdateAllSnapshotters(_snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateAllSnapshotters(&_Contract.TransactOpts, _snapshotters, _status) +// ContractOwnershipTransferred represents a OwnershipTransferred event raised by the Contract contract. +type ContractOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos } -// UpdateAllSnapshotters is a paid mutator transaction binding the contract method 0xa88d5a46. +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: function updateAllSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractTransactorSession) UpdateAllSnapshotters(_snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateAllSnapshotters(&_Contract.TransactOpts, _snapshotters, _status) -} +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Contract *ContractFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ContractOwnershipTransferredIterator, error) { -// UpdateMasterSnapshotters is a paid mutator transaction binding the contract method 0x8f9eacf3. -// -// Solidity: function updateMasterSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractTransactor) UpdateMasterSnapshotters(opts *bind.TransactOpts, _snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "updateMasterSnapshotters", _snapshotters, _status) -} + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } -// UpdateMasterSnapshotters is a paid mutator transaction binding the contract method 0x8f9eacf3. -// -// Solidity: function updateMasterSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractSession) UpdateMasterSnapshotters(_snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateMasterSnapshotters(&_Contract.TransactOpts, _snapshotters, _status) + logs, sub, err := _Contract.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ContractOwnershipTransferredIterator{contract: _Contract.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -// UpdateMasterSnapshotters is a paid mutator transaction binding the contract method 0x8f9eacf3. +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: function updateMasterSnapshotters(address[] _snapshotters, bool[] _status) returns() -func (_Contract *ContractTransactorSession) UpdateMasterSnapshotters(_snapshotters []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateMasterSnapshotters(&_Contract.TransactOpts, _snapshotters, _status) +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Contract *ContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ContractOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractOwnershipTransferred) + if err := _Contract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x38deacd3. +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. // -// Solidity: function updateMinSnapshottersForConsensus(uint256 _minSubmissionsForConsensus) returns() -func (_Contract *ContractTransactor) UpdateMinSnapshottersForConsensus(opts *bind.TransactOpts, _minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "updateMinSnapshottersForConsensus", _minSubmissionsForConsensus) +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Contract *ContractFilterer) ParseOwnershipTransferred(log types.Log) (*ContractOwnershipTransferred, error) { + event := new(ContractOwnershipTransferred) + if err := _Contract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x38deacd3. -// -// Solidity: function updateMinSnapshottersForConsensus(uint256 _minSubmissionsForConsensus) returns() -func (_Contract *ContractSession) UpdateMinSnapshottersForConsensus(_minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { - return _Contract.Contract.UpdateMinSnapshottersForConsensus(&_Contract.TransactOpts, _minSubmissionsForConsensus) +// ContractProjectTypeUpdatedIterator is returned from FilterProjectTypeUpdated and is used to iterate over the raw logs and unpacked data for ProjectTypeUpdated events raised by the Contract contract. +type ContractProjectTypeUpdatedIterator struct { + Event *ContractProjectTypeUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration } -// UpdateMinSnapshottersForConsensus is a paid mutator transaction binding the contract method 0x38deacd3. -// -// Solidity: function updateMinSnapshottersForConsensus(uint256 _minSubmissionsForConsensus) returns() -func (_Contract *ContractTransactorSession) UpdateMinSnapshottersForConsensus(_minSubmissionsForConsensus *big.Int) (*types.Transaction, error) { - return _Contract.Contract.UpdateMinSnapshottersForConsensus(&_Contract.TransactOpts, _minSubmissionsForConsensus) +// 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 +// returned and Error() can be queried for the exact failure. +func (it *ContractProjectTypeUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractProjectTypeUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractProjectTypeUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } } -// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0x9b2f89ce. -// -// Solidity: function updateSnapshotSubmissionWindow(uint256 newsnapshotSubmissionWindow) returns() -func (_Contract *ContractTransactor) UpdateSnapshotSubmissionWindow(opts *bind.TransactOpts, newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "updateSnapshotSubmissionWindow", newsnapshotSubmissionWindow) +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractProjectTypeUpdatedIterator) Error() error { + return it.fail } -// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0x9b2f89ce. -// -// Solidity: function updateSnapshotSubmissionWindow(uint256 newsnapshotSubmissionWindow) returns() -func (_Contract *ContractSession) UpdateSnapshotSubmissionWindow(newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { - return _Contract.Contract.UpdateSnapshotSubmissionWindow(&_Contract.TransactOpts, newsnapshotSubmissionWindow) +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractProjectTypeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil } -// UpdateSnapshotSubmissionWindow is a paid mutator transaction binding the contract method 0x9b2f89ce. -// -// Solidity: function updateSnapshotSubmissionWindow(uint256 newsnapshotSubmissionWindow) returns() -func (_Contract *ContractTransactorSession) UpdateSnapshotSubmissionWindow(newsnapshotSubmissionWindow *big.Int) (*types.Transaction, error) { - return _Contract.Contract.UpdateSnapshotSubmissionWindow(&_Contract.TransactOpts, newsnapshotSubmissionWindow) +// ContractProjectTypeUpdated represents a ProjectTypeUpdated event raised by the Contract contract. +type ContractProjectTypeUpdated struct { + DataMarketAddress common.Address + ProjectType string + Allowed bool + EnableEpochId *big.Int + Raw types.Log // Blockchain specific contextual infos } -// UpdateValidators is a paid mutator transaction binding the contract method 0x1b0b3ae3. +// FilterProjectTypeUpdated is a free log retrieval operation binding the contract event 0x3c6dc99dfc227a11ad701f84af7d44db829ba6c5e71c85f0ba80da02a2c20b42. // -// Solidity: function updateValidators(address[] _validators, bool[] _status) returns() -func (_Contract *ContractTransactor) UpdateValidators(opts *bind.TransactOpts, _validators []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.contract.Transact(opts, "updateValidators", _validators, _status) +// Solidity: event ProjectTypeUpdated(address indexed dataMarketAddress, string projectType, bool allowed, uint256 enableEpochId) +func (_Contract *ContractFilterer) FilterProjectTypeUpdated(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractProjectTypeUpdatedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "ProjectTypeUpdated", dataMarketAddressRule) + if err != nil { + return nil, err + } + return &ContractProjectTypeUpdatedIterator{contract: _Contract.contract, event: "ProjectTypeUpdated", logs: logs, sub: sub}, nil } -// UpdateValidators is a paid mutator transaction binding the contract method 0x1b0b3ae3. +// WatchProjectTypeUpdated is a free log subscription operation binding the contract event 0x3c6dc99dfc227a11ad701f84af7d44db829ba6c5e71c85f0ba80da02a2c20b42. // -// Solidity: function updateValidators(address[] _validators, bool[] _status) returns() -func (_Contract *ContractSession) UpdateValidators(_validators []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateValidators(&_Contract.TransactOpts, _validators, _status) +// Solidity: event ProjectTypeUpdated(address indexed dataMarketAddress, string projectType, bool allowed, uint256 enableEpochId) +func (_Contract *ContractFilterer) WatchProjectTypeUpdated(opts *bind.WatchOpts, sink chan<- *ContractProjectTypeUpdated, dataMarketAddress []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "ProjectTypeUpdated", dataMarketAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractProjectTypeUpdated) + if err := _Contract.contract.UnpackLog(event, "ProjectTypeUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// UpdateValidators is a paid mutator transaction binding the contract method 0x1b0b3ae3. +// ParseProjectTypeUpdated is a log parse operation binding the contract event 0x3c6dc99dfc227a11ad701f84af7d44db829ba6c5e71c85f0ba80da02a2c20b42. // -// Solidity: function updateValidators(address[] _validators, bool[] _status) returns() -func (_Contract *ContractTransactorSession) UpdateValidators(_validators []common.Address, _status []bool) (*types.Transaction, error) { - return _Contract.Contract.UpdateValidators(&_Contract.TransactOpts, _validators, _status) +// Solidity: event ProjectTypeUpdated(address indexed dataMarketAddress, string projectType, bool allowed, uint256 enableEpochId) +func (_Contract *ContractFilterer) ParseProjectTypeUpdated(log types.Log) (*ContractProjectTypeUpdated, error) { + event := new(ContractProjectTypeUpdated) + if err := _Contract.contract.UnpackLog(event, "ProjectTypeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -// ContractDelayedSnapshotSubmittedIterator is returned from FilterDelayedSnapshotSubmitted and is used to iterate over the raw logs and unpacked data for DelayedSnapshotSubmitted events raised by the Contract contract. -type ContractDelayedSnapshotSubmittedIterator struct { - Event *ContractDelayedSnapshotSubmitted // Event containing the contract specifics and raw log +// ContractProjectsUpdatedIterator is returned from FilterProjectsUpdated and is used to iterate over the raw logs and unpacked data for ProjectsUpdated events raised by the Contract contract. +type ContractProjectsUpdatedIterator struct { + Event *ContractProjectsUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1453,7 +4685,7 @@ type ContractDelayedSnapshotSubmittedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractDelayedSnapshotSubmittedIterator) Next() bool { +func (it *ContractProjectsUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1462,7 +4694,7 @@ func (it *ContractDelayedSnapshotSubmittedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractDelayedSnapshotSubmitted) + it.Event = new(ContractProjectsUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1477,7 +4709,7 @@ func (it *ContractDelayedSnapshotSubmittedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractDelayedSnapshotSubmitted) + it.Event = new(ContractProjectsUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1493,65 +4725,54 @@ func (it *ContractDelayedSnapshotSubmittedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractDelayedSnapshotSubmittedIterator) Error() error { +func (it *ContractProjectsUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractDelayedSnapshotSubmittedIterator) Close() error { +func (it *ContractProjectsUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractDelayedSnapshotSubmitted represents a DelayedSnapshotSubmitted event raised by the Contract contract. -type ContractDelayedSnapshotSubmitted struct { - SnapshotterAddr common.Address - SnapshotCid string - EpochId *big.Int - ProjectId string - Timestamp *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractProjectsUpdated represents a ProjectsUpdated event raised by the Contract contract. +type ContractProjectsUpdated struct { + DataMarketAddress common.Address + Projects []string + Status []bool + EnableEpochId *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterDelayedSnapshotSubmitted is a free log retrieval operation binding the contract event 0xa4b1762053ee970f50692b6936d4e58a9a01291449e4da16bdf758891c8de752. +// FilterProjectsUpdated is a free log retrieval operation binding the contract event 0xcbf1b93d76451f05244e2f6139bf7266a14bac5182e5ed8981ab0ce36479efbf. // -// Solidity: event DelayedSnapshotSubmitted(address indexed snapshotterAddr, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) -func (_Contract *ContractFilterer) FilterDelayedSnapshotSubmitted(opts *bind.FilterOpts, snapshotterAddr []common.Address, epochId []*big.Int) (*ContractDelayedSnapshotSubmittedIterator, error) { - - var snapshotterAddrRule []interface{} - for _, snapshotterAddrItem := range snapshotterAddr { - snapshotterAddrRule = append(snapshotterAddrRule, snapshotterAddrItem) - } +// Solidity: event ProjectsUpdated(address indexed dataMarketAddress, string[] projects, bool[] status, uint256 enableEpochId) +func (_Contract *ContractFilterer) FilterProjectsUpdated(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractProjectsUpdatedIterator, error) { - var epochIdRule []interface{} - for _, epochIdItem := range epochId { - epochIdRule = append(epochIdRule, epochIdItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - logs, sub, err := _Contract.contract.FilterLogs(opts, "DelayedSnapshotSubmitted", snapshotterAddrRule, epochIdRule) + logs, sub, err := _Contract.contract.FilterLogs(opts, "ProjectsUpdated", dataMarketAddressRule) if err != nil { return nil, err } - return &ContractDelayedSnapshotSubmittedIterator{contract: _Contract.contract, event: "DelayedSnapshotSubmitted", logs: logs, sub: sub}, nil + return &ContractProjectsUpdatedIterator{contract: _Contract.contract, event: "ProjectsUpdated", logs: logs, sub: sub}, nil } -// WatchDelayedSnapshotSubmitted is a free log subscription operation binding the contract event 0xa4b1762053ee970f50692b6936d4e58a9a01291449e4da16bdf758891c8de752. +// WatchProjectsUpdated is a free log subscription operation binding the contract event 0xcbf1b93d76451f05244e2f6139bf7266a14bac5182e5ed8981ab0ce36479efbf. // -// Solidity: event DelayedSnapshotSubmitted(address indexed snapshotterAddr, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) -func (_Contract *ContractFilterer) WatchDelayedSnapshotSubmitted(opts *bind.WatchOpts, sink chan<- *ContractDelayedSnapshotSubmitted, snapshotterAddr []common.Address, epochId []*big.Int) (event.Subscription, error) { - - var snapshotterAddrRule []interface{} - for _, snapshotterAddrItem := range snapshotterAddr { - snapshotterAddrRule = append(snapshotterAddrRule, snapshotterAddrItem) - } +// Solidity: event ProjectsUpdated(address indexed dataMarketAddress, string[] projects, bool[] status, uint256 enableEpochId) +func (_Contract *ContractFilterer) WatchProjectsUpdated(opts *bind.WatchOpts, sink chan<- *ContractProjectsUpdated, dataMarketAddress []common.Address) (event.Subscription, error) { - var epochIdRule []interface{} - for _, epochIdItem := range epochId { - epochIdRule = append(epochIdRule, epochIdItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - logs, sub, err := _Contract.contract.WatchLogs(opts, "DelayedSnapshotSubmitted", snapshotterAddrRule, epochIdRule) + logs, sub, err := _Contract.contract.WatchLogs(opts, "ProjectsUpdated", dataMarketAddressRule) if err != nil { return nil, err } @@ -1561,8 +4782,8 @@ func (_Contract *ContractFilterer) WatchDelayedSnapshotSubmitted(opts *bind.Watc select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractDelayedSnapshotSubmitted) - if err := _Contract.contract.UnpackLog(event, "DelayedSnapshotSubmitted", log); err != nil { + event := new(ContractProjectsUpdated) + if err := _Contract.contract.UnpackLog(event, "ProjectsUpdated", log); err != nil { return err } event.Raw = log @@ -1583,21 +4804,21 @@ func (_Contract *ContractFilterer) WatchDelayedSnapshotSubmitted(opts *bind.Watc }), nil } -// ParseDelayedSnapshotSubmitted is a log parse operation binding the contract event 0xa4b1762053ee970f50692b6936d4e58a9a01291449e4da16bdf758891c8de752. +// ParseProjectsUpdated is a log parse operation binding the contract event 0xcbf1b93d76451f05244e2f6139bf7266a14bac5182e5ed8981ab0ce36479efbf. // -// Solidity: event DelayedSnapshotSubmitted(address indexed snapshotterAddr, string snapshotCid, uint256 indexed epochId, string projectId, uint256 timestamp) -func (_Contract *ContractFilterer) ParseDelayedSnapshotSubmitted(log types.Log) (*ContractDelayedSnapshotSubmitted, error) { - event := new(ContractDelayedSnapshotSubmitted) - if err := _Contract.contract.UnpackLog(event, "DelayedSnapshotSubmitted", log); err != nil { +// Solidity: event ProjectsUpdated(address indexed dataMarketAddress, string[] projects, bool[] status, uint256 enableEpochId) +func (_Contract *ContractFilterer) ParseProjectsUpdated(log types.Log) (*ContractProjectsUpdated, error) { + event := new(ContractProjectsUpdated) + if err := _Contract.contract.UnpackLog(event, "ProjectsUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractEpochReleasedIterator is returned from FilterEpochReleased and is used to iterate over the raw logs and unpacked data for EpochReleased events raised by the Contract contract. -type ContractEpochReleasedIterator struct { - Event *ContractEpochReleased // Event containing the contract specifics and raw log +// ContractSequencersUpdatedIterator is returned from FilterSequencersUpdated and is used to iterate over the raw logs and unpacked data for SequencersUpdated events raised by the Contract contract. +type ContractSequencersUpdatedIterator struct { + Event *ContractSequencersUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1611,7 +4832,7 @@ type ContractEpochReleasedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractEpochReleasedIterator) Next() bool { +func (it *ContractSequencersUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1620,7 +4841,7 @@ func (it *ContractEpochReleasedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractEpochReleased) + it.Event = new(ContractSequencersUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1635,7 +4856,7 @@ func (it *ContractEpochReleasedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractEpochReleased) + it.Event = new(ContractSequencersUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1651,54 +4872,53 @@ func (it *ContractEpochReleasedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractEpochReleasedIterator) Error() error { +func (it *ContractSequencersUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractEpochReleasedIterator) Close() error { +func (it *ContractSequencersUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractEpochReleased represents a EpochReleased event raised by the Contract contract. -type ContractEpochReleased struct { - EpochId *big.Int - Begin *big.Int - End *big.Int - Timestamp *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractSequencersUpdated represents a SequencersUpdated event raised by the Contract contract. +type ContractSequencersUpdated struct { + DataMarketAddress common.Address + SequencerAddress common.Address + Allowed bool + Raw types.Log // Blockchain specific contextual infos } -// FilterEpochReleased is a free log retrieval operation binding the contract event 0x108f87075a74f81fa2271fdf9fc0883a1811431182601fc65d24513970336640. +// FilterSequencersUpdated is a free log retrieval operation binding the contract event 0xad12010237fe83915c67abe51836e693a16f8a2592b9a4e959374ab33ae7a697. // -// Solidity: event EpochReleased(uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) -func (_Contract *ContractFilterer) FilterEpochReleased(opts *bind.FilterOpts, epochId []*big.Int) (*ContractEpochReleasedIterator, error) { +// Solidity: event SequencersUpdated(address indexed dataMarketAddress, address sequencerAddress, bool allowed) +func (_Contract *ContractFilterer) FilterSequencersUpdated(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractSequencersUpdatedIterator, error) { - var epochIdRule []interface{} - for _, epochIdItem := range epochId { - epochIdRule = append(epochIdRule, epochIdItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - logs, sub, err := _Contract.contract.FilterLogs(opts, "EpochReleased", epochIdRule) + logs, sub, err := _Contract.contract.FilterLogs(opts, "SequencersUpdated", dataMarketAddressRule) if err != nil { return nil, err } - return &ContractEpochReleasedIterator{contract: _Contract.contract, event: "EpochReleased", logs: logs, sub: sub}, nil + return &ContractSequencersUpdatedIterator{contract: _Contract.contract, event: "SequencersUpdated", logs: logs, sub: sub}, nil } -// WatchEpochReleased is a free log subscription operation binding the contract event 0x108f87075a74f81fa2271fdf9fc0883a1811431182601fc65d24513970336640. +// WatchSequencersUpdated is a free log subscription operation binding the contract event 0xad12010237fe83915c67abe51836e693a16f8a2592b9a4e959374ab33ae7a697. // -// Solidity: event EpochReleased(uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) -func (_Contract *ContractFilterer) WatchEpochReleased(opts *bind.WatchOpts, sink chan<- *ContractEpochReleased, epochId []*big.Int) (event.Subscription, error) { +// Solidity: event SequencersUpdated(address indexed dataMarketAddress, address sequencerAddress, bool allowed) +func (_Contract *ContractFilterer) WatchSequencersUpdated(opts *bind.WatchOpts, sink chan<- *ContractSequencersUpdated, dataMarketAddress []common.Address) (event.Subscription, error) { - var epochIdRule []interface{} - for _, epochIdItem := range epochId { - epochIdRule = append(epochIdRule, epochIdItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - logs, sub, err := _Contract.contract.WatchLogs(opts, "EpochReleased", epochIdRule) + logs, sub, err := _Contract.contract.WatchLogs(opts, "SequencersUpdated", dataMarketAddressRule) if err != nil { return nil, err } @@ -1708,8 +4928,8 @@ func (_Contract *ContractFilterer) WatchEpochReleased(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractEpochReleased) - if err := _Contract.contract.UnpackLog(event, "EpochReleased", log); err != nil { + event := new(ContractSequencersUpdated) + if err := _Contract.contract.UnpackLog(event, "SequencersUpdated", log); err != nil { return err } event.Raw = log @@ -1730,21 +4950,21 @@ func (_Contract *ContractFilterer) WatchEpochReleased(opts *bind.WatchOpts, sink }), nil } -// ParseEpochReleased is a log parse operation binding the contract event 0x108f87075a74f81fa2271fdf9fc0883a1811431182601fc65d24513970336640. +// ParseSequencersUpdated is a log parse operation binding the contract event 0xad12010237fe83915c67abe51836e693a16f8a2592b9a4e959374ab33ae7a697. // -// Solidity: event EpochReleased(uint256 indexed epochId, uint256 begin, uint256 end, uint256 timestamp) -func (_Contract *ContractFilterer) ParseEpochReleased(log types.Log) (*ContractEpochReleased, error) { - event := new(ContractEpochReleased) - if err := _Contract.contract.UnpackLog(event, "EpochReleased", log); err != nil { +// Solidity: event SequencersUpdated(address indexed dataMarketAddress, address sequencerAddress, bool allowed) +func (_Contract *ContractFilterer) ParseSequencersUpdated(log types.Log) (*ContractSequencersUpdated, error) { + event := new(ContractSequencersUpdated) + if err := _Contract.contract.UnpackLog(event, "SequencersUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Contract contract. -type ContractOwnershipTransferredIterator struct { - Event *ContractOwnershipTransferred // Event containing the contract specifics and raw log +// ContractSnapshotBatchAttestationSubmittedIterator is returned from FilterSnapshotBatchAttestationSubmitted and is used to iterate over the raw logs and unpacked data for SnapshotBatchAttestationSubmitted events raised by the Contract contract. +type ContractSnapshotBatchAttestationSubmittedIterator struct { + Event *ContractSnapshotBatchAttestationSubmitted // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1758,7 +4978,7 @@ type ContractOwnershipTransferredIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractOwnershipTransferredIterator) Next() bool { +func (it *ContractSnapshotBatchAttestationSubmittedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1767,7 +4987,7 @@ func (it *ContractOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractOwnershipTransferred) + it.Event = new(ContractSnapshotBatchAttestationSubmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1782,7 +5002,7 @@ func (it *ContractOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractOwnershipTransferred) + it.Event = new(ContractSnapshotBatchAttestationSubmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1798,60 +5018,75 @@ func (it *ContractOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractOwnershipTransferredIterator) Error() error { +func (it *ContractSnapshotBatchAttestationSubmittedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractOwnershipTransferredIterator) Close() error { +func (it *ContractSnapshotBatchAttestationSubmittedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractOwnershipTransferred represents a OwnershipTransferred event raised by the Contract contract. -type ContractOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// ContractSnapshotBatchAttestationSubmitted represents a SnapshotBatchAttestationSubmitted event raised by the Contract contract. +type ContractSnapshotBatchAttestationSubmitted struct { + DataMarketAddress common.Address + BatchId *big.Int + EpochId *big.Int + Timestamp *big.Int + ValidatorAddr common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterSnapshotBatchAttestationSubmitted is a free log retrieval operation binding the contract event 0xf4b2e45e85a2dfbff1f3d17d57722c58599f10a2a3b9764b6106e7ca0c21d22f. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Contract *ContractFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ContractOwnershipTransferredIterator, error) { +// Solidity: event SnapshotBatchAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) FilterSnapshotBatchAttestationSubmitted(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int, validatorAddr []common.Address) (*ContractSnapshotBatchAttestationSubmittedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) } - logs, sub, err := _Contract.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + var validatorAddrRule []interface{} + for _, validatorAddrItem := range validatorAddr { + validatorAddrRule = append(validatorAddrRule, validatorAddrItem) + } + + logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotBatchAttestationSubmitted", dataMarketAddressRule, epochIdRule, validatorAddrRule) if err != nil { return nil, err } - return &ContractOwnershipTransferredIterator{contract: _Contract.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &ContractSnapshotBatchAttestationSubmittedIterator{contract: _Contract.contract, event: "SnapshotBatchAttestationSubmitted", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchSnapshotBatchAttestationSubmitted is a free log subscription operation binding the contract event 0xf4b2e45e85a2dfbff1f3d17d57722c58599f10a2a3b9764b6106e7ca0c21d22f. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Contract *ContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ContractOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event SnapshotBatchAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) WatchSnapshotBatchAttestationSubmitted(opts *bind.WatchOpts, sink chan<- *ContractSnapshotBatchAttestationSubmitted, dataMarketAddress []common.Address, epochId []*big.Int, validatorAddr []common.Address) (event.Subscription, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) } - logs, sub, err := _Contract.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + var validatorAddrRule []interface{} + for _, validatorAddrItem := range validatorAddr { + validatorAddrRule = append(validatorAddrRule, validatorAddrItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotBatchAttestationSubmitted", dataMarketAddressRule, epochIdRule, validatorAddrRule) if err != nil { return nil, err } @@ -1861,8 +5096,8 @@ func (_Contract *ContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpt select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractOwnershipTransferred) - if err := _Contract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(ContractSnapshotBatchAttestationSubmitted) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchAttestationSubmitted", log); err != nil { return err } event.Raw = log @@ -1883,21 +5118,21 @@ func (_Contract *ContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpt }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseSnapshotBatchAttestationSubmitted is a log parse operation binding the contract event 0xf4b2e45e85a2dfbff1f3d17d57722c58599f10a2a3b9764b6106e7ca0c21d22f. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Contract *ContractFilterer) ParseOwnershipTransferred(log types.Log) (*ContractOwnershipTransferred, error) { - event := new(ContractOwnershipTransferred) - if err := _Contract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event SnapshotBatchAttestationSubmitted(address indexed dataMarketAddress, uint256 batchId, uint256 indexed epochId, uint256 timestamp, address indexed validatorAddr) +func (_Contract *ContractFilterer) ParseSnapshotBatchAttestationSubmitted(log types.Log) (*ContractSnapshotBatchAttestationSubmitted, error) { + event := new(ContractSnapshotBatchAttestationSubmitted) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchAttestationSubmitted", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractProjectsUpdatedIterator is returned from FilterProjectsUpdated and is used to iterate over the raw logs and unpacked data for ProjectsUpdated events raised by the Contract contract. -type ContractProjectsUpdatedIterator struct { - Event *ContractProjectsUpdated // Event containing the contract specifics and raw log +// ContractSnapshotBatchFinalizedIterator is returned from FilterSnapshotBatchFinalized and is used to iterate over the raw logs and unpacked data for SnapshotBatchFinalized events raised by the Contract contract. +type ContractSnapshotBatchFinalizedIterator struct { + Event *ContractSnapshotBatchFinalized // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1911,7 +5146,7 @@ type ContractProjectsUpdatedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractProjectsUpdatedIterator) Next() bool { +func (it *ContractSnapshotBatchFinalizedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1920,7 +5155,7 @@ func (it *ContractProjectsUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractProjectsUpdated) + it.Event = new(ContractSnapshotBatchFinalized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1935,7 +5170,7 @@ func (it *ContractProjectsUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractProjectsUpdated) + it.Event = new(ContractSnapshotBatchFinalized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1951,43 +5186,70 @@ func (it *ContractProjectsUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractProjectsUpdatedIterator) Error() error { +func (it *ContractSnapshotBatchFinalizedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractProjectsUpdatedIterator) Close() error { +func (it *ContractSnapshotBatchFinalizedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractProjectsUpdated represents a ProjectsUpdated event raised by the Contract contract. -type ContractProjectsUpdated struct { - ProjectId string - Allowed bool - EnableEpochId *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractSnapshotBatchFinalized represents a SnapshotBatchFinalized event raised by the Contract contract. +type ContractSnapshotBatchFinalized struct { + DataMarketAddress common.Address + EpochId *big.Int + BatchId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterProjectsUpdated is a free log retrieval operation binding the contract event 0x96103183e0788ea5e37ef5b430d1e822a85c862531186baeea043a82dcbcb924. +// FilterSnapshotBatchFinalized is a free log retrieval operation binding the contract event 0x9737b8e7fb3913ba98706f4b1758ac14f5cf26afbb2457117aa3360b9cc85de1. // -// Solidity: event ProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) FilterProjectsUpdated(opts *bind.FilterOpts) (*ContractProjectsUpdatedIterator, error) { +// Solidity: event SnapshotBatchFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterSnapshotBatchFinalized(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (*ContractSnapshotBatchFinalizedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } - logs, sub, err := _Contract.contract.FilterLogs(opts, "ProjectsUpdated") + logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotBatchFinalized", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } - return &ContractProjectsUpdatedIterator{contract: _Contract.contract, event: "ProjectsUpdated", logs: logs, sub: sub}, nil + return &ContractSnapshotBatchFinalizedIterator{contract: _Contract.contract, event: "SnapshotBatchFinalized", logs: logs, sub: sub}, nil } -// WatchProjectsUpdated is a free log subscription operation binding the contract event 0x96103183e0788ea5e37ef5b430d1e822a85c862531186baeea043a82dcbcb924. +// WatchSnapshotBatchFinalized is a free log subscription operation binding the contract event 0x9737b8e7fb3913ba98706f4b1758ac14f5cf26afbb2457117aa3360b9cc85de1. // -// Solidity: event ProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) WatchProjectsUpdated(opts *bind.WatchOpts, sink chan<- *ContractProjectsUpdated) (event.Subscription, error) { +// Solidity: event SnapshotBatchFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchSnapshotBatchFinalized(opts *bind.WatchOpts, sink chan<- *ContractSnapshotBatchFinalized, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } - logs, sub, err := _Contract.contract.WatchLogs(opts, "ProjectsUpdated") + logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotBatchFinalized", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } @@ -1997,8 +5259,8 @@ func (_Contract *ContractFilterer) WatchProjectsUpdated(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractProjectsUpdated) - if err := _Contract.contract.UnpackLog(event, "ProjectsUpdated", log); err != nil { + event := new(ContractSnapshotBatchFinalized) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchFinalized", log); err != nil { return err } event.Raw = log @@ -2019,21 +5281,21 @@ func (_Contract *ContractFilterer) WatchProjectsUpdated(opts *bind.WatchOpts, si }), nil } -// ParseProjectsUpdated is a log parse operation binding the contract event 0x96103183e0788ea5e37ef5b430d1e822a85c862531186baeea043a82dcbcb924. +// ParseSnapshotBatchFinalized is a log parse operation binding the contract event 0x9737b8e7fb3913ba98706f4b1758ac14f5cf26afbb2457117aa3360b9cc85de1. // -// Solidity: event ProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) ParseProjectsUpdated(log types.Log) (*ContractProjectsUpdated, error) { - event := new(ContractProjectsUpdated) - if err := _Contract.contract.UnpackLog(event, "ProjectsUpdated", log); err != nil { +// Solidity: event SnapshotBatchFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseSnapshotBatchFinalized(log types.Log) (*ContractSnapshotBatchFinalized, error) { + event := new(ContractSnapshotBatchFinalized) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchFinalized", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractSnapshotBatchFinalizedIterator is returned from FilterSnapshotBatchFinalized and is used to iterate over the raw logs and unpacked data for SnapshotBatchFinalized events raised by the Contract contract. -type ContractSnapshotBatchFinalizedIterator struct { - Event *ContractSnapshotBatchFinalized // Event containing the contract specifics and raw log +// ContractSnapshotBatchSubmittedIterator is returned from FilterSnapshotBatchSubmitted and is used to iterate over the raw logs and unpacked data for SnapshotBatchSubmitted events raised by the Contract contract. +type ContractSnapshotBatchSubmittedIterator struct { + Event *ContractSnapshotBatchSubmitted // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2047,7 +5309,7 @@ type ContractSnapshotBatchFinalizedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractSnapshotBatchFinalizedIterator) Next() bool { +func (it *ContractSnapshotBatchSubmittedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2056,7 +5318,7 @@ func (it *ContractSnapshotBatchFinalizedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractSnapshotBatchFinalized) + it.Event = new(ContractSnapshotBatchSubmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2071,7 +5333,7 @@ func (it *ContractSnapshotBatchFinalizedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractSnapshotBatchFinalized) + it.Event = new(ContractSnapshotBatchSubmitted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2087,61 +5349,65 @@ func (it *ContractSnapshotBatchFinalizedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractSnapshotBatchFinalizedIterator) Error() error { +func (it *ContractSnapshotBatchSubmittedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractSnapshotBatchFinalizedIterator) Close() error { +func (it *ContractSnapshotBatchSubmittedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractSnapshotBatchFinalized represents a SnapshotBatchFinalized event raised by the Contract contract. -type ContractSnapshotBatchFinalized struct { - EpochId *big.Int - BatchId *big.Int - Timestamp *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractSnapshotBatchSubmitted represents a SnapshotBatchSubmitted event raised by the Contract contract. +type ContractSnapshotBatchSubmitted struct { + DataMarketAddress common.Address + BatchId *big.Int + BatchCid string + EpochId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterSnapshotBatchFinalized is a free log retrieval operation binding the contract event 0x5234f54aa94bd8e44799076dbbe59404d669eb94833cfbff03360715b9820e40. +// FilterSnapshotBatchSubmitted is a free log retrieval operation binding the contract event 0x0b4031b6dda76fc423ccf9fba3aa5b0936474be3c9b7080c165c0744a002fe75. // -// Solidity: event SnapshotBatchFinalized(uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) -func (_Contract *ContractFilterer) FilterSnapshotBatchFinalized(opts *bind.FilterOpts, epochId []*big.Int, batchId []*big.Int) (*ContractSnapshotBatchFinalizedIterator, error) { +// Solidity: event SnapshotBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterSnapshotBatchSubmitted(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int) (*ContractSnapshotBatchSubmittedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } var epochIdRule []interface{} for _, epochIdItem := range epochId { epochIdRule = append(epochIdRule, epochIdItem) } - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotBatchFinalized", epochIdRule, batchIdRule) + logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotBatchSubmitted", dataMarketAddressRule, epochIdRule) if err != nil { return nil, err } - return &ContractSnapshotBatchFinalizedIterator{contract: _Contract.contract, event: "SnapshotBatchFinalized", logs: logs, sub: sub}, nil + return &ContractSnapshotBatchSubmittedIterator{contract: _Contract.contract, event: "SnapshotBatchSubmitted", logs: logs, sub: sub}, nil } -// WatchSnapshotBatchFinalized is a free log subscription operation binding the contract event 0x5234f54aa94bd8e44799076dbbe59404d669eb94833cfbff03360715b9820e40. +// WatchSnapshotBatchSubmitted is a free log subscription operation binding the contract event 0x0b4031b6dda76fc423ccf9fba3aa5b0936474be3c9b7080c165c0744a002fe75. // -// Solidity: event SnapshotBatchFinalized(uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) -func (_Contract *ContractFilterer) WatchSnapshotBatchFinalized(opts *bind.WatchOpts, sink chan<- *ContractSnapshotBatchFinalized, epochId []*big.Int, batchId []*big.Int) (event.Subscription, error) { +// Solidity: event SnapshotBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchSnapshotBatchSubmitted(opts *bind.WatchOpts, sink chan<- *ContractSnapshotBatchSubmitted, dataMarketAddress []common.Address, epochId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } var epochIdRule []interface{} for _, epochIdItem := range epochId { epochIdRule = append(epochIdRule, epochIdItem) } - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotBatchFinalized", epochIdRule, batchIdRule) + logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotBatchSubmitted", dataMarketAddressRule, epochIdRule) if err != nil { return nil, err } @@ -2151,8 +5417,8 @@ func (_Contract *ContractFilterer) WatchSnapshotBatchFinalized(opts *bind.WatchO select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractSnapshotBatchFinalized) - if err := _Contract.contract.UnpackLog(event, "SnapshotBatchFinalized", log); err != nil { + event := new(ContractSnapshotBatchSubmitted) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchSubmitted", log); err != nil { return err } event.Raw = log @@ -2173,21 +5439,21 @@ func (_Contract *ContractFilterer) WatchSnapshotBatchFinalized(opts *bind.WatchO }), nil } -// ParseSnapshotBatchFinalized is a log parse operation binding the contract event 0x5234f54aa94bd8e44799076dbbe59404d669eb94833cfbff03360715b9820e40. +// ParseSnapshotBatchSubmitted is a log parse operation binding the contract event 0x0b4031b6dda76fc423ccf9fba3aa5b0936474be3c9b7080c165c0744a002fe75. // -// Solidity: event SnapshotBatchFinalized(uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) -func (_Contract *ContractFilterer) ParseSnapshotBatchFinalized(log types.Log) (*ContractSnapshotBatchFinalized, error) { - event := new(ContractSnapshotBatchFinalized) - if err := _Contract.contract.UnpackLog(event, "SnapshotBatchFinalized", log); err != nil { +// Solidity: event SnapshotBatchSubmitted(address indexed dataMarketAddress, uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseSnapshotBatchSubmitted(log types.Log) (*ContractSnapshotBatchSubmitted, error) { + event := new(ContractSnapshotBatchSubmitted) + if err := _Contract.contract.UnpackLog(event, "SnapshotBatchSubmitted", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractSnapshotBatchSubmittedIterator is returned from FilterSnapshotBatchSubmitted and is used to iterate over the raw logs and unpacked data for SnapshotBatchSubmitted events raised by the Contract contract. -type ContractSnapshotBatchSubmittedIterator struct { - Event *ContractSnapshotBatchSubmitted // Event containing the contract specifics and raw log +// ContractSnapshotFinalizedIterator is returned from FilterSnapshotFinalized and is used to iterate over the raw logs and unpacked data for SnapshotFinalized events raised by the Contract contract. +type ContractSnapshotFinalizedIterator struct { + Event *ContractSnapshotFinalized // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2201,7 +5467,7 @@ type ContractSnapshotBatchSubmittedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractSnapshotBatchSubmittedIterator) Next() bool { +func (it *ContractSnapshotFinalizedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2210,7 +5476,7 @@ func (it *ContractSnapshotBatchSubmittedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractSnapshotBatchSubmitted) + it.Event = new(ContractSnapshotFinalized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2225,7 +5491,7 @@ func (it *ContractSnapshotBatchSubmittedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractSnapshotBatchSubmitted) + it.Event = new(ContractSnapshotFinalized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2241,54 +5507,64 @@ func (it *ContractSnapshotBatchSubmittedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractSnapshotBatchSubmittedIterator) Error() error { +func (it *ContractSnapshotFinalizedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractSnapshotBatchSubmittedIterator) Close() error { +func (it *ContractSnapshotFinalizedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractSnapshotBatchSubmitted represents a SnapshotBatchSubmitted event raised by the Contract contract. -type ContractSnapshotBatchSubmitted struct { - BatchId *big.Int - BatchCid string - EpochId *big.Int - Timestamp *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractSnapshotFinalized represents a SnapshotFinalized event raised by the Contract contract. +type ContractSnapshotFinalized struct { + DataMarketAddress common.Address + EpochId *big.Int + EpochEnd *big.Int + ProjectId string + SnapshotCid string + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterSnapshotBatchSubmitted is a free log retrieval operation binding the contract event 0x71f7e37d775c89547d94f23aae240bec29afd96657dc34975abbdd326e8e6d5d. +// FilterSnapshotFinalized is a free log retrieval operation binding the contract event 0x1746fd35c2b9c905f8e7ef34232f796acb536f2fd87f01d201f57fb338eab9a6. // -// Solidity: event SnapshotBatchSubmitted(uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) -func (_Contract *ContractFilterer) FilterSnapshotBatchSubmitted(opts *bind.FilterOpts, epochId []*big.Int) (*ContractSnapshotBatchSubmittedIterator, error) { +// Solidity: event SnapshotFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 epochEnd, string projectId, string snapshotCid, uint256 timestamp) +func (_Contract *ContractFilterer) FilterSnapshotFinalized(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int) (*ContractSnapshotFinalizedIterator, error) { + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } var epochIdRule []interface{} for _, epochIdItem := range epochId { epochIdRule = append(epochIdRule, epochIdItem) } - logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotBatchSubmitted", epochIdRule) + logs, sub, err := _Contract.contract.FilterLogs(opts, "SnapshotFinalized", dataMarketAddressRule, epochIdRule) if err != nil { return nil, err } - return &ContractSnapshotBatchSubmittedIterator{contract: _Contract.contract, event: "SnapshotBatchSubmitted", logs: logs, sub: sub}, nil + return &ContractSnapshotFinalizedIterator{contract: _Contract.contract, event: "SnapshotFinalized", logs: logs, sub: sub}, nil } -// WatchSnapshotBatchSubmitted is a free log subscription operation binding the contract event 0x71f7e37d775c89547d94f23aae240bec29afd96657dc34975abbdd326e8e6d5d. +// WatchSnapshotFinalized is a free log subscription operation binding the contract event 0x1746fd35c2b9c905f8e7ef34232f796acb536f2fd87f01d201f57fb338eab9a6. // -// Solidity: event SnapshotBatchSubmitted(uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) -func (_Contract *ContractFilterer) WatchSnapshotBatchSubmitted(opts *bind.WatchOpts, sink chan<- *ContractSnapshotBatchSubmitted, epochId []*big.Int) (event.Subscription, error) { +// Solidity: event SnapshotFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 epochEnd, string projectId, string snapshotCid, uint256 timestamp) +func (_Contract *ContractFilterer) WatchSnapshotFinalized(opts *bind.WatchOpts, sink chan<- *ContractSnapshotFinalized, dataMarketAddress []common.Address, epochId []*big.Int) (event.Subscription, error) { + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } var epochIdRule []interface{} for _, epochIdItem := range epochId { epochIdRule = append(epochIdRule, epochIdItem) } - logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotBatchSubmitted", epochIdRule) + logs, sub, err := _Contract.contract.WatchLogs(opts, "SnapshotFinalized", dataMarketAddressRule, epochIdRule) if err != nil { return nil, err } @@ -2298,8 +5574,8 @@ func (_Contract *ContractFilterer) WatchSnapshotBatchSubmitted(opts *bind.WatchO select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractSnapshotBatchSubmitted) - if err := _Contract.contract.UnpackLog(event, "SnapshotBatchSubmitted", log); err != nil { + event := new(ContractSnapshotFinalized) + if err := _Contract.contract.UnpackLog(event, "SnapshotFinalized", log); err != nil { return err } event.Raw = log @@ -2320,21 +5596,21 @@ func (_Contract *ContractFilterer) WatchSnapshotBatchSubmitted(opts *bind.WatchO }), nil } -// ParseSnapshotBatchSubmitted is a log parse operation binding the contract event 0x71f7e37d775c89547d94f23aae240bec29afd96657dc34975abbdd326e8e6d5d. +// ParseSnapshotFinalized is a log parse operation binding the contract event 0x1746fd35c2b9c905f8e7ef34232f796acb536f2fd87f01d201f57fb338eab9a6. // -// Solidity: event SnapshotBatchSubmitted(uint256 batchId, string batchCid, uint256 indexed epochId, uint256 timestamp) -func (_Contract *ContractFilterer) ParseSnapshotBatchSubmitted(log types.Log) (*ContractSnapshotBatchSubmitted, error) { - event := new(ContractSnapshotBatchSubmitted) - if err := _Contract.contract.UnpackLog(event, "SnapshotBatchSubmitted", log); err != nil { +// Solidity: event SnapshotFinalized(address indexed dataMarketAddress, uint256 indexed epochId, uint256 epochEnd, string projectId, string snapshotCid, uint256 timestamp) +func (_Contract *ContractFilterer) ParseSnapshotFinalized(log types.Log) (*ContractSnapshotFinalized, error) { + event := new(ContractSnapshotFinalized) + if err := _Contract.contract.UnpackLog(event, "SnapshotFinalized", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractValidatorsUpdatedIterator is returned from FilterValidatorsUpdated and is used to iterate over the raw logs and unpacked data for ValidatorsUpdated events raised by the Contract contract. -type ContractValidatorsUpdatedIterator struct { - Event *ContractValidatorsUpdated // Event containing the contract specifics and raw log +// ContractTriggerBatchResubmissionIterator is returned from FilterTriggerBatchResubmission and is used to iterate over the raw logs and unpacked data for TriggerBatchResubmission events raised by the Contract contract. +type ContractTriggerBatchResubmissionIterator struct { + Event *ContractTriggerBatchResubmission // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2348,7 +5624,7 @@ type ContractValidatorsUpdatedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractValidatorsUpdatedIterator) Next() bool { +func (it *ContractTriggerBatchResubmissionIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2357,7 +5633,7 @@ func (it *ContractValidatorsUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractValidatorsUpdated) + it.Event = new(ContractTriggerBatchResubmission) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2372,7 +5648,7 @@ func (it *ContractValidatorsUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractValidatorsUpdated) + it.Event = new(ContractTriggerBatchResubmission) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2388,42 +5664,70 @@ func (it *ContractValidatorsUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractValidatorsUpdatedIterator) Error() error { +func (it *ContractTriggerBatchResubmissionIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractValidatorsUpdatedIterator) Close() error { +func (it *ContractTriggerBatchResubmissionIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractValidatorsUpdated represents a ValidatorsUpdated event raised by the Contract contract. -type ContractValidatorsUpdated struct { - ValidatorAddress common.Address - Allowed bool - Raw types.Log // Blockchain specific contextual infos +// ContractTriggerBatchResubmission represents a TriggerBatchResubmission event raised by the Contract contract. +type ContractTriggerBatchResubmission struct { + DataMarketAddress common.Address + EpochId *big.Int + BatchId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterValidatorsUpdated is a free log retrieval operation binding the contract event 0x7f3079c058f3e3dee87048158309898b46e9741ff53b6c7a3afac7c370649afc. +// FilterTriggerBatchResubmission is a free log retrieval operation binding the contract event 0x4a87247b65ffdb6c5ebb776b6e70fc9bddc3402b413d82060701fd9c30a3ff07. // -// Solidity: event ValidatorsUpdated(address validatorAddress, bool allowed) -func (_Contract *ContractFilterer) FilterValidatorsUpdated(opts *bind.FilterOpts) (*ContractValidatorsUpdatedIterator, error) { +// Solidity: event TriggerBatchResubmission(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) FilterTriggerBatchResubmission(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (*ContractTriggerBatchResubmissionIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } - logs, sub, err := _Contract.contract.FilterLogs(opts, "ValidatorsUpdated") + logs, sub, err := _Contract.contract.FilterLogs(opts, "TriggerBatchResubmission", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } - return &ContractValidatorsUpdatedIterator{contract: _Contract.contract, event: "ValidatorsUpdated", logs: logs, sub: sub}, nil + return &ContractTriggerBatchResubmissionIterator{contract: _Contract.contract, event: "TriggerBatchResubmission", logs: logs, sub: sub}, nil } -// WatchValidatorsUpdated is a free log subscription operation binding the contract event 0x7f3079c058f3e3dee87048158309898b46e9741ff53b6c7a3afac7c370649afc. +// WatchTriggerBatchResubmission is a free log subscription operation binding the contract event 0x4a87247b65ffdb6c5ebb776b6e70fc9bddc3402b413d82060701fd9c30a3ff07. // -// Solidity: event ValidatorsUpdated(address validatorAddress, bool allowed) -func (_Contract *ContractFilterer) WatchValidatorsUpdated(opts *bind.WatchOpts, sink chan<- *ContractValidatorsUpdated) (event.Subscription, error) { +// Solidity: event TriggerBatchResubmission(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) WatchTriggerBatchResubmission(opts *bind.WatchOpts, sink chan<- *ContractTriggerBatchResubmission, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (event.Subscription, error) { - logs, sub, err := _Contract.contract.WatchLogs(opts, "ValidatorsUpdated") + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } + + logs, sub, err := _Contract.contract.WatchLogs(opts, "TriggerBatchResubmission", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } @@ -2433,8 +5737,8 @@ func (_Contract *ContractFilterer) WatchValidatorsUpdated(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractValidatorsUpdated) - if err := _Contract.contract.UnpackLog(event, "ValidatorsUpdated", log); err != nil { + event := new(ContractTriggerBatchResubmission) + if err := _Contract.contract.UnpackLog(event, "TriggerBatchResubmission", log); err != nil { return err } event.Raw = log @@ -2455,21 +5759,21 @@ func (_Contract *ContractFilterer) WatchValidatorsUpdated(opts *bind.WatchOpts, }), nil } -// ParseValidatorsUpdated is a log parse operation binding the contract event 0x7f3079c058f3e3dee87048158309898b46e9741ff53b6c7a3afac7c370649afc. +// ParseTriggerBatchResubmission is a log parse operation binding the contract event 0x4a87247b65ffdb6c5ebb776b6e70fc9bddc3402b413d82060701fd9c30a3ff07. // -// Solidity: event ValidatorsUpdated(address validatorAddress, bool allowed) -func (_Contract *ContractFilterer) ParseValidatorsUpdated(log types.Log) (*ContractValidatorsUpdated, error) { - event := new(ContractValidatorsUpdated) - if err := _Contract.contract.UnpackLog(event, "ValidatorsUpdated", log); err != nil { +// Solidity: event TriggerBatchResubmission(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, uint256 timestamp) +func (_Contract *ContractFilterer) ParseTriggerBatchResubmission(log types.Log) (*ContractTriggerBatchResubmission, error) { + event := new(ContractTriggerBatchResubmission) + if err := _Contract.contract.UnpackLog(event, "TriggerBatchResubmission", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractAllSnapshottersUpdatedIterator is returned from FilterAllSnapshottersUpdated and is used to iterate over the raw logs and unpacked data for AllSnapshottersUpdated events raised by the Contract contract. -type ContractAllSnapshottersUpdatedIterator struct { - Event *ContractAllSnapshottersUpdated // Event containing the contract specifics and raw log +// ContractUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Contract contract. +type ContractUpgradedIterator struct { + Event *ContractUpgraded // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2483,7 +5787,7 @@ type ContractAllSnapshottersUpdatedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractAllSnapshottersUpdatedIterator) Next() bool { +func (it *ContractUpgradedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2492,7 +5796,7 @@ func (it *ContractAllSnapshottersUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractAllSnapshottersUpdated) + it.Event = new(ContractUpgraded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2507,7 +5811,7 @@ func (it *ContractAllSnapshottersUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractAllSnapshottersUpdated) + it.Event = new(ContractUpgraded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2523,42 +5827,51 @@ func (it *ContractAllSnapshottersUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractAllSnapshottersUpdatedIterator) Error() error { +func (it *ContractUpgradedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractAllSnapshottersUpdatedIterator) Close() error { +func (it *ContractUpgradedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractAllSnapshottersUpdated represents a AllSnapshottersUpdated event raised by the Contract contract. -type ContractAllSnapshottersUpdated struct { - SnapshotterAddress common.Address - Allowed bool - Raw types.Log // Blockchain specific contextual infos +// ContractUpgraded represents a Upgraded event raised by the Contract contract. +type ContractUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterAllSnapshottersUpdated is a free log retrieval operation binding the contract event 0x743e47fbcd2e3a64a2ab8f5dcdeb4c17f892c17c9f6ab58d3a5c235953d60058. +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event allSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) FilterAllSnapshottersUpdated(opts *bind.FilterOpts) (*ContractAllSnapshottersUpdatedIterator, error) { +// Solidity: event Upgraded(address indexed implementation) +func (_Contract *ContractFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ContractUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } - logs, sub, err := _Contract.contract.FilterLogs(opts, "allSnapshottersUpdated") + logs, sub, err := _Contract.contract.FilterLogs(opts, "Upgraded", implementationRule) if err != nil { return nil, err } - return &ContractAllSnapshottersUpdatedIterator{contract: _Contract.contract, event: "allSnapshottersUpdated", logs: logs, sub: sub}, nil + return &ContractUpgradedIterator{contract: _Contract.contract, event: "Upgraded", logs: logs, sub: sub}, nil } -// WatchAllSnapshottersUpdated is a free log subscription operation binding the contract event 0x743e47fbcd2e3a64a2ab8f5dcdeb4c17f892c17c9f6ab58d3a5c235953d60058. +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event allSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) WatchAllSnapshottersUpdated(opts *bind.WatchOpts, sink chan<- *ContractAllSnapshottersUpdated) (event.Subscription, error) { +// Solidity: event Upgraded(address indexed implementation) +func (_Contract *ContractFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ContractUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } - logs, sub, err := _Contract.contract.WatchLogs(opts, "allSnapshottersUpdated") + logs, sub, err := _Contract.contract.WatchLogs(opts, "Upgraded", implementationRule) if err != nil { return nil, err } @@ -2568,8 +5881,8 @@ func (_Contract *ContractFilterer) WatchAllSnapshottersUpdated(opts *bind.WatchO select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractAllSnapshottersUpdated) - if err := _Contract.contract.UnpackLog(event, "allSnapshottersUpdated", log); err != nil { + event := new(ContractUpgraded) + if err := _Contract.contract.UnpackLog(event, "Upgraded", log); err != nil { return err } event.Raw = log @@ -2590,21 +5903,21 @@ func (_Contract *ContractFilterer) WatchAllSnapshottersUpdated(opts *bind.WatchO }), nil } -// ParseAllSnapshottersUpdated is a log parse operation binding the contract event 0x743e47fbcd2e3a64a2ab8f5dcdeb4c17f892c17c9f6ab58d3a5c235953d60058. +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. // -// Solidity: event allSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) ParseAllSnapshottersUpdated(log types.Log) (*ContractAllSnapshottersUpdated, error) { - event := new(ContractAllSnapshottersUpdated) - if err := _Contract.contract.UnpackLog(event, "allSnapshottersUpdated", log); err != nil { +// Solidity: event Upgraded(address indexed implementation) +func (_Contract *ContractFilterer) ParseUpgraded(log types.Log) (*ContractUpgraded, error) { + event := new(ContractUpgraded) + if err := _Contract.contract.UnpackLog(event, "Upgraded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractMasterSnapshottersUpdatedIterator is returned from FilterMasterSnapshottersUpdated and is used to iterate over the raw logs and unpacked data for MasterSnapshottersUpdated events raised by the Contract contract. -type ContractMasterSnapshottersUpdatedIterator struct { - Event *ContractMasterSnapshottersUpdated // Event containing the contract specifics and raw log +// ContractValidatorAttestationsInvalidatedIterator is returned from FilterValidatorAttestationsInvalidated and is used to iterate over the raw logs and unpacked data for ValidatorAttestationsInvalidated events raised by the Contract contract. +type ContractValidatorAttestationsInvalidatedIterator struct { + Event *ContractValidatorAttestationsInvalidated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2618,7 +5931,7 @@ type ContractMasterSnapshottersUpdatedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractMasterSnapshottersUpdatedIterator) Next() bool { +func (it *ContractValidatorAttestationsInvalidatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2627,7 +5940,7 @@ func (it *ContractMasterSnapshottersUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractMasterSnapshottersUpdated) + it.Event = new(ContractValidatorAttestationsInvalidated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2642,7 +5955,7 @@ func (it *ContractMasterSnapshottersUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractMasterSnapshottersUpdated) + it.Event = new(ContractValidatorAttestationsInvalidated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2658,42 +5971,71 @@ func (it *ContractMasterSnapshottersUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractMasterSnapshottersUpdatedIterator) Error() error { +func (it *ContractValidatorAttestationsInvalidatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractMasterSnapshottersUpdatedIterator) Close() error { +func (it *ContractValidatorAttestationsInvalidatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractMasterSnapshottersUpdated represents a MasterSnapshottersUpdated event raised by the Contract contract. -type ContractMasterSnapshottersUpdated struct { - SnapshotterAddress common.Address - Allowed bool - Raw types.Log // Blockchain specific contextual infos +// ContractValidatorAttestationsInvalidated represents a ValidatorAttestationsInvalidated event raised by the Contract contract. +type ContractValidatorAttestationsInvalidated struct { + DataMarketAddress common.Address + EpochId *big.Int + BatchId *big.Int + Validator common.Address + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterMasterSnapshottersUpdated is a free log retrieval operation binding the contract event 0x9c2d4c2b4cf1ca90e31b1448712dae908d3568785b68a411f6617479c2b9913b. +// FilterValidatorAttestationsInvalidated is a free log retrieval operation binding the contract event 0x714caf86f735bcfc9ca5f4e56456c4c16a6630870eaee41fa5748b2502a1317a. // -// Solidity: event masterSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) FilterMasterSnapshottersUpdated(opts *bind.FilterOpts) (*ContractMasterSnapshottersUpdatedIterator, error) { +// Solidity: event ValidatorAttestationsInvalidated(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, address validator, uint256 timestamp) +func (_Contract *ContractFilterer) FilterValidatorAttestationsInvalidated(opts *bind.FilterOpts, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (*ContractValidatorAttestationsInvalidatedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } - logs, sub, err := _Contract.contract.FilterLogs(opts, "masterSnapshottersUpdated") + logs, sub, err := _Contract.contract.FilterLogs(opts, "ValidatorAttestationsInvalidated", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } - return &ContractMasterSnapshottersUpdatedIterator{contract: _Contract.contract, event: "masterSnapshottersUpdated", logs: logs, sub: sub}, nil + return &ContractValidatorAttestationsInvalidatedIterator{contract: _Contract.contract, event: "ValidatorAttestationsInvalidated", logs: logs, sub: sub}, nil } -// WatchMasterSnapshottersUpdated is a free log subscription operation binding the contract event 0x9c2d4c2b4cf1ca90e31b1448712dae908d3568785b68a411f6617479c2b9913b. +// WatchValidatorAttestationsInvalidated is a free log subscription operation binding the contract event 0x714caf86f735bcfc9ca5f4e56456c4c16a6630870eaee41fa5748b2502a1317a. // -// Solidity: event masterSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) WatchMasterSnapshottersUpdated(opts *bind.WatchOpts, sink chan<- *ContractMasterSnapshottersUpdated) (event.Subscription, error) { +// Solidity: event ValidatorAttestationsInvalidated(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, address validator, uint256 timestamp) +func (_Contract *ContractFilterer) WatchValidatorAttestationsInvalidated(opts *bind.WatchOpts, sink chan<- *ContractValidatorAttestationsInvalidated, dataMarketAddress []common.Address, epochId []*big.Int, batchId []*big.Int) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } + var epochIdRule []interface{} + for _, epochIdItem := range epochId { + epochIdRule = append(epochIdRule, epochIdItem) + } + var batchIdRule []interface{} + for _, batchIdItem := range batchId { + batchIdRule = append(batchIdRule, batchIdItem) + } - logs, sub, err := _Contract.contract.WatchLogs(opts, "masterSnapshottersUpdated") + logs, sub, err := _Contract.contract.WatchLogs(opts, "ValidatorAttestationsInvalidated", dataMarketAddressRule, epochIdRule, batchIdRule) if err != nil { return nil, err } @@ -2703,8 +6045,8 @@ func (_Contract *ContractFilterer) WatchMasterSnapshottersUpdated(opts *bind.Wat select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractMasterSnapshottersUpdated) - if err := _Contract.contract.UnpackLog(event, "masterSnapshottersUpdated", log); err != nil { + event := new(ContractValidatorAttestationsInvalidated) + if err := _Contract.contract.UnpackLog(event, "ValidatorAttestationsInvalidated", log); err != nil { return err } event.Raw = log @@ -2725,21 +6067,21 @@ func (_Contract *ContractFilterer) WatchMasterSnapshottersUpdated(opts *bind.Wat }), nil } -// ParseMasterSnapshottersUpdated is a log parse operation binding the contract event 0x9c2d4c2b4cf1ca90e31b1448712dae908d3568785b68a411f6617479c2b9913b. +// ParseValidatorAttestationsInvalidated is a log parse operation binding the contract event 0x714caf86f735bcfc9ca5f4e56456c4c16a6630870eaee41fa5748b2502a1317a. // -// Solidity: event masterSnapshottersUpdated(address snapshotterAddress, bool allowed) -func (_Contract *ContractFilterer) ParseMasterSnapshottersUpdated(log types.Log) (*ContractMasterSnapshottersUpdated, error) { - event := new(ContractMasterSnapshottersUpdated) - if err := _Contract.contract.UnpackLog(event, "masterSnapshottersUpdated", log); err != nil { +// Solidity: event ValidatorAttestationsInvalidated(address indexed dataMarketAddress, uint256 indexed epochId, uint256 indexed batchId, address validator, uint256 timestamp) +func (_Contract *ContractFilterer) ParseValidatorAttestationsInvalidated(log types.Log) (*ContractValidatorAttestationsInvalidated, error) { + event := new(ContractValidatorAttestationsInvalidated) + if err := _Contract.contract.UnpackLog(event, "ValidatorAttestationsInvalidated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// ContractPretestProjectsUpdatedIterator is returned from FilterPretestProjectsUpdated and is used to iterate over the raw logs and unpacked data for PretestProjectsUpdated events raised by the Contract contract. -type ContractPretestProjectsUpdatedIterator struct { - Event *ContractPretestProjectsUpdated // Event containing the contract specifics and raw log +// ContractValidatorsUpdatedIterator is returned from FilterValidatorsUpdated and is used to iterate over the raw logs and unpacked data for ValidatorsUpdated events raised by the Contract contract. +type ContractValidatorsUpdatedIterator struct { + Event *ContractValidatorsUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2753,7 +6095,7 @@ type ContractPretestProjectsUpdatedIterator struct { // 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 // returned and Error() can be queried for the exact failure. -func (it *ContractPretestProjectsUpdatedIterator) Next() bool { +func (it *ContractValidatorsUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2762,7 +6104,7 @@ func (it *ContractPretestProjectsUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ContractPretestProjectsUpdated) + it.Event = new(ContractValidatorsUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2777,7 +6119,7 @@ func (it *ContractPretestProjectsUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ContractPretestProjectsUpdated) + it.Event = new(ContractValidatorsUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2793,43 +6135,53 @@ func (it *ContractPretestProjectsUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ContractPretestProjectsUpdatedIterator) Error() error { +func (it *ContractValidatorsUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ContractPretestProjectsUpdatedIterator) Close() error { +func (it *ContractValidatorsUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ContractPretestProjectsUpdated represents a PretestProjectsUpdated event raised by the Contract contract. -type ContractPretestProjectsUpdated struct { - ProjectId string - Allowed bool - EnableEpochId *big.Int - Raw types.Log // Blockchain specific contextual infos +// ContractValidatorsUpdated represents a ValidatorsUpdated event raised by the Contract contract. +type ContractValidatorsUpdated struct { + DataMarketAddress common.Address + ValidatorAddress common.Address + Allowed bool + Raw types.Log // Blockchain specific contextual infos } -// FilterPretestProjectsUpdated is a free log retrieval operation binding the contract event 0x9a3ed6f278d4fc2537eb88005da8f892d6a8838b3cda9d15d2d30f5639d8d861. +// FilterValidatorsUpdated is a free log retrieval operation binding the contract event 0x2a93c48a2a98c035cd37b0e8a3e25c15ce5dd0caa1fb0553603c249c37db24b8. // -// Solidity: event pretestProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) FilterPretestProjectsUpdated(opts *bind.FilterOpts) (*ContractPretestProjectsUpdatedIterator, error) { +// Solidity: event ValidatorsUpdated(address indexed dataMarketAddress, address validatorAddress, bool allowed) +func (_Contract *ContractFilterer) FilterValidatorsUpdated(opts *bind.FilterOpts, dataMarketAddress []common.Address) (*ContractValidatorsUpdatedIterator, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } - logs, sub, err := _Contract.contract.FilterLogs(opts, "pretestProjectsUpdated") + logs, sub, err := _Contract.contract.FilterLogs(opts, "ValidatorsUpdated", dataMarketAddressRule) if err != nil { return nil, err } - return &ContractPretestProjectsUpdatedIterator{contract: _Contract.contract, event: "pretestProjectsUpdated", logs: logs, sub: sub}, nil + return &ContractValidatorsUpdatedIterator{contract: _Contract.contract, event: "ValidatorsUpdated", logs: logs, sub: sub}, nil } -// WatchPretestProjectsUpdated is a free log subscription operation binding the contract event 0x9a3ed6f278d4fc2537eb88005da8f892d6a8838b3cda9d15d2d30f5639d8d861. +// WatchValidatorsUpdated is a free log subscription operation binding the contract event 0x2a93c48a2a98c035cd37b0e8a3e25c15ce5dd0caa1fb0553603c249c37db24b8. // -// Solidity: event pretestProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) WatchPretestProjectsUpdated(opts *bind.WatchOpts, sink chan<- *ContractPretestProjectsUpdated) (event.Subscription, error) { +// Solidity: event ValidatorsUpdated(address indexed dataMarketAddress, address validatorAddress, bool allowed) +func (_Contract *ContractFilterer) WatchValidatorsUpdated(opts *bind.WatchOpts, sink chan<- *ContractValidatorsUpdated, dataMarketAddress []common.Address) (event.Subscription, error) { + + var dataMarketAddressRule []interface{} + for _, dataMarketAddressItem := range dataMarketAddress { + dataMarketAddressRule = append(dataMarketAddressRule, dataMarketAddressItem) + } - logs, sub, err := _Contract.contract.WatchLogs(opts, "pretestProjectsUpdated") + logs, sub, err := _Contract.contract.WatchLogs(opts, "ValidatorsUpdated", dataMarketAddressRule) if err != nil { return nil, err } @@ -2839,8 +6191,8 @@ func (_Contract *ContractFilterer) WatchPretestProjectsUpdated(opts *bind.WatchO select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ContractPretestProjectsUpdated) - if err := _Contract.contract.UnpackLog(event, "pretestProjectsUpdated", log); err != nil { + event := new(ContractValidatorsUpdated) + if err := _Contract.contract.UnpackLog(event, "ValidatorsUpdated", log); err != nil { return err } event.Raw = log @@ -2861,12 +6213,12 @@ func (_Contract *ContractFilterer) WatchPretestProjectsUpdated(opts *bind.WatchO }), nil } -// ParsePretestProjectsUpdated is a log parse operation binding the contract event 0x9a3ed6f278d4fc2537eb88005da8f892d6a8838b3cda9d15d2d30f5639d8d861. +// ParseValidatorsUpdated is a log parse operation binding the contract event 0x2a93c48a2a98c035cd37b0e8a3e25c15ce5dd0caa1fb0553603c249c37db24b8. // -// Solidity: event pretestProjectsUpdated(string projectId, bool allowed, uint256 enableEpochId) -func (_Contract *ContractFilterer) ParsePretestProjectsUpdated(log types.Log) (*ContractPretestProjectsUpdated, error) { - event := new(ContractPretestProjectsUpdated) - if err := _Contract.contract.UnpackLog(event, "pretestProjectsUpdated", log); err != nil { +// Solidity: event ValidatorsUpdated(address indexed dataMarketAddress, address validatorAddress, bool allowed) +func (_Contract *ContractFilterer) ParseValidatorsUpdated(log types.Log) (*ContractValidatorsUpdated, error) { + event := new(ContractValidatorsUpdated) + if err := _Contract.contract.UnpackLog(event, "ValidatorsUpdated", log); err != nil { return nil, err } event.Raw = log diff --git a/pkgs/helpers/chain.go b/pkgs/helpers/chain.go index 8a50843..6c27678 100644 --- a/pkgs/helpers/chain.go +++ b/pkgs/helpers/chain.go @@ -4,6 +4,8 @@ import ( "context" "encoding/json" "fmt" + "github.com/cenkalti/backoff/v4" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -17,6 +19,7 @@ import ( "strings" "time" "validator/config" + "validator/pkgs/clients" "validator/pkgs/contract/contract" ) @@ -31,6 +34,7 @@ func ConfigureClient() { Client, err = ethclient.Dial(config.SettingsObj.ClientUrl) if err != nil { log.Fatal(err) + clients.SendFailureNotification("chain.go", "Failed to connect to blockchain client", time.Now().String(), "Critical") } } @@ -38,11 +42,13 @@ func SetupAuth() { nonce, err := Client.PendingNonceAt(context.Background(), config.SettingsObj.SignerAccountAddress) if err != nil { log.Fatalf("Failed to get nonce: %v", err) + clients.SendFailureNotification("chain.go", "Failed to get pending noce for account", time.Now().String(), "Critical") } Auth, err = bind.NewKeyedTransactorWithChainID(config.SettingsObj.PrivateKey, big.NewInt(int64(config.SettingsObj.ChainID))) if err != nil { log.Fatalf("Failed to create authorized transactor: %v", err) + clients.SendFailureNotification("chain.go", "Failed to create authorized transactor", time.Now().String(), "Critical") } Auth.Nonce = big.NewInt(int64(nonce)) @@ -55,6 +61,7 @@ func UpdateGasPrice(multiplier int) { gasPrice, err := Client.SuggestGasPrice(context.Background()) if err != nil { log.Errorf("Failed to get gas price: %v", err) + clients.SendFailureNotification("chain.go", "Failed to get gas price", time.Now().String(), "High") } Auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(int64(multiplier))) } @@ -69,6 +76,7 @@ func StartFetchingBlocks() { if err != nil { log.Fatal(err) + clients.SendFailureNotification("chain.go", "Failed to parse contract ABI", time.Now().String(), "Critical") } for { @@ -76,6 +84,7 @@ func StartFetchingBlocks() { block, err = Client.BlockByNumber(context.Background(), nil) if err != nil || block == nil { log.Errorf("Failed to fetch latest block: %s", err.Error()) + clients.SendFailureNotification("chain.go", "Failed to fetch latest block", time.Now().String(), "Medium") continue } @@ -85,32 +94,53 @@ func StartFetchingBlocks() { // iterate all transactions in parallel and search for events go func() { - for _, tx := range block.Transactions() { - receipt, err := Client.TransactionReceipt(context.Background(), tx.Hash()) - if err != nil { - log.Errorln(err.Error()) + var logs []types.Log + var err error + + hash := block.Hash() + filterQuery := ethereum.FilterQuery{ + BlockHash: &hash, + Addresses: []common.Address{common.HexToAddress(config.SettingsObj.ContractAddress)}, + //Topics: [][]common.Hash{{contractABI.Events["SnapshotBatchSubmitted"].ID, contractABI.Events["EpochReleased"].ID}}, + } + + operation := func() error { + logs, err = Client.FilterLogs(context.Background(), filterQuery) + return err + } + + if err = backoff.Retry(operation, backoff.WithMaxRetries(backoff.NewConstantBackOff(200*time.Millisecond), 3)); err != nil { + log.Errorln("Error fetching logs: ", err.Error()) + clients.SendFailureNotification("ProcessEvents", fmt.Sprintf("Error fetching logs: %s", err.Error()), time.Now().String(), "High") + return + } + + for _, vLog := range logs { + if vLog.Address.Hex() != config.SettingsObj.ContractAddress { continue } - for _, vLog := range receipt.Logs { - if vLog.Address.Hex() != config.SettingsObj.ContractAddress { + switch vLog.Topics[0].Hex() { + case contractABI.Events["SnapshotBatchSubmitted"].ID.Hex(): + event, err := Instance.ParseSnapshotBatchSubmitted(vLog) + if err != nil { + log.Debugln("Error unpacking SnapshotBatchSubmitted event:", err) + clients.SendFailureNotification("chain.go", "Error unpacking SnapshotBatchSubmitted event", time.Now().String(), "High") continue } - switch vLog.Topics[0].Hex() { - case contractABI.Events["SnapshotBatchSubmitted"].ID.Hex(): - event, err := Instance.ParseSnapshotBatchSubmitted(*vLog) - if err != nil { - log.Debugln("Error unpacking SnapshotBatchSubmitted event:", err) - continue - } - // begin building merkle tree + if event.DataMarketAddress == config.SettingsObj.DataMarketAddress { go storeBatchSubmission(event) - case contractABI.Events["EpochReleased"].ID.Hex(): - event, err := Instance.ParseEpochReleased(*vLog) - if err != nil { - log.Debugln("Error unpacking epochReleased event:", err) - continue - } - event.EpochId = new(big.Int).SetBytes(vLog.Topics[1][:]) + } + // begin building merkle tree + + case contractABI.Events["EpochReleased"].ID.Hex(): + event, err := Instance.ParseEpochReleased(vLog) + if err != nil { + log.Debugln("Error unpacking epochReleased event:", err) + clients.SendFailureNotification("chain.go", "Error unpacking epochReleased event", time.Now().String(), "High") + continue + } + event.EpochId = new(big.Int).SetBytes(vLog.Topics[1][:]) + if event.DataMarketAddress == config.SettingsObj.DataMarketAddress { if CurrentEpochID.Cmp(event.EpochId) < 0 { CurrentEpochID.Set(event.EpochId) go triggerValidationFlow(new(big.Int).Set(CurrentEpochID)) @@ -135,6 +165,7 @@ func PopulateStateVars() { break } else { log.Debugln("Encountered error while fetching current block: ", err.Error()) + clients.SendFailureNotification("chain.go", "Encountered error while fetching current block", time.Now().String(), "Mild") } } CurrentEpochID.Set(big.NewInt(0)) @@ -150,10 +181,12 @@ func storeBatchSubmission(event *contract.ContractSnapshotBatchSubmitted) { submissionIds, err := json.Marshal(batch.SubmissionIds) if err != nil { log.Errorf("Unable to unmarshal submissionIds for batch %d epochId %s: %s\n", batch.ID, event.EpochId.String(), err.Error()) + clients.SendFailureNotification("chain.go", "Failed to marshal submissionIds", time.Now().String(), "High") } err = Set(context.Background(), RedisClient, fmt.Sprintf("%s.%s.%s", ValidatorKey, event.EpochId.String(), batch.ID.String()), string(submissionIds), time.Hour) if err != nil { log.Errorf("Unable to store submissions for batch %d epochId %s: %s\n", batch.ID, event.EpochId.String(), err.Error()) + clients.SendFailureNotification("chain.go", "Failed to store submissions", time.Now().String(), "High") } } @@ -169,6 +202,7 @@ func triggerValidationFlow(epochId *big.Int) { if err != nil { log.Errorf("Unable to fetch keys for pattern %s: %s\n", pattern, err.Error()) + clients.SendFailureNotification("chain.go", "Failed to fetch keys for pattern", time.Now().String(), "High") } sort.Slice(keys, func(i, j int) bool { @@ -184,16 +218,19 @@ func triggerValidationFlow(epochId *big.Int) { value, err := Get(context.Background(), RedisClient, key) if err != nil { log.Errorln("Error fetching data from redis: ", err.Error()) + clients.SendFailureNotification("chain.go", "Error fetching data from redis", time.Now().String(), "High") } log.Debugf("Fetched submissions for key %s\n", key) var batchSubmissionIds []string err = json.Unmarshal([]byte(value), &batchSubmissionIds) if err != nil { log.Errorf("Unable to unmarshal batch submissionIds for key: %s\n", key) + clients.SendFailureNotification("chain.go", "Failed to unmarshal batch submissionIds", time.Now().String(), "High") } _, err = UpdateMerkleTree(batchSubmissionIds, tree) if err != nil { log.Errorf("Unable to build Merkel tree: %s\n", err.Error()) + clients.SendFailureNotification("chain.go", "Failed to build Merkel tree", time.Now().String(), "High") } SubmitAttestation(key, tree.RootDigest()) } @@ -240,7 +277,7 @@ func EnsureTxSuccess(epochID *big.Int) { updatedNonce := Auth.Nonce.String() UpdateGasPrice(1) var reTx *types.Transaction - for reTx, err = Instance.SubmitBatchAttestation(Auth, batchID, epochID, [32]byte(common.Hex2Bytes(cid))); err != nil; { + for reTx, err = Instance.SubmitBatchAttestation(Auth, config.SettingsObj.DataMarketAddress, batchID, epochID, [32]byte(common.Hex2Bytes(cid))); err != nil; { updatedNonce = Auth.Nonce.String() multiplier = HandleAttestationSubmissionError(err, multiplier, batchID.String()) } diff --git a/pkgs/helpers/contract.go b/pkgs/helpers/contract.go index e86b9d7..173749d 100644 --- a/pkgs/helpers/contract.go +++ b/pkgs/helpers/contract.go @@ -33,7 +33,7 @@ func SubmitAttestation(key string, cid []byte) { var tx *types.Transaction var err error nonce := Auth.Nonce.String() - for tx, err = Instance.SubmitBatchAttestation(Auth, batchId, epochId, [32]byte(cid)); err != nil; { + for tx, err = Instance.SubmitBatchAttestation(Auth, config.SettingsObj.DataMarketAddress, batchId, epochId, [32]byte(cid)); err != nil; { time.Sleep(time.Duration(config.SettingsObj.BlockTime) * time.Second) nonce = Auth.Nonce.String() multiplier = HandleAttestationSubmissionError(err, multiplier, batchId.String()) diff --git a/pkgs/helpers/database.go b/pkgs/helpers/database.go index ef3f5e2..4e599c5 100644 --- a/pkgs/helpers/database.go +++ b/pkgs/helpers/database.go @@ -17,11 +17,12 @@ func NewRedisClient() *redis.Client { return redis.NewClient(&redis.Options{ Addr: fmt.Sprintf("%s:%s", config.SettingsObj.RedisHost, config.SettingsObj.RedisPort), // Redis server address Password: "", // no password set - DB: 0, // use default DB + DB: config.SettingsObj.RedisDB, // use default DB }) } func Set(ctx context.Context, client *redis.Client, key string, value string, expiration time.Duration) error { + // TODO: This s probably not neccessary if _, err := Get(ctx, client, key); err != nil && !errors.Is(err, redis.Nil) { return err } diff --git a/pkgs/helpers/errors.go b/pkgs/helpers/errors.go index 51dcfb9..24555cb 100644 --- a/pkgs/helpers/errors.go +++ b/pkgs/helpers/errors.go @@ -3,26 +3,32 @@ package helpers import ( log "github.com/sirupsen/logrus" "strings" + "time" + "validator/pkgs/clients" ) func HandleAttestationSubmissionError(err error, multiplier int, id string) int { log.Debugf("Found error: %s proceeding with adjustments for attestation submission\n", err.Error()) if strings.Contains(err.Error(), "transaction underpriced") { log.Errorf("Could not submit batch: %s error: %s\n", id, err.Error()) + clients.SendFailureNotification("AttestationSubmission", err.Error(), time.Now().String(), "Medium") multiplier++ UpdateGasPrice(multiplier) log.Debugln("Retrying with gas price: ", Auth.GasPrice.String()) } else if strings.Contains(err.Error(), "nonce too low") { log.Errorf("Nonce too low for batch: %s error: %s\n", id, err.Error()) + clients.SendFailureNotification("AttestationSubmission", err.Error(), time.Now().String(), "Medium") UpdateAuth(1) log.Debugln("Retrying with nonce: ", Auth.Nonce.String()) } else if strings.Contains(err.Error(), "nonce too high") { log.Errorf("Nonce too low for batch: %s error: %s\n", id, err.Error()) + clients.SendFailureNotification("AttestationSubmission", err.Error(), time.Now().String(), "Medium") UpdateAuth(-1) log.Debugln("Retrying with nonce: ", Auth.Nonce.String()) } else { // Handle other errors log.Errorf("Unexpected error: %v", err) + clients.SendFailureNotification("AttestationSubmission", err.Error(), time.Now().String(), "High") } return multiplier } diff --git a/pkgs/helpers/ipfs.go b/pkgs/helpers/ipfs.go index 2c72fac..e33fe51 100644 --- a/pkgs/helpers/ipfs.go +++ b/pkgs/helpers/ipfs.go @@ -6,7 +6,9 @@ import ( shell "github.com/ipfs/go-ipfs-api" log "github.com/sirupsen/logrus" "math/big" + "time" "validator/config" + "validator/pkgs/clients" ) var IPFSCon *shell.Shell @@ -29,6 +31,7 @@ func StoreOnIPFS(sh *shell.Shell, data *Batch) (string, error) { jsonData, err := json.Marshal(data) cid, err := sh.Add(bytes.NewReader(jsonData)) if err != nil { + clients.SendFailureNotification("IPFS", "Error Storing on IPFS: "+err.Error(), time.Now().String(), "High") return "", err } return cid, nil @@ -37,18 +40,21 @@ func StoreOnIPFS(sh *shell.Shell, data *Batch) (string, error) { func FetchSubmission(sh *shell.Shell, cid string) *Batch { data, err := sh.Cat(cid) if err != nil { + clients.SendFailureNotification("IPFS", "Error Fetching from IPFS: "+err.Error(), time.Now().String(), "High") return nil } buf := new(bytes.Buffer) _, err = buf.ReadFrom(data) if err != nil { + clients.SendFailureNotification("IPFS", "Error Fetching from IPFS: "+err.Error(), time.Now().String(), "High") return nil } batch := &Batch{} err = json.Unmarshal(buf.Bytes(), batch) // Unmarshal takes a byte slice directly if err != nil { + clients.SendFailureNotification("IPFS", "Error unmarshalling fetched data from IPFS: "+err.Error(), time.Now().String(), "High") return nil } diff --git a/pkgs/helpers/merkle.go b/pkgs/helpers/merkle.go index 6004bec..29fcbbd 100644 --- a/pkgs/helpers/merkle.go +++ b/pkgs/helpers/merkle.go @@ -4,6 +4,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/sergerad/incremental-merkle-tree/imt" log "github.com/sirupsen/logrus" + "time" + "validator/pkgs/clients" ) func UpdateMerkleTree(sortedData []string, tree *imt.IncrementalMerkleTree) (*imt.IncrementalMerkleTree, error) { @@ -12,6 +14,7 @@ func UpdateMerkleTree(sortedData []string, tree *imt.IncrementalMerkleTree) (*im err := tree.AddLeaf([]byte(value)) if err != nil { log.Errorf("Error adding merkle tree leaf: %s\n", err.Error()) + clients.SendFailureNotification("merkle.go", "Error adding merkle tree leaf: "+err.Error(), time.Now().String(), "High") return nil, err } } diff --git a/pm2.config.js b/pm2.config.js deleted file mode 100644 index 807c108..0000000 --- a/pm2.config.js +++ /dev/null @@ -1,22 +0,0 @@ -// this means if app restart {MAX_RESTART} times in 1 min then it stops -// const MAX_RESTART = 10; -// const MIN_UPTIME = 60000; -const NODE_ENV = process.env.NODE_ENV || 'development'; - -module.exports = { - apps : [ - { - name : "validator", - script : "./cmd/cmd", - cwd : `${__dirname}/cmd`, - // max_restarts: MAX_RESTART, - // min_uptime: MIN_UPTIME, - // kill_timeout : 3000, - env: { - NODE_ENV: NODE_ENV, - CONFIG_PATH:`${__dirname}` - }, - args: "5" //Log level set to debug, for production change to 4 (INFO) or 2(ERROR) - } - ] -} \ No newline at end of file diff --git a/run-dev.sh b/run-dev.sh new file mode 100755 index 0000000..e616a52 --- /dev/null +++ b/run-dev.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +env_vars="" + +env_file=".env" +if [ -f "$env_file" ]; then + echo "Reading $env_file" + while IFS= read -r line || [ -n "$line" ]; do + if [[ ! "$line" =~ ^# && -n "$line" ]]; then + env_vars+=" $line" + fi + done < "$env_file" +else + echo "File $env_file does not exist" +fi + +env $env_vars go run cmd/main.go diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..bf36fc9 --- /dev/null +++ b/run.sh @@ -0,0 +1 @@ +docker run --env-file .env proto-submission-validator \ No newline at end of file diff --git a/validator_autofill.sh b/validator_autofill.sh deleted file mode 100755 index 69e6e66..0000000 --- a/validator_autofill.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -set -e - -echo 'populating validator settings from environment values...'; - -if [ -z "$SIGNER_ACCOUNT_ADDRESS" ]; then - echo "SIGNER_ACCOUNT_ADDRESS not found, please set this in your .env!"; - exit 1; -fi - -if [ -z "$SIGNER_ACCOUNT_PRIVATE_KEY" ]; then - echo "SIGNER_ACCOUNT_PRIVATE_KEY not found, please set this in your .env!"; - exit 1; -fi - - -if [ -z "$PROST_RPC_URL" ]; then - echo "$PROST_RPC_URL not found, please set this in your .env!"; - exit 1; -fi -if [ -z "$PROTOCOL_STATE_CONTRACT" ]; then - echo "PROTOCOL_STATE_CONTRACT not found, please set this in your .env!"; - exit 1; -fi - -# Assuming default values for each variable if not provided -export REDIS_HOST="${REDIS_HOST:-redis}" -export REDIS_PORT="${REDIS_PORT:-6379}" -export IPFS_URL="${IPFS_URL:-/dns/ipfs/tcp/5001}" -export IPFS_API_KEY="${IPFS_API_KEY:-}" -export IPFS_API_SECRET="${IPFS_API_SECRET:-}" -export BATCH_SUBMISSION_LIMIT="${BATCH_SUBMISSION_LIMIT:-60}" -export BLOCK_TIME="${BLOCK_TIME:-1}" - -cd config - -# Template to actual settings.json manipulation -cp settings.example.json settings.json - -# Replace placeholders in settings.json with actual values from environment variables -sed -i'.backup' -e "s#PROST_RPC_URL#$PROST_RPC_URL#" \ - -e "s#PROTOCOL_STATE_CONTRACT#$PROTOCOL_STATE_CONTRACT#" \ - -e "s#REDIS_HOST#$REDIS_HOST#" \ - -e "s#REDIS_PORT#$REDIS_PORT#" \ - -e "s#IPFS_URL#$IPFS_URL#" \ - -e "s#SIGNER_ACCOUNT_ADDRESS#$SIGNER_ACCOUNT_ADDRESS#" \ - -e "s#SIGNER_ACCOUNT_PRIVATE_KEY#$SIGNER_ACCOUNT_PRIVATE_KEY#" \ - -e "s#PROST_CHAIN_ID#$PROST_CHAIN_ID#" settings.json \ - -e "s#BLOCK_TIME#$BLOCK_TIME#" \ - -e "s#BATCH_SUBMISSION_LIMIT#$BATCH_SUBMISSION_LIMIT#" settings.json - -# Cleanup backup file -rm settings.json.backup