Skip to content

Conversation

cctdaniel
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 2:04pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 2:04pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 2:04pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Oct 31, 2024 2:04pm

Comment on lines -10 to -17
// Helper function to parse DataSource from a Cell
export function parseDataSource(cell: Cell): DataSource {
const slice = cell.beginParse();
const emitterChain = slice.loadUint(16);
const emitterAddress = slice.loadUint(256).toString(16).padStart(64, "0");
return { emitterChain, emitterAddress };
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this to the sdk

Comment on lines -166 to -187
export function parseGuardianSetKeys(cell: Cell): string[] {
const keys: string[] = [];

function parseCell(c: Cell) {
let slice = c.beginParse();
while (slice.remainingRefs > 0 || slice.remainingBits >= 160) {
if (slice.remainingBits >= 160) {
const bitsToSkip = slice.remainingBits - 160;
slice = slice.skip(bitsToSkip);
const key = slice.loadBits(160);
keys.push("0x" + key.toString());
}
if (slice.remainingRefs > 0) {
parseCell(slice.loadRef());
}
}
}

parseCell(cell);
return keys;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to the sdk

// Create a dictionary for data sources
const dataSourcesDict = Dictionary.empty(
Dictionary.Keys.Uint(32),
Dictionary.Keys.Uint(8),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix previous bug

@cctdaniel cctdaniel merged commit 99acefa into main Oct 31, 2024
8 checks passed
@cctdaniel cctdaniel deleted the contract-manager-ton branch October 31, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants