-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:safe-global/safe-contracts into add…
…_tests_eip1271
- Loading branch information
Showing
76 changed files
with
3,963 additions
and
3,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import "@nomiclabs/hardhat-ethers"; | ||
import { buildSafeTransaction } from "../src/utils/execution"; | ||
import { benchmark } from "./utils/setup" | ||
import { getFactory } from "../test/utils/setup"; | ||
|
||
benchmark("Proxy", [{ | ||
name: "creation", | ||
prepare: async (contracts,_,nonce) => { | ||
const factory = contracts.additions.factory | ||
// We're cheating and passing the factory address as a singleton address to bypass a check that singleton contract exists | ||
const data = factory.interface.encodeFunctionData("createProxyWithNonce", [factory.address, "0x", 0]) | ||
return buildSafeTransaction({ to: factory.address, data, safeTxGas: 1000000, nonce }) | ||
}, | ||
fixture: async () => { | ||
return { | ||
factory: await getFactory(), | ||
} | ||
} | ||
}]) | ||
|
||
benchmark("Proxy", [{ | ||
name: "chain specific creation", | ||
prepare: async (contracts,_,nonce) => { | ||
const factory = contracts.additions.factory | ||
// We're cheating and passing the factory address as a singleton address to bypass a check that singleton contract exists | ||
const data = factory.interface.encodeFunctionData("createChainSpecificProxyWithNonce", [factory.address, "0x", 0]) | ||
return buildSafeTransaction({ to: factory.address, data, safeTxGas: 1000000, nonce }) | ||
}, | ||
fixture: async () => { | ||
return { | ||
factory: await getFactory(), | ||
} | ||
} | ||
}]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.