File tree Expand file tree Collapse file tree 9 files changed +20751
-0
lines changed
Expand file tree Collapse file tree 9 files changed +20751
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Truffle Compatibility
2+
3+ on :
4+ pull_request :
5+ branches : [ main, release/** ]
6+ push :
7+ branches : [ main, release/** ]
8+ tags : [ v* ]
9+
10+ jobs :
11+ setup-local-hedera :
12+ name : Truffle Compatibility
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
16+ steps :
17+ - name : Setup node
18+ uses : actions/setup-node@v2
19+ with :
20+ node-version : 16
21+
22+ - name : Checkout repo
23+ uses : actions/checkout@v2
24+
25+ - name : Install packages
26+ run : npm ci
27+
28+ - name : Create .env file
29+ run : |
30+ cp ./tools/truffle-example/.env.example ./tools/truffle-example/.env
31+ cp ./packages/server/tests/localAcceptance.env .env
32+
33+ - name : Lerna Bootstrap
34+ run : npm run setup
35+
36+ - name : Install pnpm
37+ run : npm install -g pnpm
38+
39+ - name : Build Typescript
40+ run : npx lerna run build
41+
42+ - name : Run RPC Server
43+ run : npm run integration:prerequisite &
44+
45+ - name : Install truffle dependencies
46+ run : cd ./tools/truffle-example/ && npm ci
47+
48+ - name : Run the truffle tests
49+ uses : nick-fields/retry@v2
50+ with :
51+ max_attempts : 10
52+ timeout_minutes : 10
53+ retry_wait_seconds : 45
54+ command : cd ./tools/truffle-example/ && npx truffle test
Original file line number Diff line number Diff line change 1+ # all available private keys and addresses can be found here https://github.com/hashgraph/hedera-local-node#commands
2+ OPERATOR_PRIVATE_KEY = 0x105d050185ccb907fba04dd92d8de9e32c18305e097ab41dadda21489a211524
3+ RECEIVER_PRIVATE_KEY = 0x2e1d968b041d84dd120a5860cee60cd83f9374ef527ca86996317ada3d0d03e7
4+ RELAY_URL = ' http://localhost'
5+ RELAY_PORT = 7546
Original file line number Diff line number Diff line change 1+ node_modules
2+ .env
3+ coverage
4+ coverage.json
5+ typechain
6+ typechain-types
7+
8+ # Truffle files
9+ build
Original file line number Diff line number Diff line change 1+ //SPDX-License-Identifier: Unlicense
2+ pragma solidity ^ 0.8.0 ;
3+
4+ contract Greeter {
5+ string private greeting;
6+
7+ constructor (string memory _greeting ) {
8+ greeting = _greeting;
9+ }
10+
11+ function greet () public view returns (string memory ) {
12+ return greeting;
13+ }
14+
15+ function setGreeting (string memory _greeting ) public {
16+ greeting = _greeting;
17+ }
18+ }
Original file line number Diff line number Diff line change 1+ /*-
2+ *
3+ * Hedera JSON RPC Relay - Truffle Example
4+ *
5+ * Copyright (C) 2022 Hedera Hashgraph, LLC
6+ *
7+ * Licensed under the Apache License, Version 2.0 (the "License");
8+ * you may not use this file except in compliance with the License.
9+ * You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing, software
14+ * distributed under the License is distributed on an "AS IS" BASIS,
15+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ * See the License for the specific language governing permissions and
17+ * limitations under the License.
18+ *
19+ */
20+
21+ const Greeter = artifacts . require ( 'Greeter' ) ;
22+
23+ module . exports = function ( deployer ) {
24+ deployer . deploy ( Greeter , 'initial_msg' ) ;
25+ } ;
You can’t perform that action at this time.
0 commit comments