Skip to content

Commit

Permalink
move onChainRevStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Jan 12, 2024
1 parent 1ae002a commit ab00cca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
11 changes: 0 additions & 11 deletions verifiable/credential_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"math/big"
"strings"
"sync"

core "github.com/iden3/go-iden3-core/v2"
"github.com/iden3/go-iden3-crypto/poseidon"
Expand Down Expand Up @@ -76,9 +75,6 @@ type CredentialStatusConfig struct {
IssuerDID *string
}

var idsInStateContract = map[core.ID]bool{}
var idsInStateContractLock sync.RWMutex

var errIdentityDoesNotExist = errors.New("identity does not exist")

func isErrIdentityDoesNotExist(err error) bool {
Expand All @@ -88,13 +84,6 @@ func isErrIdentityDoesNotExist(err error) bool {
return err.Error() == "execution reverted: Identity does not exist"
}

func isErrInvalidRootsLength(err error) bool {
if err == nil {
return false
}
return err.Error() == "execution reverted: Invalid roots length"
}

type errPathNotFound struct {
path string
}
Expand Down
18 changes: 18 additions & 0 deletions verifiable/status_on_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,31 @@ import (
"net/url"
"strconv"
"strings"
"sync"

core "github.com/iden3/go-iden3-core/v2"
"github.com/iden3/go-iden3-core/v2/w3c"
"github.com/iden3/go-schema-processor/v2/utils"
"github.com/pkg/errors"
)

type onChainRevStatus struct {

Check failure on line 18 in verifiable/status_on_chain.go

View workflow job for this annotation

GitHub Actions / lint

type `onChainRevStatus` is unused (unused)
chainID core.ChainID
contractAddress string
revNonce uint64
genesisState *big.Int
}

func isErrInvalidRootsLength(err error) bool {
if err == nil {
return false
}
return err.Error() == "execution reverted: Invalid roots length"
}

var idsInStateContract = map[core.ID]bool{}
var idsInStateContractLock sync.RWMutex

type OnChainResolver struct {
}

Expand Down

0 comments on commit ab00cca

Please sign in to comment.