fix(@embark/dapps): add missing Smart Contract configurations

Those had been removed in a refactor while the Smart Contract sources have been
kept around, resulting in deployment errors as Embark doesn't know what to do
with the Smart Contracts that don't come with a dedicated config.

This commit re-adds the configurations to make the deployment pass again.
This commit is contained in:
Pascal Precht 2019-11-05 14:17:51 +01:00 committed by Pascal Precht
parent fccda21623
commit 92f6dd4ce9
2 changed files with 37 additions and 9 deletions

View File

@ -11,13 +11,9 @@ contract BigFreakingContract {
mapping( address => mapping( address => uint ) ) _approvals;
uint public _supply;
// TODO: currently commented due to a bug with the params
// constructor( uint initial_balance ) public {
constructor() public {
// _balances[msg.sender] = initial_balance;
// _supply = initial_balance;
_balances[msg.sender] = 100;
_supply = 100;
constructor( uint initial_balance ) public {
_balances[msg.sender] = initial_balance;
_supply = initial_balance;
}
function totalSupply() public constant returns (uint supply) {
return _supply;

View File

@ -15,6 +15,10 @@ module.exports = {
Ownable: {
deploy: false
},
Token: {
deploy: false,
args: [1000]
},
SimpleStorage: {
fromIndex: 0,
args: [100],
@ -32,9 +36,37 @@ module.exports = {
args: ["$SimpleStorage"]
//args: ["0x0000000000000000000000000000000000000000"]
},
BFC: {
BigFreakingContract: {
args: [100]
}
},
ContractArgs: {
args: [
["$MyToken2", "$SimpleStorage"],
123
]
},
SomeContract: {
deployIf: 'await MyToken.methods.isAvailable().call()',
deps: ['MyToken'],
args: [
["$MyToken2", "$SimpleStorage"],
100
]
},
Expiration: {
args: [1000]
},
SimpleStorageWithHttpImport: {
fromIndex: 0,
args: [100]
},
MyToken: {
instanceOf: "Token"
},
MyToken2: {
instanceOf: "Token",
args: [200]
},
},
afterDeploy: async (dependencies) => {
console.log("==========================");