Documentation ¶
Index ¶
- Variables
- func ServiceType(nt config.NodeType) ([32]byte, error)
- type AudiusContracts
- func (ac *AudiusContracts) GetAudioTokenContract() (*gen.AudiusToken, error)
- func (ac *AudiusContracts) GetClaimsManagerContract() (*gen.ClaimsManager, error)
- func (ac *AudiusContracts) GetDelegateManagerContract() (*gen.DelegateManager, error)
- func (ac *AudiusContracts) GetGovernanceContract() (*gen.Governance, error)
- func (ac *AudiusContracts) GetRewardsManagerContract() (*gen.EthRewardsManager, error)
- func (ac *AudiusContracts) GetServiceProviderFactoryContract() (*gen.ServiceProviderFactory, error)
- func (ac *AudiusContracts) GetServiceTypeManagerContract() (*gen.ServiceTypeManager, error)
- func (ac *AudiusContracts) GetStakingContract() (*gen.Staking, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DiscoveryNode = common.Utf8ToHex("discovery-node") ContentNode = common.Utf8ToHex("content-node") )
valid service types
View Source
var ( RegistryKey = common.Utf8ToHex("Registry") GovernanceKey = common.Utf8ToHex("Governance") StakingKey = common.Utf8ToHex("StakingProxy") ServiceProviderFactoryKey = common.Utf8ToHex("ServiceProviderFactory") ClaimsManagerKey = common.Utf8ToHex("ClaimsManagerProxy") DelegateManagerKey = common.Utf8ToHex("DelegateManager") AudiusTokenKey = common.Utf8ToHex("Token") RewardsManagerKey = common.Utf8ToHex("EthRewardsManagerProxy") )
contract keys
Functions ¶
Types ¶
type AudiusContracts ¶
type AudiusContracts struct { Rpc *ethclient.Client /** contract addresses */ RegistryAddress *geth.Address GovernanceAddress *geth.Address StakingAddress *geth.Address ServiceProviderFactoryAddress *geth.Address ClaimsManagerAddress *geth.Address DelegateManagerAddress *geth.Address AudioTokenAddress *geth.Address RewardsManagerAddress *geth.Address ServiceTypeManagerAddress *geth.Address /** contract instances */ Registry *gen.Registry Governance *gen.Governance Staking *gen.Staking ServiceProviderFactory *gen.ServiceProviderFactory ClaimsManager *gen.ClaimsManager DelegateManager *gen.DelegateManager AudioToken *gen.AudiusToken RewardsManager *gen.EthRewardsManager ServiceTypeManager *gen.ServiceTypeManager }
manager struct so contracts get loaded lazily upon usage and don't spam rpcs for contracts a developer may not need
func NewAudiusContracts ¶
func NewAudiusContracts(rpc *ethclient.Client, registryAddress string) (*AudiusContracts, error)
instantiates audius contract manager so that contracts can be initialized lazily
func NewAudiusContractsInit ¶
func NewAudiusContractsInit(rpc *ethclient.Client, registryAddress string) (*AudiusContracts, error)
instantiates audius contract manager and eagerly gathers contract instances as well
func (*AudiusContracts) GetAudioTokenContract ¶
func (ac *AudiusContracts) GetAudioTokenContract() (*gen.AudiusToken, error)
func (*AudiusContracts) GetClaimsManagerContract ¶
func (ac *AudiusContracts) GetClaimsManagerContract() (*gen.ClaimsManager, error)
func (*AudiusContracts) GetDelegateManagerContract ¶
func (ac *AudiusContracts) GetDelegateManagerContract() (*gen.DelegateManager, error)
func (*AudiusContracts) GetGovernanceContract ¶
func (ac *AudiusContracts) GetGovernanceContract() (*gen.Governance, error)
func (*AudiusContracts) GetRewardsManagerContract ¶
func (ac *AudiusContracts) GetRewardsManagerContract() (*gen.EthRewardsManager, error)
func (*AudiusContracts) GetServiceProviderFactoryContract ¶
func (ac *AudiusContracts) GetServiceProviderFactoryContract() (*gen.ServiceProviderFactory, error)
func (*AudiusContracts) GetServiceTypeManagerContract ¶
func (ac *AudiusContracts) GetServiceTypeManagerContract() (*gen.ServiceTypeManager, error)
func (*AudiusContracts) GetStakingContract ¶
func (ac *AudiusContracts) GetStakingContract() (*gen.Staking, error)
Click to show internal directories.
Click to hide internal directories.