Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions contracts/DispatcherStorage.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
pragma solidity ^0.4.8;

import "zeppelin-solidity/contracts/ownership/Ownable.sol";
contract DispatcherStorage is Ownable {
contract DispatcherStorage {
address public lib;

function DispatcherStorage(address newLib) public {
replace(newLib);
}

function replace(address newLib) public onlyOwner /* onlyDAO */ {
function replace(address newLib) public /* onlyDAO */ {
lib = newLib;
}
}
20 changes: 20 additions & 0 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var LibInterface = artifacts.require("./LibInterface.sol");
var DispatcherStorage = artifacts.require("./DispatcherStorage.sol");
var Dispatcher = artifacts.require("./Dispatcher.sol");
var TheContract = artifacts.require("./TheContract.sol");

module.exports = function(deployer) {
deployer.deploy(LibInterface)
.then(() => {
return deployer.deploy(DispatcherStorage, LibInterface.address)})
.then(() => {
Dispatcher.unlinked_binary = Dispatcher.unlinked_binary.replace(
'0x1111222233334444555566667777888899990000',
DispatcherStorage.address
);
return deployer.deploy(Dispatcher)})
.then(() => {
deployer.link(Dispatcher, TheContract).then(() => {
return deployer.deploy(TheContract)})
});
};
1 change: 0 additions & 1 deletion truffle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('babel-polyfill');

module.exports = {
networks: {
Expand Down