mirror of
https://github.com/luxfi/securities.git
synced 2026-10-30 15:17:20 +00:00
25 lines
627 B
Go
25 lines
627 B
Go
package erc3643
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/luxfi/geth/common"
|
|
)
|
|
|
|
// TrustedIssuersRegistry wraps the registry of approved claim issuers.
|
|
type TrustedIssuersRegistry struct {
|
|
Address common.Address
|
|
client Client
|
|
}
|
|
|
|
// NewTrustedIssuersRegistry binds to an existing TrustedIssuersRegistry.
|
|
func NewTrustedIssuersRegistry(client Client, addr common.Address) (*TrustedIssuersRegistry, error) {
|
|
if client == nil {
|
|
return nil, errors.New("erc3643: nil client")
|
|
}
|
|
if addr == (common.Address{}) {
|
|
return nil, errors.New("erc3643: zero address")
|
|
}
|
|
return &TrustedIssuersRegistry{Address: addr, client: client}, nil
|
|
}
|