Skip to content

Commit 24cf5ad

Browse files
committed
rename contract1 and contract2 to simple-state and amm-contract
1 parent 7609c91 commit 24cf5ad

File tree

14 files changed

+26
-22
lines changed

14 files changed

+26
-22
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ git clone https://github.com/hyperweb-io/hyperweb-boilerplate.git
5050
yarn
5151
```
5252

53+
## Repository overview
54+
55+
* `src/`: Contains source code for each contract, with each sub-directory as a separate contract.
56+
* `simple-state`: A simple contract to demonstrate state transitions.
57+
* `amm-contract`: An automated market maker contract using the Bank module.
58+
* `scripts/`: Holds the build script to create contract bundles.
59+
* `__tests__/`: Includes test cases to validate contract functionality.
60+
* `dist/`: Output folder for bundled contracts ready for deployment.
61+
5362
## Quickstart
5463

5564
### Bundle Contracts

__tests__/contract2.test.ts renamed to __tests__/ammContract.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('Contract 2: AMM contract test', () => {
7373

7474
it('instantiate contract', async () => {
7575
// Read contract code from external file
76-
const contractPath = path.join(__dirname, '../dist/contracts/bundle2.js');
76+
const contractPath = path.join(__dirname, '../dist/contracts/ammContract.js');
7777
contractCode = fs.readFileSync(contractPath, 'utf8');
7878

7979
const msg = jsd.jsd.MessageComposer.fromPartial.instantiate({

__tests__/first.test.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

__tests__/contract1.test.ts renamed to __tests__/simpleState.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('JSD tests', () => {
5757

5858
it('instantiate contract', async () => {
5959
// Read contract code from external file
60-
const contractPath = path.join(__dirname, '../dist/contracts/bundle1.js');
60+
const contractPath = path.join(__dirname, '../dist/contracts/simpleState.js');
6161
contractCode = fs.readFileSync(contractPath, 'utf8');
6262

6363
const msg = jsd.jsd.MessageComposer.fromPartial.instantiate({

dist/contracts/bundle2.js renamed to dist/contracts/ammContract.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/contracts/bundle2.js.map renamed to dist/contracts/ammContract.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/contracts/bundle1.js renamed to dist/contracts/simpleState.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/contracts/bundle1.js.map renamed to dist/contracts/simpleState.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ interface BuildConfig {
99

1010
const configs: BuildConfig[] = [
1111
{
12-
entryFile: 'src/contract1/index.ts',
13-
outFile: 'dist/contracts/bundle1.js',
12+
entryFile: 'src/simple-state/index.ts',
13+
outFile: 'dist/contracts/simpleState.js',
1414
externalPackages: ['otherpackage', '~somepackage']
1515
},
1616
{
17-
entryFile: 'src/contract2/index.ts',
18-
outFile: 'dist/contracts/bundle2.js',
17+
entryFile: 'src/amm-contract/index.ts',
18+
outFile: 'dist/contracts/ammContract.js',
1919
externalPackages: ['~bank'],
2020
}
2121
];
File renamed without changes.

0 commit comments

Comments
 (0)