Documentation
¶
Index ¶
- Constants
- func BuildIdentityUpdateEvent(inboxId [32]byte, update []byte, sequenceID uint64) ([]byte, error)
- func BuildIdentityUpdateLog(t *testing.T, inboxId [32]byte, clientEnvelope *envelopesProto.ClientEnvelope, ...) types.Log
- func BuildMessageSentEvent(groupID [32]byte, message []byte, sequenceID uint64) ([]byte, error)
- func BuildMessageSentLog(t *testing.T, groupID [32]byte, clientEnvelope *envelopesProto.ClientEnvelope, ...) types.Log
- func CancelledContext() context.Context
- func DeployGroupMessagesContract(t *testing.T) string
- func DeployIdentityUpdatesContract(t *testing.T) string
- func DeployNodesContract(t *testing.T) string
- func GetCallerName(depth int) string
- func GetContractsOptions(t *testing.T) config.ContractsOptions
- func GetLatestTag(t *testing.T) string
- func GetLatestVersion(t *testing.T) *semver.Version
- func GetPayerOptions(t *testing.T) config.PayerOptions
- func InsertGatewayEnvelopes(t *testing.T, db *sql.DB, rows []queries.InsertGatewayEnvelopeParams, ...)
- func Int64ToHash(x int64) common.Hash
- func Marshal(t *testing.T, msg proto.Message) []byte
- func NewDB(t *testing.T, ctx context.Context) (*sql.DB, string, func())
- func NewDBs(t *testing.T, ctx context.Context, count int) ([]*sql.DB, func())
- func NewLog(t testing.TB) *zap.Logger
- func RandomAddress() common.Address
- func RandomBlockHash() common.Hash
- func RandomBytes(n int) []byte
- func RandomGroupID() [32]byte
- func RandomInboxId() string
- func RandomLogTopic() common.Hash
- func RandomPrivateKey(t *testing.T) *ecdsa.PrivateKey
- func RandomString(n int) string
- func RandomStringLower(n int) string
Constants ¶
View Source
const ( ANVIL_LOCALNET_HOST = "http://localhost:7545" ANVIL_LOCALNET_CHAIN_ID = 31337 LOCAL_PRIVATE_KEY = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" NODES_CONTRACT_NAME = "Nodes" GROUP_MESSAGES_CONTRACT_NAME = "GroupMessages" IDENTITY_UPDATES_CONTRACT_NAME = "IdentityUpdates" )
View Source
const ( LocalTestDBDSNPrefix = "postgres://postgres:xmtp@localhost:8765" LocalTestDBDSNSuffix = "?sslmode=disable" )
View Source
const BLOCKCHAIN_RPC_URL = "http://localhost:7545"
View Source
const TEST_PRIVATE_KEY = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
This is the private key that anvil has funded by default This is safe to commit
Variables ¶
This section is empty.
Functions ¶
func BuildIdentityUpdateLog ¶
func BuildIdentityUpdateLog( t *testing.T, inboxId [32]byte, clientEnvelope *envelopesProto.ClientEnvelope, sequenceID uint64, ) types.Log
Build a log message for an IdentityUpdateCreated event
func BuildMessageSentEvent ¶
Build an abi encoded MessageSent event struct
func BuildMessageSentLog ¶
func BuildMessageSentLog( t *testing.T, groupID [32]byte, clientEnvelope *envelopesProto.ClientEnvelope, sequenceID uint64, ) types.Log
Build a log message for a MessageSent event
func CancelledContext ¶ added in v0.1.1
func DeployNodesContract ¶
func GetCallerName ¶ added in v0.2.0
func GetContractsOptions ¶
func GetContractsOptions(t *testing.T) config.ContractsOptions
func GetLatestTag ¶ added in v0.2.1
func GetLatestVersion ¶ added in v0.2.1
func GetPayerOptions ¶
func GetPayerOptions(t *testing.T) config.PayerOptions
func InsertGatewayEnvelopes ¶
func Int64ToHash ¶ added in v0.2.0
func RandomAddress ¶
func RandomBlockHash ¶ added in v0.2.0
func RandomBytes ¶
func RandomGroupID ¶
func RandomGroupID() [32]byte
func RandomInboxId ¶
func RandomInboxId() string
func RandomLogTopic ¶
func RandomPrivateKey ¶
func RandomPrivateKey(t *testing.T) *ecdsa.PrivateKey
func RandomString ¶
func RandomStringLower ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.