Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ BatchSize: 1000, AtBlockHeight: 0, FlowAccessNodeURL: "access.mainnet.nodes.onflow.org:9000", Chain: flow.Mainnet, ConcurrentClients: 10, Pause: 500 * time.Millisecond, }
View Source
var GetContracts string
Functions ¶
func BatchScript ¶
func NewGetContractsHandler ¶
func NewGetContractsHandler(handler GetContractsHandler) func(value cadence.Value)
Types ¶
type AddressProvider ¶
type AddressProvider struct {
// contains filtered or unexported fields
}
AddressProvider Is used to get all the addresses that exists at a certain referenceBlockId
func InitAddressProvider ¶
func InitAddressProvider( ctx context.Context, log zerolog.Logger, chain flow.ChainID, referenceBlockID flow.Identifier, client *client.Client, pause time.Duration, ) (*AddressProvider, error)
InitAddressProvider uses bisection to get the last existing address.
func (*AddressProvider) GenerateAddressBatches ¶
func (p *AddressProvider) GenerateAddressBatches(addressChan chan<- []flow.Address, batchSize int)
func (*AddressProvider) GetNextAddress ¶
func (p *AddressProvider) GetNextAddress() (address flow.Address, isOutOfBounds bool)
func (*AddressProvider) LastAddress ¶
func (p *AddressProvider) LastAddress() flow.Address
type Config ¶
type Config struct { // BachSize is the number of addresses for which to run each script BatchSize int // 0 is treated as the latest block height. AtBlockHeight uint64 FlowAccessNodeURL string Chain flow.ChainID ConcurrentClients int Pause time.Duration }
Config defines that application's config
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
get_contracts
Get all contracts from a network and write them as a CSV file to standard output.
|
Get all contracts from a network and write them as a CSV file to standard output. |
Click to show internal directories.
Click to hide internal directories.