Skip to content

Commit

Permalink
add more debug sc calls to sw factory
Browse files Browse the repository at this point in the history
  • Loading branch information
mortelli committed Jan 13, 2022
1 parent 6109ad8 commit 29ea85b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
22 changes: 22 additions & 0 deletions contracts/factory/SmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ contract SmartWalletFactory is ISmartWalletFactory {
return nonces[from];
}

function hashParams(
address factory,
address owner,
address recoverer,
uint256 index
) external returns (bytes32){
bytes32 _hash = keccak256(abi.encodePacked(
factory,
owner,
recoverer,
index
));
return _hash;
}

function hashPrefix(
string calldata prefix
) external returns (bytes32){
bytes32 r = keccak256(abi.encodePacked(prefix));
return r;
}

function hashMessage(
address factory,
address owner,
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions types/truffle-contracts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4853,6 +4853,55 @@ export interface SmartWalletFactoryInstance extends Truffle.ContractInstance {

nonce(from: string | BN, txDetails?: Truffle.TransactionDetails): Promise<BN>;

hashParams: {
(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
txDetails?: Truffle.TransactionDetails
): Promise<Truffle.TransactionResponse>;
call(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
sendTransaction(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
estimateGas(
factory: string | BN,
owner: string | BN,
recoverer: string | BN,
index: number | BN | string,
txDetails?: Truffle.TransactionDetails
): Promise<number>;
};

hashPrefix: {
(prefix: string, txDetails?: Truffle.TransactionDetails): Promise<
Truffle.TransactionResponse
>;
call(
prefix: string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
sendTransaction(
prefix: string,
txDetails?: Truffle.TransactionDetails
): Promise<string>;
estimateGas(
prefix: string,
txDetails?: Truffle.TransactionDetails
): Promise<number>;
};

hashMessage: {
(
factory: string | BN,
Expand Down

0 comments on commit 29ea85b

Please sign in to comment.