* tob-worm-4-panics: using options rather than unwrap
* removed mock dependencies argument
* added test to make file
* use ok or else
* fmt
* ok
* errors resolved
* Solitaire: Use sysvar for rent instead of default
Using default has some risks such as:
- Network having a different values (such as Pythnet)
- Network changes the value
It avoids using default as fallback to have Error more explicitly
avoid exposing above risks under rare conditions
that the sysvar might return Err.
* Update comments
* Format the code
* near-sdk-refactor: Fix attest
: Fix missing function calls
: make near on near
: renamed tryHexToNativeStringNear
* near-sdk-refactor: bumped near-sdk-js version
Co-authored-by: Josh Siegel <jsiegel@jumptrading.com>
Add fmt, check, and clippy targets to the Makefile so that people don't
have to remember the exact set of parameters needed. Also fix the test
target since we no longer run the tests through docker.
Solitaire parses accounts using two traits, FromAccounts and Peel. The
FromAccounts derive macro generates a function, `FromAccounts::from()`,
which calls `Peel::peel` to construct each field in the struct:
```
let example = Example {
foo: Peel::peel(next_account_iter(accs)?),
bar: Peel::peel(next_account_iter(accs)?),
baz: Peel::peel(next_account_iter(accs)?),
...,
}
```
The FromAccounts derivation also attempts to implement Peel for the
structure itself however, which means `Example` itself is embeddable as
a field in another accounts struct. This is only used in ClaimableVAA
which is a large source of confusion and the complexity is not worth
maintaining.
This commit removes the recursion by:
1) Removing the `impl Peel` derived by FromAccounts.
2) Removes the AccountInfo iterator from Context as it is no longer needed.
3) Adds the current parsed account to Context instead, safe thanks to (2)
4) Move message out of ClaimableVAA and pass in to verify everywhere instead.
5) Removes Peel/FromAccounts from ClaimableVAA.
* solana/devnet_setup.sh: Build CLI instead of JITing it
This makes the registration process a few seconds faster.
* solana/Dockerfile: Don't copy devnet_setup.sh at the beginning
This is unnecessary, and inefficient, because each time the file
changes, a lot of things get rebuilt/reinstalled.
* solana/Dockerfile: cache cargo registry
this allows skipping rebuilding cargo dependencies. Small contract
changes now rebuild in 20s, down from 60s before
* Remove unnecessary debian depencies
* Rename rust-toolchain.toml to rust-toolchain (rustup in the container
didn't recognise it with .toml extension) and use in containers
instead of manually specifying rust version
* solana/Dockerfile: Use prebuilt docker image
* solana: Add docs on docker base images
* solana: Add "msg.sender" and remove fee from payload3
* solana: update payload3 instruction to include the sender account
* solana: allow sending payload 3s to program ids directly
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
* Implement message posting with account reuse
Change-Id: I195f493f6816048f5f8f76e1f0f6e561fa0fe692
* Use different magic for unreliable messages
* guardiand: Ignore solana instructions with empty data
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
The integration tests were previously just copied over from the
token-bridge directory and not changed at all (they still referenced the
token-bridge crate).
Clean up the files and add tests for basic functionality like sending
and receiving native + wrapped NFTs.