Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement address dumping #175

Merged
merged 5 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Update the `dump` function to handle addresses: PR [#175](https://github.com/tact-lang/tact/pull/175)

### Fixed

Expand Down
3 changes: 3 additions & 0 deletions src/abi/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ export const GlobalFunctions: { [key: string]: AbiFunction } = {
} else if (arg.name === 'String') {
const exp = writeExpression(resolved[0], ctx);
return `${ctx.used(`__tact_debug_str`)}(${exp})`;
} else if (arg.name === 'Address') {
const exp = writeExpression(resolved[0], ctx);
return `${ctx.used(`__tact_debug_address`)}(${exp})`;
}
throwError('dump() not supported for type: ' + arg.name, ref);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/generator/Writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { trimIndent } from "../utils/text";
import { topologicalSort } from "../utils/utils";
import { Writer } from "../utils/Writer";

type Flag = 'inline' | 'impure';
type Flag = 'inline' | 'impure' | 'inline_ref';

type Body = {
kind: 'generic',
Expand Down
Loading
Loading