-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate current deploy scripts to zodiac-core
- Loading branch information
1 parent
095ec26
commit df901ff
Showing
4 changed files
with
73 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Signer } from "ethers"; | ||
import { EIP1193Provider } from "zodiac-core"; | ||
import { EthereumProvider } from "hardhat/types"; | ||
|
||
export default function createAdapter({ | ||
provider, | ||
signer, | ||
}: { | ||
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; | ||
} | ||
|
||
return provider.request({ method, params }); | ||
}, | ||
}; | ||
} |
29 changes: 17 additions & 12 deletions
29
packages/contracts/src/deploy/deploy_circulating_supply.ts
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