Skip to content

Commit

Permalink
fix: idl gen (#856)
Browse files Browse the repository at this point in the history
* fix idl gen

* cpicontext in all prgms

---------

Co-authored-by: Swen <[email protected]>
  • Loading branch information
SwenSchaeferjohann and Swen authored Jun 22, 2024
1 parent 526dcfa commit 444b3bf
Show file tree
Hide file tree
Showing 7 changed files with 359 additions and 40 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/light-system-programs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
run: |
source ./scripts/devenv.sh
anchor build
anchor build --program-name light_system_program -- --features cpi-context
- name: ${{ matrix.program }}
run: |
Expand All @@ -83,10 +82,6 @@ jobs:
IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}"
for subtest in "${sub_tests[@]}"
do
if [ "$subtest" == "cargo-test-sbf --features cpi-context -p token-escrow -- --test-threads=1" ]; then
anchor build --program-name light_system_program -- --features cpi-context
anchor build --program-name light_compressed_token -- --features cpi-context
fi
echo "$subtest"
eval "RUSTFLAGS=\"-D warnings\" $subtest"
done
2 changes: 1 addition & 1 deletion examples/token-escrow/programs/token-escrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ no-entrypoint = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
custom-heap = []
default = ["custom-heap", "idl-build"]
default = ["custom-heap", "idl-build", "cpi-context"]
test-sbf = []
cpi-context = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
Expand Down
192 changes: 176 additions & 16 deletions js/compressed-token/src/idl/light_compressed_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1360,23 +1360,103 @@ export type LightCompressedToken = {
errors: [
{
code: 6000;
name: 'SignerCheckFailed';
msg: 'Signer check failed';
name: 'PublicKeyAmountMissmatch';
msg: 'public keys and amounts must be of same length';
},
{
code: 6001;
name: 'CreateTransferInstructionFailed';
msg: 'Create transfer instruction failed';
name: 'SignerCheckFailed';
msg: 'SignerCheckFailed';
},
{
code: 6002;
name: 'AccountNotFound';
msg: 'Account not found';
name: 'ComputeInputSumFailed';
msg: 'ComputeInputSumFailed';
},
{
code: 6003;
name: 'SerializationError';
msg: 'Serialization error';
name: 'ComputeOutputSumFailed';
msg: 'ComputeOutputSumFailed';
},
{
code: 6004;
name: 'ComputeCompressSumFailed';
msg: 'ComputeCompressSumFailed';
},
{
code: 6005;
name: 'ComputeDecompressSumFailed';
msg: 'ComputeDecompressSumFailed';
},
{
code: 6006;
name: 'SumCheckFailed';
msg: 'SumCheckFailed';
},
{
code: 6007;
name: 'DecompressRecipientUndefinedForDecompress';
msg: 'DecompressRecipientUndefinedForDecompress';
},
{
code: 6008;
name: 'CompressedPdaUndefinedForDecompress';
msg: 'CompressedPdaUndefinedForDecompress';
},
{
code: 6009;
name: 'DeCompressAmountUndefinedForDecompress';
msg: 'DeCompressAmountUndefinedForDecompress';
},
{
code: 6010;
name: 'CompressedPdaUndefinedForCompress';
msg: 'CompressedPdaUndefinedForCompress';
},
{
code: 6011;
name: 'DeCompressAmountUndefinedForCompress';
msg: 'DeCompressAmountUndefinedForCompress';
},
{
code: 6012;
name: 'DelegateUndefined';
msg: 'DelegateUndefined while delegated amount is defined';
},
{
code: 6013;
name: 'DelegateSignerCheckFailed';
msg: 'DelegateSignerCheckFailed';
},
{
code: 6014;
name: 'SplTokenSupplyMismatch';
msg: 'SplTokenSupplyMismatch';
},
{
code: 6015;
name: 'HeapMemoryCheckFailed';
msg: 'HeapMemoryCheckFailed';
},
{
code: 6016;
name: 'InstructionNotCallable';
msg: 'The instruction is not callable';
},
{
code: 6017;
name: 'ArithmeticUnderflow';
msg: 'ArithmeticUnderflow';
},
{
code: 6018;
name: 'InvalidDelegate';
msg: 'InvalidDelegate';
},
{
code: 6019;
name: 'HashToFieldError';
msg: 'HashToFieldError';
},
];
};
Expand Down Expand Up @@ -2747,23 +2827,103 @@ export const IDL: LightCompressedToken = {
errors: [
{
code: 6000,
name: 'SignerCheckFailed',
msg: 'Signer check failed',
name: 'PublicKeyAmountMissmatch',
msg: 'public keys and amounts must be of same length',
},
{
code: 6001,
name: 'CreateTransferInstructionFailed',
msg: 'Create transfer instruction failed',
name: 'SignerCheckFailed',
msg: 'SignerCheckFailed',
},
{
code: 6002,
name: 'AccountNotFound',
msg: 'Account not found',
name: 'ComputeInputSumFailed',
msg: 'ComputeInputSumFailed',
},
{
code: 6003,
name: 'SerializationError',
msg: 'Serialization error',
name: 'ComputeOutputSumFailed',
msg: 'ComputeOutputSumFailed',
},
{
code: 6004,
name: 'ComputeCompressSumFailed',
msg: 'ComputeCompressSumFailed',
},
{
code: 6005,
name: 'ComputeDecompressSumFailed',
msg: 'ComputeDecompressSumFailed',
},
{
code: 6006,
name: 'SumCheckFailed',
msg: 'SumCheckFailed',
},
{
code: 6007,
name: 'DecompressRecipientUndefinedForDecompress',
msg: 'DecompressRecipientUndefinedForDecompress',
},
{
code: 6008,
name: 'CompressedPdaUndefinedForDecompress',
msg: 'CompressedPdaUndefinedForDecompress',
},
{
code: 6009,
name: 'DeCompressAmountUndefinedForDecompress',
msg: 'DeCompressAmountUndefinedForDecompress',
},
{
code: 6010,
name: 'CompressedPdaUndefinedForCompress',
msg: 'CompressedPdaUndefinedForCompress',
},
{
code: 6011,
name: 'DeCompressAmountUndefinedForCompress',
msg: 'DeCompressAmountUndefinedForCompress',
},
{
code: 6012,
name: 'DelegateUndefined',
msg: 'DelegateUndefined while delegated amount is defined',
},
{
code: 6013,
name: 'DelegateSignerCheckFailed',
msg: 'DelegateSignerCheckFailed',
},
{
code: 6014,
name: 'SplTokenSupplyMismatch',
msg: 'SplTokenSupplyMismatch',
},
{
code: 6015,
name: 'HeapMemoryCheckFailed',
msg: 'HeapMemoryCheckFailed',
},
{
code: 6016,
name: 'InstructionNotCallable',
msg: 'The instruction is not callable',
},
{
code: 6017,
name: 'ArithmeticUnderflow',
msg: 'ArithmeticUnderflow',
},
{
code: 6018,
name: 'InvalidDelegate',
msg: 'InvalidDelegate',
},
{
code: 6019,
name: 'HashToFieldError',
msg: 'HashToFieldError',
},
],
};
Loading

0 comments on commit 444b3bf

Please sign in to comment.