From cad0a8ac3a7b0ba7b91557d1572dad8d0f0d0bff Mon Sep 17 00:00:00 2001 From: solanoe Date: Mon, 1 Apr 2024 22:15:49 -0300 Subject: [PATCH] prettier again --- frontend/claim_sdk/idl/token_dispenser.json | 75 +- frontend/claim_sdk/idl/token_dispenser.ts | 1588 +++++++++---------- frontend/components/Subscribe.tsx | 4 +- frontend/components/modal/Disclaimer.tsx | 2 +- frontend/sections/TokensReceived.tsx | 2 +- token-dispenser/scripts/treasuries | 2 +- 6 files changed, 767 insertions(+), 906 deletions(-) diff --git a/frontend/claim_sdk/idl/token_dispenser.json b/frontend/claim_sdk/idl/token_dispenser.json index 371a31d3..098c2327 100644 --- a/frontend/claim_sdk/idl/token_dispenser.json +++ b/frontend/claim_sdk/idl/token_dispenser.json @@ -38,10 +38,7 @@ { "name": "merkleRoot", "type": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } }, { @@ -141,10 +138,7 @@ { "name": "merkleRoot", "type": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } }, { @@ -334,10 +328,7 @@ "name": "proofOfInclusion", "type": { "vec": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } } } @@ -367,10 +358,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -381,10 +369,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } } ] @@ -395,10 +380,7 @@ { "name": "address", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -409,10 +391,7 @@ { "name": "address", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -441,10 +420,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -476,10 +452,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } }, { @@ -497,10 +470,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -515,10 +485,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -537,10 +504,7 @@ { "name": "signature", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { @@ -550,10 +514,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 65 - ] + "array": ["u8", 65] } }, { @@ -568,10 +529,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 20 - ] + "array": ["u8", 20] } }, { @@ -586,10 +544,7 @@ { "name": "pubkey", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { diff --git a/frontend/claim_sdk/idl/token_dispenser.ts b/frontend/claim_sdk/idl/token_dispenser.ts index da5ef49d..5f813551 100644 --- a/frontend/claim_sdk/idl/token_dispenser.ts +++ b/frontend/claim_sdk/idl/token_dispenser.ts @@ -1,344 +1,334 @@ -export type TokenDispenser = -{ - "version": "0.1.0", - "name": "token_dispenser", - "instructions": [ +export type TokenDispenser = { + version: '0.1.0' + name: 'token_dispenser' + instructions: [ { - "name": "initialize", - "docs": [ - "This can only be called once and should be called right after the program is deployed." - ], - "accounts": [ + name: 'initialize' + docs: [ + 'This can only be called once and should be called right after the program is deployed.' + ] + accounts: [ { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer' + isMut: true + isSigner: true }, { - "name": "config", - "isMut": true, - "isSigner": false + name: 'config' + isMut: true + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "addressLookupTable", - "isMut": false, - "isSigner": false + name: 'addressLookupTable' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "merkleRoot", - "type": { - "array": [ - "u8", - 20 - ] + name: 'merkleRoot' + type: { + array: ['u8', 20] } }, { - "name": "dispenserGuard", - "type": "publicKey" + name: 'dispenserGuard' + type: 'publicKey' }, { - "name": "maxTransfer", - "type": "u64" + name: 'maxTransfer' + type: 'u64' } ] }, { - "name": "claim", - "docs": [ + name: 'claim' + docs: [ "* Claim a claimant's tokens. This instructions needs to enforce :\n * - The dispenser guard has signed the transaction - DONE\n * - The claimant is claiming no more than once per ecosystem - DONE\n * - The claimant has provided a valid proof of identity (is the owner of the wallet\n * entitled to the tokens)\n * - The claimant has provided a valid proof of inclusion (this confirm that the claimant --\n * DONE\n * - The claimant has not already claimed tokens -- DONE" - ], - "accounts": [ + ] + accounts: [ { - "name": "funder", - "isMut": true, - "isSigner": true + name: 'funder' + isMut: true + isSigner: true }, { - "name": "claimant", - "isMut": false, - "isSigner": true + name: 'claimant' + isMut: false + isSigner: true }, { - "name": "claimantFund", - "isMut": true, - "isSigner": false, - "docs": [ + name: 'claimantFund' + isMut: true + isSigner: false + docs: [ "Claimant's associated token account to receive the tokens", - "Should be initialized outside of this program." + 'Should be initialized outside of this program.' ] }, { - "name": "config", - "isMut": false, - "isSigner": false + name: 'config' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false }, { - "name": "treasury", - "isMut": true, - "isSigner": false + name: 'treasury' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "sysvarInstruction", - "isMut": false, - "isSigner": false, - "docs": [ + name: 'sysvarInstruction' + isMut: false + isSigner: false + docs: [ "CHECK : Anchor wants me to write this comment because I'm using AccountInfo which doesn't check for ownership and doesn't deserialize the account automatically. But it's fine because I check the address and I load it using load_instruction_at_checked." ] }, { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false + name: 'associatedTokenProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "claimCertificate", - "type": { - "defined": "ClaimCertificate" + name: 'claimCertificate' + type: { + defined: 'ClaimCertificate' } } ] } - ], - "accounts": [ + ] + accounts: [ { - "name": "Config", - "type": { - "kind": "struct", - "fields": [ + name: 'Config' + type: { + kind: 'struct' + fields: [ { - "name": "bump", - "type": "u8" + name: 'bump' + type: 'u8' }, { - "name": "merkleRoot", - "type": { - "array": [ - "u8", - 20 - ] + name: 'merkleRoot' + type: { + array: ['u8', 20] } }, { - "name": "dispenserGuard", - "type": "publicKey" + name: 'dispenserGuard' + type: 'publicKey' }, { - "name": "mint", - "type": "publicKey" + name: 'mint' + type: 'publicKey' }, { - "name": "addressLookupTable", - "type": "publicKey" + name: 'addressLookupTable' + type: 'publicKey' }, { - "name": "maxTransfer", - "type": "u64" + name: 'maxTransfer' + type: 'u64' } ] } }, { - "name": "Receipt", - "type": { - "kind": "struct", - "fields": [] + name: 'Receipt' + type: { + kind: 'struct' + fields: [] } } - ], - "types": [ + ] + types: [ { - "name": "CosmosMessage", - "docs": [ - "* An ADR036 message used in Cosmos. ADR036 is a standard for signing arbitrary data.\n* Only the message payload is stored in this struct.\n* The message signed for Cosmos is a JSON serialized CosmosStdSignDoc containing the payload and ADR036 compliant parameters.\n* The message also contains the bech32 address of the signer. We check that the signer corresponds to the public key." - ], - "type": { - "kind": "struct", - "fields": [ + name: 'CosmosMessage' + docs: [ + '* An ADR036 message used in Cosmos. ADR036 is a standard for signing arbitrary data.\n* Only the message payload is stored in this struct.\n* The message signed for Cosmos is a JSON serialized CosmosStdSignDoc containing the payload and ADR036 compliant parameters.\n* The message also contains the bech32 address of the signer. We check that the signer corresponds to the public key.' + ] + type: { + kind: 'struct' + fields: [ { - "name": "payload", - "type": "bytes" + name: 'payload' + type: 'bytes' }, { - "name": "signer", - "type": "string" + name: 'signer' + type: 'string' } ] } }, { - "name": "DiscordMessage", - "docs": [ + name: 'DiscordMessage' + docs: [ "* This message (borsh-serialized) needs to be signed by the dispenser guard after\n * verifying the claimant's pubkey controls the discord account.\n * The dispenser guard key should not be used for anything else." - ], - "type": { - "kind": "struct", - "fields": [ + ] + type: { + kind: 'struct' + fields: [ { - "name": "username", - "type": "string" + name: 'username' + type: 'string' }, { - "name": "claimant", - "type": "publicKey" + name: 'claimant' + type: 'publicKey' } ] } }, { - "name": "Ed25519InstructionHeader", - "type": { - "kind": "struct", - "fields": [ + name: 'Ed25519InstructionHeader' + type: { + kind: 'struct' + fields: [ { - "name": "numSignatures", - "type": "u8" + name: 'numSignatures' + type: 'u8' }, { - "name": "padding", - "type": "u8" + name: 'padding' + type: 'u8' }, { - "name": "signatureOffset", - "type": "u16" + name: 'signatureOffset' + type: 'u16' }, { - "name": "signatureInstructionIndex", - "type": "u16" + name: 'signatureInstructionIndex' + type: 'u16' }, { - "name": "publicKeyOffset", - "type": "u16" + name: 'publicKeyOffset' + type: 'u16' }, { - "name": "publicKeyInstructionIndex", - "type": "u16" + name: 'publicKeyInstructionIndex' + type: 'u16' }, { - "name": "messageDataOffset", - "type": "u16" + name: 'messageDataOffset' + type: 'u16' }, { - "name": "messageDataSize", - "type": "u16" + name: 'messageDataSize' + type: 'u16' }, { - "name": "messageInstructionIndex", - "type": "u16" + name: 'messageInstructionIndex' + type: 'u16' } ] } }, { - "name": "Secp256k1InstructionHeader", - "type": { - "kind": "struct", - "fields": [ + name: 'Secp256k1InstructionHeader' + type: { + kind: 'struct' + fields: [ { - "name": "numSignatures", - "type": "u8" + name: 'numSignatures' + type: 'u8' }, { - "name": "signatureOffset", - "type": "u16" + name: 'signatureOffset' + type: 'u16' }, { - "name": "signatureInstructionIndex", - "type": "u8" + name: 'signatureInstructionIndex' + type: 'u8' }, { - "name": "ethAddressOffset", - "type": "u16" + name: 'ethAddressOffset' + type: 'u16' }, { - "name": "ethAddressInstructionIndex", - "type": "u8" + name: 'ethAddressInstructionIndex' + type: 'u8' }, { - "name": "messageDataOffset", - "type": "u16" + name: 'messageDataOffset' + type: 'u16' }, { - "name": "messageDataSize", - "type": "u16" + name: 'messageDataSize' + type: 'u16' }, { - "name": "messageInstructionIndex", - "type": "u8" + name: 'messageInstructionIndex' + type: 'u8' } ] } }, { - "name": "ClaimInfo", - "type": { - "kind": "struct", - "fields": [ - { - "name": "identity", - "type": { - "defined": "Identity" + name: 'ClaimInfo' + type: { + kind: 'struct' + fields: [ + { + name: 'identity' + type: { + defined: 'Identity' } }, { - "name": "amount", - "type": "u64" + name: 'amount' + type: 'u64' } ] } }, { - "name": "ClaimCertificate", - "type": { - "kind": "struct", - "fields": [ + name: 'ClaimCertificate' + type: { + kind: 'struct' + fields: [ { - "name": "amount", - "type": "u64" + name: 'amount' + type: 'u64' }, { - "name": "proofOfIdentity", - "type": { - "defined": "IdentityCertificate" + name: 'proofOfIdentity' + type: { + defined: 'IdentityCertificate' } }, { - "name": "proofOfInclusion", - "type": { - "vec": { - "array": [ - "u8", - 20 - ] + name: 'proofOfInclusion' + type: { + vec: { + array: ['u8', 20] } } } @@ -346,106 +336,91 @@ export type TokenDispenser = } }, { - "name": "Identity", - "docs": [ + name: 'Identity' + docs: [ "* This is the identity that the claimant will use to claim tokens.\n * A claimant can claim tokens for 1 identity on each ecosystem.\n * Typically for a blockchain it is a public key in the blockchain's address space." - ], - "type": { - "kind": "enum", - "variants": [ + ] + type: { + kind: 'enum' + variants: [ { - "name": "Discord", - "fields": [ + name: 'Discord' + fields: [ { - "name": "username", - "type": "string" + name: 'username' + type: 'string' } ] }, { - "name": "Solana", - "fields": [ + name: 'Solana' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] + name: 'pubkey' + type: { + array: ['u8', 32] } } ] }, { - "name": "Evm", - "fields": [ + name: 'Evm' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] + name: 'pubkey' + type: { + array: ['u8', 20] } } ] }, { - "name": "Sui", - "fields": [ + name: 'Sui' + fields: [ { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] + name: 'address' + type: { + array: ['u8', 32] } } ] }, { - "name": "Aptos", - "fields": [ + name: 'Aptos' + fields: [ { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] + name: 'address' + type: { + array: ['u8', 32] } } ] }, { - "name": "Cosmwasm", - "fields": [ + name: 'Cosmwasm' + fields: [ { - "name": "address", - "type": "string" + name: 'address' + type: 'string' } ] }, { - "name": "Injective", - "fields": [ + name: 'Injective' + fields: [ { - "name": "address", - "type": "string" + name: 'address' + type: 'string' } ] }, { - "name": "Algorand", - "fields": [ + name: 'Algorand' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] + name: 'pubkey' + type: { + array: ['u8', 32] } } ] @@ -454,911 +429,842 @@ export type TokenDispenser = } }, { - "name": "IdentityCertificate", - "type": { - "kind": "enum", - "variants": [ + name: 'IdentityCertificate' + type: { + kind: 'enum' + variants: [ { - "name": "Discord", - "fields": [ + name: 'Discord' + fields: [ { - "name": "username", - "type": "string" + name: 'username' + type: 'string' }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] }, { - "name": "Evm", - "fields": [ + name: 'Evm' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] + name: 'pubkey' + type: { + array: ['u8', 20] } }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] }, { - "name": "Solana" + name: 'Solana' }, { - "name": "Sui", - "fields": [ + name: 'Sui' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] + name: 'pubkey' + type: { + array: ['u8', 32] } }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] }, { - "name": "Aptos", - "fields": [ + name: 'Aptos' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] + name: 'pubkey' + type: { + array: ['u8', 32] } }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] }, { - "name": "Cosmwasm", - "fields": [ + name: 'Cosmwasm' + fields: [ { - "name": "chain_id", - "type": "string" + name: 'chain_id' + type: 'string' }, { - "name": "signature", - "type": { - "array": [ - "u8", - 64 - ] + name: 'signature' + type: { + array: ['u8', 64] } }, { - "name": "recovery_id", - "type": "u8" + name: 'recovery_id' + type: 'u8' }, { - "name": "pubkey", - "type": { - "array": [ - "u8", - 65 - ] + name: 'pubkey' + type: { + array: ['u8', 65] } }, { - "name": "message", - "type": "bytes" + name: 'message' + type: 'bytes' } ] }, { - "name": "Injective", - "fields": [ + name: 'Injective' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] + name: 'pubkey' + type: { + array: ['u8', 20] } }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] }, { - "name": "Algorand", - "fields": [ + name: 'Algorand' + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] + name: 'pubkey' + type: { + array: ['u8', 32] } }, { - "name": "verification_instruction_index", - "type": "u8" + name: 'verification_instruction_index' + type: 'u8' } ] } ] } } - ], - "events": [ + ] + events: [ { - "name": "ClaimEvent", - "fields": [ + name: 'ClaimEvent' + fields: [ { - "name": "treasury", - "type": "publicKey", - "index": false + name: 'treasury' + type: 'publicKey' + index: false }, { - "name": "remainingBalance", - "type": "u64", - "index": false + name: 'remainingBalance' + type: 'u64' + index: false }, { - "name": "claimant", - "type": "publicKey", - "index": false + name: 'claimant' + type: 'publicKey' + index: false }, { - "name": "claimInfo", - "type": { - "defined": "ClaimInfo" - }, - "index": false + name: 'claimInfo' + type: { + defined: 'ClaimInfo' + } + index: false } ] } - ], - "errors": [ + ] + errors: [ { - "code": 6000, - "name": "AlreadyClaimed" + code: 6000 + name: 'AlreadyClaimed' }, { - "code": 6001, - "name": "InvalidInclusionProof" + code: 6001 + name: 'InvalidInclusionProof' }, { - "code": 6002, - "name": "WrongPda" + code: 6002 + name: 'WrongPda' }, { - "code": 6003, - "name": "SignatureVerificationWrongProgram" + code: 6003 + name: 'SignatureVerificationWrongProgram' }, { - "code": 6004, - "name": "SignatureVerificationWrongAccounts" + code: 6004 + name: 'SignatureVerificationWrongAccounts' }, { - "code": 6005, - "name": "SignatureVerificationWrongHeader" + code: 6005 + name: 'SignatureVerificationWrongHeader' }, { - "code": 6006, - "name": "SignatureVerificationWrongPayload" + code: 6006 + name: 'SignatureVerificationWrongPayload' }, { - "code": 6007, - "name": "SignatureVerificationWrongPayloadMetadata" + code: 6007 + name: 'SignatureVerificationWrongPayloadMetadata' }, { - "code": 6008, - "name": "SignatureVerificationWrongSigner" + code: 6008 + name: 'SignatureVerificationWrongSigner' }, { - "code": 6009, - "name": "UnauthorizedCosmosChainId" + code: 6009 + name: 'UnauthorizedCosmosChainId' }, { - "code": 6010, - "name": "TransferExceedsMax" + code: 6010 + name: 'TransferExceedsMax' } ] } -; -export const IDL: TokenDispenser = -{ - "version": "0.1.0", - "name": "token_dispenser", - "instructions": [ +export const IDL: TokenDispenser = { + version: '0.1.0', + name: 'token_dispenser', + instructions: [ { - "name": "initialize", - "docs": [ - "This can only be called once and should be called right after the program is deployed." + name: 'initialize', + docs: [ + 'This can only be called once and should be called right after the program is deployed.', ], - "accounts": [ + accounts: [ { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer', + isMut: true, + isSigner: true, }, { - "name": "config", - "isMut": true, - "isSigner": false + name: 'config', + isMut: true, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint', + isMut: false, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "addressLookupTable", - "isMut": false, - "isSigner": false - } + name: 'addressLookupTable', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "merkleRoot", - "type": { - "array": [ - "u8", - 20 - ] - } + name: 'merkleRoot', + type: { + array: ['u8', 20], + }, }, { - "name": "dispenserGuard", - "type": "publicKey" + name: 'dispenserGuard', + type: 'publicKey', }, { - "name": "maxTransfer", - "type": "u64" - } - ] + name: 'maxTransfer', + type: 'u64', + }, + ], }, { - "name": "claim", - "docs": [ - "* Claim a claimant's tokens. This instructions needs to enforce :\n * - The dispenser guard has signed the transaction - DONE\n * - The claimant is claiming no more than once per ecosystem - DONE\n * - The claimant has provided a valid proof of identity (is the owner of the wallet\n * entitled to the tokens)\n * - The claimant has provided a valid proof of inclusion (this confirm that the claimant --\n * DONE\n * - The claimant has not already claimed tokens -- DONE" + name: 'claim', + docs: [ + "* Claim a claimant's tokens. This instructions needs to enforce :\n * - The dispenser guard has signed the transaction - DONE\n * - The claimant is claiming no more than once per ecosystem - DONE\n * - The claimant has provided a valid proof of identity (is the owner of the wallet\n * entitled to the tokens)\n * - The claimant has provided a valid proof of inclusion (this confirm that the claimant --\n * DONE\n * - The claimant has not already claimed tokens -- DONE", ], - "accounts": [ + accounts: [ { - "name": "funder", - "isMut": true, - "isSigner": true + name: 'funder', + isMut: true, + isSigner: true, }, { - "name": "claimant", - "isMut": false, - "isSigner": true + name: 'claimant', + isMut: false, + isSigner: true, }, { - "name": "claimantFund", - "isMut": true, - "isSigner": false, - "docs": [ + name: 'claimantFund', + isMut: true, + isSigner: false, + docs: [ "Claimant's associated token account to receive the tokens", - "Should be initialized outside of this program." - ] + 'Should be initialized outside of this program.', + ], }, { - "name": "config", - "isMut": false, - "isSigner": false + name: 'config', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint', + isMut: false, + isSigner: false, }, { - "name": "treasury", - "isMut": true, - "isSigner": false + name: 'treasury', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "sysvarInstruction", - "isMut": false, - "isSigner": false, - "docs": [ - "CHECK : Anchor wants me to write this comment because I'm using AccountInfo which doesn't check for ownership and doesn't deserialize the account automatically. But it's fine because I check the address and I load it using load_instruction_at_checked." - ] + name: 'sysvarInstruction', + isMut: false, + isSigner: false, + docs: [ + "CHECK : Anchor wants me to write this comment because I'm using AccountInfo which doesn't check for ownership and doesn't deserialize the account automatically. But it's fine because I check the address and I load it using load_instruction_at_checked.", + ], }, { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - } + name: 'associatedTokenProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "claimCertificate", - "type": { - "defined": "ClaimCertificate" - } - } - ] - } + name: 'claimCertificate', + type: { + defined: 'ClaimCertificate', + }, + }, + ], + }, ], - "accounts": [ + accounts: [ { - "name": "Config", - "type": { - "kind": "struct", - "fields": [ + name: 'Config', + type: { + kind: 'struct', + fields: [ { - "name": "bump", - "type": "u8" + name: 'bump', + type: 'u8', }, { - "name": "merkleRoot", - "type": { - "array": [ - "u8", - 20 - ] - } + name: 'merkleRoot', + type: { + array: ['u8', 20], + }, }, { - "name": "dispenserGuard", - "type": "publicKey" + name: 'dispenserGuard', + type: 'publicKey', }, { - "name": "mint", - "type": "publicKey" + name: 'mint', + type: 'publicKey', }, { - "name": "addressLookupTable", - "type": "publicKey" + name: 'addressLookupTable', + type: 'publicKey', }, { - "name": "maxTransfer", - "type": "u64" - } - ] - } + name: 'maxTransfer', + type: 'u64', + }, + ], + }, }, { - "name": "Receipt", - "type": { - "kind": "struct", - "fields": [] - } - } + name: 'Receipt', + type: { + kind: 'struct', + fields: [], + }, + }, ], - "types": [ + types: [ { - "name": "CosmosMessage", - "docs": [ - "* An ADR036 message used in Cosmos. ADR036 is a standard for signing arbitrary data.\n* Only the message payload is stored in this struct.\n* The message signed for Cosmos is a JSON serialized CosmosStdSignDoc containing the payload and ADR036 compliant parameters.\n* The message also contains the bech32 address of the signer. We check that the signer corresponds to the public key." + name: 'CosmosMessage', + docs: [ + '* An ADR036 message used in Cosmos. ADR036 is a standard for signing arbitrary data.\n* Only the message payload is stored in this struct.\n* The message signed for Cosmos is a JSON serialized CosmosStdSignDoc containing the payload and ADR036 compliant parameters.\n* The message also contains the bech32 address of the signer. We check that the signer corresponds to the public key.', ], - "type": { - "kind": "struct", - "fields": [ + type: { + kind: 'struct', + fields: [ { - "name": "payload", - "type": "bytes" + name: 'payload', + type: 'bytes', }, { - "name": "signer", - "type": "string" - } - ] - } + name: 'signer', + type: 'string', + }, + ], + }, }, { - "name": "DiscordMessage", - "docs": [ - "* This message (borsh-serialized) needs to be signed by the dispenser guard after\n * verifying the claimant's pubkey controls the discord account.\n * The dispenser guard key should not be used for anything else." + name: 'DiscordMessage', + docs: [ + "* This message (borsh-serialized) needs to be signed by the dispenser guard after\n * verifying the claimant's pubkey controls the discord account.\n * The dispenser guard key should not be used for anything else.", ], - "type": { - "kind": "struct", - "fields": [ + type: { + kind: 'struct', + fields: [ { - "name": "username", - "type": "string" + name: 'username', + type: 'string', }, { - "name": "claimant", - "type": "publicKey" - } - ] - } + name: 'claimant', + type: 'publicKey', + }, + ], + }, }, { - "name": "Ed25519InstructionHeader", - "type": { - "kind": "struct", - "fields": [ + name: 'Ed25519InstructionHeader', + type: { + kind: 'struct', + fields: [ { - "name": "numSignatures", - "type": "u8" + name: 'numSignatures', + type: 'u8', }, { - "name": "padding", - "type": "u8" + name: 'padding', + type: 'u8', }, { - "name": "signatureOffset", - "type": "u16" + name: 'signatureOffset', + type: 'u16', }, { - "name": "signatureInstructionIndex", - "type": "u16" + name: 'signatureInstructionIndex', + type: 'u16', }, { - "name": "publicKeyOffset", - "type": "u16" + name: 'publicKeyOffset', + type: 'u16', }, { - "name": "publicKeyInstructionIndex", - "type": "u16" + name: 'publicKeyInstructionIndex', + type: 'u16', }, { - "name": "messageDataOffset", - "type": "u16" + name: 'messageDataOffset', + type: 'u16', }, { - "name": "messageDataSize", - "type": "u16" + name: 'messageDataSize', + type: 'u16', }, { - "name": "messageInstructionIndex", - "type": "u16" - } - ] - } + name: 'messageInstructionIndex', + type: 'u16', + }, + ], + }, }, { - "name": "Secp256k1InstructionHeader", - "type": { - "kind": "struct", - "fields": [ + name: 'Secp256k1InstructionHeader', + type: { + kind: 'struct', + fields: [ { - "name": "numSignatures", - "type": "u8" + name: 'numSignatures', + type: 'u8', }, { - "name": "signatureOffset", - "type": "u16" + name: 'signatureOffset', + type: 'u16', }, { - "name": "signatureInstructionIndex", - "type": "u8" + name: 'signatureInstructionIndex', + type: 'u8', }, { - "name": "ethAddressOffset", - "type": "u16" + name: 'ethAddressOffset', + type: 'u16', }, { - "name": "ethAddressInstructionIndex", - "type": "u8" + name: 'ethAddressInstructionIndex', + type: 'u8', }, { - "name": "messageDataOffset", - "type": "u16" + name: 'messageDataOffset', + type: 'u16', }, { - "name": "messageDataSize", - "type": "u16" + name: 'messageDataSize', + type: 'u16', }, { - "name": "messageInstructionIndex", - "type": "u8" - } - ] - } + name: 'messageInstructionIndex', + type: 'u8', + }, + ], + }, }, { - "name": "ClaimInfo", - "type": { - "kind": "struct", - "fields": [ - { - "name": "identity", - "type": { - "defined": "Identity" - } + name: 'ClaimInfo', + type: { + kind: 'struct', + fields: [ + { + name: 'identity', + type: { + defined: 'Identity', + }, }, { - "name": "amount", - "type": "u64" - } - ] - } + name: 'amount', + type: 'u64', + }, + ], + }, }, { - "name": "ClaimCertificate", - "type": { - "kind": "struct", - "fields": [ + name: 'ClaimCertificate', + type: { + kind: 'struct', + fields: [ { - "name": "amount", - "type": "u64" + name: 'amount', + type: 'u64', }, { - "name": "proofOfIdentity", - "type": { - "defined": "IdentityCertificate" - } + name: 'proofOfIdentity', + type: { + defined: 'IdentityCertificate', + }, }, { - "name": "proofOfInclusion", - "type": { - "vec": { - "array": [ - "u8", - 20 - ] - } - } - } - ] - } + name: 'proofOfInclusion', + type: { + vec: { + array: ['u8', 20], + }, + }, + }, + ], + }, }, { - "name": "Identity", - "docs": [ - "* This is the identity that the claimant will use to claim tokens.\n * A claimant can claim tokens for 1 identity on each ecosystem.\n * Typically for a blockchain it is a public key in the blockchain's address space." + name: 'Identity', + docs: [ + "* This is the identity that the claimant will use to claim tokens.\n * A claimant can claim tokens for 1 identity on each ecosystem.\n * Typically for a blockchain it is a public key in the blockchain's address space.", ], - "type": { - "kind": "enum", - "variants": [ + type: { + kind: 'enum', + variants: [ { - "name": "Discord", - "fields": [ + name: 'Discord', + fields: [ { - "name": "username", - "type": "string" - } - ] + name: 'username', + type: 'string', + }, + ], }, { - "name": "Solana", - "fields": [ + name: 'Solana', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] + name: 'pubkey', + type: { + array: ['u8', 32], + }, + }, + ], }, { - "name": "Evm", - "fields": [ + name: 'Evm', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] - } - } - ] + name: 'pubkey', + type: { + array: ['u8', 20], + }, + }, + ], }, { - "name": "Sui", - "fields": [ + name: 'Sui', + fields: [ { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] + name: 'address', + type: { + array: ['u8', 32], + }, + }, + ], }, { - "name": "Aptos", - "fields": [ + name: 'Aptos', + fields: [ { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] + name: 'address', + type: { + array: ['u8', 32], + }, + }, + ], }, { - "name": "Cosmwasm", - "fields": [ + name: 'Cosmwasm', + fields: [ { - "name": "address", - "type": "string" - } - ] + name: 'address', + type: 'string', + }, + ], }, { - "name": "Injective", - "fields": [ + name: 'Injective', + fields: [ { - "name": "address", - "type": "string" - } - ] + name: 'address', + type: 'string', + }, + ], }, { - "name": "Algorand", - "fields": [ + name: 'Algorand', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - ] - } + name: 'pubkey', + type: { + array: ['u8', 32], + }, + }, + ], + }, + ], + }, }, { - "name": "IdentityCertificate", - "type": { - "kind": "enum", - "variants": [ + name: 'IdentityCertificate', + type: { + kind: 'enum', + variants: [ { - "name": "Discord", - "fields": [ + name: 'Discord', + fields: [ { - "name": "username", - "type": "string" + name: 'username', + type: 'string', }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] + name: 'verification_instruction_index', + type: 'u8', + }, + ], }, { - "name": "Evm", - "fields": [ + name: 'Evm', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] - } + name: 'pubkey', + type: { + array: ['u8', 20], + }, }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] + name: 'verification_instruction_index', + type: 'u8', + }, + ], }, { - "name": "Solana" + name: 'Solana', }, { - "name": "Sui", - "fields": [ + name: 'Sui', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'pubkey', + type: { + array: ['u8', 32], + }, }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] + name: 'verification_instruction_index', + type: 'u8', + }, + ], }, { - "name": "Aptos", - "fields": [ + name: 'Aptos', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'pubkey', + type: { + array: ['u8', 32], + }, }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] + name: 'verification_instruction_index', + type: 'u8', + }, + ], }, { - "name": "Cosmwasm", - "fields": [ + name: 'Cosmwasm', + fields: [ { - "name": "chain_id", - "type": "string" + name: 'chain_id', + type: 'string', }, { - "name": "signature", - "type": { - "array": [ - "u8", - 64 - ] - } + name: 'signature', + type: { + array: ['u8', 64], + }, }, { - "name": "recovery_id", - "type": "u8" + name: 'recovery_id', + type: 'u8', }, { - "name": "pubkey", - "type": { - "array": [ - "u8", - 65 - ] - } + name: 'pubkey', + type: { + array: ['u8', 65], + }, }, { - "name": "message", - "type": "bytes" - } - ] + name: 'message', + type: 'bytes', + }, + ], }, { - "name": "Injective", - "fields": [ + name: 'Injective', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 20 - ] - } + name: 'pubkey', + type: { + array: ['u8', 20], + }, }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] + name: 'verification_instruction_index', + type: 'u8', + }, + ], }, { - "name": "Algorand", - "fields": [ + name: 'Algorand', + fields: [ { - "name": "pubkey", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'pubkey', + type: { + array: ['u8', 32], + }, }, { - "name": "verification_instruction_index", - "type": "u8" - } - ] - } - ] - } - } + name: 'verification_instruction_index', + type: 'u8', + }, + ], + }, + ], + }, + }, ], - "events": [ + events: [ { - "name": "ClaimEvent", - "fields": [ + name: 'ClaimEvent', + fields: [ { - "name": "treasury", - "type": "publicKey", - "index": false + name: 'treasury', + type: 'publicKey', + index: false, }, { - "name": "remainingBalance", - "type": "u64", - "index": false + name: 'remainingBalance', + type: 'u64', + index: false, }, { - "name": "claimant", - "type": "publicKey", - "index": false + name: 'claimant', + type: 'publicKey', + index: false, }, { - "name": "claimInfo", - "type": { - "defined": "ClaimInfo" + name: 'claimInfo', + type: { + defined: 'ClaimInfo', }, - "index": false - } - ] - } + index: false, + }, + ], + }, ], - "errors": [ + errors: [ { - "code": 6000, - "name": "AlreadyClaimed" + code: 6000, + name: 'AlreadyClaimed', }, { - "code": 6001, - "name": "InvalidInclusionProof" + code: 6001, + name: 'InvalidInclusionProof', }, { - "code": 6002, - "name": "WrongPda" + code: 6002, + name: 'WrongPda', }, { - "code": 6003, - "name": "SignatureVerificationWrongProgram" + code: 6003, + name: 'SignatureVerificationWrongProgram', }, { - "code": 6004, - "name": "SignatureVerificationWrongAccounts" + code: 6004, + name: 'SignatureVerificationWrongAccounts', }, { - "code": 6005, - "name": "SignatureVerificationWrongHeader" + code: 6005, + name: 'SignatureVerificationWrongHeader', }, { - "code": 6006, - "name": "SignatureVerificationWrongPayload" + code: 6006, + name: 'SignatureVerificationWrongPayload', }, { - "code": 6007, - "name": "SignatureVerificationWrongPayloadMetadata" + code: 6007, + name: 'SignatureVerificationWrongPayloadMetadata', }, { - "code": 6008, - "name": "SignatureVerificationWrongSigner" + code: 6008, + name: 'SignatureVerificationWrongSigner', }, { - "code": 6009, - "name": "UnauthorizedCosmosChainId" + code: 6009, + name: 'UnauthorizedCosmosChainId', }, { - "code": 6010, - "name": "TransferExceedsMax" - } - ] + code: 6010, + name: 'TransferExceedsMax', + }, + ], } -; diff --git a/frontend/components/Subscribe.tsx b/frontend/components/Subscribe.tsx index 5f76ecf5..094b278b 100644 --- a/frontend/components/Subscribe.tsx +++ b/frontend/components/Subscribe.tsx @@ -65,7 +65,7 @@ const Subscribe = () => {
{ onChange={() => setStatus((s) => ({ ...status, terms: !status.terms })) } - className="bg-opacity-15 checkbox h-4 w-4 appearance-none border border-white bg-white" + className="checkbox h-4 w-4 appearance-none border border-white bg-white bg-opacity-15" /> I agree to receive marketing emails and other communications diff --git a/frontend/components/modal/Disclaimer.tsx b/frontend/components/modal/Disclaimer.tsx index d5727d4a..c73dca95 100644 --- a/frontend/components/modal/Disclaimer.tsx +++ b/frontend/components/modal/Disclaimer.tsx @@ -134,7 +134,7 @@ export function Disclaimer({ onAgree, showModal }: DisclaimerProps) { Terms.{' '}

-
+
setAgreed((agreed) => !agreed)} diff --git a/frontend/sections/TokensReceived.tsx b/frontend/sections/TokensReceived.tsx index 9fdd3556..b841dcbf 100644 --- a/frontend/sections/TokensReceived.tsx +++ b/frontend/sections/TokensReceived.tsx @@ -53,7 +53,7 @@ export const TokensReceived = ({ totalCoinsClaimed }: TokensReceivedProps) => { newsletter.

-
+
diff --git a/token-dispenser/scripts/treasuries b/token-dispenser/scripts/treasuries index cbf2229e..28283fc3 100644 --- a/token-dispenser/scripts/treasuries +++ b/token-dispenser/scripts/treasuries @@ -4,4 +4,4 @@ WatsKcF7vbvxAMp26pz3yMc4X4R66gNvExCtHwc371H WATY4JeitW6xZeZa9U4Wy8cxYdk1LtW6s6mmDFhUKuD waTyocL9rFxerXZNsGP7v7G8VVoR7hDk74Tp4nC7uEV waTZHsCNgr8SzkbXiwEPBd6PE1pb5owuR1NQotM4zJj -waTyocL9rFxerXZNsGP7v7G8VVoR7hDk74Tp4nC7uEV \ No newline at end of file +waTyocL9rFxerXZNsGP7v7G8VVoR7hDk74Tp4nC7uEV