-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hammeWang/master
update contracts and complete deploy scripts
- Loading branch information
Showing
5 changed files
with
80 additions
and
3 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
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,7 +1,7 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
contract IMintableNFT { | ||
function mint(address _to, uint256 _encodedTokenId) public returns (uint256 _tokenId); | ||
function mint(address _to, uint256 _encodedTokenId) public; | ||
|
||
function burn(address _to, uint256 _encodedTokenId) public returns (uint256 _tokenId); | ||
function burn(address _to, uint256 _encodedTokenId) public; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const IteringNFT = artifacts.require("IteringNFT"); | ||
const FreeITOBase = artifacts.require("FreeITOBase"); | ||
const MintAndBurnAuthority = artifacts.require("MintAndBurnAuthority"); | ||
const InterstellarEncoderV3 = artifacts.require("InterstellarEncoderV3"); | ||
|
||
var fs = require('fs'); | ||
var contracts = JSON.parse(fs.readFileSync('./kovan_address.json', 'utf8')); | ||
|
||
|
||
const conf = { | ||
interstellarEncoderV3_address: "0x0700fa0c70ada58ad708e7bf93d032f1fd9a5150", | ||
registry_address: "0xd8b7a3f6076872c2c37fb4d5cbfeb5bf45826ed7", | ||
unknown_objectId: 255, | ||
itoContract_id: 3 | ||
|
||
} | ||
|
||
module.exports = async function(deployer, network) { | ||
|
||
if(network != "kovan") { | ||
return; | ||
} | ||
|
||
deployer.deploy(IteringNFT).then(async() => { | ||
await deployer.deploy(FreeITOBase, contracts["SettingsRegistry"], IteringNFT.address); | ||
}).then(async() => { | ||
await deployer.deploy(MintAndBurnAuthority, [FreeITOBase.address]); | ||
}).then(async() => { | ||
// set authority | ||
let iteringNft = await IteringNFT.deployed(); | ||
await iteringNft.setAuthority(MintAndBurnAuthority.address); | ||
|
||
let encoderV3 = await InterstellarEncoderV3.at(contracts["InterstellarEncoderV3"]); | ||
await encoderV3.registerNewObjectClass(FreeITOBase.address, conf.unknown_objectId); | ||
await encoderV3.registerNewOwnershipContract(IteringNFT.address, conf.itoContract_id); | ||
|
||
|
||
}) | ||
|
||
}; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"InterstellarEncoderV3": "0x0700fa0c70ada58ad708e7bf93d032f1fd9a5150", | ||
"SettingsRegistry": "0xd8b7a3f6076872c2c37fb4d5cbfeb5bf45826ed7" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@itering/NFT-shifter", | ||
"version": "0.1.0", | ||
"description": "Itering Object Issueing", | ||
"main": "truffle-config.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/itering/NFT-shifter.git" | ||
}, | ||
"keywords": [ | ||
"smart-contracts" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/itering/NFT-shifter/issues" | ||
}, | ||
"homepage": "https://github.com/itering/NFT-shifter#readme", | ||
"dependencies": { | ||
"@evolutionland/common": "^1.7.5", | ||
"openzeppelin-solidity": "^1.12.0" | ||
} | ||
} |