truffle 框架
This commit is contained in:
parent
c914473c5c
commit
a1c481cef4
3
build.sh
Normal file
3
build.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
truffle compile && truffle migrate --reset && cp build/contracts/DeviceManager.json frontend/src/artifacts/DeviceManager.json
|
5
migrations/1_initial_migration.js
Normal file
5
migrations/1_initial_migration.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
var Migrations = artifacts.require("./Migrations.sol");
|
||||||
|
|
||||||
|
module.exports = function(deployer) {
|
||||||
|
deployer.deploy(Migrations);
|
||||||
|
};
|
5
migrations/2_deploy_contracts.js
Normal file
5
migrations/2_deploy_contracts.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
var DeviceManager = artifacts.require("./DeviceManager.sol");
|
||||||
|
|
||||||
|
module.exports = function(deployer) {
|
||||||
|
deployer.deploy(DeviceManager);
|
||||||
|
};
|
13640
package-lock.json
generated
Normal file
13640
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
5
package.json
Normal file
5
package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"truffle": "^5.11.5"
|
||||||
|
}
|
||||||
|
}
|
9
truffle-config.js
Normal file
9
truffle-config.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
networks: {
|
||||||
|
development: {
|
||||||
|
host: "127.0.0.1",
|
||||||
|
port: 8545,
|
||||||
|
network_id: "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
9
truffle.js
Normal file
9
truffle.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
networks: {
|
||||||
|
development: {
|
||||||
|
host: "127.0.0.1",
|
||||||
|
port: 8545,
|
||||||
|
network_id: "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user