ethapi

package
v0.0.0-...-81db2af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateETHAddress

func CreateETHAddress() (string, string, error)

Types

type BlockChainEventResp

type BlockChainEventResp struct {
	Transfer                            []*Erc20TokenTransferEventResp                            `json:"transfer"`
	NftTransfer                         []*NftTransferEventResp                                   `json:"nft_transfer"`
	ERC1155Transfer                     []*ERC1155ransferEventResp                                `json:"erc1155_transfer"`
	BridgeMint                          []*BridgeMint                                             `json:"bridge_mint"`
	BridgeWithdraw                      []*BridgeWithdraw                                         `json:"bridge_withdraw"`
	ImageHubImageTipTransferred         []*ImageHubImageTipTransferred                            `json:"image_hub_image_tip_transferred"`
	ImageHubSubscriptionPriceUpdated    []*ImageHubSubscriptionPriceUpdated                       `json:"image_hub_subscription_price_updated"`
	ImageHubSubscriptionRegistered      []*ImageHubSubscriptionRegistered                         `json:"image_hub_subscription_registered"`
	ImageHubSubscriptionCharged         []*ImageHubSubscriptionCharged                            `json:"image_hub_subscription_charged"`
	WorkerHubNewInference               []*WorkerHubNewInference                                  `json:"worker_hub_new_inference"`
	LastBlockNumber                     int64                                                     `json:"last_block_number"`
	BlockNumber                         uint64                                                    `json:"block_number"`
	MemePoolCreated                     []*UniswapPoolCreatedEventResp                            `json:"meme_pool_created"`
	MemeSwap                            []*UniswapSwapEventResp                                   `json:"meme_swap"`
	MemeIncreaseLiquidity               []*UniswapPositionLiquidity                               `json:"meme_increase_liquidity"`
	MemeDecreaseLiquidity               []*UniswapPositionLiquidity                               `json:"meme_decrease_liquidity"`
	AgentSharesTrades                   []*agentshares.AgentSharesTrade                           `json:"agent_shares_trades"`
	SystemPromptManagerNewTokens        []*systempromptmanager.SystemPromptManagerNewToken        `json:"system_prompt_manager_new_tokens"`
	SystemPromptManagerAgentDataUpdates []*systempromptmanager.SystemPromptManagerAgentDataUpdate `json:"system_prompt_manager_agent_data_updates"`
	SystemPromptManagerAgentURIUpdates  []*systempromptmanager.SystemPromptManagerAgentURIUpdate  `json:"system_prompt_manager_agent_uri_updates"`
	OrderpaymentOrderPaids              []*orderpayment.OrderpaymentOrderPaid                     `json:"orderpayment_order_paid"`
	RealWorldAgentExecutionRequested    []*RealWorldAgentExecutionRequested                       `json:"real_world_agent_execution_requested"`
}

type BlockChainExternalEventResp

type BlockChainExternalEventResp struct {
	UniV3PoolCreated []*UniswapPoolCreatedEventResp `json:"uni_v3_pool_created"`
	UniV3Swap        []*UniswapSwapEventResp        `json:"uni_v3_swap"`
	LastBlockNumber  int64                          `json:"last_block_number"`
	BlockNumber      uint64                         `json:"block_number"`
}

type BlockResp

type BlockResp struct {
	// contains filtered or unexported fields
}

func (*BlockResp) Hash

func (b *BlockResp) Hash() string

func (*BlockResp) Time

func (b *BlockResp) Time() uint64

type BridgeMint

type BridgeMint struct {
	TxHash          string     `json:"tx_hash"`
	ContractAddress string     `json:"contract_address"`
	Timestamp       uint64     `json:"timestamp"`
	Index           uint       `json:"log_index"`
	TxIndex         uint       `json:"tx_index"`
	BlockNumber     uint64     `json:"block_number"`
	Tokens          []string   `json:"tokens"`
	Recipients      []string   `json:"recipients"`
	Amounts         []*big.Int `json:"amounts"`
}

type BridgeWithdraw

type BridgeWithdraw struct {
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
	Token           string   `json:"token"`
	Burner          string   `json:"burner"`
	Amount          *big.Int `json:"amount"`
	Extddr          string   `json:"extddr"`
	DestChainId     *big.Int `json:"dest_chain_id"`
}

type Client

type Client struct {
	evmapi.BaseClient
	BaseURL     string
	BaseGasURL  string
	BlockMap    map[uint64]*BlockResp
	BlockMapMtx sync.Mutex

	MinGasPrice       string
	BTCL1             bool
	BlockTimeDisabled bool
	//
	InscribeTxsLog func(txHash string, inscribeTxHash string, logErr string)
	// contains filtered or unexported fields
}

func (*Client) Address

func (c *Client) Address() (string, string, error)

func (*Client) ApechainNonfungiblePositionManagerMint

func (c *Client) ApechainNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *apechainnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) ArbitrumNonfungiblePositionManagerMint

func (c *Client) ArbitrumNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *arbitrumnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) AvaxNonfungiblePositionManagerMint

func (c *Client) AvaxNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *avaxnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) Balance

func (c *Client) Balance(addr string) (*big.Int, error)

func (*Client) BaseNonfungiblePositionManagerMint

func (c *Client) BaseNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *basenonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) BaseNonfungiblePositionManagerMintData

func (c *Client) BaseNonfungiblePositionManagerMintData(recipient string, sqrtPriceX96 *big.Int, params *basenonfungiblepositionmanager.INonfungiblePositionManagerMintParams) ([]byte, error)

func (*Client) BaseQuoterQuoteExactInputSingle

func (c *Client) BaseQuoterQuoteExactInputSingle(contractAddress string, params *basequoterv2.IQuoterV2QuoteExactInputSingleParams) (*big.Int, *big.Int, uint32, uint32, error)

func (*Client) BaseQuoterQuoteExactOutputSingle

func (c *Client) BaseQuoterQuoteExactOutputSingle(contractAddress string, params *basequoterv2.IQuoterV2QuoteExactOutputSingleParams) (*big.Int, *big.Int, uint32, uint32, error)

func (*Client) BaseSwapRouterExactInputSingle

func (c *Client) BaseSwapRouterExactInputSingle(contractAddr, privateHex string, weth9 common.Address, params *baseswaprouter02.IV3SwapRouterExactInputSingleParams) (string, error)

func (*Client) BlockByNumber

func (c *Client) BlockByNumber(blockNumber int64) (*types.Block, error)

func (*Client) BscNonfungiblePositionManagerMint

func (c *Client) BscNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *bscnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) CamelotNonfungiblePositionManagerPositionInfo

func (c *Client) CamelotNonfungiblePositionManagerPositionInfo(positionAddr string, tokenId *big.Int) (*UniV3SwapPositionInfo, error)

func (*Client) CeloNonfungiblePositionManagerMint

func (c *Client) CeloNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *celononfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) ChainID

func (c *Client) ChainID() uint64

func (*Client) CheckTxPendingByHash

func (c *Client) CheckTxPendingByHash(txHash common.Hash) (*RPCResponse, bool, error)

func (*Client) ConvertAddressForIn

func (c *Client) ConvertAddressForIn(addr string) string

func (*Client) ConvertAddressForOut

func (c *Client) ConvertAddressForOut(addr string) string

func (*Client) DAOTreasuryAddLiquidity

func (c *Client) DAOTreasuryAddLiquidity(contractAddr string, prkHex string, daoToken common.Address) (string, error)

func (*Client) DAOTreasuryInitializeData

func (c *Client) DAOTreasuryInitializeData(positionManager common.Address, baseToken common.Address) ([]byte, error)

func (*Client) DAOTreasurySettleFund

func (c *Client) DAOTreasurySettleFund(contractAddr string, prkHex string, fundBalance *big.Int) (string, error)

func (*Client) Dagent721Mint

func (c *Client) Dagent721Mint(contractAddr string, prkHex string, to common.Address, uri string, data []byte, fee *big.Int, promptKey string, promptScheduler common.Address, modelId uint32) (string, error)

func (*Client) DeployAGENTToken

func (c *Client) DeployAGENTToken(prkHex string, name string, symbol string, amount *big.Int, recipient string) (string, string, error)

func (*Client) DeployDAOTToken

func (c *Client) DeployDAOTToken(prkHex string, name string, symbol string) (string, string, error)

func (*Client) DeployDAOTreasury

func (c *Client) DeployDAOTreasury(prkHex string) (string, string, error)

func (*Client) DeployERC20RealWorldAgent

func (c *Client) DeployERC20RealWorldAgent(prkHex string, name string, symbol string, amount *big.Int, recipient common.Address, minFeeToUse *big.Int, timeout uint32, tokenFee common.Address, worker common.Address) (string, string, error)

func (*Client) DeployERC20UtilityAgent

func (c *Client) DeployERC20UtilityAgent(prkHex string, name string, symbol string, amount *big.Int, recipient common.Address, systemPrompt string, storageInfo []byte) (string, string, error)

func (*Client) DeployMultisend

func (c *Client) DeployMultisend(prkHex string) (string, string, error)

func (*Client) DeployProxyAdmin

func (c *Client) DeployProxyAdmin(prkHex string) (string, string, error)

func (*Client) DeployTransparentUpgradeableProxy

func (c *Client) DeployTransparentUpgradeableProxy(prkHex string, logic common.Address, admin common.Address, data []byte) (string, string, error)

func (*Client) ERC20RealWorldAgentAct

func (c *Client) ERC20RealWorldAgentAct(contractAddr string, prkHex string, uuid [32]byte, data []byte) (string, error)

func (*Client) ERC20RealWorldAgentSubmitSolution

func (c *Client) ERC20RealWorldAgentSubmitSolution(contractAddr string, prkHex string, actId *big.Int, result []byte) (string, error)

func (*Client) ERC20UtilityAgentFetchCode

func (c *Client) ERC20UtilityAgentFetchCode(contractAddress string) (string, error)

func (*Client) ERC20UtilityAgentGetStorageInfo

func (c *Client) ERC20UtilityAgentGetStorageInfo(contractAddress string) (*erc20utilityagent.IUtilityAgentStorageInfo, error)

func (*Client) Erc1155Balance

func (c *Client) Erc1155Balance(erc20Addr string, tokenId string, addr string) (*big.Int, error)

func (*Client) Erc1155IsApprovedForAll

func (c *Client) Erc1155IsApprovedForAll(erc20Addr string, addr string, operator string) (bool, error)

func (*Client) Erc20Allowance

func (c *Client) Erc20Allowance(erc20Addr string, addr string, spender string) (*big.Int, error)

func (*Client) Erc20ApproveMax

func (c *Client) Erc20ApproveMax(erc20Addr string, prkHex string, toAddr string) (string, error)

func (*Client) Erc20ApproveMaxCheck

func (c *Client) Erc20ApproveMaxCheck(contractAddr string, prkHex string, spender common.Address) (string, error)

func (*Client) Erc20ApproveMaxData

func (c *Client) Erc20ApproveMaxData(toAddr string) ([]byte, error)

func (*Client) Erc20Balance

func (c *Client) Erc20Balance(erc20Addr string, addr string) (*big.Int, error)

func (*Client) Erc20EventsByTransaction

func (c *Client) Erc20EventsByTransaction(txHash string) (*Erc20TokenEventResp, error)

func (*Client) Erc20Info

func (c *Client) Erc20Info(erc20Addr string) (*Erc20InfoResp, error)

func (*Client) Erc20Symbol

func (c *Client) Erc20Symbol(erc20Addr string) (string, error)

func (*Client) Erc20TokenEventResp

func (c *Client) Erc20TokenEventResp(resp *Erc20TokenEventResp, log *types.Log) error

func (*Client) Erc20Transfer

func (c *Client) Erc20Transfer(erc20Addr string, prkHex string, toAddr string, amount string) (string, error)

func (*Client) Erc721Transfer

func (c *Client) Erc721Transfer(contractAddr string, prkHex string, toAddr string, tokenId *big.Int) (string, error)

func (*Client) EthereumNonfungiblePositionManagerMint

func (c *Client) EthereumNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *ethereumnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) EventsByTransaction

func (c *Client) EventsByTransaction(txHash string) (*BlockChainEventResp, error)

func (*Client) ExternalEventEventsByTransaction

func (c *Client) ExternalEventEventsByTransaction(txHash string) (*BlockChainExternalEventResp, error)

func (*Client) GPUManagerGetModelID

func (c *Client) GPUManagerGetModelID(contactAddress string) (uint32, error)

func (*Client) GetAssignmentByInferenceId

func (c *Client) GetAssignmentByInferenceId(workerhubAddress string, inferenceId uint) ([]iworkerhub.IWorkerHubAssignment, error)

func (*Client) GetBlockTime

func (c *Client) GetBlockTime(n uint64) (uint64, error)

func (*Client) GetCachedGasPriceAndTipCap

func (c *Client) GetCachedGasPriceAndTipCap() (*big.Int, *big.Int, error)

func (*Client) GetChainID

func (c *Client) GetChainID() (uint64, error)

func (*Client) GetClient

func (c *Client) GetClient() (*ethclient.Client, error)

func (*Client) GetFrom

func (c *Client) GetFrom(tx *types.Transaction) (string, error)

func (*Client) GetFromFromHash

func (c *Client) GetFromFromHash(hash string) (string, error)

func (*Client) GetLastBlockNumber

func (c *Client) GetLastBlockNumber() (int64, error)

func (*Client) GetReceiveAddrsByHeight

func (c *Client) GetReceiveAddrsByHeight(height int64) ([]string, []*TxResp, error)

func (*Client) GetRewardSignature

func (c *Client) GetRewardSignature(contractAddr, tokenAddr, accountAddr, prk string, balance *big.Int) (string, error)

func (*Client) GetSignatureTimestamp

func (c *Client) GetSignatureTimestamp(prk string, timestamp int64) (string, error)

func (*Client) IAGENTTokenDeployerCallWithValueData

func (c *Client) IAGENTTokenDeployerCallWithValueData(target string, data []byte, value *big.Int) ([]byte, error)

func (*Client) IAGENTTokenDeployerCreateTokenData

func (c *Client) IAGENTTokenDeployerCreateTokenData(salt string, name string, symbol string, supply *big.Int) ([]byte, error)

func (*Client) IAGENTTokenDeployerGetToken

func (c *Client) IAGENTTokenDeployerGetToken(contractAddress string, salt string) (string, error)

func (*Client) IAGENTTokenDeployerMulticallData

func (c *Client) IAGENTTokenDeployerMulticallData(data [][]byte) ([]byte, error)

func (*Client) IV3SwapRouterExactInputSingleData

func (c *Client) IV3SwapRouterExactInputSingleData(params *iv3swaprouter.IV3SwapRouterExactInputSingleParams) ([]byte, error)

func (*Client) InscribeTxs

func (c *Client) InscribeTxs(txHashs []string) (string, error)

func (*Client) IsContract

func (c *Client) IsContract(address string) (bool, error)

func (*Client) MemeNonfungiblePositionManagerBurn

func (c *Client) MemeNonfungiblePositionManagerBurn(contractAddr string, adminPrk string, weth9 common.Address, tokenId *big.Int) (string, error)

func (*Client) MemeNonfungiblePositionManagerMint

func (c *Client) MemeNonfungiblePositionManagerMint(contractAddr string, prkHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *memenonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) MemeNonfungiblePositionManagerMintData

func (c *Client) MemeNonfungiblePositionManagerMintData(recipient string, sqrtPriceX96 *big.Int, params *memenonfungiblepositionmanager.INonfungiblePositionManagerMintParams) ([]byte, error)

func (*Client) MemeNonfungiblePositionManagerPositionInfo

func (c *Client) MemeNonfungiblePositionManagerPositionInfo(positionAddr string, tokenId *big.Int) (*UniV3SwapPositionInfo, error)

func (*Client) MultisendERC20Transfer

func (c *Client) MultisendERC20Transfer(contractAddr string, prkHex string, token common.Address, addresses []common.Address, amounts []*big.Int) (string, error)

func (*Client) NewErc20TokenEventResp

func (c *Client) NewErc20TokenEventResp() *Erc20TokenEventResp

func (*Client) NewEventResp

func (c *Client) NewEventResp() *BlockChainEventResp

func (*Client) NewExternalEventResp

func (c *Client) NewExternalEventResp() *BlockChainExternalEventResp

func (*Client) NftOwnerOf

func (c *Client) NftOwnerOf(nftAddr string, tokenID string) (string, error)

func (*Client) PancakeswapV3PoolSlot0

func (c *Client) PancakeswapV3PoolSlot0(poolAddr string) (*struct {
	SqrtPriceX96               *big.Int
	Tick                       *big.Int
	ObservationIndex           uint16
	ObservationCardinality     uint16
	ObservationCardinalityNext uint16
	FeeProtocol                uint32
	Unlocked                   bool
}, error)

func (*Client) ParseEventResp

func (c *Client) ParseEventResp(resp *BlockChainEventResp, log *types.Log) error

func (*Client) ParseExternalEventResp

func (c *Client) ParseExternalEventResp(resp *BlockChainExternalEventResp, log *types.Log) error

func (*Client) PolygonNonfungiblePositionManagerMint

func (c *Client) PolygonNonfungiblePositionManagerMint(contractAddr string, privateHex string, weth9 common.Address, sqrtPriceX96 *big.Int, params *polygonnonfungiblepositionmanager.INonfungiblePositionManagerMintParams) (string, error)

func (*Client) ProxyAdminUpgrade

func (c *Client) ProxyAdminUpgrade(contractAddr string, prkHex string, proxyAddress common.Address, logic common.Address) (string, error)

func (*Client) ReferralPaymentSignMessage

func (c *Client) ReferralPaymentSignMessage(contractAddr, tokenAddr, accountAddr, prk string, balance *big.Int) (string, error)

func (*Client) ScanEvents

func (c *Client) ScanEvents(contractAddrs []string, startBlock, endBlock int64) (*BlockChainEventResp, error)

func (*Client) ScanExternalEvents

func (c *Client) ScanExternalEvents(contractAddrs []string, startBlock, endBlock int64) (*BlockChainExternalEventResp, error)

func (*Client) ScanTokenHolders

func (c *Client) ScanTokenHolders(contracts []string, startBlock, endBlock int64) (*Erc20TokenEventResp, error)

func (*Client) Sign

func (c *Client) Sign(privateKey string, hash [32]byte) ([]byte, error)

func (*Client) SignWithEthereum

func (c *Client) SignWithEthereum(privateKey string, dataBytes []byte) (string, error)

func (*Client) SystemPromptManagerInfer

func (c *Client) SystemPromptManagerInfer(contractAddr string, prkHex string, agentId int64, inferData string, externalData string) (string, error)

func (*Client) SystemPromptManagerMint

func (c *Client) SystemPromptManagerMint(contractAddr string, prkHex string, to common.Address, uri string, data []byte, fee *big.Int) (string, error)

func (*Client) SystemPromptManagerTopup

func (c *Client) SystemPromptManagerTopup(contractAddr string, prkHex string, agentId int64, amount *big.Int) (string, error)

func (*Client) Transact

func (c *Client) Transact(contractAddr string, prkHex string, dataBytes []byte, value *big.Int) (string, error)

func (*Client) TransactionConfirmed

func (c *Client) TransactionConfirmed(hash string) error

func (*Client) Transfer

func (c *Client) Transfer(prkHex string, toAddr string, amount string, includeFee bool, wait bool) (string, error)

func (*Client) UniswapV3PoolSlot0

func (c *Client) UniswapV3PoolSlot0(poolAddr string) (*struct {
	SqrtPriceX96               *big.Int
	Tick                       *big.Int
	ObservationIndex           uint16
	ObservationCardinality     uint16
	ObservationCardinalityNext uint16
	FeeProtocol                uint8
	Unlocked                   bool
}, error)

func (*Client) UniswapV3PoolSlot0Arb

func (c *Client) UniswapV3PoolSlot0Arb(poolAddr string) (*struct {
	Price              *big.Int
	Tick               *big.Int
	FeeZto             uint16
	FeeOtz             uint16
	TimepointIndex     uint16
	CommunityFeeToken0 uint8
	CommunityFeeToken1 uint8
	Unlocked           bool
}, error)

func (*Client) ValidateMessageSignature

func (c *Client) ValidateMessageSignature(msg string, signatureHex string, signer string) error

func (*Client) WaitMined

func (c *Client) WaitMined(hash string) error

func (*Client) WaitMinedTxReceipt

func (c *Client) WaitMinedTxReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

func (*Client) WorkerHubAssignment

func (c *Client) WorkerHubAssignment(workerhubAddress string, assignmentId uint) (*big.Int, []byte, error)

func (*Client) WorkerHubInference

func (c *Client) WorkerHubInference(workerhubAddress string, inferenceId uint) (*iworkerhub.IWorkerHubInference, error)

type ERC1155ransferEventResp

type ERC1155ransferEventResp struct {
	NetworkID       uint64 `json:"network_id"`
	TxHash          string `json:"tx_hash"`
	ContractAddress string `json:"contract_address"`
	Timestamp       uint64 `json:"timestamp"`
	Operator        string
	From            string
	To              string
	Id              *big.Int
	Value           *big.Int
}

type Erc20InfoResp

type Erc20InfoResp struct {
	Symbol     string   `json:"symbol"`
	Name       string   `json:"name"`
	TotalSuply *big.Int `json:"total_suply"`
	Decimals   int      `json:"decimals"`
}

type Erc20TokenEventResp

type Erc20TokenEventResp struct {
	Transfer        []*Erc20TokenTransferEventResp `json:"transfer"`
	NftTransfer     []*NftTransferEventResp        `json:"nft_transfer"`
	ERC1155Transfer []*ERC1155ransferEventResp     `json:"erc1155_transfer"`
	LastBlockNumber int64                          `json:"last_block_number"`
}

type Erc20TokenTransferEventResp

type Erc20TokenTransferEventResp struct {
	NetworkID       uint64   `json:"network_id"`
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	From            string   `json:"from"`
	To              string   `json:"to"`
	Value           *big.Int `json:"value"`
	Index           uint     `json:"log_index"`
	BlockNumber     uint64   `json:"block_number"`
	TxIndex         uint     `json:"tx_index"`
}

///////

type ImageHubImageTipTransferred

type ImageHubImageTipTransferred struct {
	NetworkID       uint64 `json:"network_id"`
	TxHash          string `json:"tx_hash"`
	ContractAddress string `json:"contract_address"`
	Timestamp       uint64 `json:"timestamp"`
	Index           uint   `json:"log_index"`
	TxIndex         uint   `json:"tx_index"`
	BlockNumber     uint64 `json:"block_number"`
	User            string
	Creator         string
	ImageId         *big.Int
	Amount          *big.Int
	Fee             *big.Int
}

type ImageHubSubscriptionCharged

type ImageHubSubscriptionCharged struct {
	NetworkID       uint64 `json:"network_id"`
	TxHash          string `json:"tx_hash"`
	ContractAddress string `json:"contract_address"`
	Timestamp       uint64 `json:"timestamp"`
	Index           uint   `json:"log_index"`
	TxIndex         uint   `json:"tx_index"`
	BlockNumber     uint64 `json:"block_number"`
	User            string
	Creator         string
	Duration        *big.Int
	ExpiredAt       *big.Int
	Amount          *big.Int
	Fee             *big.Int
}

type ImageHubSubscriptionPriceUpdated

type ImageHubSubscriptionPriceUpdated struct {
	NetworkID       uint64 `json:"network_id"`
	TxHash          string `json:"tx_hash"`
	ContractAddress string `json:"contract_address"`
	Timestamp       uint64 `json:"timestamp"`
	Index           uint   `json:"log_index"`
	TxIndex         uint   `json:"tx_index"`
	BlockNumber     uint64 `json:"block_number"`
	Creator         string
	Duration        *big.Int
	Price           *big.Int
}

type ImageHubSubscriptionRegistered

type ImageHubSubscriptionRegistered struct {
	NetworkID       uint64 `json:"network_id"`
	TxHash          string `json:"tx_hash"`
	ContractAddress string `json:"contract_address"`
	Timestamp       uint64 `json:"timestamp"`
	Index           uint   `json:"log_index"`
	TxIndex         uint   `json:"tx_index"`
	BlockNumber     uint64 `json:"block_number"`
	User            string
	Creator         string
	Duration        *big.Int
	Price           *big.Int
}

type NftTransferEventResp

type NftTransferEventResp struct {
	NetworkID       uint64   `json:"network_id"`
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	From            string   `json:"from"`
	To              string   `json:"to"`
	TokenId         *big.Int `json:"token_id"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
}

type RPCResponse

type RPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	Result  *ResultResponse `json:"result"`
	ID      int             `json:"id"`
}

type RealWorldAgentExecutionRequested

type RealWorldAgentExecutionRequested struct {
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
	ActId           *big.Int `json:"act_id"`
	Uuid            string   `json:"uuid"`
	Creator         string   `json:"creator"`
	Data            string   `json:"data"`
}

type ResultResponse

type ResultResponse struct {
	Hash          string  `json:"hash"`
	BlockHash     *string `json:"blockHash"`
	BlockNumber   *string `json:"blockNumber"`
	Number        *string `json:"number"`
	ChainID       string  `json:"chainId"`
	L1BlockNumber *string `json:"l1BlockNumber"`
}

type SwapNonfungiblePositionManagerMintParams

type SwapNonfungiblePositionManagerMintParams struct {
	Token0         string   `json:"token0"`
	Token1         string   `json:"token1"`
	Fee            *big.Int `json:"fee"`
	TickLower      *big.Int `json:"tick_lower"`
	TickUpper      *big.Int `json:"tick_upper"`
	Amount0Desired *big.Int `json:"amount0_desired"`
	Amount1Desired *big.Int `json:"amount1_desired"`
	Amount0Min     *big.Int `json:"amount0_min"`
	Amount1Min     *big.Int `json:"amount1_min"`
	Deadline       *big.Int `json:"deadline"`
	SqrtPriceX96   *big.Int `json:"sqrt_price_x96"`
	NetworkID      uint64   `json:"network_id"`
}

type TxResp

type TxResp struct {
	TxHash      string
	FromAddress string
	ToAddrress  string
	Amount      *big.Int
}

type UniV3SwapPositionInfo

type UniV3SwapPositionInfo struct {
	Nonce                    *big.Int `json:"nonce"`
	Operator                 string   `json:"opperator"`
	Token0                   string   `json:"token0"`
	Token1                   string   `json:"token1"`
	Fee                      *big.Int `json:"fee"`
	TickLower                *big.Int `json:"tick_lower"`
	TickUpper                *big.Int `json:"tick_upper"`
	Liquidity                *big.Int `json:"liquidity"`
	FeeGrowthInside0LastX128 *big.Int `json:"fee_growth_inside0_last_x128"`
	FeeGrowthInside1LastX128 *big.Int `json:"fee_growth_inside1_last_x128"`
	TokensOwed0              *big.Int `json:"tokens_owed0"`
	TokensOwed1              *big.Int `json:"tokens_owed1"`
	Owner                    string   `json:"owner"`
	NetworkID                uint64   `json:"network_id"`
}

type UniswapPoolCreatedEventResp

type UniswapPoolCreatedEventResp struct {
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Token0          string   `json:"token0"`
	Token1          string   `json:"token1"`
	Pool            string   `json:"pool"`
	Fee             *big.Int `json:"fee"`
	TickSpacing     *big.Int `json:"tick_spacing"`
	Index           uint     `json:"log_index"`
	NetworkID       uint64   `json:"network_id"`
}

type UniswapPositionLiquidity

type UniswapPositionLiquidity struct {
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
	TokenId         *big.Int `json:"token_id"`
	Liquidity       *big.Int `json:"liquidity"`
	Amount0         *big.Int `json:"amount0"`
	Amount1         *big.Int `json:"amount1"`
	NetworkID       uint64   `json:"network_id"`
}

type UniswapSwapEventResp

type UniswapSwapEventResp struct {
	FromAddress     string   `json:"from_address"`
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Sender          string   `json:"sender"`
	Recipient       string   `json:"recipient"`
	Amount0         *big.Int `json:"amount0"`
	Amount1         *big.Int `json:"amount1"`
	SqrtPriceX96    *big.Int `json:"sqrt_price_x96"`
	Liquidity       *big.Int `json:"liquidity"`
	Tick            *big.Int `json:"tick"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
	NetworkID       uint64   `json:"network_id"`
}

type WorkerHubNewInference

type WorkerHubNewInference struct {
	NetworkID       uint64   `json:"network_id"`
	TxHash          string   `json:"tx_hash"`
	ContractAddress string   `json:"contract_address"`
	Timestamp       uint64   `json:"timestamp"`
	Index           uint     `json:"log_index"`
	TxIndex         uint     `json:"tx_index"`
	BlockNumber     uint64   `json:"block_number"`
	InferenceId     *big.Int `json:"inference_id"`
	Model           string   `json:"model"`
	Creator         string   `json:"creator"`
	Value           *big.Int `json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL