Skip to content

Commit

Permalink
new chains + upgrade (#59)
Browse files Browse the repository at this point in the history
* - Modified getContract Client API

* upgrade to v2

* bump version

* version

* fix

* fix
  • Loading branch information
thelostone-mc authored May 6, 2024
1 parent 42b3153 commit a76aa5b
Show file tree
Hide file tree
Showing 59 changed files with 190 additions and 3,243 deletions.
4 changes: 3 additions & 1 deletion dist/Allo/Allo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class Allo {
this.contract = (0, viem_1.getContract)({
address: this.addr,
abi: allo_config_1.abi,
publicClient: this.client,
client: {
public: this.client,
}
});
}
address() {
Expand Down
4 changes: 4 additions & 0 deletions dist/Allo/allo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ exports.abi = exports.getAddress = void 0;
const DEFAULT_ADDRESS = "0x1133eA7Af70876e64665ecD07C0A0476d09465a1";
const getAddress = (chain) => {
switch (chain.id) {
case 42: // Lukso Mainnet
return "0xB087535DB0df98fC4327136e897A5985E5Cfbd66";
case 300: // ZkSync Era Testnet
case 324: // ZkSync Era Mainnet
return "0x9D1D1BF2835935C291C0f5228c86d5C4e235A249";
case 314159: // Filecoin Calibration
return "0x26827C474a276bb25bc414c9FF8c55962cAe3fb9";
default:
return DEFAULT_ADDRESS;
}
Expand Down
Empty file removed dist/Client/chains.d.ts
Empty file.
22 changes: 0 additions & 22 deletions dist/Client/chains.js

This file was deleted.

29 changes: 0 additions & 29 deletions dist/Client/customChains.d.ts

This file was deleted.

51 changes: 0 additions & 51 deletions dist/Client/customChains.js

This file was deleted.

20 changes: 11 additions & 9 deletions dist/Registry/Registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class Registry {
this.contract = (0, viem_1.getContract)({
address: this.addr,
abi: registry_config_1.abi,
publicClient: this.client,
client: {
public: this.client,
}
});
}
address() {
Expand Down Expand Up @@ -74,32 +76,32 @@ class Registry {
return admin;
});
}
hasRole({ role, account }) {
return __awaiter(this, void 0, void 0, function* () {
hasRole(_a) {
return __awaiter(this, arguments, void 0, function* ({ role, account }) {
const hasRole = yield this.contract.read.hasRole([role, account]);
return hasRole;
});
}
isMemberOfProfile({ profileId, account, }) {
return __awaiter(this, void 0, void 0, function* () {
isMemberOfProfile(_a) {
return __awaiter(this, arguments, void 0, function* ({ profileId, account, }) {
const isMember = yield this.contract.read.isMemberOfProfile([
profileId,
account,
]);
return isMember;
});
}
isOwnerOfProfile({ profileId, account, }) {
return __awaiter(this, void 0, void 0, function* () {
isOwnerOfProfile(_a) {
return __awaiter(this, arguments, void 0, function* ({ profileId, account, }) {
const isOwner = yield this.contract.read.isOwnerOfProfile([
profileId,
account,
]);
return isOwner;
});
}
isOwnerOrMemberOfProfile({ profileId, account, }) {
return __awaiter(this, void 0, void 0, function* () {
isOwnerOrMemberOfProfile(_a) {
return __awaiter(this, arguments, void 0, function* ({ profileId, account, }) {
const isOwnerOrMember = yield this.contract.read.isOwnerOrMemberOfProfile([
profileId,
account,
Expand Down
2 changes: 2 additions & 0 deletions dist/Registry/registry.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const getAddress = (chain) => {
case 300: // ZkSync Era Testnet
case 324: // ZkSync Era Mainnet
return "0xaa376Ef759c1f5A8b0B5a1e2FEC5C23f3bF30246";
case 314159: // Filecoin Calibration
return "0xb91DBEb018789d712EDC1a9e6C6AdC891BD5Ec2c";
default:
return DEFAULT_ADDRESS;
}
Expand Down
Empty file removed dist/__live__/AlloLive.d.ts
Empty file.
18 changes: 0 additions & 18 deletions dist/__live__/AlloLive.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/__live__/RegistryLive.d.ts

This file was deleted.

84 changes: 0 additions & 84 deletions dist/__live__/RegistryLive.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/__live__/createSuperfluidpool.d.ts

This file was deleted.

Loading

0 comments on commit a76aa5b

Please sign in to comment.