Skip to content

Commit 5ebbb5f

Browse files
committed
Corrected deployment scripts and added public method to query metadata url
1 parent a549ca4 commit 5ebbb5f

File tree

6 files changed

+26
-23
lines changed

6 files changed

+26
-23
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ artifacts
66
typechain-types
77
remix-compiler.config.js
88
.openzeppelin
9+
migrations
10+
build/

contracts/linear-vesting/LinearVestingProjectUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ contract LinearVestingProjectUpgradeable is ManageableUpgradeable, ILinearVestin
2727
mapping(uint => mapping(address => Grant)) public grants;
2828

2929
/// @dev metadata url
30-
string metadataUrl;
30+
string public metadataUrl;
3131

3232
/**
3333
* @notice Construct a new Vesting contract

hardhat.config.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ const config: HardhatUserConfig = {
1010
networks: {
1111
hardhat: {
1212
},
13-
goerli: {
14-
network: 5,
15-
url: process.env.RPC_URL || '',
16-
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
13+
local: {
14+
url: 'http://127.0.0.1:7545',
15+
accounts: ['0x0e0e6ca08cc4b4cd0eb43c5b9934f51926b634d0387ecbf7c7c4dd456041db03']
1716
},
1817
sepolia: {
19-
network: 11155111,
20-
url: process.env.RPC_URL || '',
18+
// network: 11155111,
19+
url: 'https://sepolia.infura.io/v3/b280b8aa6cda4dba845afb03d46c2396',
2120
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
2221
},
2322
mumbai: {
24-
network: 80001,
25-
url: process.env.RPC_URL || '',
23+
url: 'https://polygon-mumbai.infura.io/v3/b280b8aa6cda4dba845afb03d46c2396',
2624
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
2725
},
2826
mainnet: {
29-
network: 1,
27+
// network: 1,
3028
url: process.env.RPC_URL || '',
3129
accounts: process.env.DEPLOYER_KEY ? [process.env.DEPLOYER_KEY] : []
3230
}
@@ -48,9 +46,10 @@ const config: HardhatUserConfig = {
4846
},
4947
etherscan: {
5048
apiKey: {
51-
mainnet: process.env.ETHERSCAN_API_KEY ?? "",
52-
goerli: process.env.ETHERSCAN_API_KEY ?? "",
53-
polygonMumbai: process.env.ETHERSCAN_API_KEY ?? "",
49+
mainnet: 'T3UIPRSIK9Q776Y87B48YWCIFC6EV71B96',
50+
sepolia: 'T3UIPRSIK9Q776Y87B48YWCIFC6EV71B96',
51+
mumbai: 'X1X9XZVFXI3S235YQGQ7A99CG648ADCUHF',
52+
matic: 'X1X9XZVFXI3S235YQGQ7A99CG648ADCUHF',
5453
}
5554
}
5655
};

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "linear-vesting-contracts",
2+
"name": "tokenflows-contracts",
33
"version": "1.0.0",
4-
"description": "Token Linear Vesting Smart Contracts developed for ERC20 crowdsales IDOs and token distribution events.",
4+
"description": "TokenFlows Smart Contracts.",
55
"main": "scripts/deploy.ts",
66
"scripts": {
77
"deploy": "npx hardhat run scripts/deploy.ts --network sepolia",
@@ -10,18 +10,19 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/dandelionlabs-io/linear-vesting-contracts.git"
13+
"url": "git+https://github.com/dandelionlabs-io/tokenflows-contracts.git"
1414
},
1515
"keywords": [
1616
"token-vesting",
17-
"dandelionlabs"
17+
"dandelionlabs",
18+
"tokenflows"
1819
],
1920
"author": "Dandelion Labs (hello@dandelionlabs.io)",
2021
"license": "MIT",
2122
"bugs": {
22-
"url": "https://github.com/dandelionlabs-io/linear-vesting-contracts/issues"
23+
"url": "https://github.com/dandelionlabs-io/tokenflows-contracts/issues"
2324
},
24-
"homepage": "https://github.com/dandelionlabs-io/linear-vesting-contracts#readme",
25+
"homepage": "https://github.com/dandelionlabs-io/tokenflows-contracts#readme",
2526
"devDependencies": {
2627
"@nomiclabs/hardhat-ethers": "^2.0.2",
2728
"@nomiclabs/hardhat-etherscan": "^3.1.7",

scripts/create-project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { ethers } from "hardhat";
1+
import {ethers} from "hardhat";
22

33
async function main() {
44

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

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

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

1111
await tx.wait(1)
1212

scripts/deploy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ require('dotenv').config()
44

55
async function main() {
66

7-
const LinearVestingProjectUpgradeable = await ethers.getContractFactory("LinearVestingProjectUpgradeable");
7+
const LinearVestingProjectRemovableUpgradeable = await ethers.getContractFactory("LinearVestingProjectRemovableUpgradeable");
88
const LinearVestingProjectFactoryUpgradeable = await ethers.getContractFactory("LinearVestingProjectFactoryUpgradeable");
99

10-
const projectBase = await LinearVestingProjectUpgradeable.deploy();
10+
const projectBase = await LinearVestingProjectRemovableUpgradeable.deploy();
11+
await projectBase.deployed()
1112

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

0 commit comments

Comments
 (0)