Skip to content

Commit

Permalink
Post-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-calo committed Dec 30, 2021
1 parent 26eff25 commit 856bc2a
Show file tree
Hide file tree
Showing 44 changed files with 16,387 additions and 17,302 deletions.
2 changes: 1 addition & 1 deletion migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Migrations = artifacts.require("Migrations");

module.exports = function(deployer) {
module.exports = function (deployer) {
deployer.deploy(Migrations);
};
32 changes: 16 additions & 16 deletions migrations/2_deploy.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const Token = artifacts.require("Token");
const farm = artifacts.require("Farm");

module.exports = async function(deployer) {
//deploy Token
await deployer.deploy(Token)

//assign token into variable to get it's address
const token = await Token.deployed();
//pass token address for contract(for future minting)
await deployer.deploy(farm, token.address);
//assign contract into variable to get it's address
const farmContract = await farm.deployed();
//change token's owner/minter from deployer to farm
await token.passMinterRole(farmContract.address);
};
const Token = artifacts.require("Token");
const farm = artifacts.require("Farm");

module.exports = async function (deployer) {
//deploy Token
await deployer.deploy(Token);

//assign token into variable to get it's address
const token = await Token.deployed();
//pass token address for contract(for future minting)
await deployer.deploy(farm, token.address);
//assign contract into variable to get it's address
const farmContract = await farm.deployed();
//change token's owner/minter from deployer to farm
await token.passMinterRole(farmContract.address);
};
33 changes: 16 additions & 17 deletions scripts/script.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
const ContractName = artifacts.require("ContractName")

module.exports = async function(callback) {
try {
// Get Accounts
const accounts = await web3.eth.getAccounts()

// Fetch the deployed contract
const contract = await ContractName.deployed()
console.log('Contract fetched', contract.address)
}
catch(error) {
console.log(error)
}

callback()
}
const ContractName = artifacts.require("ContractName");

module.exports = async function (callback) {
try {
// Get Accounts
const accounts = await web3.eth.getAccounts();

// Fetch the deployed contract
const contract = await ContractName.deployed();
console.log("Contract fetched", contract.address);
} catch (error) {
console.log(error);
}

callback();
};
74 changes: 16 additions & 58 deletions src/abis/Context.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,15 @@
"ast": {
"absolutePath": "@openzeppelin/contracts/GSN/Context.sol",
"exportedSymbols": {
"Context": [
1464
]
"Context": [1464]
},
"id": 1465,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1443,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"],
"nodeType": "PragmaDirective",
"src": "33:31:3"
},
Expand All @@ -43,9 +33,7 @@
"contractKind": "contract",
"fullyImplemented": true,
"id": 1464,
"linearizedBaseContracts": [
1464
],
"linearizedBaseContracts": [1464],
"name": "Context",
"nodeType": "ContractDefinition",
"nodes": [
Expand Down Expand Up @@ -260,24 +248,14 @@
"attributes": {
"absolutePath": "@openzeppelin/contracts/GSN/Context.sol",
"exportedSymbols": {
"Context": [
1464
]
"Context": [1464]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
]
"literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"]
},
"id": 1443,
"name": "PragmaDirective",
Expand All @@ -286,17 +264,11 @@
{
"attributes": {
"abstract": true,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"baseContracts": [null],
"contractDependencies": [null],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
1464
],
"linearizedBaseContracts": [1464],
"name": "Context",
"scope": 1465
},
Expand All @@ -306,9 +278,7 @@
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"modifiers": [null],
"name": "_msgSender",
"scope": 1464,
"stateMutability": "view",
Expand All @@ -318,9 +288,7 @@
"children": [
{
"attributes": {
"parameters": [
null
]
"parameters": [null]
},
"children": [],
"id": 1444,
Expand Down Expand Up @@ -380,9 +348,7 @@
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"overloadedDeclarations": [null],
"referencedDeclaration": 4294967281,
"type": "msg",
"value": "msg"
Expand Down Expand Up @@ -416,9 +382,7 @@
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"modifiers": [null],
"name": "_msgData",
"scope": 1464,
"stateMutability": "view",
Expand All @@ -428,9 +392,7 @@
"children": [
{
"attributes": {
"parameters": [
null
]
"parameters": [null]
},
"children": [],
"id": 1453,
Expand Down Expand Up @@ -476,9 +438,7 @@
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"overloadedDeclarations": [null],
"referencedDeclaration": 4294967268,
"type": "contract Context",
"value": "this"
Expand Down Expand Up @@ -509,9 +469,7 @@
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"overloadedDeclarations": [null],
"referencedDeclaration": 4294967281,
"type": "msg",
"value": "msg"
Expand Down Expand Up @@ -567,4 +525,4 @@
"methods": {},
"version": 1
}
}
}
Loading

0 comments on commit 856bc2a

Please sign in to comment.