-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
1 changed file
with
29 additions
and
0 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,29 @@ | ||
const { deployer, web3 } = require('@openzeppelin/truffle-deployer'); | ||
const { BN } = web3.utils; | ||
|
||
const IdentityVerification = artifacts.require('IdentityVerification'); | ||
const UserRegistry = artifacts.require('UserRegistry'); | ||
|
||
module.exports = async (deployer) => { | ||
// Set the gas price and gas limit for the deployment | ||
const gasPrice = new BN('20000000000'); | ||
const gasLimit = new BN('5000000'); | ||
|
||
// Get the deployed instances of the contracts | ||
const identityVerificationInstance = await IdentityVerification.deployed(); | ||
const userRegistryInstance = await UserRegistry.deployed(); | ||
|
||
// Set the address of the IdentityVerification contract in the UserRegistry contract | ||
await userRegistryInstance.setIdentityVerificationAddress(identityVerificationInstance.address, { | ||
from: deployer.accounts[0], | ||
gas: gasLimit, | ||
gasPrice: gasPrice, | ||
}); | ||
|
||
// Set the address of the UserRegistry contract in the IdentityVerification contract | ||
await identityVerificationInstance.setUserRegistryAddress(userRegistryInstance.address, { | ||
from: deployer.accounts[0], | ||
gas: gasLimit, | ||
gasPrice: gasPrice, | ||
}); | ||
}; |