-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
265 additions
and
47 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { deployments, getNamedAccounts, getUnnamedAccounts, ethers } from 'hardhat'; | ||
|
||
const { execute } = deployments; | ||
// example script | ||
|
||
const args = process.argv.slice(2); | ||
const account = args[0]; | ||
const message = args[1]; | ||
|
||
async function main() { | ||
const { owner, simpleOffchainVerifier, offRamper, onRamper } = await getNamedAccounts(); | ||
const simpleOffchainVerifierSigner = await ethers.getSigner(simpleOffchainVerifier); | ||
const bob = await ethers.getSigner(offRamper); | ||
const alice = await ethers.getSigner(onRamper); | ||
|
||
|
||
console.log('simpleOffchainVerifier: ', simpleOffchainVerifier); | ||
console.log('bob.address: ', bob.address); | ||
console.log('DeRampVault.address: ', DeRampVault.address); | ||
|
||
|
||
const erc20Deployment = await deployments.get('SimpleERC20'); | ||
const erc20ABI = await ethers.getContractFactory('SimpleERC20'); | ||
const deRampABI = await ethers.getContractFactory('DeRampVault'); | ||
|
||
|
||
|
||
const DeRampHandle = await deRampABI.connect(simpleOffchainVerifierSigner).attach(DeRampVault.address); | ||
const tx = await DeRampHandle.transferFrom(DeRampVault.address, alice.address, 100); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.