Skip to content

Commit e8d0903

Browse files
authored
chore: setup CI (#24)
1 parent 0a33346 commit e8d0903

File tree

7 files changed

+180
-0
lines changed

7 files changed

+180
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Bug Report
2+
description: Report a reproducible bug or unexpected behavior
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: Describe the bug, including expected and actual behavior
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: steps
15+
attributes:
16+
label: Steps to Reproduce
17+
description: Provide a list of steps to reproduce the bug
18+
placeholder: |
19+
1. Run `...`
20+
2. Enter `...`
21+
3. See error
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: environment
27+
attributes:
28+
label: Environment
29+
description: Provide relevant environment details (OS, runtime, etc).
30+
placeholder: "`node -v && uname -a` e.g., Ubuntu 25.04, Node 22.16.0"
31+
validations:
32+
required: false
33+
34+
- type: textarea
35+
id: logs
36+
attributes:
37+
label: Logs or Screenshots
38+
description: Include relevant logs, stack traces, or screenshots
39+
validations:
40+
required: false
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Docs Update
2+
description: Suggest an update or improvement to the documentation
3+
labels: ["documentation"]
4+
body:
5+
- type: textarea
6+
id: suggestion
7+
attributes:
8+
label: Suggested Update
9+
description: Describe the proposed documentation update or fix
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: context
15+
attributes:
16+
label: Additional Context
17+
description: Add any other relevant information or context
18+
validations:
19+
required: false
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Feature Request
2+
description: Suggest an idea or enhancement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: summary
7+
attributes:
8+
label: Feature Summary
9+
description: Clearly describe the feature you’d like to see added
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: usecase
15+
attributes:
16+
label: Use Case
17+
description: Explain why this feature is useful or what problem it solves
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: alternatives
23+
attributes:
24+
label: Alternatives Considered
25+
description: Have you considered other solutions or workarounds?
26+
validations:
27+
required: false
28+
29+
- type: textarea
30+
id: additional
31+
attributes:
32+
label: Additional Context
33+
description: Add any other context or screenshots here
34+
validations:
35+
required: false

.github/ISSUE_TEMPLATE/generic.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Generic Issue
2+
description: Open a general issue or question
3+
body:
4+
- type: textarea
5+
id: description
6+
attributes:
7+
label: Description
8+
description: Provide a detailed description of the issue or question
9+
validations:
10+
required: true

.github/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Issue
2+
3+
Closes #<issue-number>
4+
5+
## Checklist
6+
7+
Please ensure the following items are completed before requesting review:
8+
9+
* [ ] Updated `CHANGELOG.md` with relevant changes
10+
* [ ] Documented the contribution in `README.md`
11+
* [ ] Added tests to demonstrate correct behavior (both positive and negative cases)
12+
* [ ] All tests pass successfully (`yarn test`)
13+
* [ ] Code passes linting checks (`yarn lint`)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
dist
33
.idea
4+
coverage/
45

56
# yarn
67
.yarn/*
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { Cell, Transaction, loadTransaction, Address } from '@ton/core';
2+
3+
import { prettifyTransaction } from './pretty-transaction';
4+
import { contractsMeta } from './ContractsMeta';
5+
6+
// https://tonviewer.com/transaction/5bf72c6176c05c67fea19c19fcd47fc5f0dd3a1ca5751301f527862d19c40b50
7+
const cell = Cell.fromBase64(
8+
'te6ccgECBgEAAWQAA7VyTjRpWA16dAJzYea7IhARrTnqTZMZDClCQpsTvWOFkSAAAjlKRSd8d1VJdrlojk2tE0R2YQzVvQihpkrNfVlosaesSdlZktYQAAI5SkUnfDZKlnhgABRgeB4IAQIDAQGgBACCcoz83Ab0pEynw7l3wfGY+ufntTEboif8NKACRYJb/SHmmwB2a/lFtZyR0Folzo0LLXFxZ4ff9eQaW9OnCDgJyKsBEwwIwPA8EGB4HgkFALdYADAPZs5wp02y/Tb2CIF+2bbawObquu469MFdcHDQ+5nHAAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEjA8DwAYUWGAAAEcpSKTvjMlSzwx/////wACgPsfYAf///+UAAAD4AAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
9+
);
10+
11+
const tx: Transaction = loadTransaction(cell.asSlice());
12+
13+
describe('pretty transaction', () => {
14+
it('no pretty', () => {
15+
const { failReason, to, on, op } = prettifyTransaction(tx);
16+
expect({
17+
failReason,
18+
to,
19+
on,
20+
op,
21+
}).toEqual({
22+
on: 'EQAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEo2Y',
23+
op: '4294967295',
24+
to: 'EQAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEo2Y',
25+
});
26+
});
27+
28+
it('pretty', () => {
29+
contractsMeta.upsert(Address.parse('EQAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEo2Y'), {
30+
wrapperName: 'bar',
31+
abi: {
32+
name: 'foo',
33+
errors: {
34+
4294967282: {
35+
message: 'some error',
36+
},
37+
},
38+
types: [
39+
{
40+
name: 'some',
41+
header: 4294967295,
42+
fields: [],
43+
},
44+
],
45+
},
46+
});
47+
const { failReason, to, on, op } = prettifyTransaction(tx);
48+
expect({
49+
failReason,
50+
to,
51+
on,
52+
op,
53+
}).toEqual({
54+
failReason: {
55+
message: 'some error',
56+
},
57+
to: 'EQAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEo2Y (foo)',
58+
on: 'EQAk40aVgNenQCc2HmuyIQEa056k2TGQwpQkKbE71jhZEo2Y (foo)',
59+
op: '4294967295 (some)',
60+
});
61+
});
62+
});

0 commit comments

Comments
 (0)