Skip to content

Commit

Permalink
fix: fix deploy script and apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahschwartz committed Sep 19, 2024
1 parent 11b974c commit 37d0f79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions code/multisig/contracts/TwoUserMultisig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ contract TwoUserMultisig is IAccount, IERC1271 {
uint32 gas = Utils.safeCastToU32(gasleft());

// Note, that the deployer contract can only be called
// with a "systemCall" flag.
// with a "enableEraVMExtensions" flag.
SystemContractsCaller.systemCallWithPropagatedRevert(gas, to, value, data);
} else {
bool success;
Expand Down Expand Up @@ -215,8 +215,8 @@ contract TwoUserMultisig is IAccount, IERC1271 {
// since it is where the length of the `_fullSignature` is stored
assembly {
let r := mload(add(_fullSignature, 0x20))
let s := mload(add(_fullSignature, 0x40))
let v := and(mload(add(_fullSignature, 0x41)), 0xff)
let s := mload(add(_fullSignature, 0x40))
let v := and(mload(add(_fullSignature, 0x41)), 0xff)

mstore(add(signature1, 0x20), r)
mstore(add(signature1, 0x40), s)
Expand Down
17 changes: 11 additions & 6 deletions code/multisig/deploy/deploy-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ export default async function (hre: HardhatRuntimeEnvironment) {
// Getting the bytecodeHash of the account
const bytecodeHash = utils.hashBytecode(aaArtifact.bytecode);

const factory = await deployer.deploy(factoryArtifact, [bytecodeHash], undefined, [
// Since the factory requires the code of the multisig to be available,
// we should pass it here as well.
aaArtifact.bytecode,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
] as any);
const factory = await deployer.deploy(
factoryArtifact,
[bytecodeHash],
undefined,
undefined, // Override transaction section
[
// Since the factory requires the code of the multisig to be available,
// we need to pass it here as well.
aaArtifact.bytecode,
]
);

const factoryAddress = await factory.getAddress();

Expand Down

0 comments on commit 37d0f79

Please sign in to comment.