Skip to content

Commit c0daa62

Browse files
refactor(sdk): remove sharing contract address from config and module
1 parent bcf0ddb commit c0daa62

File tree

5 files changed

+0
-25
lines changed

5 files changed

+0
-25
lines changed

packages/sdk/src/config/config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export type ChainId = number;
33
export interface ChainConfig {
44
name?: string;
55
dataprotectorContractAddress?: string;
6-
sharingContractAddress?: string;
76
subgraphUrl?: string;
87
ipfsGateway?: string;
98
ipfsNode?: string;
@@ -16,7 +15,6 @@ const CHAIN_CONFIG: Record<ChainId, ChainConfig> = {
1615
134: {
1716
name: 'bellecour',
1817
dataprotectorContractAddress: '0x3a4ab33f3d605e75b6d00a32a0fa55c3628f6a59',
19-
sharingContractAddress: '0x1390c3c6a545198809f1c7c5dd2600ef74d60925',
2018
subgraphUrl:
2119
'https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2',
2220
ipfsGateway: 'https://ipfs-gateway.v8-bellecour.iex.ec',
@@ -27,7 +25,6 @@ const CHAIN_CONFIG: Record<ChainId, ChainConfig> = {
2725
421614: {
2826
name: 'arbitrum-sepolia-testnet',
2927
dataprotectorContractAddress: '0x168eAF6C33a77E3caD9db892452f51a5D91df621',
30-
sharingContractAddress: '0x34AD9D161E815D7696777a9D2d668aF2d6e675e9',
3128
subgraphUrl:
3229
'https://thegraph.arbitrum-sepolia-testnet.iex.ec/api/subgraphs/id/5YjRPLtjS6GH6bB4yY55Qg4HzwtRGQ8TaHtGf9UBWWd',
3330
ipfsGateway: 'https://ipfs-gateway.arbitrum-sepolia-testnet.iex.ec',
@@ -38,7 +35,6 @@ const CHAIN_CONFIG: Record<ChainId, ChainConfig> = {
3835
42161: {
3936
name: 'arbitrum-mainnet',
4037
dataprotectorContractAddress: '0xF08f91F7646FDb95a4E24977b8Db91318252A667',
41-
sharingContractAddress: '0x2dA2D268281d79b81D609D68e4507e7ACDfd7E05',
4238
subgraphUrl:
4339
'https://thegraph.arbitrum.iex.ec/api/subgraphs/id/Ep5zs5zVr4tDiVuQJepUu51e5eWYJpka624X4DMBxe3u',
4440
ipfsGateway: 'https://ipfs-gateway.arbitrum-mainnet.iex.ec',

packages/sdk/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ export { IExecDataProtector } from './lib/IExecDataProtector.js';
77

88
// submodules only
99
export { IExecDataProtectorCore } from './lib/dataProtectorCore/IExecDataProtectorCore.js';
10-
export { IExecDataProtectorSharing } from './lib/dataProtectorSharing/IExecDataProtectorSharing.js';

packages/sdk/src/lib/IExecDataProtector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { AbstractProvider, AbstractSigner, Eip1193Provider } from 'ethers';
22
import { IExecDataProtectorCore } from './dataProtectorCore/IExecDataProtectorCore.js';
3-
import { IExecDataProtectorSharing } from './dataProtectorSharing/IExecDataProtectorSharing.js';
43
import { IExecDataProtectorModule } from './IExecDataProtectorModule.js';
54
import type {
65
DataProtectorConfigOptions,
@@ -10,8 +9,6 @@ import type {
109
class IExecDataProtector extends IExecDataProtectorModule {
1110
public core: IExecDataProtectorCore;
1211

13-
public sharing: IExecDataProtectorSharing;
14-
1512
constructor(
1613
ethProvider?:
1714
| AbstractProvider
@@ -24,7 +21,6 @@ class IExecDataProtector extends IExecDataProtectorModule {
2421
super(ethProvider, options);
2522

2623
this.core = new IExecDataProtectorCore(ethProvider, options);
27-
this.sharing = new IExecDataProtectorSharing(ethProvider, options);
2824
}
2925
}
3026

packages/sdk/src/lib/IExecDataProtectorModule.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type EthersCompatibleProvider =
2121

2222
interface IExecDataProtectorResolvedConfig {
2323
dataprotectorContractAddress: AddressOrENS;
24-
sharingContractAddress: AddressOrENS;
2524
graphQLClient: GraphQLClient;
2625
ipfsNode: string;
2726
ipfsGateway: string;
@@ -32,8 +31,6 @@ interface IExecDataProtectorResolvedConfig {
3231
abstract class IExecDataProtectorModule {
3332
protected dataprotectorContractAddress!: AddressOrENS;
3433

35-
protected sharingContractAddress!: AddressOrENS;
36-
3734
protected graphQLClient!: GraphQLClient;
3835

3936
protected ipfsNode!: string;
@@ -64,7 +61,6 @@ abstract class IExecDataProtectorModule {
6461
if (!this.initPromise) {
6562
this.initPromise = this.resolveConfig().then((config) => {
6663
this.dataprotectorContractAddress = config.dataprotectorContractAddress;
67-
this.sharingContractAddress = config.sharingContractAddress;
6864
this.graphQLClient = config.graphQLClient;
6965
this.ipfsNode = config.ipfsNode;
7066
this.ipfsGateway = config.ipfsGateway;
@@ -86,9 +82,6 @@ abstract class IExecDataProtectorModule {
8682
const dataprotectorContractAddress =
8783
this.options?.dataprotectorContractAddress ||
8884
chainDefaultConfig?.dataprotectorContractAddress;
89-
const sharingContractAddress =
90-
this.options?.sharingContractAddress ||
91-
chainDefaultConfig?.sharingContractAddress;
9285
const ipfsGateway =
9386
this.options?.ipfsGateway || chainDefaultConfig?.ipfsGateway;
9487
const defaultWorkerpool = chainDefaultConfig?.workerpoolAddress;
@@ -98,7 +91,6 @@ abstract class IExecDataProtectorModule {
9891
if (!subgraphUrl) missing.push('subgraphUrl');
9992
if (!dataprotectorContractAddress)
10093
missing.push('dataprotectorContractAddress');
101-
if (!sharingContractAddress) missing.push('sharingContractAddress');
10294
if (!ipfsGateway) missing.push('ipfsGateway');
10395
if (!defaultWorkerpool) missing.push('defaultWorkerpool');
10496
if (!ipfsNode) missing.push('ipfsNode');
@@ -135,7 +127,6 @@ abstract class IExecDataProtectorModule {
135127

136128
return {
137129
dataprotectorContractAddress: dataprotectorContractAddress.toLowerCase(),
138-
sharingContractAddress: sharingContractAddress.toLowerCase(),
139130
defaultWorkerpool,
140131
graphQLClient,
141132
ipfsNode,

packages/sdk/src/lib/types/commonTypes.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ export type DataProtectorConfigOptions = {
3737
*/
3838
dataprotectorContractAddress?: AddressOrENS;
3939

40-
/**
41-
* The Ethereum contract address or ENS (Ethereum Name Service) for dataProtector sharing smart contract.
42-
* If not provided, the default dataProtector sharing contract address will be used.
43-
* @default{@link DEFAULT_SHARING_CONTRACT_ADDRESS}
44-
*/
45-
sharingContractAddress?: AddressOrENS;
46-
4740
/**
4841
* The subgraph URL for querying data.
4942
* If not provided, the default dataProtector subgraph URL will be used.

0 commit comments

Comments
 (0)