Skip to content

Commit

Permalink
Merge pull request #273 from masa-finance/proxy-view-aggregator-support
Browse files Browse the repository at this point in the history
feat: extend sdk to support ProxyViewAggregator contract out of the box
  • Loading branch information
nolanjacobson authored Apr 26, 2024
2 parents 41e1b34 + 3b5b3b6 commit e67a29d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/contracts/load-marketplace-contracts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {
DataPointsMulti,
DataPointsMulti__factory,
ProxyViewAggregator,
ProxyViewAggregator__factory,
} from "@masa-finance/masa-contracts-marketplace";
import { Signer } from "ethers";

Expand All @@ -22,7 +24,15 @@ export const loadMarketplaceContracts = ({
signer,
});

// ProxyViewAggregator
const ProxyViewAggregator = loadContract<ProxyViewAggregator & ContractInfo>({
factory: new ProxyViewAggregator__factory(),
address: addresses[networkName]?.ProxyViewAggregatorAddress,
signer,
});

return {
DataPointsMulti,
ProxyViewAggregator,
};
};
1 change: 1 addition & 0 deletions src/interface/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export interface Addresses {
SoulboundGreenAddress?: string;
// Marketplace
DataPointsMultiAddress?: string;
ProxyViewAggregatorAddress?: string;
}
3 changes: 2 additions & 1 deletion src/interface/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import type {
SoulName,
SoulStore,
} from "@masa-finance/masa-contracts-identity";
import type { DataPointsMulti } from "@masa-finance/masa-contracts-marketplace";
import type { DataPointsMulti, ProxyViewAggregator } from "@masa-finance/masa-contracts-marketplace";

export interface ContractInfo {
hasAddress?: boolean;
}

export interface IMarketplaceContracts {
DataPointsMulti: DataPointsMulti & ContractInfo;
ProxyViewAggregator: ProxyViewAggregator & ContractInfo;
}

export interface IIdentityContracts {
Expand Down

0 comments on commit e67a29d

Please sign in to comment.