Skip to content

Commit

Permalink
Corrected deployment scripts and added public method to query metadat…
Browse files Browse the repository at this point in the history
…a url
  • Loading branch information
leonacostaok committed Apr 20, 2023
1 parent a549ca4 commit 5ebbb5f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ artifacts
typechain-types
remix-compiler.config.js
.openzeppelin
migrations
build/
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract LinearVestingProjectUpgradeable is ManageableUpgradeable, ILinearVestin
mapping(uint => mapping(address => Grant)) public grants;

/// @dev metadata url
string metadataUrl;
string public metadataUrl;

/**
* @notice Construct a new Vesting contract
Expand Down
23 changes: 11 additions & 12 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,21 @@ const config: HardhatUserConfig = {
networks: {
hardhat: {
},
goerli: {
network: 5,
url: process.env.RPC_URL || '',
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
local: {
url: 'http://127.0.0.1:7545',
accounts: ['0x0e0e6ca08cc4b4cd0eb43c5b9934f51926b634d0387ecbf7c7c4dd456041db03']
},
sepolia: {
network: 11155111,
url: process.env.RPC_URL || '',
// network: 11155111,
url: 'https://sepolia.infura.io/v3/b280b8aa6cda4dba845afb03d46c2396',
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
},
mumbai: {
network: 80001,
url: process.env.RPC_URL || '',
url: 'https://polygon-mumbai.infura.io/v3/b280b8aa6cda4dba845afb03d46c2396',
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
},
mainnet: {
network: 1,
// network: 1,
url: process.env.RPC_URL || '',
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
}
Expand All @@ -48,9 +46,10 @@ const config: HardhatUserConfig = {
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY ?? "",
goerli: process.env.ETHERSCAN_API_KEY ?? "",
polygonMumbai: process.env.ETHERSCAN_API_KEY ?? "",
mainnet: 'T3UIPRSIK9Q776Y87B48YWCIFC6EV71B96',
sepolia: 'T3UIPRSIK9Q776Y87B48YWCIFC6EV71B96',
mumbai: 'X1X9XZVFXI3S235YQGQ7A99CG648ADCUHF',
matic: 'X1X9XZVFXI3S235YQGQ7A99CG648ADCUHF',
}
}
};
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "linear-vesting-contracts",
"name": "tokenflows-contracts",
"version": "1.0.0",
"description": "Token Linear Vesting Smart Contracts developed for ERC20 crowdsales IDOs and token distribution events.",
"description": "TokenFlows Smart Contracts.",
"main": "scripts/deploy.ts",
"scripts": {
"deploy": "npx hardhat run scripts/deploy.ts --network sepolia",
Expand All @@ -10,18 +10,19 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/dandelionlabs-io/linear-vesting-contracts.git"
"url": "git+https://github.com/dandelionlabs-io/tokenflows-contracts.git"
},
"keywords": [
"token-vesting",
"dandelionlabs"
"dandelionlabs",
"tokenflows"
],
"author": "Dandelion Labs ([email protected])",
"license": "MIT",
"bugs": {
"url": "https://github.com/dandelionlabs-io/linear-vesting-contracts/issues"
"url": "https://github.com/dandelionlabs-io/tokenflows-contracts/issues"
},
"homepage": "https://github.com/dandelionlabs-io/linear-vesting-contracts#readme",
"homepage": "https://github.com/dandelionlabs-io/tokenflows-contracts#readme",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-project.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ethers } from "hardhat";
import {ethers} from "hardhat";

async function main() {

const LinearVestingProjectFactoryUpgradeable = await ethers.getContractFactory("LinearVestingProjectFactoryUpgradeable");

const factory = LinearVestingProjectFactoryUpgradeable.attach(process.env.EXISTING_FACTORY)

const tx = await factory.createProject(process.env.EXISTING_TOKEN)
const tx = await factory.createProject(process.env.EXISTING_TOKEN, 'Dandelion Labs Test 2', 'https://ipfs.io/ipfs/QmRnuKeoL9qFShGYb8n2fHi9YADq9HxaBBy2og7mx7PbhE')

await tx.wait(1)

Expand Down
5 changes: 3 additions & 2 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ require('dotenv').config()

async function main() {

const LinearVestingProjectUpgradeable = await ethers.getContractFactory("LinearVestingProjectUpgradeable");
const LinearVestingProjectRemovableUpgradeable = await ethers.getContractFactory("LinearVestingProjectRemovableUpgradeable");
const LinearVestingProjectFactoryUpgradeable = await ethers.getContractFactory("LinearVestingProjectFactoryUpgradeable");

const projectBase = await LinearVestingProjectUpgradeable.deploy();
const projectBase = await LinearVestingProjectRemovableUpgradeable.deploy();
await projectBase.deployed()

console.log("Vesting Project for beacon proxy deployed to:", projectBase.address);

Expand Down

0 comments on commit 5ebbb5f

Please sign in to comment.