Documentation ¶
Index ¶
- Variables
- func NewPaladinClient(t *testing.T, ctx context.Context, tb testbed.Testbed) pldclient.PaladinClient
- type AtomDeployed
- type AtomFactoryHelper
- type AtomHelper
- type AtomOperation
- type DomainTransactionHelper
- type NotoHelper
- func (n *NotoHelper) ApproveTransfer(ctx context.Context, params *types.ApproveParams) *DomainTransactionHelper
- func (n *NotoHelper) Mint(ctx context.Context, to string, amount int64) *DomainTransactionHelper
- func (n *NotoHelper) Transfer(ctx context.Context, to string, amount int64) *DomainTransactionHelper
- type NotoTrackerHelper
- type SentDomainTransaction
- type StateData
- type SwapHelper
- type TradeRequestInput
- type TransactionHelper
- type ZetoHelper
- func (z *ZetoHelper) LockProof(ctx context.Context, delegate *tktypes.EthAddress, call []byte) *DomainTransactionHelper
- func (n *ZetoHelper) Mint(ctx context.Context, to string, amount uint64) *DomainTransactionHelper
- func (n *ZetoHelper) Transfer(ctx context.Context, to string, amount uint64) *DomainTransactionHelper
Constants ¶
This section is empty.
Variables ¶
View Source
var AtomFactoryJSON []byte
View Source
var AtomJSON []byte
View Source
var NotoFactoryJSON []byte
View Source
var NotoInterfaceJSON []byte
View Source
var NotoTrackerJSON []byte
View Source
var SwapJSON []byte
View Source
var ZetoFactoryJSON []byte
Functions ¶
func NewPaladinClient ¶
Types ¶
type AtomDeployed ¶
type AtomDeployed struct {
Address *tktypes.EthAddress `json:"addr"`
}
type AtomFactoryHelper ¶
type AtomFactoryHelper struct { Address *tktypes.EthAddress FactoryABI abi.ABI InstanceABI abi.ABI // contains filtered or unexported fields }
func InitAtom ¶
func InitAtom( t *testing.T, tb testbed.Testbed, pld pldclient.PaladinClient, address string, ) *AtomFactoryHelper
func (*AtomFactoryHelper) Create ¶
func (a *AtomFactoryHelper) Create(ctx context.Context, signer string, operations []*AtomOperation) *AtomHelper
type AtomHelper ¶
type AtomHelper struct { Address *tktypes.EthAddress InstanceABI abi.ABI // contains filtered or unexported fields }
func (*AtomHelper) Execute ¶
func (a *AtomHelper) Execute(ctx context.Context) *TransactionHelper
func (*AtomHelper) GetOperationCount ¶
func (a *AtomHelper) GetOperationCount(ctx context.Context) int
func (*AtomHelper) GetOperations ¶
func (a *AtomHelper) GetOperations(ctx context.Context) []map[string]any
type AtomOperation ¶
type AtomOperation struct { ContractAddress *tktypes.EthAddress `json:"contractAddress"` CallData tktypes.HexBytes `json:"callData"` }
type DomainTransactionHelper ¶
type DomainTransactionHelper struct {
// contains filtered or unexported fields
}
func NewDomainTransactionHelper ¶
func NewDomainTransactionHelper(ctx context.Context, t *testing.T, rpc rpcbackend.Backend, to *tktypes.EthAddress, fn *abi.Entry, inputs tktypes.RawJSON) *DomainTransactionHelper
func (*DomainTransactionHelper) Prepare ¶
func (dth *DomainTransactionHelper) Prepare(signer string) *testbed.TransactionResult
func (*DomainTransactionHelper) SignAndSend ¶
func (dth *DomainTransactionHelper) SignAndSend(signer string, confirm ...bool) *SentDomainTransaction
type NotoHelper ¶
type NotoHelper struct { Address *tktypes.EthAddress ABI abi.ABI // contains filtered or unexported fields }
func DeployNoto ¶
func DeployNoto(ctx context.Context, t *testing.T, rpc rpcbackend.Backend, domainName, notary string, hooks *tktypes.EthAddress) *NotoHelper
func (*NotoHelper) ApproveTransfer ¶
func (n *NotoHelper) ApproveTransfer(ctx context.Context, params *types.ApproveParams) *DomainTransactionHelper
func (*NotoHelper) Mint ¶
func (n *NotoHelper) Mint(ctx context.Context, to string, amount int64) *DomainTransactionHelper
func (*NotoHelper) Transfer ¶
func (n *NotoHelper) Transfer(ctx context.Context, to string, amount int64) *DomainTransactionHelper
type NotoTrackerHelper ¶
type NotoTrackerHelper struct { Address *tktypes.EthAddress ABI abi.ABI // contains filtered or unexported fields }
func DeployTracker ¶
func DeployTracker( ctx context.Context, t *testing.T, tb testbed.Testbed, pld pldclient.PaladinClient, signer string, ) *NotoTrackerHelper
func (*NotoTrackerHelper) GetBalance ¶
func (h *NotoTrackerHelper) GetBalance(ctx context.Context, account string) int64
type SentDomainTransaction ¶
type SentDomainTransaction struct {
// contains filtered or unexported fields
}
func (*SentDomainTransaction) Wait ¶
func (st *SentDomainTransaction) Wait()
type StateData ¶
type StateData struct { Inputs []*pldapi.StateEncoded `json:"inputs"` Outputs []*pldapi.StateEncoded `json:"outputs"` }
type SwapHelper ¶
type SwapHelper struct { Address *tktypes.EthAddress ABI abi.ABI // contains filtered or unexported fields }
func DeploySwap ¶
func DeploySwap( ctx context.Context, t *testing.T, tb testbed.Testbed, pld pldclient.PaladinClient, signer string, input *TradeRequestInput, ) *SwapHelper
func (*SwapHelper) Execute ¶
func (s *SwapHelper) Execute(ctx context.Context) *TransactionHelper
func (*SwapHelper) Prepare ¶
func (s *SwapHelper) Prepare(ctx context.Context, states *StateData) *TransactionHelper
type TradeRequestInput ¶
type TradeRequestInput struct { Holder1 string `json:"holder1"` Holder2 string `json:"holder2"` TokenAddress1 *tktypes.EthAddress `json:"tokenAddress1"` TokenAddress2 *tktypes.EthAddress `json:"tokenAddress2"` TokenValue1 *tktypes.HexUint256 `json:"tokenValue1"` TokenValue2 *tktypes.HexUint256 `json:"tokenValue2"` TradeData1 tktypes.HexBytes `json:"tradeData1"` TradeData2 tktypes.HexBytes `json:"tradeData2"` }
type TransactionHelper ¶
type TransactionHelper struct {
// contains filtered or unexported fields
}
func NewTransactionHelper ¶
func (*TransactionHelper) FindEvent ¶
func (th *TransactionHelper) FindEvent(txHash *tktypes.Bytes32, abi abi.ABI, eventName string, eventParams any) *pldapi.EventWithData
func (*TransactionHelper) Prepare ¶
func (th *TransactionHelper) Prepare() tktypes.HexBytes
func (*TransactionHelper) SignAndSend ¶
func (th *TransactionHelper) SignAndSend(signer string) pldclient.SentTransaction
type ZetoHelper ¶
type ZetoHelper struct { Address *tktypes.EthAddress // contains filtered or unexported fields }
func DeployZeto ¶
func DeployZeto(ctx context.Context, t *testing.T, rpc rpcbackend.Backend, domainName, controllerName, tokenName string) *ZetoHelper
func (*ZetoHelper) LockProof ¶
func (z *ZetoHelper) LockProof(ctx context.Context, delegate *tktypes.EthAddress, call []byte) *DomainTransactionHelper
func (*ZetoHelper) Mint ¶
func (n *ZetoHelper) Mint(ctx context.Context, to string, amount uint64) *DomainTransactionHelper
func (*ZetoHelper) Transfer ¶
func (n *ZetoHelper) Transfer(ctx context.Context, to string, amount uint64) *DomainTransactionHelper
Click to show internal directories.
Click to hide internal directories.