Skip to content

Commit

Permalink
implement address dumping
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Mar 14, 2024
1 parent 7ed5e05 commit 18bf7d5
Show file tree
Hide file tree
Showing 6 changed files with 510 additions and 8 deletions.
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

0 comments on commit 18bf7d5

Please sign in to comment.