// truffle-config.js
const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonic = 'your mnemonic phrase here'; // Add your mnemonic phrase for your wallet
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
Memeseco: {
provider: () => new HDWalletProvider(mnemonic, 'https://rpc.memeseco.com'),
network_id: 6666,
gas: 5500000,
gasPrice: 10000000000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
},
compilers: {
solc: {
version: "^0.8.0"
}
}
};
Create this contract sample
// contracts/CustomToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract CustomToken is ERC20 {
constructor() ERC20("Memeseco Token", "$MMM") {
_mint(msg.sender, 1000000 * 10**decimals());
}
}
truffle migrate --network Memeseco
// hardhat.config.js
require("@nomiclabs/hardhat-waffle");
require("dotenv").config();
const customRpcUrl = "https://rpc.memeseco.com"; // memeseco custom RPC URL
const customChainId = 6666; // Chain ID for memeseco
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {},
Memeseco: {
url: customRpcUrl,
chainId: customChainId,
accounts: [process.env.PRIVATE_KEY],
},
},
solidity: {
version: "0.8.0",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
};
Create this contract sample
// contracts/CustomToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract CustomToken is ERC20 {
constructor() ERC20("Memeseco Token", "$MMM") {
_mint(msg.sender, 1000000 * 10**decimals());
}
}
// scripts/deploy.js
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying contracts with the account:", deployer.address);
const CustomToken = await ethers.getContractFactory("CustomToken");
const customToken = await CustomToken.deploy();
console.log("CustomToken contract address:", customToken.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
npx hardhat run scripts/deploy.js --network memeseco