Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
2
votes
Why does has_one does not work?
You need to name the struct fields the same way as you did for instruction fields.
Rename first or the other, e.g.,
// all named as `client`
#[derive(Accounts)]
pub struct AcceptJob<'info> {
#[ac …
1
vote
Accepted
Account::try_from is not working because of the lifetime issue
I'm not sure here but maybe you may try to work with data and directly loading PriceUpdateV2?
Similar to this
let data = &mut (*ctx.accounts.oracle_account.data).borrow_mut();
let account = PriceUpdat …
3
votes
Error: target/idl/sol_404.json doesn't exist. Did you run `anchor build`?
I assume there will be a discrepancy in naming of your project. You can see the idl is generated to sol404.json and is searched at file sol_404.json by anchor test.
The code of anchor workspace loadin …
2
votes
Accepted
Anchor Test has Transaction simulation failed: Error processing Instruction 0: custom progra...
This is an expected behaviour. At least based on the code you provided. The test says If PDA Account already created, then we expect an error.
The error you receive is 0x0
'Allocate: account Address { …