mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-02 08:56:11 +00:00
update readme
This commit is contained in:
parent
b212a69ce0
commit
18dd35f1a5
@ -83,7 +83,12 @@ Embark will automatically take care of deployment for you and set all needed JS
|
|||||||
```Javascript
|
```Javascript
|
||||||
# app/contracts/simple_storage.sol
|
# app/contracts/simple_storage.sol
|
||||||
contract SimpleStorage {
|
contract SimpleStorage {
|
||||||
uint storedData;
|
uint public storedData;
|
||||||
|
|
||||||
|
function SimpleStorage(uint initialValue) {
|
||||||
|
storedData = initialValue;
|
||||||
|
}
|
||||||
|
|
||||||
function set(uint x) {
|
function set(uint x) {
|
||||||
storedData = x;
|
storedData = x;
|
||||||
}
|
}
|
||||||
@ -98,6 +103,7 @@ Will automatically be available in Javascript as:
|
|||||||
# app/js/index.js
|
# app/js/index.js
|
||||||
SimpleStorage.set(100);
|
SimpleStorage.set(100);
|
||||||
SimpleStorage.get();
|
SimpleStorage.get();
|
||||||
|
SimpleStorage.storedData();
|
||||||
```
|
```
|
||||||
|
|
||||||
You can specify for each contract and environment its gas costs and arguments:
|
You can specify for each contract and environment its gas costs and arguments:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user