A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/test/e2e/seeder/ganache-contract-address-re...

29 lines
676 B

/*
* Use this class to store pre-deployed smart contract addresses of the contracts deployed to
* a local blockchain instance ran by Ganache.
*/
class GanacheContractAddressRegistry {
#addresses = {};
/**
* Store new contract address in key:value pair.
*
* @param contractName
* @param contractAddress
*/
storeNewContractAddress(contractName, contractAddress) {
this.#addresses[contractName] = contractAddress;
}
/**
* Get deployed contract address by its name (key).
*
* @param contractName
*/
getContractAddress(contractName) {
return this.#addresses[contractName];
}
}
module.exports = GanacheContractAddressRegistry;