Skip to content

Commit

Permalink
feat: update permission call
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
  • Loading branch information
md0x committed Jul 19, 2024
1 parent 79fd454 commit 8ab9061
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/bundleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const prepareUnlockTransaction = async (
let target = ovalAddress;
if (isSharedWallet) {
target = env.permissionProxyAddress;
data = PermissionProxy__factory.createInterface().encodeFunctionData("execute", [target, data]);
data = PermissionProxy__factory.createInterface().encodeFunctionData("execute", [ovalAddress, data]);
}

const { unlockTxHash, signedUnlockTx } = await createUnlockLatestValueTx(
Expand Down
3 changes: 2 additions & 1 deletion src/lib/ovalDiscovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { StandardChronicleFactory__factory } from "../contract-types/factories/S
import { StandardPythFactory } from "../contract-types/StandardPythFactory";
import { StandardPythFactory__factory } from "../contract-types/factories/StandardPythFactory__factory";
import { FACTORIES_GENESIS_BLOCK } from "./constants";
import { Logger } from "./";

// Singleton class to discover Oval instances
export class OvalDiscovery {
Expand Down Expand Up @@ -49,7 +50,6 @@ export class OvalDiscovery {
public async findOval(fromBlock: number) {
if (!this.provider) return;
const lastBlock = await this.provider.getBlockNumber();

const factories = [this.standardCoinbaseFactory, this.standardChainlinkFactory, this.standardChronicleFactory, this.standardPythFactory];

for (const factory of factories) {
Expand All @@ -61,6 +61,7 @@ export class OvalDiscovery {
const ovalDeployments = await paginatedEventQuery(factory.connect(this.provider), factory.filters.OvalDeployed(undefined, undefined, undefined, undefined, undefined, undefined), searchConfig);

ovalDeployments.forEach((ovalDeployment: EventLog) => {
Logger.debug("OvalDiscovery", `Found Oval deployment: ${ovalDeployment.args[1]}`);
this.ovalInstances.add(getAddress(ovalDeployment.args[1]));
});
}
Expand Down

0 comments on commit 8ab9061

Please sign in to comment.