Skip to content

Commit

Permalink
fix starknet codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Oct 17, 2024
1 parent b9e9a89 commit 1fc77fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions starknet-events/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ type Contract struct {
PaddedAddress string
}

func (c *Contract) AddressWithoutLead() string {
return c.PaddedAddress[2:]
}

func (c *Contract) Identifier() string { return c.Name }
func (c *Contract) IdentifierCapitalize() string {
if len(c.Name) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion starknet-events/templates/src/lib.rs.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn map_{{ $contract.Identifier }}_events(transactions: Transactions) -> Result<E
for event in data_events {
let event_from_address = Hex(event.from_address.as_slice()).to_string();

if event_from_address != "{{ $contract.AddressWithoutLead }}" {
if event_from_address != "{{ $contract.PaddedAddress }}" {
continue;
}

Expand Down

0 comments on commit 1fc77fc

Please sign in to comment.