Documentation
¶
Index ¶
- func CreateTestSigner() (*core.Ed25519Signer, ed25519.PublicKey, p2ptypes.PeerID)
- func DeployCapabilitiesRegistry(sethClient *seth.Client, pubKeys []*ed25519.PublicKey, ...) (common.Address, error)
- func DeployTestWorkflowRegistry(t *testing.T, sethClient *seth.Client) (*workflow_registry_wrapper_v2.WorkflowRegistry, error)
- func NewSethClientWithContracts(t *testing.T, logger *zerolog.Logger, rpcUrl string, chainId uint64, ...) *seth.Client
- func PreparePayloadForSigning(payload OwnershipProofSignaturePayload) ([]byte, error)
- type OwnershipProofSignaturePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestSigner ¶
Helper function to create test Ed25519 signer and keys
func DeployTestWorkflowRegistry ¶
func DeployTestWorkflowRegistry(t *testing.T, sethClient *seth.Client) (*workflow_registry_wrapper_v2.WorkflowRegistry, error)
deployTestWorkflowRegistry deploys the WorkflowRegistry contract using the provided Seth client.
func PreparePayloadForSigning ¶
func PreparePayloadForSigning(payload OwnershipProofSignaturePayload) ([]byte, error)
Convert payload fields into Solidity-compatible data types and concatenate them in the expected order. Use the same hashing algorithm as the Solidity contract (keccak256) to hash the concatenated data. Finally, follow the EIP-191 standard to create the final hash for signing.
Types ¶
type OwnershipProofSignaturePayload ¶
type OwnershipProofSignaturePayload struct {
RequestType uint8 // should be uint8 in Solidity, 1 byte
WorkflowOwnerAddress common.Address // should be 20 bytes in Solidity, address type
ChainID string // should be uint256 in Solidity, chain-selectors provide it as a string
WorkflowRegistryContract common.Address // address of the WorkflowRegistry contract, should be 20 bytes in Solidity
Version string // should be dynamic type in Solidity (string)
ValidityTimestamp time.Time // should be uint256 in Solidity
OwnershipProofHash common.Hash // should be bytes32 in Solidity, 32 bytes hash of the ownership proof
}
Click to show internal directories.
Click to hide internal directories.