Skip to content

Commit

Permalink
removed argent
Browse files Browse the repository at this point in the history
  • Loading branch information
baitcode committed Feb 3, 2025
1 parent b87cc50 commit 6ad1573
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 122,732 deletions.
27 changes: 7 additions & 20 deletions hash/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,13 @@ func TestCompiledClassHash(t *testing.T) {
//
// none
func TestCompiledClassHashWithBytecodeSegmentLengths(t *testing.T) {
{
content, err := os.ReadFile("./tests/contract.casm.json")
require.NoError(t, err)

var casmClass contracts.CasmClass
err = json.Unmarshal(content, &casmClass)
require.NoError(t, err)

hash := hash.CompiledClassHash(casmClass)
require.Equal(t, "0x28e4f13aed1aea3b4c2544bc10b0a2a4f37c71f830d0e3031e95aeb9cef9889", hash.String())
}
{
content, err := os.ReadFile("./tests/argent-0.4.0/ArgentAccount.casm")
require.NoError(t, err)
content, err := os.ReadFile("./tests/contract.casm.json")
require.NoError(t, err)

var casmClass contracts.CasmClass
err = json.Unmarshal(content, &casmClass)
require.NoError(t, err)
var casmClass contracts.CasmClass
err = json.Unmarshal(content, &casmClass)
require.NoError(t, err)

hash := hash.CompiledClassHash(casmClass)
require.Equal(t, "0x7a663375245780bd307f56fde688e33e5c260ab02b76741a57711c5b60d47f6", hash.String())
}
hash := hash.CompiledClassHash(casmClass)
require.Equal(t, "0x28e4f13aed1aea3b4c2544bc10b0a2a4f37c71f830d0e3031e95aeb9cef9889", hash.String())
}
Loading

0 comments on commit 6ad1573

Please sign in to comment.