diff --git a/internal/parsers/contract/alpha.go b/internal/parsers/contract/alpha.go index 9dd21f8cb..fdddf4029 100644 --- a/internal/parsers/contract/alpha.go +++ b/internal/parsers/contract/alpha.go @@ -43,7 +43,6 @@ func (p *Alpha) Parse(ctx context.Context, operation *operation.Operation, store } store.AddContracts(&contract) - store.AddAccounts(contract.Account) return nil } diff --git a/internal/parsers/contract/babylon.go b/internal/parsers/contract/babylon.go index 99a9acc2d..278e3c97c 100644 --- a/internal/parsers/contract/babylon.go +++ b/internal/parsers/contract/babylon.go @@ -43,7 +43,6 @@ func (p *Babylon) Parse(ctx context.Context, operation *operation.Operation, sto } store.AddContracts(&contract) - store.AddAccounts(contract.Account) return nil } diff --git a/internal/parsers/contract/hangzhou.go b/internal/parsers/contract/hangzhou.go index e07f0766e..73336c8ee 100644 --- a/internal/parsers/contract/hangzhou.go +++ b/internal/parsers/contract/hangzhou.go @@ -43,7 +43,6 @@ func (p *Hangzhou) Parse(ctx context.Context, operation *operation.Operation, st } store.AddContracts(&contract) - store.AddAccounts(contract.Account) return nil } diff --git a/internal/parsers/contract/jakarta.go b/internal/parsers/contract/jakarta.go index b35155794..3c09d1fd2 100644 --- a/internal/parsers/contract/jakarta.go +++ b/internal/parsers/contract/jakarta.go @@ -47,7 +47,6 @@ func (p *Jakarta) Parse(ctx context.Context, operation *operation.Operation, sto } store.AddContracts(&contract) - store.AddAccounts(contract.Account) return nil } diff --git a/internal/parsers/migrations/implicit.go b/internal/parsers/migrations/implicit.go index e27666706..6d8412a40 100644 --- a/internal/parsers/migrations/implicit.go +++ b/internal/parsers/migrations/implicit.go @@ -108,6 +108,7 @@ func (p *ImplicitParser) origination(ctx context.Context, implicit noderpc.Impli Kind: types.MigrationKindBootstrap, Contract: *contracts[i], }) + store.AddAccounts(origination.Destination) break } } diff --git a/internal/parsers/migrations/vesting.go b/internal/parsers/migrations/vesting.go index aa435cdc5..f30695e87 100644 --- a/internal/parsers/migrations/vesting.go +++ b/internal/parsers/migrations/vesting.go @@ -63,12 +63,6 @@ func (p *VestingParser) Parse(ctx context.Context, data noderpc.ContractData, he return err } - store.AddAccounts( - vestingOperation.Source, - vestingOperation.Destination, - vestingOperation.Delegate, - ) - contracts := store.ListContracts() for i := range contracts { if contracts[i].Account.Address == address { @@ -79,6 +73,11 @@ func (p *VestingParser) Parse(ctx context.Context, data noderpc.ContractData, he Kind: types.MigrationKindBootstrap, Contract: *contracts[i], }) + store.AddAccounts( + vestingOperation.Source, + vestingOperation.Destination, + vestingOperation.Delegate, + ) break } } diff --git a/internal/parsers/operations/origination.go b/internal/parsers/operations/origination.go index 2e5057f2b..0574d91f1 100644 --- a/internal/parsers/operations/origination.go +++ b/internal/parsers/operations/origination.go @@ -73,6 +73,7 @@ func (p Origination) Parse(ctx context.Context, data noderpc.Operation, store pa if err := p.appliedHandler(ctx, data, &origination, store); err != nil { return err } + store.AddAccounts(origination.Destination) } store.AddOperations(&origination)