From 6ad5f9f2bc0a74bdc8208890e0658822dc0afbe7 Mon Sep 17 00:00:00 2001 From: Ferran Borreguero Date: Thu, 29 Feb 2024 18:02:18 +0000 Subject: [PATCH] Add e2e test --- suave/e2e/workflow_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/suave/e2e/workflow_test.go b/suave/e2e/workflow_test.go index 41980743b..66731e3dc 100644 --- a/suave/e2e/workflow_test.go +++ b/suave/e2e/workflow_test.go @@ -1305,6 +1305,19 @@ func TestE2E_Precompile_CryptoBLS(t *testing.T) { require.True(t, valid) } +func TestE2E_Precompile_RandomBytes(t *testing.T) { + fr := newFramework(t) + defer fr.Close() + + // generate 32 random bytes + res := fr.callPrecompile("randomBytes", []interface{}{uint64(32)}) + require.Len(t, res[0], 32) + + // generate 64 random bytes + res = fr.callPrecompile("randomBytes", []interface{}{uint64(64)}) + require.Len(t, res[0], 64) +} + type clientWrapper struct { t *testing.T