Skip to content

Commit 1ecb982

Browse files
committed
attestation contract
1 parent 8b7a62c commit 1ecb982

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

contracts/Attestation.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pragma solidity ^0.4.19;
2+
3+
contract Attestation {
4+
5+
function write(string _entity1,string _entity2,string _data) public returns (bool) {
6+
return true;
7+
}
8+
}

migrations/2_deploy_contracts.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ var InviteToken = artifacts.require("./InviteToken.sol");
22
var VanityURL = artifacts.require("./VanityURL.sol");
33
var AirDrop = artifacts.require("./AirDrop.sol");
44
var SpringToken = artifacts.require("./SPRINGToken.sol");
5+
var Attestation = artifacts.require("./Attestation.sol");
56

67
module.exports = function(deployer,network,accounts) {
78
deployer.deploy(InviteToken,1000000).then(function() {
89
return deployer.deploy(AirDrop, InviteToken.address);
910
}).then(function() {
1011
return deployer.deploy(VanityURL);
12+
}).then(function() {
13+
return deployer.deploy(Attestation);
1114
}).then(function() {
1215
return deployer.deploy(SpringToken,1000000);
1316
});

test/5_attestation.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var Attestation = artifacts.require("./Attestation.sol");
2+
3+
contract('Attestation', function(accounts) {
4+
5+
var attestationInstance;
6+
7+
before(function () {
8+
return Attestation.deployed().then(function(instance) {
9+
attestationInstance = instance;
10+
});
11+
});
12+
13+
it("should write to blockchain", function() {
14+
return attestationInstance.write('_entity1','_entity2','_data').then(function(instance){
15+
assert.isDefined(instance,"should be able to write to blockchain")
16+
}).catch(function(error){
17+
assert.isUndefined(error,"should be able to write to blockchain")
18+
})
19+
});
20+
});

0 commit comments

Comments
 (0)