1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/test/e2e/seeder/smart-contracts.js
seaona 6e4de3bee8
[e2e] test-dapp update to v6.0.0 (#18844)
* Test dapp update to v6.0.0 and tweak initial token amounts to adjust to the new contract

* Update gas estimates for new TST contract

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 13:01:17 +02:00

69 lines
1.3 KiB
JavaScript

const {
hstBytecode,
hstAbi,
piggybankBytecode,
piggybankAbi,
collectiblesAbi,
collectiblesBytecode,
erc1155Abi,
erc1155Bytecode,
failingContractAbi,
failingContractBytecode,
multisigAbi,
multisigBytecode,
} = require('@metamask/test-dapp/dist/constants.json');
const hstFactory = {
initialAmount: 10,
tokenName: 'TST',
decimalUnits: 4,
tokenSymbol: 'TST',
bytecode: hstBytecode,
abi: hstAbi,
};
const nftsFactory = {
bytecode: collectiblesBytecode,
abi: collectiblesAbi,
};
const erc1155Factory = {
bytecode: erc1155Bytecode,
abi: erc1155Abi,
};
const piggybankFactory = {
bytecode: piggybankBytecode,
abi: piggybankAbi,
};
const failingContract = {
bytecode: failingContractBytecode,
abi: failingContractAbi,
};
const multisigFactory = {
bytecode: multisigBytecode,
abi: multisigAbi,
};
const SMART_CONTRACTS = {
HST: 'hst',
NFTS: 'nfts',
ERC1155: 'erc1155',
PIGGYBANK: 'piggybank',
FAILING: 'failing',
MULTISIG: 'multisig',
};
const contractConfiguration = {
[SMART_CONTRACTS.HST]: hstFactory,
[SMART_CONTRACTS.NFTS]: nftsFactory,
[SMART_CONTRACTS.ERC1155]: erc1155Factory,
[SMART_CONTRACTS.PIGGYBANK]: piggybankFactory,
[SMART_CONTRACTS.FAILING]: failingContract,
[SMART_CONTRACTS.MULTISIG]: multisigFactory,
};
module.exports = { SMART_CONTRACTS, contractConfiguration };