Skip to content

feat: Add has_one relations inference so you don't need to pass accounts that are referenced by a has_one#2160

Merged
armaniferrante merged 18 commits into
otter-sec:masterfrom
ChewingGlass:feature/relations-derivation
Sep 10, 2022
Merged

feat: Add has_one relations inference so you don't need to pass accounts that are referenced by a has_one#2160
armaniferrante merged 18 commits into
otter-sec:masterfrom
ChewingGlass:feature/relations-derivation

Conversation

@ChewingGlass

Copy link
Copy Markdown
Contributor

This is similar to PDA inference. In typescript, you can now avoid passing to .accounts() accounts that can be resolved by fetching and pulling fields off of provided public keys.

Also added a few handy methods I'd like to see. Can remove if needed.

See the tests/ repo for more details.

@vercel

vercel Bot commented Aug 30, 2022

Copy link
Copy Markdown

@ChewingGlass is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@staccDOTsol

Copy link
Copy Markdown

Nooahhhhh

Comment thread lang/syn/src/idl/file.rs Outdated
filename: impl AsRef<Path>,
version: String,
seeds_feature: bool,
relations_feature: bool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we combine this with the seeds_feature ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The nomenclature isn't accurate but the intention is the same.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Up to you. You mean keep the same name? seeds = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes.

@armaniferrante armaniferrante left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove the package-lock.json file and the yarn error log.

@armaniferrante armaniferrante merged commit e69e50d into otter-sec:master Sep 10, 2022
Henry-E pushed a commit to Henry-E/anchor that referenced this pull request Dec 6, 2022
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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.

3 participants