forked from sunflower-land/sunflower-land
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26eff25
commit 856bc2a
Showing
44 changed files
with
16,387 additions
and
17,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.