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

Chaincash store updates/impl #43

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

Conversation

ross-weir
Copy link
Member

@ross-weir ross-weir commented Dec 29, 2023

  • Update node.sign_and_submit to return the signed transaction so we have access to ErgoBoxes, we need them for box ids
  • save created reserve & note to db

@ross-weir ross-weir force-pushed the start-datastore-impl branch from 80a10ea to a877773 Compare January 3, 2024 09:47
docs/MODEL.md Outdated
int id PK
int note_id FK
int type "Type enum of the denomination, 0 = gold"
Copy link
Member Author

Choose a reason for hiding this comment

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

would make sense to have a denomination for erg as well? so this is used polymorphically?

impl TryFrom<&ErgoBox> for ReserveBoxSpec {
type Error = Error;

fn try_from(value: &ErgoBox) -> Result<Self, Self::Error> {
Copy link
Member Author

Choose a reason for hiding this comment

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

should also check the ergo tree to ensure its a reserve box

Ok(reg.v.try_extract_into::<EcPoint>().unwrap())
} else {
Err(Error::InvalidType {
field: "owner".to_owned(),
Copy link
Member Author

Choose a reason for hiding this comment

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

this field could be &'static str typed

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.

1 participant