You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To build ResVault from this repo and load it in Chrome for testing (before publishing to the Chrome Web Store):
105
+
106
+
1.**Install dependencies and build**
107
+
```shell
108
+
cd ecosystem/tools/resvault
109
+
npm install --legacy-peer-deps
110
+
npm run build
111
+
```
112
+
This produces a `build` folder with the extension (React app in `index.html` + `static/js/`, `manifest.json`, `content.js`, `background.js`, and icons). **You must run the full build**—loading only the `public` folder or an incomplete `build` will show a blank popup.
113
+
114
+
2.**Load the extension in Chrome**
115
+
- Open [chrome://extensions/](chrome://extensions/) in Google Chrome.
116
+
- Turn **Developer mode** on (toggle in the top-right).
117
+
- Click **Load unpacked**.
118
+
- Choose the **`build`** folder (e.g. `incubator-resilientdb/ecosystem/tools/resvault/build`).
119
+
120
+
3.**Test**
121
+
- Use the ResVault icon in the toolbar to open the wallet popup and test flows.
122
+
- After changes, run `npm run build` again, then in `chrome://extensions/` click the **Refresh** icon on the ResVault card to reload.
123
+
124
+
4.**Publish to Chrome Web Store**
125
+
- When ready, zip the contents of the `build` folder (not the folder itself) and upload that zip in the [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole).
126
+
103
127
## Smart Contract Usage
104
128
129
+
Compile/deploy uses the Smart Contract GraphQL server. That server must have **solc** installed (non-snap, e.g. the static binary from [Solidity releases](https://github.com/ethereum/solidity/releases)) and, when starting the server, set **SOLC_PATH** to that binary (e.g. `SOLC_PATH=/usr/local/bin/solc`). ResVault itself does not need any solc-related configuration.
130
+
105
131
### Deploying Contracts
106
132
1. Navigate to the **Contract** tab in ResVault
107
-
2. Enter your ResilientDB server URL:
108
-
-**Mainnet**: Use the production ResilientDB endpoint
109
-
-**Local Development**: Use your local server (e.g., `http://localhost:8400`)
110
-
-**Custom Server**: Use any ResilientDB instance (e.g., `http://your-server:8400`)
111
-
3. Paste your Solidity contract code
112
-
4. Provide constructor arguments if needed
113
-
5. Click **Deploy** - the contract will be deployed using your wallet address
133
+
2. Enter your ResilientDB GraphQL server URL (e.g. `http://your-server:8400/graphql`)
134
+
3. Upload two files:
135
+
-**Solidity contract (`.sol`)** – your contract source
136
+
-**Configuration (`.json`)** – deployment config (see format below)
137
+
4. Click **Deploy** – the contract is compiled on the server and deployed using your wallet address
138
+
139
+
#### Contract file (`.sol`)
140
+
Standard Solidity source. No special naming; the config file references the contract by `filename:ContractName`.
141
+
142
+
Example (`SimpleStorage.sol`):
143
+
```solidity
144
+
pragma solidity >=0.5.0;
145
+
146
+
contract SimpleStorage {
147
+
uint256 public value;
148
+
149
+
constructor(uint256 _value) public {
150
+
value = _value;
151
+
}
152
+
153
+
function setValue(uint256 _value) public {
154
+
value = _value;
155
+
}
156
+
157
+
function getValue() public view returns (uint256) {
158
+
return value;
159
+
}
160
+
}
161
+
```
162
+
163
+
#### Configuration file (`.json`)
164
+
Must be valid JSON with exactly these fields:
165
+
166
+
| Field | Description |
167
+
|------------------|-------------|
168
+
|`contract_name`|`"<filename>:<ContractName>"` – the `.sol` filename and the contract name (e.g. `"simple.sol:SimpleStorage"`) |
169
+
|`arguments`| Constructor arguments as a single string; comma-separated if multiple (e.g. `"100"` or `"100,0x123..."`) |
0 commit comments