-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add the new version of zodiac core and refactor hardhat tasks
- Loading branch information
1 parent
6e20851
commit 684a009
Showing
8 changed files
with
179 additions
and
190 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
"author": "[email protected]", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@gnosis-guild/zodiac-core": "^1.1.0", | ||
"@gnosis-guild/zodiac-core": "2.0.0", | ||
"@gnosis.pm/safe-contracts": "1.3.0", | ||
"@nomicfoundation/hardhat-chai-matchers": "^2.0.7", | ||
"@nomicfoundation/hardhat-ethers": "^3.0.6", | ||
|
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { EIP1193Provider } from "@gnosis-guild/zodiac-core"; | ||
import { Signer } from "ethers"; | ||
import { EthereumProvider } from "hardhat/types"; | ||
import { EIP1193Provider } from '@gnosis-guild/zodiac-core' | ||
import { Signer } from 'ethers' | ||
import { EthereumProvider } from 'hardhat/types' | ||
|
||
export function createEIP1193( | ||
provider: EthereumProvider, | ||
signer: Signer | ||
): EIP1193Provider { | ||
return { | ||
request: async ({ method, params }) => { | ||
if (method == "eth_sendTransaction") { | ||
const { hash } = await signer.sendTransaction((params as any[])[0]); | ||
return hash; | ||
if (method == 'eth_sendTransaction') { | ||
const { hash } = await signer.sendTransaction((params as any[])[0]) | ||
return hash | ||
} | ||
|
||
return provider.request({ method, params }); | ||
return provider.request({ method, params }) | ||
}, | ||
}; | ||
} | ||
} |
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