antier-gnosis-safe
Advanced tools
Comparing version
import { ethers } from 'ethers'; | ||
export declare const signForApprover: (multiSigWalletAddress: string, intreactWithContract: ethers.Contract, callingWalletAddress: string, method: string, inputs: []) => Promise<any>; | ||
export declare const executeWithApprover: (multiSigWalletAddress: string, intreactWithContract: ethers.Contract, callingWalletAddress: string, method: string, inputs: [], approverWithSign: { | ||
export declare const signForApprover: (multiSigWalletAddress: string, interactWithContract: ethers.Contract, senderWalletAddress: string, method: string, inputs: []) => Promise<any>; | ||
export declare const executeWithApprover: (multiSigWalletAddress: string, interactWithContract: ethers.Contract, senderWalletAddress: string, method: string, inputs: [], approverWithSign: { | ||
approverWallet: string; | ||
sign: string; | ||
}[]) => Promise<any>; |
@@ -8,3 +8,3 @@ "use strict"; | ||
const gnosis_utils_execute_1 = require("./gnosis-utils-execute"); | ||
const get_signer_n_provider = async (callingWalletAddress) => { | ||
const get_signer_n_provider = async (senderWalletAddress) => { | ||
let p = null, s = null; | ||
@@ -16,3 +16,3 @@ const { ethereum } = window; | ||
}); | ||
if (accounts[0] !== callingWalletAddress) { | ||
if (accounts[0] !== senderWalletAddress) { | ||
return null; | ||
@@ -29,4 +29,4 @@ } | ||
}; | ||
const signForApprover = async (multiSigWalletAddress, intreactWithContract, callingWalletAddress, method, inputs) => { | ||
const sp = await get_signer_n_provider(callingWalletAddress); | ||
const signForApprover = async (multiSigWalletAddress, interactWithContract, senderWalletAddress, method, inputs) => { | ||
const sp = await get_signer_n_provider(senderWalletAddress); | ||
if (!sp) { | ||
@@ -36,8 +36,8 @@ return { error: true, message: "Something went wrong with signer or provider" }; | ||
const safeL2Contract = new ethers_1.ethers.Contract(multiSigWalletAddress, SafeL2_ABI_1.default, sp.signer); | ||
let sign = await (0, gnosis_utils_1.executeContractCallForSigners)(safeL2Contract, intreactWithContract, method, inputs, [sp.signer], sp.provider, false); | ||
let sign = await (0, gnosis_utils_1.executeContractCallForSigners)(safeL2Contract, interactWithContract, method, inputs, [sp.signer], sp.provider, false); | ||
return sign; | ||
}; | ||
exports.signForApprover = signForApprover; | ||
const executeWithApprover = async (multiSigWalletAddress, intreactWithContract, callingWalletAddress, method, inputs, approverWithSign) => { | ||
const sp = await get_signer_n_provider(callingWalletAddress); | ||
const executeWithApprover = async (multiSigWalletAddress, interactWithContract, senderWalletAddress, method, inputs, approverWithSign) => { | ||
const sp = await get_signer_n_provider(senderWalletAddress); | ||
if (!sp) { | ||
@@ -48,3 +48,3 @@ return { error: true, message: "Something went wrong with signer or provider" }; | ||
const safeL2Contract = new ethers_1.ethers.Contract(multiSigWalletAddress, SafeL2_ABI_1.default, sp.signer); | ||
let transaction = await (0, gnosis_utils_execute_1.executeContractCallWithSigners)(safeL2Contract, intreactWithContract, method, inputs, signs, false); | ||
let transaction = await (0, gnosis_utils_execute_1.executeContractCallWithSigners)(safeL2Contract, interactWithContract, method, inputs, signs, false); | ||
return transaction; | ||
@@ -51,0 +51,0 @@ }; |
{ | ||
"name": "antier-gnosis-safe", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
132731
-0.01%