-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding is_transfer to the other sql init. * Added deployment script. * Added new scripts. * Fix for test. * short fixes * Removed useless multiplication. * Reduced funding to 0.5 * Added receive function. * Removed hardcoded addresses. * Expanded log. * Fixed bad merge. * Increased gas limit. * Fixed known issues and added gas test that ensures network hasnt produced bad batches. * patched up sim tests. * Moved to hardcoded addresses. * Added a time sleep that seems to be good enough for the tests to pass. * Lint fixes. * Attempt to fix tests. * Fixed line that was overriding the cfg. * Changed gas price for test.' * Fix for faucet test. * reversed change. --------- Co-authored-by: StefanIliev545 <[email protected]>
- Loading branch information
1 parent
ef3cef2
commit 816bccf
Showing
22 changed files
with
159 additions
and
11 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
39 changes: 39 additions & 0 deletions
39
contracts/deployment_scripts/funding/layer1/001_fund_accounts.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
|
||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const layer1 = hre.companionNetworks.layer1; | ||
|
||
const {deployer} = await hre.getNamedAccounts(); | ||
const l1Accs = await layer1.getNamedAccounts(); | ||
|
||
const messageBusAddress = process.env.MESSAGE_BUS_ADDRESS!! | ||
|
||
const messageBus = (await hre.ethers.getContractFactory('MessageBus')).attach(messageBusAddress) | ||
const prefundAmount = hre.ethers.utils.parseEther("0.5"); | ||
const tx = await messageBus.populateTransaction.sendValueToL2(deployer, prefundAmount, { | ||
value: prefundAmount | ||
}); | ||
|
||
|
||
console.log(`Sending ${prefundAmount} to ${deployer}`); | ||
|
||
const receipt = await layer1.deployments.rawTx({ | ||
from: l1Accs.deployer, | ||
to: messageBusAddress, | ||
value: prefundAmount, | ||
data: tx.data, | ||
log: true, | ||
waitConfirmations: 1, | ||
}); | ||
if (receipt.events?.length === 0) { | ||
console.log(`Account prefunding status = FAILURE NO CROSS CHAIN EVENT`); | ||
} else { | ||
console.log(`Account prefunding status = ${receipt.status}`); | ||
} | ||
}; | ||
|
||
export default func; | ||
func.tags = ['GasPrefunding', 'GasPrefunding_deploy']; | ||
// No dependencies |
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.
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 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
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
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