From 18cbb157699af3d39f3d727318d2391a37d04ef8 Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Tue, 4 Feb 2025 16:07:40 +0700 Subject: [PATCH 01/14] upgrade all the packages --- package.json | 3 +- packages/arweave-push/package.json | 2 +- packages/bridge-sdk/package.json | 2 +- packages/bridge/package.json | 2 +- packages/common/package.json | 2 +- packages/common/src/models/account.ts | 2 +- packages/common/src/utils/ids.ts | 5 + packages/governance-sdk/package.json | 4 +- .../governance/withCreateMintGovernance.ts | 3 +- .../src/governance/withCreateRealm.ts | 3 +- .../governance/withCreateTokenGovernance.ts | 3 +- .../governance/withDepositGoverningTokens.ts | 3 +- .../governance/withRevokeGoverningTokens.ts | 3 +- .../governance/withWithdrawGoverningTokens.ts | 3 +- .../governance-sdk/tests/tools/builders.ts | 11 +- .../tools/withCreateAssociatedTokenAccount.ts | 22 +- .../tests/tools/withCreateMint.ts | 13 +- .../governance-sdk/tests/tools/withMintTo.ts | 11 +- packages/governance/package.json | 2 +- .../governance/src/tools/raydium/raydium.ts | 3 +- .../src/tools/sdk/token/splToken.ts | 11 +- packages/lending/package.json | 2 +- packages/metavinci/package.json | 2 +- yarn.lock | 771 +++++++++++++++++- 24 files changed, 835 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index 4ab75ae..3ffb0d7 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,8 @@ "rimraf": "^3.0.2", "ts-jest": "^24.0.0", "ts-node": "^9.0.0", - "typescript": "^4.1.3" + "typescript": "^4.1.3", + "node-gyp": "^10.0.1" }, "resolutions": { "react": "16.13.1", diff --git a/packages/arweave-push/package.json b/packages/arweave-push/package.json index 28ac4fb..1278092 100644 --- a/packages/arweave-push/package.json +++ b/packages/arweave-push/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@google-cloud/storage": "^5.0.0", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "arweave": "1.10.13", "busboy": "^0.3.0", "coingecko-api": "1.0.10", diff --git a/packages/bridge-sdk/package.json b/packages/bridge-sdk/package.json index 7d02ae8..0ab1069 100644 --- a/packages/bridge-sdk/package.json +++ b/packages/bridge-sdk/package.json @@ -19,7 +19,7 @@ "@oyster/common": "0.0.2", "@solana/spl-token": "0.1.3", "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "bignumber.js": "^9.0.1", "bn.js": "^5.1.3", "bs58": "^4.0.1", diff --git a/packages/bridge/package.json b/packages/bridge/package.json index e77a436..c2e74b3 100644 --- a/packages/bridge/package.json +++ b/packages/bridge/package.json @@ -12,7 +12,7 @@ "@solana/spl-token": "0.1.3", "@solana/spl-token-registry": "^0.2.0", "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", diff --git a/packages/common/package.json b/packages/common/package.json index 2945918..1499a0a 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -31,7 +31,7 @@ "@solana/wallet-adapter-base": "^0.6.0", "@solana/wallet-adapter-react": "^0.12.6", "@solana/wallet-adapter-wallets": "^0.10.1", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", diff --git a/packages/common/src/models/account.ts b/packages/common/src/models/account.ts index 00d0b52..441a02e 100644 --- a/packages/common/src/models/account.ts +++ b/packages/common/src/models/account.ts @@ -60,8 +60,8 @@ export function approve( // if delegate is not passed ephemeral transfer authority is used delegate?: PublicKey, existingTransferAuthority?: Account, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ): Account { - const tokenProgram = TOKEN_PROGRAM_ID; const transferAuthority = existingTransferAuthority || new Account(); const delegateKey = delegate ?? transferAuthority.publicKey; diff --git a/packages/common/src/utils/ids.ts b/packages/common/src/utils/ids.ts index 9110627..dd6dca8 100644 --- a/packages/common/src/utils/ids.ts +++ b/packages/common/src/utils/ids.ts @@ -8,6 +8,10 @@ export let TOKEN_PROGRAM_ID = new PublicKey( 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', ); +export let TOKEN_2022_PROGRAM_ID = new PublicKey( + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', +); + export let LENDING_PROGRAM_ID = new PublicKey( 'LendZqTs7gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi', ); @@ -154,6 +158,7 @@ export const setProgramIds = (envName: string) => { export const programIds = () => { return { token: TOKEN_PROGRAM_ID, + token_2022: TOKEN_2022_PROGRAM_ID, swap: SWAP_PROGRAM_ID, swap_legacy: SWAP_PROGRAM_LEGACY_IDS, swapLayout: SWAP_PROGRAM_LAYOUT, diff --git a/packages/governance-sdk/package.json b/packages/governance-sdk/package.json index f3ab4de..c872652 100644 --- a/packages/governance-sdk/package.json +++ b/packages/governance-sdk/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/solana-labs/oyster/issues" }, "dependencies": { - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "bignumber.js": "^9.0.1", "bn.js": "^5.1.3", "borsh": "^0.3.1", @@ -41,7 +41,7 @@ "esbuild-jest": "^0.5.0", "jest": "^29.2.0", "typescript": "^4.5.4", - "@solana/spl-token": "0.1.3", + "@solana/spl-token": "*", "ts-jest": "29.0.3", "@types/jest": "29.2.0" }, diff --git a/packages/governance-sdk/src/governance/withCreateMintGovernance.ts b/packages/governance-sdk/src/governance/withCreateMintGovernance.ts index 60194af..f32162d 100644 --- a/packages/governance-sdk/src/governance/withCreateMintGovernance.ts +++ b/packages/governance-sdk/src/governance/withCreateMintGovernance.ts @@ -26,6 +26,7 @@ export const withCreateMintGovernance = async ( payer: PublicKey, governanceAuthority: PublicKey, voterWeightRecord?: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const args = new CreateMintGovernanceArgs({ config, @@ -73,7 +74,7 @@ export const withCreateMintGovernance = async ( isSigner: true, }, { - pubkey: TOKEN_PROGRAM_ID, // 6 + pubkey: tokenProgram, // 6 isWritable: false, isSigner: false, }, diff --git a/packages/governance-sdk/src/governance/withCreateRealm.ts b/packages/governance-sdk/src/governance/withCreateRealm.ts index f7254b7..cf4b579 100644 --- a/packages/governance-sdk/src/governance/withCreateRealm.ts +++ b/packages/governance-sdk/src/governance/withCreateRealm.ts @@ -34,6 +34,7 @@ export async function withCreateRealm( minCommunityWeightToCreateGovernance: BN, communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) { const configArgs = createRealmConfigArgs( programVersion, @@ -95,7 +96,7 @@ export async function withCreateRealm( isWritable: false, }, { - pubkey: TOKEN_PROGRAM_ID, + pubkey: tokenProgram, isSigner: false, isWritable: false, }, diff --git a/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts b/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts index 743dd1e..d1b5021 100644 --- a/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts +++ b/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts @@ -26,6 +26,7 @@ export const withCreateTokenGovernance = async ( payer: PublicKey, governanceAuthority: PublicKey, voterWeightRecord?: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const args = new CreateTokenGovernanceArgs({ config, @@ -77,7 +78,7 @@ export const withCreateTokenGovernance = async ( isSigner: true, }, { - pubkey: TOKEN_PROGRAM_ID, + pubkey: tokenProgram, isWritable: false, isSigner: false, }, diff --git a/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts b/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts index b542d85..e13df40 100644 --- a/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts +++ b/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts @@ -28,6 +28,7 @@ export const withDepositGoverningTokens = async ( payer: PublicKey, amount: BN, governingTokenOwnerIsSigner?: boolean, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const args = new DepositGoverningTokensArgs({ amount }); const data = Buffer.from( @@ -97,7 +98,7 @@ export const withDepositGoverningTokens = async ( isSigner: false, }, { - pubkey: TOKEN_PROGRAM_ID, + pubkey: tokenProgram, isWritable: false, isSigner: false, }, diff --git a/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts b/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts index 6d5cf42..d78185e 100644 --- a/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts +++ b/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts @@ -19,6 +19,7 @@ export const withRevokeGoverningTokens = async ( governingTokenMint: PublicKey, revokeAuthority: PublicKey, amount: BN, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const args = new RevokeGoverningTokensArgs({ amount }); const data = Buffer.from( @@ -72,7 +73,7 @@ export const withRevokeGoverningTokens = async ( isWritable: false, }, { - pubkey: TOKEN_PROGRAM_ID, + pubkey: tokenProgram, isWritable: false, isSigner: false, }, diff --git a/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts b/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts index cb5bd2f..9fc95a9 100644 --- a/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts +++ b/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts @@ -14,6 +14,7 @@ export const withWithdrawGoverningTokens = async ( governingTokenDestination: PublicKey, governingTokenMint: PublicKey, governingTokenOwner: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const args = new WithdrawGoverningTokensArgs(); const data = Buffer.from( @@ -62,7 +63,7 @@ export const withWithdrawGoverningTokens = async ( isSigner: false, }, { - pubkey: TOKEN_PROGRAM_ID, + pubkey: tokenProgram, isWritable: false, isSigner: false, }, diff --git a/packages/governance-sdk/tests/tools/builders.ts b/packages/governance-sdk/tests/tools/builders.ts index 4a68971..f5bce70 100644 --- a/packages/governance-sdk/tests/tools/builders.ts +++ b/packages/governance-sdk/tests/tools/builders.ts @@ -1,6 +1,6 @@ import { ASSOCIATED_TOKEN_PROGRAM_ID, - Token, + getAssociatedTokenAddress, TOKEN_PROGRAM_ID, } from '@solana/spl-token'; import { @@ -78,7 +78,7 @@ export class BenchBuilder { connection?: Connection | undefined, programId?: PublicKey | undefined, ) { - connection = connection ?? new Connection(rpcEndpoint, 'recent'); + connection = connection ?? new Connection(rpcEndpoint, 'processed'); programId = programId ?? rpcProgramId; const programVersion = await getGovernanceProgramVersion( @@ -273,11 +273,12 @@ export class RealmBuilder { } async withdrawGoverningTokens() { - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, + const ataPk = await getAssociatedTokenAddress( this.communityMintPk, this.bench.walletPk, + false, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, ); await withWithdrawGoverningTokens( diff --git a/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts b/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts index 1bbf53e..7582404 100644 --- a/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts +++ b/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts @@ -1,6 +1,7 @@ import { ASSOCIATED_TOKEN_PROGRAM_ID, - Token, + createAssociatedTokenAccountInstruction, + getAssociatedTokenAddress, TOKEN_PROGRAM_ID, } from '@solana/spl-token' import { PublicKey, TransactionInstruction } from '@solana/web3.js' @@ -11,21 +12,22 @@ export const withCreateAssociatedTokenAccount = async ( ownerPk: PublicKey, payerPk: PublicKey ) => { - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, + const ataPk = await getAssociatedTokenAddress( mintPk, - ownerPk // owner + ownerPk, // owner + false, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, ) instructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintPk, + createAssociatedTokenAccountInstruction( + payerPk, ataPk, ownerPk, - payerPk + mintPk, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, ) ) diff --git a/packages/governance-sdk/tests/tools/withCreateMint.ts b/packages/governance-sdk/tests/tools/withCreateMint.ts index e653fd1..d93a2ad 100644 --- a/packages/governance-sdk/tests/tools/withCreateMint.ts +++ b/packages/governance-sdk/tests/tools/withCreateMint.ts @@ -1,4 +1,4 @@ -import { MintLayout, Token } from '@solana/spl-token' +import { createInitializeMintInstruction, MintLayout } from '@solana/spl-token' import { Connection, Keypair, @@ -16,7 +16,8 @@ export const withCreateMint = async ( ownerPk: PublicKey, freezeAuthorityPk: PublicKey | null, decimals: number, - payerPk: PublicKey + payerPk: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID ) => { const mintRentExempt = await connection.getMinimumBalanceForRentExemption( MintLayout.span @@ -30,18 +31,18 @@ export const withCreateMint = async ( newAccountPubkey: mintAccount.publicKey, lamports: mintRentExempt, space: MintLayout.span, - programId: TOKEN_PROGRAM_ID, + programId: tokenProgram, }) ) signers.push(mintAccount) instructions.push( - Token.createInitMintInstruction( - TOKEN_PROGRAM_ID, + createInitializeMintInstruction( mintAccount.publicKey, decimals, ownerPk, - freezeAuthorityPk + freezeAuthorityPk, + tokenProgram, ) ) return mintAccount.publicKey diff --git a/packages/governance-sdk/tests/tools/withMintTo.ts b/packages/governance-sdk/tests/tools/withMintTo.ts index 434c675..b021616 100644 --- a/packages/governance-sdk/tests/tools/withMintTo.ts +++ b/packages/governance-sdk/tests/tools/withMintTo.ts @@ -1,6 +1,6 @@ -import { Token, u64 } from '@solana/spl-token' import { PublicKey, TransactionInstruction } from '@solana/web3.js' import { TOKEN_PROGRAM_ID } from '../../src/tools/sdk/splToken' +import { createMintToInstruction } from '@solana/spl-token' @@ -9,16 +9,17 @@ export const withMintTo = async ( mintPk: PublicKey, destinationPk: PublicKey, mintAuthorityPk: PublicKey, - amount: number | u64 + amount: number, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID ) => { instructions.push( - Token.createMintToInstruction( - TOKEN_PROGRAM_ID, + createMintToInstruction( mintPk, destinationPk, mintAuthorityPk, + amount, [], - amount + tokenProgram, ) ) } diff --git a/packages/governance/package.json b/packages/governance/package.json index 6591e5b..1c8ccae 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -8,7 +8,7 @@ "@project-serum/borsh": "^0.2.2", "@solana/spl-governance": "0.3.17", "@solana/spl-token": "0.1.3", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "antd": "^4.6.6", "bn.js": "^5.1.3", "buffer-layout": "^1.2.0", diff --git a/packages/governance/src/tools/raydium/raydium.ts b/packages/governance/src/tools/raydium/raydium.ts index 16453a2..76e4efa 100644 --- a/packages/governance/src/tools/raydium/raydium.ts +++ b/packages/governance/src/tools/raydium/raydium.ts @@ -86,6 +86,7 @@ export function depositInstructionV4( poolRewardTokenAccountB: PublicKey, // tokenProgramId: PublicKey, amount: number, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ): TransactionInstruction { const dataLayout = struct([u8('instruction'), nu64('amount')]); @@ -99,7 +100,7 @@ export function depositInstructionV4( { pubkey: userRewardTokenAccount, isSigner: false, isWritable: true }, { pubkey: poolRewardTokenAccount, isSigner: false, isWritable: true }, { pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true }, - { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: true }, + { pubkey: tokenProgram, isSigner: false, isWritable: true }, { pubkey: userRewardTokenAccountB, isSigner: false, isWritable: true }, { pubkey: poolRewardTokenAccountB, isSigner: false, isWritable: true }, ]; diff --git a/packages/governance/src/tools/sdk/token/splToken.ts b/packages/governance/src/tools/sdk/token/splToken.ts index c7495ca..8386789 100644 --- a/packages/governance/src/tools/sdk/token/splToken.ts +++ b/packages/governance/src/tools/sdk/token/splToken.ts @@ -21,10 +21,11 @@ import { export async function getAssociatedTokenAddress( mint: PublicKey, owner: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ): Promise { return ( await PublicKey.findProgramAddress( - [owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], + [owner.toBuffer(), tokenProgram.toBuffer(), mint.toBuffer()], SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, ) )[0]; @@ -37,6 +38,7 @@ export function createTokenAccount( mint: PublicKey, owner: PublicKey, signers: Keypair[], + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) { const account = createUninitializedTokenAccount( instructions, @@ -46,7 +48,7 @@ export function createTokenAccount( ); instructions.push( - Token.createInitAccountInstruction(TOKEN_PROGRAM_ID, mint, account, owner), + Token.createInitAccountInstruction(tokenProgram, mint, account, owner), ); return account; @@ -57,6 +59,7 @@ export function createUninitializedTokenAccount( payer: PublicKey, amount: number, signers: Keypair[], + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) { const account = new Keypair(); instructions.push( @@ -65,7 +68,7 @@ export function createUninitializedTokenAccount( newAccountPubkey: account.publicKey, lamports: amount, space: AccountLayout.span, - programId: TOKEN_PROGRAM_ID, + programId: tokenProgram, }), ); @@ -81,6 +84,7 @@ export const withCreateSplTokenAccount = async ( mint: PublicKey, owner: PublicKey, payer: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID, ) => { const tokenAccountRentExempt = await connection.getMinimumBalanceForRentExemption( AccountLayout.span, @@ -93,6 +97,7 @@ export const withCreateSplTokenAccount = async ( mint, owner, signers, + tokenProgram ); return tokenAccountAddress; diff --git a/packages/lending/package.json b/packages/lending/package.json index edfe745..dd26b53 100644 --- a/packages/lending/package.json +++ b/packages/lending/package.json @@ -10,7 +10,7 @@ "@project-serum/serum": "^0.13.11", "@solana/spl-token": "0.1.3", "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", diff --git a/packages/metavinci/package.json b/packages/metavinci/package.json index efd3879..230e1ce 100644 --- a/packages/metavinci/package.json +++ b/packages/metavinci/package.json @@ -11,7 +11,7 @@ "@solana/spl-token": "0.1.3", "@solana/spl-token-registry": "^0.2.0", "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1.22.0", + "@solana/web3.js": "^1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", diff --git a/yarn.lock b/yarn.lock index 8806f97..31969e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1574,6 +1574,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.25.0": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.7.tgz#f4e7fe527cd710f8dc0618610b61b4b060c3c341" + integrity sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.12.13", "@babel/template@^7.4.0", "@babel/template@^7.8.6": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" @@ -2279,6 +2286,18 @@ dependencies: "@hapi/hoek" "^8.3.0" +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3671,6 +3690,18 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@noble/curves@^1.4.2": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff" + integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== + dependencies: + "@noble/hashes" "1.7.1" + +"@noble/hashes@1.7.1", "@noble/hashes@^1.4.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f" + integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== + "@nodelib/fs.scandir@2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" @@ -3697,6 +3728,24 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" +"@npmcli/agent@^2.0.0": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5" + integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== + dependencies: + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.3" + +"@npmcli/fs@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726" + integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg== + dependencies: + semver "^7.3.5" + "@octokit/auth-token@^2.4.0": version "2.4.5" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" @@ -3834,6 +3883,11 @@ enc-utils "^3.0.0" randombytes "^2.1.0" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@portis/web3-provider-engine@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@portis/web3-provider-engine/-/web3-provider-engine-1.1.2.tgz#97f383156ea6b70fba69ae93a945fdd94159b1ba" @@ -4073,6 +4127,16 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@solana/buffer-layout-utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/web3.js" "^1.32.0" + bigint-buffer "^1.1.5" + bignumber.js "^9.0.1" + "@solana/buffer-layout@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" @@ -4080,6 +4144,76 @@ dependencies: buffer "~6.0.3" +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/codecs-core@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz#1a2d76b9c7b9e7b7aeb3bd78be81c2ba21e3ce22" + integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== + dependencies: + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-data-structures@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz#d47b2363d99fb3d643f5677c97d64a812982b888" + integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-numbers@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz#f34978ddf7ea4016af3aaed5f7577c1d9869a614" + integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-strings@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz#e1d9167075b8c5b0b60849f8add69c0f24307018" + integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.1.tgz#146dc5db58bd3c28e04b4c805e6096c2d2a0a875" + integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/options" "2.0.0-rc.1" + +"@solana/errors@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.1.tgz#3882120886eab98a37a595b85f81558861b29d62" + integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@solana/options@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.1.tgz#06924ba316dc85791fc46726a51403144a85fc4d" + integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/spl-governance@0.3.17": version "0.3.17" resolved "https://registry.yarnpkg.com/@solana/spl-governance/-/spl-governance-0.3.17.tgz#ec6fc9c3e3c2eb5de0c00ebc8c4d46f6e5a899e9" @@ -4093,6 +4227,20 @@ bs58 "^4.0.1" superstruct "^0.15.2" +"@solana/spl-token-group@^0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz#83c00f0cd0bda33115468cd28b89d94f8ec1fee4" + integrity sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + +"@solana/spl-token-metadata@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz#d240947aed6e7318d637238022a7b0981b32ae80" + integrity sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + "@solana/spl-token-registry@^0.2.0": version "0.2.51" resolved "https://registry.yarnpkg.com/@solana/spl-token-registry/-/spl-token-registry-0.2.51.tgz#a263c146575f1dbab2d3e2e1f379068a8a63706f" @@ -4113,6 +4261,17 @@ json-to-pretty-yaml "^1.2.2" mkdirp "1.0.4" +"@solana/spl-token@*": + version "0.4.12" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.4.12.tgz#09361f9c8116f277b177dbcae7e3a273a19cd48a" + integrity sha512-K6CxzSoO1vC+WBys25zlSDaW0w4UFZO/IvEZquEI35A/PjqXNQHeVigmDCZYEJfESvYarKwsr8tYr/29lPtvaw== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/spl-token-group" "^0.0.7" + "@solana/spl-token-metadata" "^0.1.6" + buffer "^6.0.3" + "@solana/spl-token@0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.3.tgz#6bf7c1a74cd95dabe8b8164e4c13b987db5be3bd" @@ -4274,6 +4433,27 @@ tweetnacl "^1.0.0" ws "^7.0.0" +"@solana/web3.js@^1", "@solana/web3.js@^1.32.0": + version "1.98.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.0.tgz#21ecfe8198c10831df6f0cfde7f68370d0405917" + integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.2.2", "@solana/web3.js@^1.21.0": version "1.31.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" @@ -4417,6 +4597,13 @@ "@svgr/plugin-svgo" "^4.3.1" loader-utils "^1.2.3" +"@swc/helpers@^0.5.11": + version "0.5.15" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.15.tgz#79efab344c5819ecf83a43f3f9f811fc84b516d7" + integrity sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g== + dependencies: + tslib "^2.8.0" + "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -5327,11 +5514,30 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/w3c-web-hid@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/w3c-web-hid/-/w3c-web-hid-1.0.2.tgz#bdf2f813ffa7ccd1ca63aa218d680edddd839417" integrity sha512-tNLnl6+/AkmASEnviwdLLE6kaXlY28cDVyQ3e+WwnEAm5DHyO7c71a5TtYX6ofrnzzdQSnNsjNMoggsbrtOYfQ== +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@types/ws@^8.2.2": + version "8.5.14" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.14.tgz#93d44b268c9127d96026cf44353725dd9b6c3c21" + integrity sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "20.2.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" @@ -5911,6 +6117,11 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -6036,6 +6247,11 @@ agent-base@6: dependencies: debug "4" +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1" + integrity sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw== + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -6050,6 +6266,13 @@ agentkeepalive@^3.4.1: dependencies: humanize-ms "^1.2.1" +agentkeepalive@^4.5.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a" + integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== + dependencies: + humanize-ms "^1.2.1" + aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -6145,6 +6368,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -6169,6 +6397,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + antd@^4.6.6: version "4.15.0" resolved "https://registry.yarnpkg.com/antd/-/antd-4.15.0.tgz#4bfcd7eba7ae7812d95bcd391bf113a32e5a2143" @@ -7539,6 +7772,13 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" @@ -7559,7 +7799,7 @@ bind-decorator@^1.0.11: resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f" integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8= -bindings@^1.2.1, bindings@^1.5.0: +bindings@^1.2.1, bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -7613,6 +7853,11 @@ bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + body-parser@1.19.0, body-parser@^1.16.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -7666,6 +7911,15 @@ borsh@^0.4.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -7674,6 +7928,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" @@ -8040,6 +8301,24 @@ cacache@^13.0.1: ssri "^7.0.0" unique-filename "^1.1.1" +cacache@^18.0.0: + version "18.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.4.tgz#4601d7578dadb59c66044e157d02a3314682d6a5" + integrity sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ== + dependencies: + "@npmcli/fs" "^3.1.0" + fs-minipass "^3.0.0" + glob "^10.2.2" + lru-cache "^10.0.1" + minipass "^7.0.3" + minipass-collect "^2.0.1" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + p-map "^4.0.0" + ssri "^10.0.0" + tar "^6.1.11" + unique-filename "^3.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -8247,6 +8526,11 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.4.1.tgz#1b48bf0963ec158dce2aacf69c093ae2dd2092d8" + integrity sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -8363,6 +8647,11 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -8669,6 +8958,11 @@ commander@2, commander@^2.11.0, commander@^2.18.0, commander@^2.20.0, commander@ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" @@ -9810,6 +10104,13 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -9963,6 +10264,11 @@ delaunator@4: resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-4.0.1.tgz#3d779687f57919a7a418f8ab947d3bddb6846957" integrity sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag== +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -10391,6 +10697,11 @@ duplexify@^4.0.0, duplexify@^4.1.1: readable-stream "^3.1.1" stream-shift "^1.0.0" +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -10504,6 +10815,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -10527,7 +10843,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: +encoding@^0.1.11, encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -10587,6 +10903,11 @@ err-code@^1.0.0: resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + errno@^0.1.1, errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" @@ -11624,6 +11945,11 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^3.0.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -11743,6 +12069,11 @@ expect@^29.0.0, expect@^29.2.2: jest-message-util "^29.2.1" jest-util "^29.2.1" +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + express@^4.14.0, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -11905,6 +12236,11 @@ fast-safe-stringify@^2.0.8: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz#dc2af48c46cf712b683e849b2bbd446b32de936f" integrity sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag== +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + fast-text-encoding@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" @@ -12229,6 +12565,14 @@ foreach@^2.0.5: resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +foreground-child@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -12362,6 +12706,13 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-minipass@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" + integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== + dependencies: + minipass "^7.0.3" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -12667,6 +13018,18 @@ glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glo once "^1.3.0" path-is-absolute "^1.0.0" +glob@^10.2.2, glob@^10.3.10: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -12839,6 +13202,11 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +graceful-fs@^4.2.6: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -13197,6 +13565,11 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-cache-semantics@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -13261,6 +13634,14 @@ http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http-proxy-middleware@0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" @@ -13310,6 +13691,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== + dependencies: + agent-base "^7.1.2" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -13658,6 +14047,14 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -13944,6 +14341,11 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-negative-zero@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" @@ -14173,6 +14575,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -14185,6 +14592,11 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -14285,6 +14697,15 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + javascript-time-ago@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/javascript-time-ago/-/javascript-time-ago-2.3.4.tgz#811f203df7998283f4d55305677b40b6e7742779" @@ -14326,6 +14747,24 @@ jayson@^3.4.4: lodash "^4.17.20" uuid "^3.4.0" +jayson@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.3.tgz#db9be2e4287d9fef4fc05b5fe367abe792c2eee8" + integrity sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + jazzicon@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/jazzicon/-/jazzicon-1.5.0.tgz#d7f36b516023db39ee6eac117f4054e937b65e99" @@ -15577,6 +16016,11 @@ jsbi@^3.1.1: resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.4.tgz#9654dd02207a66a4911b4e4bb74265bc2cbc9dd0" integrity sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg== +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -16534,6 +16978,11 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@^10.0.1, lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -16590,6 +17039,24 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +make-fetch-happen@^13.0.0: + version "13.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== + dependencies: + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" + http-cache-semantics "^4.1.1" + is-lambda "^1.0.1" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + proc-log "^4.2.0" + promise-retry "^2.0.1" + ssri "^10.0.0" + make-fetch-happen@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" @@ -17002,6 +17469,13 @@ minimatch@3.0.4, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -17031,6 +17505,24 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== + dependencies: + minipass "^7.0.3" + +minipass-fetch@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c" + integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg== + dependencies: + minipass "^7.0.3" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + minipass-flush@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -17038,13 +17530,20 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-pipeline@^1.2.2: +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== dependencies: minipass "^3.0.0" +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -17060,6 +17559,16 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -17067,6 +17576,14 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" +minizlib@^2.1.1, minizlib@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -17106,7 +17623,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@1.0.4: +mkdirp@*, mkdirp@1.0.4, mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -17196,7 +17713,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -17339,6 +17856,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@^0.6.3: + version "0.6.4" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -17397,6 +17919,13 @@ node-fetch@2.6.1, node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.5.0, node- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@~1.7.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -17415,6 +17944,22 @@ node-gyp-build@^4.2.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== +node-gyp@^10.0.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.3.1.tgz#1dd1a1a1c6c5c59da1a76aea06a062786b2c8a1a" + integrity sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^10.3.10" + graceful-fs "^4.2.6" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^4.1.0" + semver "^7.3.5" + tar "^6.2.1" + which "^4.0.0" + node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -17505,6 +18050,13 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" +nopt@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== + dependencies: + abbrev "^2.0.0" + normalize-hex@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/normalize-hex/-/normalize-hex-0.0.2.tgz#5491c43759db2f06b7168d8419f4925c271ab27e" @@ -18124,6 +18676,11 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + pako@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" @@ -18326,6 +18883,14 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -19318,6 +19883,11 @@ private@^0.1.6, private@^0.1.8: resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== +proc-log@^4.1.0, proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -19346,6 +19916,14 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + promise-to-callback@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" @@ -20547,6 +21125,11 @@ regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + regenerator-transform@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" @@ -20986,6 +21569,22 @@ rpc-websockets@^7.4.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.4.tgz#9d8ee82533b5d1e13d9ded729e3e38d0d8fa083f" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -21463,6 +22062,11 @@ signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -21553,6 +22157,11 @@ smart-buffer@^4.1.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -21625,6 +22234,23 @@ socks-proxy-agent@^4.0.0: agent-base "~4.2.1" socks "~2.3.2" +socks-proxy-agent@^8.0.3: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + socks@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" @@ -21788,6 +22414,11 @@ split@^1.0.0: dependencies: through "2" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -21844,6 +22475,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssri@^10.0.0: + version "10.0.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== + dependencies: + minipass "^7.0.3" + ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" @@ -21994,6 +22632,15 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -22038,6 +22685,15 @@ string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.matchall@^4.0.2: version "4.0.4" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.4.tgz#608f255e93e072107f5de066f81a2dfb78cf6b29" @@ -22113,6 +22769,13 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@6.0.0, strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" @@ -22148,6 +22811,13 @@ strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -22275,6 +22945,11 @@ superstruct@^0.8.3: kind-of "^6.0.2" tiny-invariant "^1.0.6" +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-2.0.2.tgz#3f6d32fbdc11c357deff127d591a39b996300c54" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + supports-color@8.1.1, supports-color@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -22418,6 +23093,18 @@ tar@^4.0.2, tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: safe-buffer "^5.1.2" yallist "^3.0.3" +tar@^6.1.11, tar@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + teeny-request@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" @@ -22751,6 +23438,11 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + traverse-chain@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" @@ -22898,6 +23590,11 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== +tslib@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tsutils@^3.17.1: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -23129,6 +23826,13 @@ unique-filename@^1.1.1: dependencies: unique-slug "^2.0.0" +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== + dependencies: + unique-slug "^4.0.0" + unique-slug@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" @@ -23136,6 +23840,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== + dependencies: + imurmurhash "^0.1.4" + unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -23445,7 +24156,7 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0, uuid@^8.3.0: +uuid@^8.0.0, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -23953,6 +24664,11 @@ webgl-constants@^1.1.1: resolved "https://registry.yarnpkg.com/webgl-constants/-/webgl-constants-1.1.1.tgz#f9633ee87fea56647a60b9ce735cbdfb891c6855" integrity sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -24135,6 +24851,14 @@ whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" @@ -24210,6 +24934,13 @@ which@^1.2.9, which@^1.3.0, which@^1.3.1: dependencies: isexe "^2.0.0" +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== + dependencies: + isexe "^3.1.1" + wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -24405,6 +25136,15 @@ workerpool@6.1.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -24432,6 +25172,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -24562,6 +25311,16 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" From 651b024a6dc262e4ffa1729e86ae304eadb842bb Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Sat, 22 Feb 2025 18:14:00 +0400 Subject: [PATCH 02/14] add token2022 working example --- .../tests/governance/api.v3.t2022.test.ts | 235 ++++++++++++++++++ .../governance-sdk/tests/tools/builders.ts | 21 +- .../tools/withCreateAssociatedTokenAccount.ts | 7 +- 3 files changed, 256 insertions(+), 7 deletions(-) create mode 100644 packages/governance-sdk/tests/governance/api.v3.t2022.test.ts diff --git a/packages/governance-sdk/tests/governance/api.v3.t2022.test.ts b/packages/governance-sdk/tests/governance/api.v3.t2022.test.ts new file mode 100644 index 0000000..11e5732 --- /dev/null +++ b/packages/governance-sdk/tests/governance/api.v3.t2022.test.ts @@ -0,0 +1,235 @@ +import { Keypair } from '@solana/web3.js'; +import BN from 'bn.js'; +import { + GovernanceConfig, + GoverningTokenConfigAccountArgs, + GoverningTokenType, + VoteThreshold, + VoteThresholdType, + VoteTipping, +} from '../../src/governance/accounts'; +import { PROGRAM_VERSION_V3 } from '../../src/registry/constants'; +import { BenchBuilder } from '../tools/builders'; +import { getTimestampFromDays } from '../tools/units'; + +test('getGovernanceProgramVersionToken2022', async () => { + // Arrange + // Act + const builder = await BenchBuilder.withConnection(); + + // Assert + expect(builder.programVersion).toEqual(3); +}); + +test('createRealmWithTokenConfigsToken2022', async () => { + // Arrange + const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => + b.withWallet(), + ); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + const realm = await bench + .withRealm(communityTokenConfig, councilTokenConfig, true) + .then(b => b.sendTx()); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('createGovernanceWithConfigToken2022', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.sendTx()); + + const config = new GovernanceConfig({ + communityVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 20, + }), + minCommunityTokensToCreateProposal: new BN(1), + minInstructionHoldUpTime: 0, + baseVotingTime: getTimestampFromDays(3), + communityVoteTipping: VoteTipping.Strict, + councilVoteTipping: VoteTipping.Strict, + minCouncilTokensToCreateProposal: new BN(1), + councilVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 60, + }), + councilVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + communityVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + votingCoolOffTime: 5000, + depositExemptProposalCount: 10, + }); + + // Act + const governancePk = await realm.createGovernance(config); + + // Assert + const governance = await realm.getGovernance(governancePk); + + expect(governance.account.config.communityVoteThreshold).toEqual( + config.communityVoteThreshold, + ); + + expect(governance.account.config.councilVoteThreshold).toEqual( + config.councilVoteThreshold, + ); + + expect(governance.account.config.councilVetoVoteThreshold).toEqual( + config.councilVetoVoteThreshold, + ); + + expect(governance.account.config.baseVotingTime).toEqual( + getTimestampFromDays(3), + ); + + expect(governance.account.config.votingCoolOffTime).toEqual(5000); + + expect(governance.account.config.depositExemptProposalCount).toEqual(10); +}); + +test('setRealmConfigWithTokenConfigsToken2022', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.sendTx()); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('revokeGoverningTokenToken2022', async () => { + // Arrange + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: undefined, + maxVoterWeightAddin: undefined, + tokenType: GoverningTokenType.Membership, + }); + + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm(communityTokenConfig, undefined, true)) + .then(b => b.withCommunityMember(true)) + .then(b => b.sendTx()); + + // Act + await realm.revokeGoverningTokens(true); + + // Assert + const tokenOwnerRecord = await realm.getTokenOwnerRecord( + realm.communityOwnerRecordPk, + ); + + expect( + tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), + ).toEqual(0); +}); + +test('refundProposalDepositToken2022', async () => { + // Arrange + const realm = await BenchBuilder.withConnection() + .then(b => b.withWallet()) + .then(b => b.withRealm(undefined, undefined, true)) + .then(b => b.withCommunityMember(true)) + .then(b => b.withGovernance()) + .then(b => b.sendTx()) + .then(b => b.withProposal()) + .then(b => b.withProposalSignOff()) + .then(b => b.withCastVote()) + .then(b => b.sendTx()); + + // Act + await realm.refundProposalDeposit(); + + // Assert + const proposalDeposits = await realm.getProposalDeposits( + realm.bench.walletPk, + ); + + expect(proposalDeposits.length).toBe(0); +}); diff --git a/packages/governance-sdk/tests/tools/builders.ts b/packages/governance-sdk/tests/tools/builders.ts index f5bce70..89f6bd3 100644 --- a/packages/governance-sdk/tests/tools/builders.ts +++ b/packages/governance-sdk/tests/tools/builders.ts @@ -1,6 +1,7 @@ import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddress, + TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, } from '@solana/spl-token'; import { @@ -121,10 +122,12 @@ export class BenchBuilder { async withRealm( communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, + useToken2022?: boolean | undefined, ) { return new RealmBuilder(this).withRealm( communityTokenConfig, councilTokenConfig, + useToken2022 ); } } @@ -150,6 +153,7 @@ export class RealmBuilder { async withRealm( communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, + useToken2022?: boolean | undefined, ) { const name = `Realm-${new Keypair().publicKey.toBase58().slice(0, 6)}`; this.realmAuthorityPk = this.bench.walletPk; @@ -163,6 +167,7 @@ export class RealmBuilder { this.bench.walletPk, 0, this.bench.walletPk, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); // Create council @@ -174,6 +179,7 @@ export class RealmBuilder { this.bench.walletPk, 0, this.bench.walletPk, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); const communityMintMaxVoteWeightSource = @@ -192,6 +198,7 @@ export class RealmBuilder { new BN(1), communityTokenConfig, councilTokenConfig, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); return this; @@ -241,12 +248,13 @@ export class RealmBuilder { return getRealmConfig(this.bench.connection, realmConfigPk); } - async withCommunityMember() { + async withCommunityMember(useToken2022?: boolean | undefined) { let ataPk = await withCreateAssociatedTokenAccount( this.bench.instructions, this.communityMintPk, this.bench.walletPk, this.bench.walletPk, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); await withMintTo( this.bench.instructions, @@ -254,6 +262,7 @@ export class RealmBuilder { ataPk, this.bench.walletPk, 1, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); this.communityOwnerRecordPk = await withDepositGoverningTokens( @@ -267,17 +276,19 @@ export class RealmBuilder { this.bench.walletPk, this.bench.walletPk, new BN(1), + false, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); return this; } - async withdrawGoverningTokens() { + async withdrawGoverningTokens(useToken2022?: boolean | undefined) { const ataPk = await getAssociatedTokenAddress( this.communityMintPk, this.bench.walletPk, false, - TOKEN_PROGRAM_ID, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, ); @@ -289,12 +300,13 @@ export class RealmBuilder { ataPk, this.communityMintPk, this.bench.walletPk, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); await this.sendTx(); } - async revokeGoverningTokens() { + async revokeGoverningTokens(useToken2022?: boolean | undefined) { await withRevokeGoverningTokens( this.bench.instructions, this.bench.programId, @@ -305,6 +317,7 @@ export class RealmBuilder { this.communityMintPk, this.bench.walletPk, new BN(1), + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, ); await this.sendTx(); diff --git a/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts b/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts index 7582404..1458c51 100644 --- a/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts +++ b/packages/governance-sdk/tests/tools/withCreateAssociatedTokenAccount.ts @@ -10,13 +10,14 @@ export const withCreateAssociatedTokenAccount = async ( instructions: TransactionInstruction[], mintPk: PublicKey, ownerPk: PublicKey, - payerPk: PublicKey + payerPk: PublicKey, + tokenProgram: PublicKey = TOKEN_PROGRAM_ID ) => { const ataPk = await getAssociatedTokenAddress( mintPk, ownerPk, // owner false, - TOKEN_PROGRAM_ID, + tokenProgram, ASSOCIATED_TOKEN_PROGRAM_ID, ) @@ -26,7 +27,7 @@ export const withCreateAssociatedTokenAccount = async ( ataPk, ownerPk, mintPk, - TOKEN_PROGRAM_ID, + tokenProgram, ASSOCIATED_TOKEN_PROGRAM_ID, ) ) From 03be61bda92013abb0da72f439054bd1282ef77e Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Sun, 23 Feb 2025 10:40:48 +0400 Subject: [PATCH 03/14] pin solana/web3.js version --- packages/governance-sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/governance-sdk/package.json b/packages/governance-sdk/package.json index c872652..dfa64a8 100644 --- a/packages/governance-sdk/package.json +++ b/packages/governance-sdk/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/solana-labs/oyster/issues" }, "dependencies": { - "@solana/web3.js": "^1", + "@solana/web3.js": "=1.98.0", "bignumber.js": "^9.0.1", "bn.js": "^5.1.3", "borsh": "^0.3.1", From 4207a796927c0661cf033faf5149cc5bbeea5236 Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Sun, 23 Feb 2025 12:10:14 +0400 Subject: [PATCH 04/14] draft code (wip) --- packages/governance-sdk/package.json | 2 +- .../governance-sdk/src/governance/accounts.ts | 471 +++++++++++++++++- .../src/governance/serialisation.ts | 15 + .../governance-sdk/src/tools/invariant.ts | 48 ++ .../compileToWrappedMessageV0.ts | 54 ++ .../versionedTransaction/compiled-keys.ts | 179 +++++++ .../transactionMessage.ts | 232 +++++++++ yarn.lock | 52 +- 8 files changed, 1015 insertions(+), 38 deletions(-) create mode 100644 packages/governance-sdk/src/tools/invariant.ts create mode 100644 packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts create mode 100644 packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts create mode 100644 packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts diff --git a/packages/governance-sdk/package.json b/packages/governance-sdk/package.json index dfa64a8..7e77adb 100644 --- a/packages/governance-sdk/package.json +++ b/packages/governance-sdk/package.json @@ -40,7 +40,7 @@ "esbuild": "^0.14.11", "esbuild-jest": "^0.5.0", "jest": "^29.2.0", - "typescript": "^4.5.4", + "typescript": "^5.3.3", "@solana/spl-token": "*", "ts-jest": "29.0.3", "@types/jest": "29.2.0" diff --git a/packages/governance-sdk/src/governance/accounts.ts b/packages/governance-sdk/src/governance/accounts.ts index 88c3040..a12f728 100644 --- a/packages/governance-sdk/src/governance/accounts.ts +++ b/packages/governance-sdk/src/governance/accounts.ts @@ -36,6 +36,9 @@ export enum GovernanceAccountType { TokenGovernanceV2 = 21, SignatoryRecordV2 = 22, ProposalDeposit = 23, + RequiredSignatory = 24, + ProposalVersionedTransaction = 25, + ProposalTransactionBuffer = 26 } export interface GovernanceAccount { @@ -974,8 +977,8 @@ export class Proposal { const baseVotingTime = this.isPreVotingState() ? governance.config.baseVotingTime : (this.votingAt?.toNumber() ?? 0) + - governance.config.baseVotingTime - - unixTimestampInSeconds; + governance.config.baseVotingTime - + unixTimestampInSeconds; return baseVotingTime + governance.config.votingCoolOffTime; } @@ -1266,6 +1269,371 @@ export class ProposalTransaction { } } + +export class ProposalTransactionBuffer { + accountType: GovernanceAccountType; + proposal: PublicKey; + creator: PublicKey; + bufferIndex: number; + finalBufferHash: Uint8Array; + finalBufferSize: number; + buffer: Uint8Array; + + constructor(args: { + accountType: GovernanceAccountType; + proposal: PublicKey; + creator: PublicKey; + bufferIndex: number; + finalBufferHash: Uint8Array; + finalBufferSize: number; + buffer: Uint8Array; + }) { + // Validate buffer hash length + if (args.finalBufferHash.length !== 32) { + throw new Error('Final buffer hash must be 32 bytes'); + } + + this.accountType = args.accountType; + this.proposal = args.proposal; + this.creator = args.creator; + this.bufferIndex = args.bufferIndex; + this.finalBufferHash = args.finalBufferHash; + this.finalBufferSize = args.finalBufferSize; + this.buffer = args.buffer; + } + + validateBuffer(): boolean { + return this.buffer.length === this.finalBufferSize; + } + + // Method to serialize the buffer for on-chain storage + serialize(): Uint8Array { + // Implementation would depend on your specific serialization needs + // This is a basic example + const serialized = new Uint8Array(this.buffer.length + 40); // 40 bytes for metadata + let offset = 0; + + // Write metadata + serialized.set([this.accountType], offset); + offset += 1; + + serialized.set(this.proposal.toBytes(), offset); + offset += 32; + + serialized.set([this.bufferIndex], offset); + offset += 1; + + serialized.set(new Uint8Array(new Uint16Array([this.finalBufferSize]).buffer), offset); + offset += 2; + + // Write buffer content + serialized.set(this.buffer, offset); + + return serialized; + } +} + +// Enum for transaction execution status +export enum TransactionExecutionStatus { + None = 'None', + Success = 'Success', + Error = 'Error' +} + +// Interface for address table lookups +export interface VersionedTransactionMessageAddressTableLookup { + accountKey: PublicKey; + writableIndexes: number[]; + readonlyIndexes: number[]; +} +export class ProposalCompiledInstruction { + programIdIndex: number; + accountIndexes: number[]; + data: Uint8Array; + + constructor(args: { + programIdIndex: number; + accountIndexes: number[]; + data: Uint8Array; + }) { + if (args.programIdIndex > 255) { + throw new Error('Program ID index must be a u8 (0-255)'); + } + + args.accountIndexes.forEach(index => { + if (index > 255) { + throw new Error('Account indexes must be u8 (0-255)'); + } + }); + this.programIdIndex = args.programIdIndex; + this.accountIndexes = args.accountIndexes; + this.data = args.data; + } + + getProgramIdIndex(): number { + return this.programIdIndex; + } + + getAccountIndexes(): number[] { + return this.accountIndexes; + } + + getData(): Uint8Array { + return this.data; + } + + serialize(): Uint8Array { + // Layout: + // 1 byte - programIdIndex (u8) + // 4 bytes - accountIndexes length (u32) + // N bytes - accountIndexes array + // 4 bytes - data length (u32) + // M bytes - data array + const buffer = new Uint8Array(1 + 4 + this.accountIndexes.length + 4 + this.data.length); + let offset = 0; + + // Write programIdIndex + buffer[offset] = this.programIdIndex; + offset += 1; + + // Write accountIndexes length (u32) + buffer[offset++] = this.accountIndexes.length & 0xff; + buffer[offset++] = (this.accountIndexes.length >> 8) & 0xff; + buffer[offset++] = (this.accountIndexes.length >> 16) & 0xff; + buffer[offset++] = (this.accountIndexes.length >> 24) & 0xff; + + // Write accountIndexes + buffer.set(this.accountIndexes, offset); + offset += this.accountIndexes.length; + + // Write data length (u32) + buffer[offset++] = this.data.length & 0xff; + buffer[offset++] = (this.data.length >> 8) & 0xff; + buffer[offset++] = (this.data.length >> 16) & 0xff; + buffer[offset++] = (this.data.length >> 24) & 0xff; + + // Write data + buffer.set(this.data, offset); + + return buffer; + } +} + +// Class for transaction message +export class ProposalTransactionMessage { + numSigners: number; + numWritableSigners: number; + numWritableNonSigners: number; + accountKeys: PublicKey[]; + instructions: ProposalCompiledInstruction[]; + addressTableLookups: VersionedTransactionMessageAddressTableLookup[]; + + constructor(args: { + numSigners: number, + numWritableSigners: number, + numWritableNonSigners: number, + accountKeys: PublicKey[], + instructions: ProposalCompiledInstruction[], + addressTableLookups: VersionedTransactionMessageAddressTableLookup[] + }) { + if (args.numSigners > 255) throw new Error('Number of signers must be a u8 (0-255)'); + if (args.numWritableSigners > 255) throw new Error('Number of writable signers must be a u8 (0-255)'); + if (args.numWritableNonSigners > 255) throw new Error('Number of writable non-signers must be a u8 (0-255)'); + + this.numSigners = args.numSigners; + this.numWritableSigners = args.numWritableSigners; + this.numWritableNonSigners = args.numWritableNonSigners; + this.accountKeys = args.accountKeys; + this.instructions = args.instructions; + this.addressTableLookups = args.addressTableLookups; + } + getNumSigners(): number { return this.numSigners; } + getNumWritableSigners(): number { return this.numWritableSigners; } + getNumWritableNonSigners(): number { return this.numWritableNonSigners; } + getAccountKeys(): PublicKey[] { return this.accountKeys; } + getInstructions(): ProposalCompiledInstruction[] { return this.instructions; } + getAddressTableLookups(): VersionedTransactionMessageAddressTableLookup[] { return this.addressTableLookups; } + + serialize(): Uint8Array { + // Calculate total size needed + const accountKeysSize = this.accountKeys.length * 32; // Each PublicKey is 32 bytes + const instructionsSize = this.instructions.reduce( + (sum, instruction) => sum + instruction.serialize().length, + 0 + ); + const addressTableLookupsSize = this.addressTableLookups.reduce( + (sum, lookup) => sum + 32 + 4 + lookup.writableIndexes.length + 4 + lookup.readonlyIndexes.length, + 0 + ); + + // 3 bytes for the header numbers (numSigners, numWritableSigners, numWritableNonSigners) + // 4 bytes for number of account keys + // 4 bytes for number of instructions + // 4 bytes for number of address table lookups + const headerSize = 3 + 4 + 4 + 4; + const totalSize = headerSize + accountKeysSize + instructionsSize + addressTableLookupsSize; + + const buffer = new Uint8Array(totalSize); + let offset = 0; + + // Write header + buffer[offset++] = this.numSigners; + buffer[offset++] = this.numWritableSigners; + buffer[offset++] = this.numWritableNonSigners; + + // Write account keys length (u32) + buffer[offset++] = this.accountKeys.length & 0xff; + buffer[offset++] = (this.accountKeys.length >> 8) & 0xff; + buffer[offset++] = (this.accountKeys.length >> 16) & 0xff; + buffer[offset++] = (this.accountKeys.length >> 24) & 0xff; + + // Write account keys + for (const key of this.accountKeys) { + buffer.set(key.toBytes(), offset); + offset += 32; + } + + // Write instructions length (u32) + buffer[offset++] = this.instructions.length & 0xff; + buffer[offset++] = (this.instructions.length >> 8) & 0xff; + buffer[offset++] = (this.instructions.length >> 16) & 0xff; + buffer[offset++] = (this.instructions.length >> 24) & 0xff; + + // Write instructions + for (const instruction of this.instructions) { + const serializedInstruction = instruction.serialize(); + buffer.set(serializedInstruction, offset); + offset += serializedInstruction.length; + } + + // Write address table lookups length (u32) + buffer[offset++] = this.addressTableLookups.length & 0xff; + buffer[offset++] = this.addressTableLookups.length >> 8 & 0xff; + buffer[offset++] = this.addressTableLookups.length >> 16 & 0xff; + buffer[offset++] = this.addressTableLookups.length >> 24 & 0xff; + + // Write address table lookups + for (const lookup of this.addressTableLookups) { + // Write account key + buffer.set(lookup.accountKey.toBytes(), offset); + offset += 32; + + // Write writable indexes + buffer[offset++] = lookup.writableIndexes.length & 0xff; + buffer[offset++] = (lookup.writableIndexes.length >> 8) & 0xff; + buffer[offset++] = (lookup.writableIndexes.length >> 16) & 0xff; + buffer[offset++] = (lookup.writableIndexes.length >> 24) & 0xff; + buffer.set(new Uint8Array(lookup.writableIndexes), offset); + offset += lookup.writableIndexes.length; + + // Write readonly indexes + buffer[offset++] = lookup.readonlyIndexes.length & 0xff; + buffer[offset++] = (lookup.readonlyIndexes.length >> 8) & 0xff; + buffer[offset++] = (lookup.readonlyIndexes.length >> 16) & 0xff; + buffer[offset++] = (lookup.readonlyIndexes.length >> 24) & 0xff; + buffer.set(new Uint8Array(lookup.readonlyIndexes), offset); + offset += lookup.readonlyIndexes.length; + } + + return buffer; + } +} + +// Main class for versioned transaction +export class ProposalVersionedTransaction { + accountType: GovernanceAccountType; + proposal: PublicKey; + optionIndex: number; + transactionIndex: number; + executionIndex: number; + executedAt: number | null; + executionStatus: TransactionExecutionStatus; + ephemeralSignerBumps: number[]; + message: ProposalTransactionMessage; + + constructor(args: { + accountType: GovernanceAccountType, + proposal: PublicKey, + optionIndex: number, + transactionIndex: number, + executionIndex: number, + executedAt: number | null, + executionStatus: TransactionExecutionStatus, + ephemeralSignerBumps: number[], + message: ProposalTransactionMessage + }) { + if (args.optionIndex > 255) throw new Error('Option index must be a u8 (0-255)'); + if (args.transactionIndex > 65535) throw new Error('Transaction index must be a u16 (0-65535)'); + if (args.executionIndex > 255) throw new Error('Execution index must be a u8 (0-255)'); + + args.ephemeralSignerBumps.forEach(bump => { + if (bump > 255) throw new Error('Ephemeral signer bumps must be u8 (0-255)'); + }); + this.accountType = args.accountType; + this.proposal = args.proposal; + this.optionIndex = args.optionIndex; + this.transactionIndex = args.transactionIndex; + this.executionIndex = args.executionIndex; + this.executedAt = args.executedAt; + this.executionStatus = args.executionStatus; + this.ephemeralSignerBumps = args.ephemeralSignerBumps; + this.message = args.message; + } + + getAccountType(): GovernanceAccountType { return this.accountType; } + getProposal(): PublicKey { return this.proposal; } + getOptionIndex(): number { return this.optionIndex; } + getTransactionIndex(): number { return this.transactionIndex; } + getExecutionIndex(): number { return this.executionIndex; } + getExecutedAt(): number | null { return this.executedAt; } + getExecutionStatus(): TransactionExecutionStatus { return this.executionStatus; } + getEphemeralSignerBumps(): number[] { return this.ephemeralSignerBumps; } + getMessage(): ProposalTransactionMessage { return this.message; } + + isExecuted(): boolean { + return this.executionStatus === TransactionExecutionStatus.Success; + } + + hasError(): boolean { + return this.executionStatus === TransactionExecutionStatus.Error; + } + + getAllSigners(): PublicKey[] { + return this.message.getAccountKeys().slice(0, this.message.getNumSigners()); + } + + getWritableAccounts(): PublicKey[] { + const writableCount = this.message.getNumWritableSigners() + + this.message.getNumWritableNonSigners(); + return this.message.getAccountKeys().slice(0, writableCount); + } + + // Serialize the transaction + serialize(): Uint8Array { + const accountKeysLength = this.message.getAccountKeys().length * 32; // 32 bytes per pubkey + const instructionsLength = this.message.getInstructions().reduce( + (acc, inst) => acc + inst.serialize().length, 0 + ); + + const buffer = new Uint8Array( + 1 + // account type + 32 + // proposal pubkey + 1 + // option index + 2 + // transaction index + 1 + // execution index + 8 + // executed at + 1 + // execution status + 1 + this.ephemeralSignerBumps.length + // bumps + 3 + // message header (num_signers, num_writable_signers, num_writable_non_signers) + accountKeysLength + + instructionsLength + ); + + // Actual serialization implementation would go here + return buffer; + } +} + export async function getProposalTransactionAddress( programId: PublicKey, programVersion: number, @@ -1282,16 +1650,16 @@ export async function getProposalTransactionAddress( const seeds = programVersion === PROGRAM_VERSION_V1 ? [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - instructionIndexBuffer, - ] + Buffer.from(GOVERNANCE_PROGRAM_SEED), + proposal.toBuffer(), + instructionIndexBuffer, + ] : [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - optionIndexBuffer, - instructionIndexBuffer, - ]; + Buffer.from(GOVERNANCE_PROGRAM_SEED), + proposal.toBuffer(), + optionIndexBuffer, + instructionIndexBuffer, + ]; const [instructionAddress] = await PublicKey.findProgramAddress( seeds, @@ -1376,3 +1744,84 @@ export async function getProposalDepositAddress( return proposalDepositAddress; } + + +export function getEphemeralSignerPda({ + transactionProposalPda, + transactionIndex, + ephemeralSignerIndex, + programId, +}: { + transactionProposalPda: PublicKey; + transactionIndex: number; + ephemeralSignerIndex: number; + programId: PublicKey; +}): [PublicKey, number] { + let transactionIndexBuffer = Buffer.alloc(2); + transactionIndexBuffer.writeInt16LE(transactionIndex, 0); + + let ephemeralSignerIndexBuffer = Buffer.alloc(1); + ephemeralSignerIndexBuffer.writeUInt8(ephemeralSignerIndex); + + return PublicKey.findProgramAddressSync( + [ + Buffer.from("version_transaction"), + transactionProposalPda.toBytes(), + Buffer.from("ephemeral_signer"), + transactionIndexBuffer, + ephemeralSignerIndexBuffer, + ], + programId + ); +} + +export async function getProposalVersionedTransactionAddress( + programId: PublicKey, + proposal: PublicKey, + optionIndex: number, + transactionIndex: number, +) { + let optionIndexBuffer = Buffer.alloc(1); + optionIndexBuffer.writeUInt8(optionIndex); + + let transactionIndexBuffer = Buffer.alloc(2); + transactionIndexBuffer.writeInt16LE(transactionIndex, 0); + + const seeds = [ + Buffer.from("version_transaction"), + proposal.toBuffer(), + optionIndexBuffer, + transactionIndexBuffer, + ]; + + const [instructionAddress] = await PublicKey.findProgramAddress( + seeds, + programId, + ); + + return instructionAddress; +} + +export async function getProposalTransactionBufferAddress( + programId: PublicKey, + proposal: PublicKey, + creator: PublicKey, + bufferIndex: number, +) { + let bufferIndexBuffer = Buffer.alloc(1); + bufferIndexBuffer.writeUInt8(bufferIndex, 0); + + const seeds = [ + Buffer.from("transaction_buffer"), + proposal.toBuffer(), + creator.toBuffer(), + bufferIndexBuffer, + ]; + + const [instructionAddress] = await PublicKey.findProgramAddress( + seeds, + programId, + ); + + return instructionAddress; +} \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/serialisation.ts b/packages/governance-sdk/src/governance/serialisation.ts index f326224..106a645 100644 --- a/packages/governance-sdk/src/governance/serialisation.ts +++ b/packages/governance-sdk/src/governance/serialisation.ts @@ -952,6 +952,21 @@ function createGovernanceAccountSchema(accountVersion: number) { ], }, ], + [ + ProposalTransactionBuffer, + { + kind: 'struct', + fields: [ + ['accountType', 'u8'], + ['communityMint', 'pubkey'], + ['config', RealmConfig], + ['reserved', [6]], + ['votingProposalCount', 'u16'], + ['authority', { kind: 'option', type: 'pubkey' }], + ['name', 'string'], + ], + }, + ], ...createGovernanceStructSchema(undefined, accountVersion), ]); } diff --git a/packages/governance-sdk/src/tools/invariant.ts b/packages/governance-sdk/src/tools/invariant.ts new file mode 100644 index 0000000..fdee313 --- /dev/null +++ b/packages/governance-sdk/src/tools/invariant.ts @@ -0,0 +1,48 @@ +const isProduction: boolean = process.env.NODE_ENV === 'production'; +const prefix: string = 'Invariant failed'; + +/** + * `invariant` is used to [assert](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions) that the `condition` is [truthy](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy). + * + * 💥 `invariant` will `throw` an `Error` if the `condition` is [falsey](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy) + * + * 🤏 `message`s are not displayed in production environments to help keep bundles small + * + * @example + * + * ```ts + * const value: Person | null = { name: 'Alex' }; + * invariant(value, 'Expected value to be a person'); + * // type of `value`` has been narrowed to `Person` + * ``` + */ +export default function invariant( + condition: any, + // Not providing an inline default argument for message as the result is smaller + /** + * Can provide a string, or a function that returns a string for cases where + * the message takes a fair amount of effort to compute + */ + message?: string | (() => string), +): asserts condition { + if (condition) { + return; + } + // Condition not passed + + // In production we strip the message but still throw + if (isProduction) { + throw new Error(prefix); + } + + // When not in production we allow the message to pass through + // *This block will be removed in production builds* + + const provided: string | undefined = typeof message === 'function' ? message() : message; + + // Options: + // 1. message provided: `${prefix}: ${provided}` + // 2. message not provided: prefix + const value: string = provided ? `${prefix}: ${provided}` : prefix; + throw new Error(value); +} \ No newline at end of file diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts b/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts new file mode 100644 index 0000000..47f06ca --- /dev/null +++ b/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts @@ -0,0 +1,54 @@ +import { + AccountKeysFromLookups, + AddressLookupTableAccount, + MessageAccountKeys, + MessageAddressTableLookup, + MessageV0, + PublicKey, + TransactionInstruction, +} from "@solana/web3.js"; +import { CompiledKeys } from "./compiled-keys"; + +export function compileToWrappedMessageV0({ + payerKey, + recentBlockhash, + instructions, + addressLookupTableAccounts, +}: { + payerKey: PublicKey; + recentBlockhash: string; + instructions: TransactionInstruction[]; + addressLookupTableAccounts?: AddressLookupTableAccount[]; +}) { + const compiledKeys = CompiledKeys.compile(instructions, payerKey); + + const addressTableLookups = new Array(); + const accountKeysFromLookups: AccountKeysFromLookups = { + writable: [], + readonly: [], + }; + const lookupTableAccounts = addressLookupTableAccounts || []; + for (const lookupTable of lookupTableAccounts) { + const extractResult = compiledKeys.extractTableLookup(lookupTable); + if (extractResult !== undefined) { + const [addressTableLookup, { writable, readonly }] = extractResult; + addressTableLookups.push(addressTableLookup); + accountKeysFromLookups.writable.push(...writable); + accountKeysFromLookups.readonly.push(...readonly); + } + } + + const [header, staticAccountKeys] = compiledKeys.getMessageComponents(); + const accountKeys = new MessageAccountKeys( + staticAccountKeys, + accountKeysFromLookups + ); + const compiledInstructions = accountKeys.compileInstructions(instructions); + return new MessageV0({ + header, + staticAccountKeys, + recentBlockhash, + compiledInstructions, + addressTableLookups, + }); +} diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts b/packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts new file mode 100644 index 0000000..6e96a35 --- /dev/null +++ b/packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts @@ -0,0 +1,179 @@ +import assert from "assert"; +import { + MessageHeader, + MessageAddressTableLookup, + AccountKeysFromLookups, + AddressLookupTableAccount, + TransactionInstruction, + PublicKey, +} from "@solana/web3.js"; + +export type CompiledKeyMeta = { + isSigner: boolean; + isWritable: boolean; + isInvoked: boolean; +}; + +type KeyMetaMap = Map; + +/** + * This is almost completely copy-pasted from solana-web3.js and slightly adapted to work with "wrapped" transaction messaged such as in VaultTransaction. + * @see https://github.com/solana-labs/solana-web3.js/blob/87d33ac68e2453b8a01cf8c425aa7623888434e8/packages/library-legacy/src/message/compiled-keys.ts + */ +export class CompiledKeys { + payer: PublicKey; + keyMetaMap: KeyMetaMap; + + constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) { + this.payer = payer; + this.keyMetaMap = keyMetaMap; + } + + /** + * The only difference between this and the original is that we don't mark the instruction programIds as invoked. + * It makes sense to do because the instructions will be called via CPI, so the programIds can come from Address Lookup Tables. + * This allows to compress the message size and avoid hitting the tx size limit during vault_transaction_create instruction calls. + */ + static compile( + instructions: Array, + payer: PublicKey + ): CompiledKeys { + const keyMetaMap: KeyMetaMap = new Map(); + const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => { + const address = pubkey.toBase58(); + let keyMeta = keyMetaMap.get(address); + if (keyMeta === undefined) { + keyMeta = { + isSigner: false, + isWritable: false, + isInvoked: false, + }; + keyMetaMap.set(address, keyMeta); + } + return keyMeta; + }; + + const payerKeyMeta = getOrInsertDefault(payer); + payerKeyMeta.isSigner = true; + payerKeyMeta.isWritable = true; + + for (const ix of instructions) { + // This is the only difference from the original. + // getOrInsertDefault(ix.programId).isInvoked = true; + getOrInsertDefault(ix.programId).isInvoked = false; + for (const accountMeta of ix.keys) { + const keyMeta = getOrInsertDefault(accountMeta.pubkey); + keyMeta.isSigner ||= accountMeta.isSigner; + keyMeta.isWritable ||= accountMeta.isWritable; + } + } + + return new CompiledKeys(payer, keyMetaMap); + } + + getMessageComponents(): [MessageHeader, Array] { + const mapEntries = [...this.keyMetaMap.entries()]; + assert(mapEntries.length <= 256, "Max static account keys length exceeded"); + + const writableSigners = mapEntries.filter( + ([, meta]) => meta.isSigner && meta.isWritable + ); + const readonlySigners = mapEntries.filter( + ([, meta]) => meta.isSigner && !meta.isWritable + ); + const writableNonSigners = mapEntries.filter( + ([, meta]) => !meta.isSigner && meta.isWritable + ); + const readonlyNonSigners = mapEntries.filter( + ([, meta]) => !meta.isSigner && !meta.isWritable + ); + + const header: MessageHeader = { + numRequiredSignatures: writableSigners.length + readonlySigners.length, + numReadonlySignedAccounts: readonlySigners.length, + numReadonlyUnsignedAccounts: readonlyNonSigners.length, + }; + + // sanity checks + { + assert( + writableSigners.length > 0, + "Expected at least one writable signer key" + ); + const [payerAddress] = writableSigners[0]; + assert( + payerAddress === this.payer.toBase58(), + "Expected first writable signer key to be the fee payer" + ); + } + + const staticAccountKeys = [ + ...writableSigners.map(([address]) => new PublicKey(address)), + ...readonlySigners.map(([address]) => new PublicKey(address)), + ...writableNonSigners.map(([address]) => new PublicKey(address)), + ...readonlyNonSigners.map(([address]) => new PublicKey(address)), + ]; + + return [header, staticAccountKeys]; + } + + extractTableLookup( + lookupTable: AddressLookupTableAccount + ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined { + const [writableIndexes, drainedWritableKeys] = + this.drainKeysFoundInLookupTable( + lookupTable.state.addresses, + (keyMeta) => + !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable + ); + const [readonlyIndexes, drainedReadonlyKeys] = + this.drainKeysFoundInLookupTable( + lookupTable.state.addresses, + (keyMeta) => + !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable + ); + + // Don't extract lookup if no keys were found + if (writableIndexes.length === 0 && readonlyIndexes.length === 0) { + return; + } + + return [ + { + accountKey: lookupTable.key, + writableIndexes, + readonlyIndexes, + }, + { + writable: drainedWritableKeys, + readonly: drainedReadonlyKeys, + }, + ]; + } + + /** @internal */ + private drainKeysFoundInLookupTable( + lookupTableEntries: Array, + keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean + ): [Array, Array] { + const lookupTableIndexes = new Array(); + const drainedKeys = new Array(); + + for (const [address, keyMeta] of this.keyMetaMap.entries()) { + if (keyMetaFilter(keyMeta)) { + const key = new PublicKey(address); + const lookupTableIndex = lookupTableEntries.findIndex((entry) => + entry.equals(key) + ); + if (lookupTableIndex >= 0) { + assert(lookupTableIndex < 256, "Max lookup table index exceeded"); + lookupTableIndexes.push(lookupTableIndex); + drainedKeys.push(key); + this.keyMetaMap.delete(address); + } + } + } + + return [lookupTableIndexes, drainedKeys]; + } +} diff --git a/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts b/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts new file mode 100644 index 0000000..55adc53 --- /dev/null +++ b/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts @@ -0,0 +1,232 @@ +import { + AccountMeta, + AddressLookupTableAccount, + Connection, + PublicKey, + TransactionMessage, +} from "@solana/web3.js"; +import invariant from "../invariant"; +import { compileToWrappedMessageV0 } from "./compileToWrappedMessageV0"; +import { getEphemeralSignerPda, ProposalCompiledInstruction, ProposalTransactionMessage } from "../../governance"; + +export function isStaticWritableIndex( + message: ProposalTransactionMessage, + index: number +) { + const numAccountKeys = message.accountKeys.length; + const { numSigners, numWritableSigners, numWritableNonSigners } = message; + + if (index >= numAccountKeys) { + // `index` is not a part of static `accountKeys`. + return false; + } + + if (index < numWritableSigners) { + // `index` is within the range of writable signer keys. + return true; + } + + if (index >= numSigners) { + // `index` is within the range of non-signer keys. + const indexIntoNonSigners = index - numSigners; + // Whether `index` is within the range of writable non-signer keys. + return indexIntoNonSigners < numWritableNonSigners; + } + + return false; +} + +export function isSignerIndex(message: ProposalTransactionMessage, index: number) { + return index < message.numSigners; +} + +/** We use custom serialization for `transaction_message` that ensures as small byte size as possible. */ +export function transactionMessageToMultisigTransactionMessageBytes({ + message, + addressLookupTableAccounts, + governancePda, + treasuryPda, +}: { + message: TransactionMessage; + addressLookupTableAccounts?: AddressLookupTableAccount[]; + governancePda: PublicKey; + treasuryPda: PublicKey; +}): Uint8Array { + // Make sure authority is marked as non-signer in all instructions, + // otherwise the message will be serialized in incorrect format. + message.instructions.forEach((instruction) => { + instruction.keys.forEach((key) => { + if (key.pubkey.equals(governancePda)) { + key.isSigner = false; + } + if (key.pubkey.equals(treasuryPda)) { + key.isSigner = false; + } + }); + }); + + // Use custom implementation of `message.compileToV0Message` that allows instruction programIds + // to also be loaded from `addressLookupTableAccounts`. + const compiledMessage = compileToWrappedMessageV0({ + payerKey: message.payerKey, + recentBlockhash: message.recentBlockhash, + instructions: message.instructions, + addressLookupTableAccounts, + }); + + // Convert compiled instructions to ProposalCompiledInstruction format + const proposalInstructions = compiledMessage.compiledInstructions.map((ix) => { + return new ProposalCompiledInstruction({ + programIdIndex: ix.programIdIndex, + accountIndexes: ix.accountKeyIndexes, + data: ix.data, + }); + }); + + // Convert address table lookups + const proposalAddressTableLookups = compiledMessage.addressTableLookups.map((lookup) => ({ + accountKey: lookup.accountKey, + writableIndexes: lookup.writableIndexes, + readonlyIndexes: lookup.readonlyIndexes, + })); + + // Create and serialize ProposalTransactionMessage + const proposalMessage = new ProposalTransactionMessage({ + numSigners: compiledMessage.header.numRequiredSignatures, + numWritableSigners: + compiledMessage.header.numRequiredSignatures - + compiledMessage.header.numReadonlySignedAccounts, + numWritableNonSigners: + compiledMessage.staticAccountKeys.length - + compiledMessage.header.numRequiredSignatures - + compiledMessage.header.numReadonlyUnsignedAccounts, + accountKeys: compiledMessage.staticAccountKeys, + instructions: proposalInstructions, + addressTableLookups: proposalAddressTableLookups, + }); + + return proposalMessage.serialize(); +} + +/** Populate remaining accounts required for execution of the transaction. */ +export async function accountsForTransactionExecute({ + connection, + transactionProposalPda, + transactionIndex, + governancePda, + treasuryPda, + message, + ephemeralSignerBumps, + programId, +}: { + connection: Connection; + message: ProposalTransactionMessage; + ephemeralSignerBumps: number[]; + transactionIndex: number; + governancePda: PublicKey; + treasuryPda: PublicKey; + transactionProposalPda: PublicKey; + programId: PublicKey; +}): Promise<{ + /** Account metas used in the `message`. */ + accountMetas: AccountMeta[]; + /** Address lookup table accounts used in the `message`. */ + lookupTableAccounts: AddressLookupTableAccount[]; +}> { + const ephemeralSignerPdas = ephemeralSignerBumps.map( + (_, additionalSignerIndex) => { + return getEphemeralSignerPda({ + transactionProposalPda, + transactionIndex, + ephemeralSignerIndex: additionalSignerIndex, + programId, + })[0]; + } + ); + + const addressLookupTableKeys = message.addressTableLookups.map( + ({ accountKey }) => accountKey + ); + const addressLookupTableAccounts = new Map( + await Promise.all( + addressLookupTableKeys.map(async (key) => { + const { value } = await connection.getAddressLookupTable(key); + if (!value) { + throw new Error( + `Address lookup table account ${key.toBase58()} not found` + ); + } + return [key.toBase58(), value] as const; + }) + ) + ); + + // Populate account metas required for execution of the transaction. + const accountMetas: AccountMeta[] = []; + // First add the lookup table accounts used by the transaction. They are needed for on-chain validation. + accountMetas.push( + ...addressLookupTableKeys.map((key) => { + return { pubkey: key, isSigner: false, isWritable: false }; + }) + ); + // Then add static account keys included into the message. + for (const [accountIndex, accountKey] of message.accountKeys.entries()) { + accountMetas.push({ + pubkey: accountKey, + isWritable: isStaticWritableIndex(message, accountIndex), + // NOTE: governancePda and treasuryPda and ephemeralSignerPdas cannot be marked as signers, + // because they are PDAs and hence won't have their signatures on the transaction. + isSigner: + isSignerIndex(message, accountIndex) && + !accountKey.equals(treasuryPda) && + !accountKey.equals(governancePda) && + !ephemeralSignerPdas.find((k) => accountKey.equals(k)), + }); + } + // Then add accounts that will be loaded with address lookup tables. + for (const lookup of message.addressTableLookups) { + const lookupTableAccount = addressLookupTableAccounts.get( + lookup.accountKey.toBase58() + ); + invariant( + lookupTableAccount, + `Address lookup table account ${lookup.accountKey.toBase58()} not found` + ); + + for (const accountIndex of lookup.writableIndexes) { + if (!lookupTableAccount) continue; + const pubkey: PublicKey = + lookupTableAccount.state.addresses[accountIndex]; + invariant( + pubkey, + `Address lookup table account ${lookup.accountKey.toBase58()} does not contain address at index ${accountIndex}` + ); + accountMetas.push({ + pubkey, + isWritable: true, + // Accounts in address lookup tables can not be signers. + isSigner: false, + }); + } + for (const accountIndex of lookup.readonlyIndexes) { + if (!lookupTableAccount) continue; + const pubkey: PublicKey = + lookupTableAccount.state.addresses[accountIndex]; + invariant( + pubkey, + `Address lookup table account ${lookup.accountKey.toBase58()} does not contain address at index ${accountIndex}` + ); + accountMetas.push({ + pubkey, + isWritable: false, + // Accounts in address lookup tables can not be signers. + isSigner: false, + }); + } + } + + return { + accountMetas, + lookupTableAccounts: [...addressLookupTableAccounts.values()], + }; +} diff --git a/yarn.lock b/yarn.lock index 31969e8..37a6ac2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4410,6 +4410,27 @@ "@solana/wallet-adapter-solong" "^0.6.1" "@solana/wallet-adapter-torus" "^0.7.1" +"@solana/web3.js@=1.98.0", "@solana/web3.js@^1", "@solana/web3.js@^1.32.0": + version "1.98.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.0.tgz#21ecfe8198c10831df6f0cfde7f68370d0405917" + integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + "@solana/web3.js@^0.90.0": version "0.90.5" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-0.90.5.tgz#5be7d78a19f0b5e01bf82c52e3cbf0bb72a38cfd" @@ -4433,27 +4454,6 @@ tweetnacl "^1.0.0" ws "^7.0.0" -"@solana/web3.js@^1", "@solana/web3.js@^1.32.0": - version "1.98.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.0.tgz#21ecfe8198c10831df6f0cfde7f68370d0405917" - integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== - dependencies: - "@babel/runtime" "^7.25.0" - "@noble/curves" "^1.4.2" - "@noble/hashes" "^1.4.0" - "@solana/buffer-layout" "^4.0.1" - agentkeepalive "^4.5.0" - bigint-buffer "^1.1.5" - bn.js "^5.2.1" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.3" - fast-stable-stringify "^1.0.0" - jayson "^4.1.1" - node-fetch "^2.7.0" - rpc-websockets "^9.0.2" - superstruct "^2.0.2" - "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.2.2", "@solana/web3.js@^1.21.0": version "1.31.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" @@ -14040,7 +14040,7 @@ intl-messageformat@9.6.6: fast-memoize "^2.5.2" tslib "^2.1.0" -invariant@^2.2.2, invariant@^2.2.4: +invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -23719,10 +23719,10 @@ typescript@^4.1.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== -typescript@^4.5.4: - version "4.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8" - integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg== +typescript@^5.3.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" + integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== typical@^2.6.0, typical@^2.6.1: version "2.6.1" From 5ec495f3078c38b5d06100e239f2bf2c49c13351 Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Wed, 12 Mar 2025 18:59:13 +0400 Subject: [PATCH 05/14] add versioned transaction instructions, add draft tests --- .../governance-sdk/src/governance/accounts.ts | 26 +- .../governance-sdk/src/governance/index.ts | 6 + .../src/governance/instructions.ts | 83 +++- .../src/governance/serialisation.ts | 110 ++++- .../governance/withCloseTransactionBuffer.ts | 41 ++ .../governance/withCreateTransactionBuffer.ts | 54 +++ .../withExecuteVersionedTransaction.ts | 27 ++ .../governance/withExtendTransactionBuffer.ts | 38 ++ .../withInsertVersionedTransaction.ts | 53 +++ ...ithInsertVersionedTransactionFromBuffer.ts | 61 +++ .../tests/governance/api.v3.vtxn.test.ts | 432 ++++++++++++++++++ .../governance-sdk/tests/tools/builders.ts | 164 +++++++ 12 files changed, 1085 insertions(+), 10 deletions(-) create mode 100644 packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts create mode 100644 packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts create mode 100644 packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts create mode 100644 packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts create mode 100644 packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts create mode 100644 packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts create mode 100644 packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts diff --git a/packages/governance-sdk/src/governance/accounts.ts b/packages/governance-sdk/src/governance/accounts.ts index a12f728..34ad6eb 100644 --- a/packages/governance-sdk/src/governance/accounts.ts +++ b/packages/governance-sdk/src/governance/accounts.ts @@ -1340,11 +1340,27 @@ export enum TransactionExecutionStatus { Error = 'Error' } -// Interface for address table lookups -export interface VersionedTransactionMessageAddressTableLookup { - accountKey: PublicKey; - writableIndexes: number[]; - readonlyIndexes: number[]; +// // Interface for address table lookups +// export interface VersionedTransactionMessageAddressTableLookup { +// accountKey: PublicKey; +// writableIndexes: number[]; +// readonlyIndexes: number[]; +// } + +export class VersionedTransactionMessageAddressTableLookup { + accountKey: PublicKey; + writableIndexes: number[]; + readonlyIndexes: number[]; + + constructor(args: { + accountKey: PublicKey; + writableIndexes: number[]; + readonlyIndexes: number[]; + }) { + this.accountKey = args.accountKey; + this.writableIndexes = args.writableIndexes; + this.readonlyIndexes = args.readonlyIndexes; + } } export class ProposalCompiledInstruction { programIdIndex: number; diff --git a/packages/governance-sdk/src/governance/index.ts b/packages/governance-sdk/src/governance/index.ts index add5abc..9476b09 100644 --- a/packages/governance-sdk/src/governance/index.ts +++ b/packages/governance-sdk/src/governance/index.ts @@ -36,3 +36,9 @@ export * from './withSetGovernanceDelegate'; export * from './withSignOffProposal'; export * from './withUpdateProgramMetadata'; export * from './withWithdrawGoverningTokens'; +export * from './withCloseTransactionBuffer'; +export * from './withCreateTransactionBuffer'; +export * from './withExecuteVersionedTransaction'; +export * from './withExtendTransactionBuffer'; +export * from './withInsertVersionedTransaction'; +export * from './withInsertVersionedTransactionFromBuffer'; diff --git a/packages/governance-sdk/src/governance/instructions.ts b/packages/governance-sdk/src/governance/instructions.ts index ea5dcb2..96b9703 100644 --- a/packages/governance-sdk/src/governance/instructions.ts +++ b/packages/governance-sdk/src/governance/instructions.ts @@ -39,7 +39,17 @@ export enum GovernanceInstruction { UpdateProgramMetadata = 24, CreateNativeTreasury = 25, RevokeGoverningTokens = 26, - RefundProposalDeposit = 27, + RefundProposalDeposit = 27, + CompleteProposal = 28, + AddRequiredSignatory = 29, + RemoveRequiredSignatory = 30, + CreateTransactionBuffer = 31, + ExtendTransactionBuffer = 32, + CloseTransactionBuffer = 33, + InsertVersionedTransactionFromBuffer = 34, + InsertVersionedTransaction = 35, + ExecuteVersionedTransaction = 36, + RemoveVersionedTransaction = 37 } export class CreateRealmArgs { @@ -402,3 +412,74 @@ export class RefundProposalDepositArgs { instruction: GovernanceInstruction = GovernanceInstruction.RefundProposalDeposit; } + + +// Argument Classes +export class CreateTransactionBufferArgs { + instruction: GovernanceInstruction = GovernanceInstruction.CreateTransactionBuffer; + bufferIndex: number; + finalBufferHash: Uint8Array; + finalBufferSize: number; + buffer: Uint8Array; + + constructor(args: { bufferIndex: number; finalBufferHash: Uint8Array; finalBufferSize: number; buffer: Uint8Array }) { + this.bufferIndex = args.bufferIndex; + this.finalBufferHash = args.finalBufferHash; + this.finalBufferSize = args.finalBufferSize; + this.buffer = args.buffer; + } +} + +export class ExtendTransactionBufferArgs { + instruction: GovernanceInstruction = GovernanceInstruction.ExtendTransactionBuffer; + bufferIndex: number; + buffer: Uint8Array; + + constructor(args: { bufferIndex: number; buffer: Uint8Array }) { + this.bufferIndex = args.bufferIndex; + this.buffer = args.buffer; + } +} + +export class CloseTransactionBufferArgs { + instruction: GovernanceInstruction = GovernanceInstruction.CloseTransactionBuffer; + bufferIndex: number; + + constructor(args: { bufferIndex: number }) { + this.bufferIndex = args.bufferIndex; + } +} + +export class InsertVersionedTransactionFromBufferArgs { + instruction: GovernanceInstruction = GovernanceInstruction.InsertVersionedTransactionFromBuffer; + optionIndex: number; + ephemeralSigners: number; + transactionIndex: number; + bufferIndex: number; + + constructor(args: { optionIndex: number; ephemeralSigners: number; transactionIndex: number; bufferIndex: number }) { + this.optionIndex = args.optionIndex; + this.ephemeralSigners = args.ephemeralSigners; + this.transactionIndex = args.transactionIndex; + this.bufferIndex = args.bufferIndex; + } +} + +export class InsertVersionedTransactionArgs { + instruction: GovernanceInstruction = GovernanceInstruction.InsertVersionedTransaction; + optionIndex: number; + ephemeralSigners: number; + transactionIndex: number; + transactionMessage: Uint8Array; + + constructor(args: { optionIndex: number; ephemeralSigners: number; transactionIndex: number; transactionMessage: Uint8Array }) { + this.optionIndex = args.optionIndex; + this.ephemeralSigners = args.ephemeralSigners; + this.transactionIndex = args.transactionIndex; + this.transactionMessage = args.transactionMessage; + } +} + +export class ExecuteVersionedTransactionArgs { + instruction: GovernanceInstruction = GovernanceInstruction.ExecuteVersionedTransaction; +} \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/serialisation.ts b/packages/governance-sdk/src/governance/serialisation.ts index 106a645..5d7e40f 100644 --- a/packages/governance-sdk/src/governance/serialisation.ts +++ b/packages/governance-sdk/src/governance/serialisation.ts @@ -5,6 +5,7 @@ import { AddSignatoryArgs, CancelProposalArgs, CastVoteArgs, + CloseTransactionBufferArgs, CreateGovernanceArgs, CreateMintGovernanceArgs, CreateNativeTreasuryArgs, @@ -13,12 +14,16 @@ import { CreateRealmArgs, CreateTokenGovernanceArgs, CreateTokenOwnerRecordArgs, + CreateTransactionBufferArgs, DepositGoverningTokensArgs, ExecuteTransactionArgs, + ExecuteVersionedTransactionArgs, + ExtendTransactionBufferArgs, FinalizeVoteArgs, FlagTransactionErrorArgs, InsertTransactionArgs, - RefundProposalDepositArgs, + InsertVersionedTransactionArgs, + InsertVersionedTransactionFromBufferArgs, RelinquishVoteArgs, RemoveTransactionArgs, RevokeGoverningTokensArgs, @@ -61,6 +66,11 @@ import { GoverningTokenConfigArgs, GoverningTokenConfig, ProposalDeposit, + ProposalTransactionBuffer, + ProposalTransactionMessage, + ProposalCompiledInstruction, + VersionedTransactionMessageAddressTableLookup, + ProposalVersionedTransaction } from './accounts'; import { serialize } from 'borsh'; import { BorshAccountParser } from '../core/serialisation'; @@ -672,10 +682,72 @@ function createGovernanceInstructionSchema(programVersion: number) { }, ], [ - RefundProposalDepositArgs, + CreateTransactionBufferArgs, { kind: 'struct', - fields: [['instruction', 'u8']], + fields: [ + ['instruction', 'u8'], + ['bufferIndex', 'u8'], + ['finalBufferHash', [32]], // 32-byte array + ['finalBufferSize', 'u16'], + ['buffer', ['u8']], // Vector of bytes + ], + }, + ], + [ + ExtendTransactionBufferArgs, + { + kind: 'struct', + fields: [ + ['instruction', 'u8'], + ['bufferIndex', 'u8'], + ['buffer', ['u8']], // Vector of bytes + ], + }, + ], + [ + CloseTransactionBufferArgs, + { + kind: 'struct', + fields: [ + ['instruction', 'u8'], + ['bufferIndex', 'u8'], + ], + }, + ], + [ + InsertVersionedTransactionFromBufferArgs, + { + kind: 'struct', + fields: [ + ['instruction', 'u8'], + ['optionIndex', 'u8'], + ['ephemeralSigners', 'u8'], + ['transactionIndex', 'u16'], + ['bufferIndex', 'u8'], + ], + }, + ], + [ + InsertVersionedTransactionArgs, + { + kind: 'struct', + fields: [ + ['instruction', 'u8'], + ['optionIndex', 'u8'], + ['ephemeralSigners', 'u8'], + ['transactionIndex', 'u16'], + ['transactionMessage', ['u8']], // Vector of bytes + ], + }, + ], + [ + ExecuteVersionedTransactionArgs, + { + kind: 'struct', + fields: [ + ['instruction', 'u8'], + ], }, ], ...createGovernanceStructSchema(programVersion, undefined), @@ -967,7 +1039,37 @@ function createGovernanceAccountSchema(accountVersion: number) { ], }, ], - ...createGovernanceStructSchema(undefined, accountVersion), + [ + ProposalTransactionMessage, + { + kind: 'struct', + fields: [ + ['numSigners', 'u8'], + ['numWritableSigners', 'u8'], + ['numWritableNonSigners', 'u8'], + ['accountKeys', ['pubkey']], // Vector of pubkeys + ['instructions', [ProposalCompiledInstruction]], // Vector of instructions + ['addressTableLookups', [VersionedTransactionMessageAddressTableLookup]], // Vector of lookups + ], + }, + ], + [ + ProposalVersionedTransaction, + { + kind: 'struct', + fields: [ + ['accountType', 'u8'], + ['proposal', 'pubkey'], + ['optionIndex', 'u8'], + ['transactionIndex', 'u16'], + ['executionIndex', 'u8'], + ['executedAt', { kind: 'option', type: 'u64' }], // Using option for null possibility + ['executionStatus', 'u8'], // Using u8 to match enum pattern + ['ephemeralSignerBumps', ['u8']], // Vector of u8 + ['message', ProposalTransactionMessage], + ], + }, + ], ]); } diff --git a/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts b/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts new file mode 100644 index 0000000..5a38f0d --- /dev/null +++ b/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts @@ -0,0 +1,41 @@ +import { + PublicKey, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { CloseTransactionBufferArgs } from './instructions'; +import { getProposalTransactionBufferAddress } from './accounts'; + +export const withCloseTransactionBuffer = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + tokenOwnerRecord: PublicKey, + governanceAuthority: PublicKey, + beneficiary: PublicKey, + bufferIndex: number, +) => { + const args = new CloseTransactionBufferArgs({ bufferIndex }); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + + const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( + programId, + proposal, + beneficiary, + bufferIndex, + ); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: true, isSigner: false }, + { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, + { pubkey: governanceAuthority, isWritable: false, isSigner: true }, + { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, + { pubkey: beneficiary, isWritable: true, isSigner: true }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalTransactionBufferAddress; +}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts b/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts new file mode 100644 index 0000000..65712f2 --- /dev/null +++ b/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts @@ -0,0 +1,54 @@ +import { + PublicKey, + SYSVAR_RENT_PUBKEY, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { CreateTransactionBufferArgs } from './instructions'; +import { + getProposalTransactionBufferAddress, +} from './accounts'; +import { SYSTEM_PROGRAM_ID } from '../tools'; + +export const withCreateTransactionBuffer = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + tokenOwnerRecord: PublicKey, + governanceAuthority: PublicKey, + payer: PublicKey, + bufferIndex: number, + finalBufferHash: Uint8Array, + finalBufferSize: number, + buffer: Uint8Array, +) => { + const args = new CreateTransactionBufferArgs({ + bufferIndex, + finalBufferHash, + finalBufferSize, + buffer, + }); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( + programId, + proposal, + payer, + bufferIndex, + ); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: true, isSigner: false }, + { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, + { pubkey: governanceAuthority, isWritable: false, isSigner: true }, + { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, + { pubkey: payer, isWritable: true, isSigner: true }, + { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, + { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalTransactionBufferAddress; +}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts b/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts new file mode 100644 index 0000000..fc9afae --- /dev/null +++ b/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts @@ -0,0 +1,27 @@ +import { + PublicKey, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { ExecuteVersionedTransactionArgs } from './instructions'; + +export const withExecuteVersionedTransaction = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + proposalTransaction: PublicKey, +) => { + const args = new ExecuteVersionedTransactionArgs(); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: true, isSigner: false }, + { pubkey: proposalTransaction, isWritable: true, isSigner: false }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalTransaction; +}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts b/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts new file mode 100644 index 0000000..4f8bdaf --- /dev/null +++ b/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts @@ -0,0 +1,38 @@ +import { + PublicKey, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { ExtendTransactionBufferArgs } from './instructions'; +import { getProposalTransactionBufferAddress } from './accounts'; + +export const withExtendTransactionBuffer = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + creator: PublicKey, + bufferIndex: number, + buffer: Uint8Array, +) => { + const args = new ExtendTransactionBufferArgs({ bufferIndex, buffer }); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + + const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( + programId, + proposal, + creator, + bufferIndex, + ); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: false, isSigner: false }, + { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, + { pubkey: creator, isWritable: false, isSigner: true }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalTransactionBufferAddress; +}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts b/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts new file mode 100644 index 0000000..92f007f --- /dev/null +++ b/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts @@ -0,0 +1,53 @@ +import { + PublicKey, + SYSVAR_RENT_PUBKEY, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { InsertVersionedTransactionArgs } from './instructions'; +import { getProposalVersionedTransactionAddress } from './accounts'; +import { SYSTEM_PROGRAM_ID } from '../tools'; + +export const withInsertVersionedTransaction = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + tokenOwnerRecord: PublicKey, + governanceAuthority: PublicKey, + payer: PublicKey, + optionIndex: number, + ephemeralSigners: number, + transactionIndex: number, + transactionMessage: Uint8Array, +) => { + const args = new InsertVersionedTransactionArgs({ + optionIndex, + ephemeralSigners, + transactionIndex, + transactionMessage, + }); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + + const proposalVersionedTxAddress = await getProposalVersionedTransactionAddress( + programId, + proposal, + optionIndex, + transactionIndex, + ); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: true, isSigner: false }, + { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, + { pubkey: governanceAuthority, isWritable: false, isSigner: true }, + { pubkey: proposalVersionedTxAddress, isWritable: true, isSigner: false }, + { pubkey: payer, isWritable: true, isSigner: true }, + { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, + { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalVersionedTxAddress; +}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts b/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts new file mode 100644 index 0000000..ebbdfb0 --- /dev/null +++ b/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts @@ -0,0 +1,61 @@ +import { + PublicKey, + SYSVAR_RENT_PUBKEY, + TransactionInstruction, +} from '@solana/web3.js'; +import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; +import { serialize } from 'borsh'; +import { InsertVersionedTransactionFromBufferArgs } from './instructions'; +import { getProposalTransactionBufferAddress, getProposalVersionedTransactionAddress } from './accounts'; +import { SYSTEM_PROGRAM_ID } from '../tools'; + + +export const withInsertVersionedTransactionFromBuffer = async ( + instructions: TransactionInstruction[], + programId: PublicKey, + governance: PublicKey, + proposal: PublicKey, + tokenOwnerRecord: PublicKey, + governanceAuthority: PublicKey, + payer: PublicKey, + optionIndex: number, + ephemeralSigners: number, + transactionIndex: number, + bufferIndex: number, +) => { + const args = new InsertVersionedTransactionFromBufferArgs({ + optionIndex, + ephemeralSigners, + transactionIndex, + bufferIndex, + }); + const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); + + const proposalVersionedTxAddress = await getProposalVersionedTransactionAddress( + programId, + proposal, + optionIndex, + transactionIndex, + ); + const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( + programId, + proposal, + payer, + bufferIndex, + ); + + const keys = [ + { pubkey: governance, isWritable: false, isSigner: false }, + { pubkey: proposal, isWritable: true, isSigner: false }, + { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, + { pubkey: governanceAuthority, isWritable: false, isSigner: true }, + { pubkey: proposalVersionedTxAddress, isWritable: true, isSigner: false }, + { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, + { pubkey: payer, isWritable: true, isSigner: true }, + { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, + { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, + ]; + + instructions.push(new TransactionInstruction({ keys, programId, data })); + return proposalVersionedTxAddress; +}; \ No newline at end of file diff --git a/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts new file mode 100644 index 0000000..8860db8 --- /dev/null +++ b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts @@ -0,0 +1,432 @@ +import { Keypair } from '@solana/web3.js'; +import BN from 'bn.js'; +import { + GovernanceConfig, + GoverningTokenConfigAccountArgs, + GoverningTokenType, + TransactionExecutionStatus, + VoteThreshold, + VoteThresholdType, + VoteTipping, +} from '../../src/governance/accounts'; +import { PROGRAM_VERSION_V3 } from '../../src/registry/constants'; +import { BenchBuilder } from '../tools/builders'; +import { getTimestampFromDays } from '../tools/units'; + +test('getGovernanceProgramVersion', async () => { + // Arrange + // Act + const builder = await BenchBuilder.withConnection(); + + // Assert + expect(builder.programVersion).toEqual(3); +}); + +test('createRealmWithTokenConfigs', async () => { + // Arrange + const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => + b.withWallet(), + ); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + const realm = await bench + .withRealm(communityTokenConfig, councilTokenConfig) + .then(b => b.sendTx()); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('createGovernanceWithConfig', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.sendTx()); + + const config = new GovernanceConfig({ + communityVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 20, + }), + minCommunityTokensToCreateProposal: new BN(1), + minInstructionHoldUpTime: 0, + baseVotingTime: getTimestampFromDays(3), + communityVoteTipping: VoteTipping.Strict, + councilVoteTipping: VoteTipping.Strict, + minCouncilTokensToCreateProposal: new BN(1), + councilVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 60, + }), + councilVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + communityVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + votingCoolOffTime: 5000, + depositExemptProposalCount: 10, + }); + + // Act + const governancePk = await realm.createGovernance(config); + + // Assert + const governance = await realm.getGovernance(governancePk); + + expect(governance.account.config.communityVoteThreshold).toEqual( + config.communityVoteThreshold, + ); + + expect(governance.account.config.councilVoteThreshold).toEqual( + config.councilVoteThreshold, + ); + + expect(governance.account.config.councilVetoVoteThreshold).toEqual( + config.councilVetoVoteThreshold, + ); + + expect(governance.account.config.baseVotingTime).toEqual( + getTimestampFromDays(3), + ); + + expect(governance.account.config.votingCoolOffTime).toEqual(5000); + + expect(governance.account.config.depositExemptProposalCount).toEqual(10); +}); + +test('setRealmConfigWithTokenConfigs', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.sendTx()); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('revokeGoverningToken', async () => { + // Arrange + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: undefined, + maxVoterWeightAddin: undefined, + tokenType: GoverningTokenType.Membership, + }); + + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm(communityTokenConfig)) + .then(b => b.withCommunityMember()) + .then(b => b.sendTx()); + + // Act + await realm.revokeGoverningTokens(); + + // Assert + const tokenOwnerRecord = await realm.getTokenOwnerRecord( + realm.communityOwnerRecordPk, + ); + + expect( + tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), + ).toEqual(0); +}); + +test('createProposal', async () => { + // Arrange + const realm = await BenchBuilder.withConnection() + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()); + + // Act + const proposalPk = await realm.createProposal('proposal 1'); + + // Assert + const proposal = await realm.getProposal(proposalPk); + + expect(proposal.account.name).toEqual('proposal 1'); + expect(proposal.account.vetoVoteWeight.toNumber()).toEqual(0); + + const governance = await realm.getGovernance(proposal.account.governance); + expect(governance.account.activeProposalCount.toNumber()).toEqual(1); +}); + +test('createProposalWithDeposit', async () => { + // Arrange + const realm = await BenchBuilder.withConnection() + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()); + + // Act + const proposalPk = await realm.createProposal('proposal 1'); + + // Assert + const proposalDeposit = ( + await realm.getProposalDeposits(realm.bench.walletPk) + )[0]; + + expect(proposalDeposit.account.proposal).toEqual(proposalPk); + expect(proposalDeposit.account.depositPayer).toEqual(realm.bench.walletPk); +}); + +test('refundProposalDeposit', async () => { + // Arrange + const realm = await BenchBuilder.withConnection() + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()) + .then(b => b.withProposal()) + .then(b => b.withProposalSignOff()) + .then(b => b.withCastVote()) + .then(b => b.sendTx()); + + // Act + await realm.refundProposalDeposit(); + + // Assert + const proposalDeposits = await realm.getProposalDeposits( + realm.bench.walletPk, + ); + + expect(proposalDeposits.length).toBe(0); +}); + + +test('createTransactionBuffer', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.sendTx()); + + const bufferIndex = 0; + const finalBufferHash = new Uint8Array(32).fill(1); // Example hash + const finalBufferSize = 100; + const buffer = new Uint8Array([1, 2, 3]); + + // Act + await realm.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + expect(transactionBuffer.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); + expect(transactionBuffer.creator.toBase58()).toEqual(realm.bench.walletPk.toBase58()); + expect(transactionBuffer.bufferIndex).toEqual(bufferIndex); + expect(Buffer.from(transactionBuffer.finalBufferHash)).toEqual(Buffer.from(finalBufferHash)); + expect(transactionBuffer.finalBufferSize).toEqual(finalBufferSize); + expect(Buffer.from(transactionBuffer.buffer)).toEqual(Buffer.from(buffer)); +}); + +test('extendTransactionBuffer', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.withTransactionBuffer()) + .then(b => b.sendTx()); + + const bufferIndex = 0; + const extensionBuffer = new Uint8Array([4, 5, 6]); + + // Act + await realm.extendTransactionBuffer(bufferIndex, extensionBuffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + // Note: Actual buffer content verification depends on how extension works on-chain + expect(transactionBuffer.buffer.length).toBeGreaterThan(3); // Original was [1,2,3] +}); + +test('closeTransactionBuffer', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.withTransactionBuffer()) + .then(b => b.sendTx()); + + const bufferIndex = 0; + + // Act + await realm.closeTransactionBuffer(bufferIndex) + .then(b => b.sendTx()); + + // Assert + const accountInfo = await realm.bench.connection.getAccountInfo(realm.proposalTransactionBufferPk); + expect(accountInfo).toBeNull(); // Account should be closed +}); + +test('insertVersionedTransactionFromBuffer', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.withTransactionBuffer()) + .then(b => b.sendTx()); + + const optionIndex = 0; + const ephemeralSigners = 1; + const transactionIndex = 0; + const bufferIndex = 0; + + // Act + await realm.withVersionedTransactionFromBuffer(optionIndex, ephemeralSigners, transactionIndex, bufferIndex) + .then(b => b.sendTx()); + + // Assert + const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); + expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); + expect(versionedTx.optionIndex).toEqual(optionIndex); + expect(versionedTx.transactionIndex).toEqual(transactionIndex); + expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); +}); + +test('insertVersionedTransaction', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.sendTx()); + + const optionIndex = 0; + const ephemeralSigners = 1; + const transactionIndex = 0; + const transactionMessage = new Uint8Array([1, 2, 3]); + + // Act + await realm.withVersionedTransaction(optionIndex, ephemeralSigners, transactionIndex, transactionMessage) + .then(b => b.sendTx()); + + // Assert + const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); + expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); + expect(versionedTx.optionIndex).toEqual(optionIndex); + expect(versionedTx.transactionIndex).toEqual(transactionIndex); + expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); + expect(Buffer.from(versionedTx.message.serialize())).toEqual(Buffer.from(transactionMessage)); +}); + +test('executeVersionedTransaction', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withProposal()) + .then(b => b.withVersionedTransaction()) // Creates with defaults + .then(b => b.sendTx()); + + // Act + await realm.executeVersionedTransaction() + .then(b => b.sendTx()); + + // Assert + const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); + expect(versionedTx.executionStatus).toEqual(TransactionExecutionStatus.Success); + expect(versionedTx.executedAt).not.toBeNull(); +}); \ No newline at end of file diff --git a/packages/governance-sdk/tests/tools/builders.ts b/packages/governance-sdk/tests/tools/builders.ts index 89f6bd3..cd98bae 100644 --- a/packages/governance-sdk/tests/tools/builders.ts +++ b/packages/governance-sdk/tests/tools/builders.ts @@ -22,9 +22,15 @@ import { Vote, withAddSignatory, withCastVote, + withCloseTransactionBuffer, withCreateGovernance, withCreateProposal, + withCreateTransactionBuffer, withDepositGoverningTokens, + withExecuteVersionedTransaction, + withExtendTransactionBuffer, + withInsertVersionedTransaction, + withInsertVersionedTransactionFromBuffer, withRefundProposalDeposit, withRelinquishVote, withRevokeGoverningTokens, @@ -38,6 +44,10 @@ import { GoverningTokenConfigAccountArgs, GoverningTokenType, MintMaxVoteWeightSource, + ProposalTransactionBuffer, + ProposalTransactionMessage, + ProposalVersionedTransaction, + TransactionExecutionStatus, VoteThreshold, VoteThresholdType, VoteTipping, @@ -146,6 +156,9 @@ export class RealmBuilder { signatoryPk: PublicKey | undefined; voteRecordPk: PublicKey; + proposalTransactionBufferPk: PublicKey; + proposalVersionedTxPk: PublicKey; + constructor(bench: BenchBuilder) { this.bench = bench; } @@ -546,4 +559,155 @@ export class RealmBuilder { await this.bench.sendTx(); return this; } + + async withTransactionBuffer( + bufferIndex: number = 0, + finalBufferHash: Uint8Array = new Uint8Array(32), // 32-byte zero hash + finalBufferSize: number = 100, + buffer: Uint8Array, + ) { + this.proposalTransactionBufferPk = await withCreateTransactionBuffer( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.communityOwnerRecordPk, + this.bench.walletPk, + this.bench.walletPk, + bufferIndex, + finalBufferHash, + finalBufferSize, + buffer, + ); + return this; + } + + async extendTransactionBuffer( + bufferIndex: number = 0, + buffer: Uint8Array, + ) { + await withExtendTransactionBuffer( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.bench.walletPk, + bufferIndex, + buffer, + ); + return this; + } + + async closeTransactionBuffer(bufferIndex: number = 0) { + await withCloseTransactionBuffer( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.communityOwnerRecordPk, + this.bench.walletPk, + this.bench.walletPk, + bufferIndex, + ); + return this; + } + + async withVersionedTransactionFromBuffer( + optionIndex: number = 0, + ephemeralSigners: number = 0, + transactionIndex: number = 0, + bufferIndex: number = 0, + ) { + this.proposalVersionedTxPk = await withInsertVersionedTransactionFromBuffer( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.communityOwnerRecordPk, + this.bench.walletPk, + this.bench.walletPk, + optionIndex, + ephemeralSigners, + transactionIndex, + bufferIndex, + ); + return this; + } + + async withVersionedTransaction( + optionIndex: number = 0, + ephemeralSigners: number | undefined, + transactionIndex: number = 0, + transactionMessage: Uint8Array, + ) { + this.proposalVersionedTxPk = await withInsertVersionedTransaction( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.communityOwnerRecordPk, + this.bench.walletPk, + this.bench.walletPk, + optionIndex, + ephemeralSigners, + transactionIndex, + transactionMessage, + ); + return this; + } + + async executeVersionedTransaction() { + await withExecuteVersionedTransaction( + this.bench.instructions, + this.bench.programId, + this.governancePk, + this.proposalPk, + this.proposalVersionedTxPk, + ); + return this; + } + + // Helper method to get account data (you might need to implement these in your SDK) + async getTransactionBuffer(bufferPk: PublicKey): Promise { + // Placeholder - implement actual fetch from chain + return this.bench.connection.getAccountInfo(bufferPk).then(account => { + // Deserialize account data into ProposalTransactionBuffer + // This is a simplification - you'll need proper deserialization + return new ProposalTransactionBuffer({ + accountType: 0, // Adjust as needed + proposal: this.proposalPk, + creator: this.bench.walletPk, + bufferIndex: 0, + finalBufferHash: new Uint8Array(32), + finalBufferSize: 0, + buffer: new Uint8Array(), + }); + }); + } + + async getVersionedTransaction(txPk: PublicKey): Promise { + // Placeholder - implement actual fetch from chain + return this.bench.connection.getAccountInfo(txPk).then(account => { + // Deserialize account data into ProposalVersionedTransaction + // This is a simplification - you'll need proper deserialization + return new ProposalVersionedTransaction({ + accountType: 0, // Adjust as needed + proposal: this.proposalPk, + optionIndex: 0, + transactionIndex: 0, + executionIndex: 0, + executedAt: null, + executionStatus: TransactionExecutionStatus.None, + ephemeralSignerBumps: [], + message: new ProposalTransactionMessage({ + numSigners: 0, + numWritableSigners: 0, + numWritableNonSigners: 0, + accountKeys: [], + instructions: [], + addressTableLookups: [], + }), + }); + }); + } } From 7d919d4256d9a256c188325d91c34a689cc3993e Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Mon, 17 Mar 2025 21:50:38 +0400 Subject: [PATCH 06/14] moar tests (wip) --- .../governance-sdk/src/governance/accounts.ts | 9 + .../src/governance/serialisation.ts | 24 +- .../tests/governance/api.v3.vtxn.test.ts | 748 +++++++++--------- .../governance-sdk/tests/tools/builders.ts | 53 +- packages/governance-sdk/tests/tools/sdk.ts | 2 +- 5 files changed, 399 insertions(+), 437 deletions(-) diff --git a/packages/governance-sdk/src/governance/accounts.ts b/packages/governance-sdk/src/governance/accounts.ts index 34ad6eb..8b50949 100644 --- a/packages/governance-sdk/src/governance/accounts.ts +++ b/packages/governance-sdk/src/governance/accounts.ts @@ -53,6 +53,8 @@ export type GovernanceAccountClass = | typeof SignatoryRecord | typeof VoteRecord | typeof ProposalTransaction + | typeof ProposalVersionedTransaction + | typeof ProposalTransactionBuffer | typeof RealmConfigAccount | typeof ProgramMetadata | typeof ProposalDeposit; @@ -88,6 +90,11 @@ export function getAccountTypes(accountClass: GovernanceAccountClass) { GovernanceAccountType.ProposalInstructionV1, GovernanceAccountType.ProposalTransactionV2, ]; + case ProposalVersionedTransaction: + return [ + GovernanceAccountType.ProposalVersionedTransaction, + GovernanceAccountType.ProposalTransactionBuffer, + ]; case RealmConfigAccount: return [GovernanceAccountType.RealmConfig]; case Governance: @@ -122,6 +129,8 @@ export function getGovernanceAccountVersion( case GovernanceAccountType.MintGovernanceV2: case GovernanceAccountType.TokenGovernanceV2: case GovernanceAccountType.SignatoryRecordV2: + case GovernanceAccountType.ProposalTransactionBuffer: + case GovernanceAccountType.ProposalVersionedTransaction: return ACCOUNT_VERSION_V2; default: return ACCOUNT_VERSION_V1; diff --git a/packages/governance-sdk/src/governance/serialisation.ts b/packages/governance-sdk/src/governance/serialisation.ts index 5d7e40f..73e21d2 100644 --- a/packages/governance-sdk/src/governance/serialisation.ts +++ b/packages/governance-sdk/src/governance/serialisation.ts @@ -24,6 +24,7 @@ import { InsertTransactionArgs, InsertVersionedTransactionArgs, InsertVersionedTransactionFromBufferArgs, + RefundProposalDepositArgs, RelinquishVoteArgs, RemoveTransactionArgs, RevokeGoverningTokensArgs, @@ -681,6 +682,13 @@ function createGovernanceInstructionSchema(programVersion: number) { fields: [['instruction', 'u8']], }, ], + [ + RefundProposalDepositArgs, + { + kind: 'struct', + fields: [['instruction', 'u8']], + }, + ], [ CreateTransactionBufferArgs, { @@ -1023,19 +1031,18 @@ function createGovernanceAccountSchema(accountVersion: number) { ['reserved', [64]], ], }, - ], - [ + ],[ ProposalTransactionBuffer, { kind: 'struct', fields: [ ['accountType', 'u8'], - ['communityMint', 'pubkey'], - ['config', RealmConfig], - ['reserved', [6]], - ['votingProposalCount', 'u16'], - ['authority', { kind: 'option', type: 'pubkey' }], - ['name', 'string'], + ['proposal', 'pubkey'], + ['creator', 'pubkey'], + ['bufferIndex', 'u8'], + ['finalBufferHash', [32]], + ['finalBufferSize', 'u16'], + ['buffer', ['u8']] ], }, ], @@ -1070,6 +1077,7 @@ function createGovernanceAccountSchema(accountVersion: number) { ], }, ], + ...createGovernanceStructSchema(undefined, accountVersion), ]); } diff --git a/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts index 8860db8..5cff726 100644 --- a/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts +++ b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts @@ -13,362 +13,329 @@ import { PROGRAM_VERSION_V3 } from '../../src/registry/constants'; import { BenchBuilder } from '../tools/builders'; import { getTimestampFromDays } from '../tools/units'; -test('getGovernanceProgramVersion', async () => { - // Arrange - // Act - const builder = await BenchBuilder.withConnection(); - - // Assert - expect(builder.programVersion).toEqual(3); -}); - -test('createRealmWithTokenConfigs', async () => { - // Arrange - const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => - b.withWallet(), - ); - - const communityTokenConfig = new GoverningTokenConfigAccountArgs({ - voterWeightAddin: Keypair.generate().publicKey, - maxVoterWeightAddin: Keypair.generate().publicKey, - tokenType: GoverningTokenType.Dormant, - }); - const councilTokenConfig = new GoverningTokenConfigAccountArgs({ - voterWeightAddin: Keypair.generate().publicKey, - maxVoterWeightAddin: Keypair.generate().publicKey, - tokenType: GoverningTokenType.Membership, - }); - - // Act - const realm = await bench - .withRealm(communityTokenConfig, councilTokenConfig) - .then(b => b.sendTx()); - - // Assert - const realmConfig = await realm.getRealmConfig(); - - expect(realmConfig.account.realm).toEqual(realm.realmPk); - - // communityTokenConfig - expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( - communityTokenConfig.tokenType, - ); - expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( - communityTokenConfig.voterWeightAddin, - ); - expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( - communityTokenConfig.maxVoterWeightAddin, - ); - - // councilTokenConfig - expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( - GoverningTokenType.Membership, - ); - expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( - councilTokenConfig.voterWeightAddin, - ); - expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( - councilTokenConfig.maxVoterWeightAddin, - ); -}); - -test('createGovernanceWithConfig', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.sendTx()); - - const config = new GovernanceConfig({ - communityVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 20, - }), - minCommunityTokensToCreateProposal: new BN(1), - minInstructionHoldUpTime: 0, - baseVotingTime: getTimestampFromDays(3), - communityVoteTipping: VoteTipping.Strict, - councilVoteTipping: VoteTipping.Strict, - minCouncilTokensToCreateProposal: new BN(1), - councilVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 60, - }), - councilVetoVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 80, - }), - communityVetoVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 80, - }), - votingCoolOffTime: 5000, - depositExemptProposalCount: 10, - }); - - // Act - const governancePk = await realm.createGovernance(config); - - // Assert - const governance = await realm.getGovernance(governancePk); - - expect(governance.account.config.communityVoteThreshold).toEqual( - config.communityVoteThreshold, - ); - - expect(governance.account.config.councilVoteThreshold).toEqual( - config.councilVoteThreshold, - ); - - expect(governance.account.config.councilVetoVoteThreshold).toEqual( - config.councilVetoVoteThreshold, - ); - - expect(governance.account.config.baseVotingTime).toEqual( - getTimestampFromDays(3), - ); - - expect(governance.account.config.votingCoolOffTime).toEqual(5000); - - expect(governance.account.config.depositExemptProposalCount).toEqual(10); -}); - -test('setRealmConfigWithTokenConfigs', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.sendTx()); - - const communityTokenConfig = new GoverningTokenConfigAccountArgs({ - voterWeightAddin: Keypair.generate().publicKey, - maxVoterWeightAddin: Keypair.generate().publicKey, - tokenType: GoverningTokenType.Dormant, - }); - const councilTokenConfig = new GoverningTokenConfigAccountArgs({ - voterWeightAddin: Keypair.generate().publicKey, - maxVoterWeightAddin: Keypair.generate().publicKey, - tokenType: GoverningTokenType.Membership, - }); - - // Act - await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); - - // Assert - const realmConfig = await realm.getRealmConfig(); - - expect(realmConfig.account.realm).toEqual(realm.realmPk); - - // communityTokenConfig - expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( - communityTokenConfig.tokenType, - ); - expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( - communityTokenConfig.voterWeightAddin, - ); - expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( - communityTokenConfig.maxVoterWeightAddin, - ); - - // councilTokenConfig - expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( - GoverningTokenType.Membership, - ); - expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( - councilTokenConfig.voterWeightAddin, - ); - expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( - councilTokenConfig.maxVoterWeightAddin, - ); -}); - -test('revokeGoverningToken', async () => { - // Arrange - - const communityTokenConfig = new GoverningTokenConfigAccountArgs({ - voterWeightAddin: undefined, - maxVoterWeightAddin: undefined, - tokenType: GoverningTokenType.Membership, - }); - - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm(communityTokenConfig)) - .then(b => b.withCommunityMember()) - .then(b => b.sendTx()); - - // Act - await realm.revokeGoverningTokens(); - - // Assert - const tokenOwnerRecord = await realm.getTokenOwnerRecord( - realm.communityOwnerRecordPk, - ); - - expect( - tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), - ).toEqual(0); -}); - -test('createProposal', async () => { - // Arrange - const realm = await BenchBuilder.withConnection() - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.sendTx()); - - // Act - const proposalPk = await realm.createProposal('proposal 1'); - - // Assert - const proposal = await realm.getProposal(proposalPk); - - expect(proposal.account.name).toEqual('proposal 1'); - expect(proposal.account.vetoVoteWeight.toNumber()).toEqual(0); - - const governance = await realm.getGovernance(proposal.account.governance); - expect(governance.account.activeProposalCount.toNumber()).toEqual(1); -}); - -test('createProposalWithDeposit', async () => { - // Arrange - const realm = await BenchBuilder.withConnection() - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.sendTx()); - - // Act - const proposalPk = await realm.createProposal('proposal 1'); - - // Assert - const proposalDeposit = ( - await realm.getProposalDeposits(realm.bench.walletPk) - )[0]; - - expect(proposalDeposit.account.proposal).toEqual(proposalPk); - expect(proposalDeposit.account.depositPayer).toEqual(realm.bench.walletPk); -}); - -test('refundProposalDeposit', async () => { - // Arrange - const realm = await BenchBuilder.withConnection() - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.sendTx()) - .then(b => b.withProposal()) - .then(b => b.withProposalSignOff()) - .then(b => b.withCastVote()) - .then(b => b.sendTx()); - - // Act - await realm.refundProposalDeposit(); - - // Assert - const proposalDeposits = await realm.getProposalDeposits( - realm.bench.walletPk, - ); - - expect(proposalDeposits.length).toBe(0); -}); - - -test('createTransactionBuffer', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.withProposal()) - .then(b => b.sendTx()); +// test('getGovernanceProgramVersion', async () => { +// // Arrange +// // Act +// const builder = await BenchBuilder.withConnection(); + +// // Assert +// expect(builder.programVersion).toEqual(3); +// }); + +// test('createRealmWithTokenConfigs', async () => { +// // Arrange +// const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => +// b.withWallet(), +// ); + +// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ +// voterWeightAddin: Keypair.generate().publicKey, +// maxVoterWeightAddin: Keypair.generate().publicKey, +// tokenType: GoverningTokenType.Dormant, +// }); +// const councilTokenConfig = new GoverningTokenConfigAccountArgs({ +// voterWeightAddin: Keypair.generate().publicKey, +// maxVoterWeightAddin: Keypair.generate().publicKey, +// tokenType: GoverningTokenType.Membership, +// }); + +// // Act +// const realm = await bench +// .withRealm(communityTokenConfig, councilTokenConfig) +// .then(b => b.sendTx()); + +// // Assert +// const realmConfig = await realm.getRealmConfig(); + +// expect(realmConfig.account.realm).toEqual(realm.realmPk); + +// // communityTokenConfig +// expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( +// communityTokenConfig.tokenType, +// ); +// expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( +// communityTokenConfig.voterWeightAddin, +// ); +// expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( +// communityTokenConfig.maxVoterWeightAddin, +// ); + +// // councilTokenConfig +// expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( +// GoverningTokenType.Membership, +// ); +// expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( +// councilTokenConfig.voterWeightAddin, +// ); +// expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( +// councilTokenConfig.maxVoterWeightAddin, +// ); +// }); + +// test('createGovernanceWithConfig', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.sendTx()); + +// const config = new GovernanceConfig({ +// communityVoteThreshold: new VoteThreshold({ +// type: VoteThresholdType.YesVotePercentage, +// value: 20, +// }), +// minCommunityTokensToCreateProposal: new BN(1), +// minInstructionHoldUpTime: 0, +// baseVotingTime: getTimestampFromDays(3), +// communityVoteTipping: VoteTipping.Strict, +// councilVoteTipping: VoteTipping.Strict, +// minCouncilTokensToCreateProposal: new BN(1), +// councilVoteThreshold: new VoteThreshold({ +// type: VoteThresholdType.YesVotePercentage, +// value: 60, +// }), +// councilVetoVoteThreshold: new VoteThreshold({ +// type: VoteThresholdType.YesVotePercentage, +// value: 80, +// }), +// communityVetoVoteThreshold: new VoteThreshold({ +// type: VoteThresholdType.YesVotePercentage, +// value: 80, +// }), +// votingCoolOffTime: 5000, +// depositExemptProposalCount: 10, +// }); + +// // Act +// const governancePk = await realm.createGovernance(config); + +// // Assert +// const governance = await realm.getGovernance(governancePk); + +// expect(governance.account.config.communityVoteThreshold).toEqual( +// config.communityVoteThreshold, +// ); + +// expect(governance.account.config.councilVoteThreshold).toEqual( +// config.councilVoteThreshold, +// ); + +// expect(governance.account.config.councilVetoVoteThreshold).toEqual( +// config.councilVetoVoteThreshold, +// ); + +// expect(governance.account.config.baseVotingTime).toEqual( +// getTimestampFromDays(3), +// ); + +// expect(governance.account.config.votingCoolOffTime).toEqual(5000); + +// expect(governance.account.config.depositExemptProposalCount).toEqual(10); +// }); + +// test('setRealmConfigWithTokenConfigs', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.sendTx()); + +// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ +// voterWeightAddin: Keypair.generate().publicKey, +// maxVoterWeightAddin: Keypair.generate().publicKey, +// tokenType: GoverningTokenType.Dormant, +// }); +// const councilTokenConfig = new GoverningTokenConfigAccountArgs({ +// voterWeightAddin: Keypair.generate().publicKey, +// maxVoterWeightAddin: Keypair.generate().publicKey, +// tokenType: GoverningTokenType.Membership, +// }); + +// // Act +// await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); + +// // Assert +// const realmConfig = await realm.getRealmConfig(); + +// expect(realmConfig.account.realm).toEqual(realm.realmPk); + +// // communityTokenConfig +// expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( +// communityTokenConfig.tokenType, +// ); +// expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( +// communityTokenConfig.voterWeightAddin, +// ); +// expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( +// communityTokenConfig.maxVoterWeightAddin, +// ); + +// // councilTokenConfig +// expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( +// GoverningTokenType.Membership, +// ); +// expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( +// councilTokenConfig.voterWeightAddin, +// ); +// expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( +// councilTokenConfig.maxVoterWeightAddin, +// ); +// }); + +// test('revokeGoverningToken', async () => { +// // Arrange + +// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ +// voterWeightAddin: undefined, +// maxVoterWeightAddin: undefined, +// tokenType: GoverningTokenType.Membership, +// }); + +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm(communityTokenConfig)) +// .then(b => b.withCommunityMember()) +// .then(b => b.sendTx()); + +// // Act +// await realm.revokeGoverningTokens(); + +// // Assert +// const tokenOwnerRecord = await realm.getTokenOwnerRecord( +// realm.communityOwnerRecordPk, +// ); + +// expect( +// tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), +// ).toEqual(0); +// }); + +// test('createProposal', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection() +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.sendTx()); + +// // Act +// const proposalPk = await realm.createProposal('proposal 1'); + +// // Assert +// const proposal = await realm.getProposal(proposalPk); + +// expect(proposal.account.name).toEqual('proposal 1'); +// expect(proposal.account.vetoVoteWeight.toNumber()).toEqual(0); + +// const governance = await realm.getGovernance(proposal.account.governance); +// expect(governance.account.activeProposalCount.toNumber()).toEqual(1); +// }); + + +// test('createTransactionBuffer', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.sendTx()) +// .then(b => b.withProposal()) +// .then(b => b.sendTx()); +// const bufferIndex = 0; +// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash +// const finalBufferSize = 100; +// const buffer = new Uint8Array([1, 2, 3, 4]); + +// // Act +// await realm.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer) +// .then(b => b.sendTx()); + +// // Assert +// const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); +// if (!transactionBuffer) throw Error("No transaction buffer found") +// expect(transactionBuffer.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); +// expect(transactionBuffer.creator.toBase58()).toEqual(realm.bench.walletPk.toBase58()); +// expect(transactionBuffer.bufferIndex).toEqual(bufferIndex); +// expect(Buffer.from(transactionBuffer.finalBufferHash)).toEqual(Buffer.from(finalBufferHash)); +// expect(transactionBuffer.finalBufferSize).toEqual(finalBufferSize); +// expect(Buffer.from(transactionBuffer.buffer)).toEqual(Buffer.from(buffer)); +// }); + +// test('extendTransactionBuffer', async () => { +// const bufferIndex = 0; +// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash +// const finalBufferSize = 100; +// const buffer = new Uint8Array([1, 2, 3, 4]); +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.sendTx()) +// .then(b => b.withProposal()) +// .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) +// .then(b => b.sendTx()); + +// const extensionBuffer = new Uint8Array([4, 5, 6]); + +// // Act +// await realm.extendTransactionBuffer(bufferIndex, extensionBuffer) +// .then(b => b.sendTx()); + +// // Assert +// const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); +// if (!transactionBuffer) throw Error("No transaction buffer found") +// expect(transactionBuffer.buffer.length).toBeGreaterThan(4); // Original was [1,2,3] +// }); + +// test('closeTransactionBuffer', async () => { +// const bufferIndex = 0; +// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash +// const finalBufferSize = 100; +// const buffer = new Uint8Array([1, 2, 3, 4]); +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.sendTx()) +// .then(b => b.withProposal()) +// .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) +// .then(b => b.sendTx()); + +// // Act +// await realm.closeTransactionBuffer(bufferIndex) +// .then(b => b.sendTx()); + +// // Assert +// const accountInfo = await realm.bench.connection.getAccountInfo(realm.proposalTransactionBufferPk); +// expect(accountInfo).toBeNull(); // Account should be closed +// }); +test('insertVersionedTransactionFromBuffer', async () => { const bufferIndex = 0; const finalBufferHash = new Uint8Array(32).fill(1); // Example hash - const finalBufferSize = 100; - const buffer = new Uint8Array([1, 2, 3]); - - // Act - await realm.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer) - .then(b => b.sendTx()); - - // Assert - const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); - expect(transactionBuffer.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); - expect(transactionBuffer.creator.toBase58()).toEqual(realm.bench.walletPk.toBase58()); - expect(transactionBuffer.bufferIndex).toEqual(bufferIndex); - expect(Buffer.from(transactionBuffer.finalBufferHash)).toEqual(Buffer.from(finalBufferHash)); - expect(transactionBuffer.finalBufferSize).toEqual(finalBufferSize); - expect(Buffer.from(transactionBuffer.buffer)).toEqual(Buffer.from(buffer)); -}); - -test('extendTransactionBuffer', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.withProposal()) - .then(b => b.withTransactionBuffer()) - .then(b => b.sendTx()); - - const bufferIndex = 0; - const extensionBuffer = new Uint8Array([4, 5, 6]); - - // Act - await realm.extendTransactionBuffer(bufferIndex, extensionBuffer) - .then(b => b.sendTx()); - - // Assert - const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); - // Note: Actual buffer content verification depends on how extension works on-chain - expect(transactionBuffer.buffer.length).toBeGreaterThan(3); // Original was [1,2,3] -}); - -test('closeTransactionBuffer', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.withProposal()) - .then(b => b.withTransactionBuffer()) - .then(b => b.sendTx()); - - const bufferIndex = 0; - - // Act - await realm.closeTransactionBuffer(bufferIndex) - .then(b => b.sendTx()); - - // Assert - const accountInfo = await realm.bench.connection.getAccountInfo(realm.proposalTransactionBufferPk); - expect(accountInfo).toBeNull(); // Account should be closed -}); - -test('insertVersionedTransactionFromBuffer', async () => { + const finalBufferSize = 4; + const buffer = new Uint8Array([1, 2, 3, 4]); // Arrange const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) .then(b => b.withWallet()) .then(b => b.withRealm()) .then(b => b.withCommunityMember()) .then(b => b.withGovernance()) + .then(b => b.sendTx()) .then(b => b.withProposal()) - .then(b => b.withTransactionBuffer()) + .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) .then(b => b.sendTx()); const optionIndex = 0; - const ephemeralSigners = 1; + const ephemeralSigners = 0; const transactionIndex = 0; - const bufferIndex = 0; // Act await realm.withVersionedTransactionFromBuffer(optionIndex, ephemeralSigners, transactionIndex, bufferIndex) @@ -376,57 +343,58 @@ test('insertVersionedTransactionFromBuffer', async () => { // Assert const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); + if (!versionedTx) throw Error("No versionedTx found") expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); expect(versionedTx.optionIndex).toEqual(optionIndex); expect(versionedTx.transactionIndex).toEqual(transactionIndex); expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); }); -test('insertVersionedTransaction', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.withProposal()) - .then(b => b.sendTx()); - - const optionIndex = 0; - const ephemeralSigners = 1; - const transactionIndex = 0; - const transactionMessage = new Uint8Array([1, 2, 3]); - - // Act - await realm.withVersionedTransaction(optionIndex, ephemeralSigners, transactionIndex, transactionMessage) - .then(b => b.sendTx()); - - // Assert - const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); - expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); - expect(versionedTx.optionIndex).toEqual(optionIndex); - expect(versionedTx.transactionIndex).toEqual(transactionIndex); - expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); - expect(Buffer.from(versionedTx.message.serialize())).toEqual(Buffer.from(transactionMessage)); -}); - -test('executeVersionedTransaction', async () => { - // Arrange - const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) - .then(b => b.withWallet()) - .then(b => b.withRealm()) - .then(b => b.withCommunityMember()) - .then(b => b.withGovernance()) - .then(b => b.withProposal()) - .then(b => b.withVersionedTransaction()) // Creates with defaults - .then(b => b.sendTx()); - - // Act - await realm.executeVersionedTransaction() - .then(b => b.sendTx()); - - // Assert - const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); - expect(versionedTx.executionStatus).toEqual(TransactionExecutionStatus.Success); - expect(versionedTx.executedAt).not.toBeNull(); -}); \ No newline at end of file +// test('insertVersionedTransaction', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.withProposal()) +// .then(b => b.sendTx()); + +// const optionIndex = 0; +// const ephemeralSigners = 1; +// const transactionIndex = 0; +// const transactionMessage = new Uint8Array([1, 2, 3]); + +// // Act +// await realm.withVersionedTransaction(optionIndex, ephemeralSigners, transactionIndex, transactionMessage) +// .then(b => b.sendTx()); + +// // Assert +// const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); +// expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); +// expect(versionedTx.optionIndex).toEqual(optionIndex); +// expect(versionedTx.transactionIndex).toEqual(transactionIndex); +// expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); +// expect(Buffer.from(versionedTx.message.serialize())).toEqual(Buffer.from(transactionMessage)); +// }); + +// test('executeVersionedTransaction', async () => { +// // Arrange +// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) +// .then(b => b.withWallet()) +// .then(b => b.withRealm()) +// .then(b => b.withCommunityMember()) +// .then(b => b.withGovernance()) +// .then(b => b.withProposal()) +// .then(b => b.withVersionedTransaction()) // Creates with defaults +// .then(b => b.sendTx()); + +// // Act +// await realm.executeVersionedTransaction() +// .then(b => b.sendTx()); + +// // Assert +// const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); +// expect(versionedTx.executionStatus).toEqual(TransactionExecutionStatus.Success); +// expect(versionedTx.executedAt).not.toBeNull(); +// }); \ No newline at end of file diff --git a/packages/governance-sdk/tests/tools/builders.ts b/packages/governance-sdk/tests/tools/builders.ts index cd98bae..929a257 100644 --- a/packages/governance-sdk/tests/tools/builders.ts +++ b/packages/governance-sdk/tests/tools/builders.ts @@ -19,6 +19,7 @@ import { getRealmConfig, getTokenOwnerRecord, getVoteRecord, + GovernanceAccountParser, Vote, withAddSignatory, withCastVote, @@ -89,7 +90,7 @@ export class BenchBuilder { connection?: Connection | undefined, programId?: PublicKey | undefined, ) { - connection = connection ?? new Connection(rpcEndpoint, 'processed'); + connection = connection ?? new Connection(rpcEndpoint, 'confirmed'); programId = programId ?? rpcProgramId; const programVersion = await getGovernanceProgramVersion( @@ -636,7 +637,7 @@ export class RealmBuilder { async withVersionedTransaction( optionIndex: number = 0, - ephemeralSigners: number | undefined, + ephemeralSigners: number = 0, transactionIndex: number = 0, transactionMessage: Uint8Array, ) { @@ -667,47 +668,23 @@ export class RealmBuilder { return this; } - // Helper method to get account data (you might need to implement these in your SDK) - async getTransactionBuffer(bufferPk: PublicKey): Promise { - // Placeholder - implement actual fetch from chain + async getTransactionBuffer(bufferPk: PublicKey): Promise { return this.bench.connection.getAccountInfo(bufferPk).then(account => { - // Deserialize account data into ProposalTransactionBuffer - // This is a simplification - you'll need proper deserialization - return new ProposalTransactionBuffer({ - accountType: 0, // Adjust as needed - proposal: this.proposalPk, - creator: this.bench.walletPk, - bufferIndex: 0, - finalBufferHash: new Uint8Array(32), - finalBufferSize: 0, - buffer: new Uint8Array(), - }); + if (!account) return null + return GovernanceAccountParser(ProposalTransactionBuffer)( + bufferPk, + account + ).account }); } - async getVersionedTransaction(txPk: PublicKey): Promise { - // Placeholder - implement actual fetch from chain + async getVersionedTransaction(txPk: PublicKey): Promise { return this.bench.connection.getAccountInfo(txPk).then(account => { - // Deserialize account data into ProposalVersionedTransaction - // This is a simplification - you'll need proper deserialization - return new ProposalVersionedTransaction({ - accountType: 0, // Adjust as needed - proposal: this.proposalPk, - optionIndex: 0, - transactionIndex: 0, - executionIndex: 0, - executedAt: null, - executionStatus: TransactionExecutionStatus.None, - ephemeralSignerBumps: [], - message: new ProposalTransactionMessage({ - numSigners: 0, - numWritableSigners: 0, - numWritableNonSigners: 0, - accountKeys: [], - instructions: [], - addressTableLookups: [], - }), - }); + if (!account) return null + return GovernanceAccountParser(ProposalVersionedTransaction)( + txPk, + account + ).account }); } } diff --git a/packages/governance-sdk/tests/tools/sdk.ts b/packages/governance-sdk/tests/tools/sdk.ts index 1b91ee9..3c4c704 100644 --- a/packages/governance-sdk/tests/tools/sdk.ts +++ b/packages/governance-sdk/tests/tools/sdk.ts @@ -6,7 +6,7 @@ export async function sendTransaction(connection: Connection, instructions: Tran signers.push(feePayer); let tx = await connection.sendTransaction(transaction, signers) - await connection.confirmTransaction(tx); + await connection.confirmTransaction(tx, 'confirmed'); } export async function requestAirdrop(connection: Connection, walletPk: PublicKey) { From be2111befca9ca12d12bdb990f6f37c4f8589efa Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Fri, 25 Apr 2025 22:26:01 +0400 Subject: [PATCH 07/14] finalize and versioned-transaction structure --- .../governance-sdk/src/governance/accounts.ts | 35 +- .../src/governance/serialisation.ts | 22 + .../withExecuteVersionedTransaction.ts | 3 + packages/governance-sdk/src/tools/borsh.ts | 2 - packages/governance-sdk/src/tools/index.ts | 1 + .../compileToWrappedMessageV0.ts | 2 +- .../{compiled-keys.ts => compiledKeys.ts} | 0 .../src/tools/versionedTransaction/index.ts | 3 + .../transactionMessage.ts | 30 +- .../tests/governance/api.smoke.test.ts | 10 +- .../tests/governance/api.v3.vtxn.test.ts | 982 +++++++++++------- .../governance-sdk/tests/tools/builders.ts | 73 +- packages/governance-sdk/tests/tools/sdk.ts | 30 +- 13 files changed, 759 insertions(+), 434 deletions(-) rename packages/governance-sdk/src/tools/versionedTransaction/{compiled-keys.ts => compiledKeys.ts} (100%) create mode 100644 packages/governance-sdk/src/tools/versionedTransaction/index.ts diff --git a/packages/governance-sdk/src/governance/accounts.ts b/packages/governance-sdk/src/governance/accounts.ts index 8b50949..c1ae124 100644 --- a/packages/governance-sdk/src/governance/accounts.ts +++ b/packages/governance-sdk/src/governance/accounts.ts @@ -1371,6 +1371,7 @@ export class VersionedTransactionMessageAddressTableLookup { this.readonlyIndexes = args.readonlyIndexes; } } + export class ProposalCompiledInstruction { programIdIndex: number; accountIndexes: number[]; @@ -1381,10 +1382,6 @@ export class ProposalCompiledInstruction { accountIndexes: number[]; data: Uint8Array; }) { - if (args.programIdIndex > 255) { - throw new Error('Program ID index must be a u8 (0-255)'); - } - args.accountIndexes.forEach(index => { if (index > 255) { throw new Error('Account indexes must be u8 (0-255)'); @@ -1464,7 +1461,6 @@ export class ProposalTransactionMessage { if (args.numSigners > 255) throw new Error('Number of signers must be a u8 (0-255)'); if (args.numWritableSigners > 255) throw new Error('Number of writable signers must be a u8 (0-255)'); if (args.numWritableNonSigners > 255) throw new Error('Number of writable non-signers must be a u8 (0-255)'); - this.numSigners = args.numSigners; this.numWritableSigners = args.numWritableSigners; this.numWritableNonSigners = args.numWritableNonSigners; @@ -1632,31 +1628,6 @@ export class ProposalVersionedTransaction { this.message.getNumWritableNonSigners(); return this.message.getAccountKeys().slice(0, writableCount); } - - // Serialize the transaction - serialize(): Uint8Array { - const accountKeysLength = this.message.getAccountKeys().length * 32; // 32 bytes per pubkey - const instructionsLength = this.message.getInstructions().reduce( - (acc, inst) => acc + inst.serialize().length, 0 - ); - - const buffer = new Uint8Array( - 1 + // account type - 32 + // proposal pubkey - 1 + // option index - 2 + // transaction index - 1 + // execution index - 8 + // executed at - 1 + // execution status - 1 + this.ephemeralSignerBumps.length + // bumps - 3 + // message header (num_signers, num_writable_signers, num_writable_non_signers) - accountKeysLength + - instructionsLength - ); - - // Actual serialization implementation would go here - return buffer; - } } export async function getProposalTransactionAddress( @@ -1843,10 +1814,10 @@ export async function getProposalTransactionBufferAddress( bufferIndexBuffer, ]; - const [instructionAddress] = await PublicKey.findProgramAddress( + const [transactionBufferAddress] = await PublicKey.findProgramAddress( seeds, programId, ); - return instructionAddress; + return transactionBufferAddress; } \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/serialisation.ts b/packages/governance-sdk/src/governance/serialisation.ts index 73e21d2..460b62c 100644 --- a/packages/governance-sdk/src/governance/serialisation.ts +++ b/packages/governance-sdk/src/governance/serialisation.ts @@ -1046,6 +1046,28 @@ function createGovernanceAccountSchema(accountVersion: number) { ], }, ], + [ + ProposalCompiledInstruction, + { + kind: 'struct', + fields: [ + ['programIdIndex', 'u8'], + ['accountIndexes', ['u8']], // Vector of u8 + ['data', ['u8']], // Vector of u8 (Uint8Array) + ], + }, + ], + [ + VersionedTransactionMessageAddressTableLookup, + { + kind: 'struct', + fields: [ + ['accountKey', 'pubkey'], + ['writableIndexes', ['u8']], // Vector of u8 + ['readonlyIndexes', ['u8']], // Vector of u8 + ], + }, + ], [ ProposalTransactionMessage, { diff --git a/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts b/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts index fc9afae..b9f7157 100644 --- a/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts +++ b/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts @@ -1,4 +1,5 @@ import { + AccountMeta, PublicKey, TransactionInstruction, } from '@solana/web3.js'; @@ -12,6 +13,7 @@ export const withExecuteVersionedTransaction = async ( governance: PublicKey, proposal: PublicKey, proposalTransaction: PublicKey, + remainingAccountKeys: AccountMeta[], ) => { const args = new ExecuteVersionedTransactionArgs(); const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); @@ -21,6 +23,7 @@ export const withExecuteVersionedTransaction = async ( { pubkey: proposal, isWritable: true, isSigner: false }, { pubkey: proposalTransaction, isWritable: true, isSigner: false }, ]; + keys.push(...remainingAccountKeys); instructions.push(new TransactionInstruction({ keys, programId, data })); return proposalTransaction; diff --git a/packages/governance-sdk/src/tools/borsh.ts b/packages/governance-sdk/src/tools/borsh.ts index 24cb7bf..569954a 100644 --- a/packages/governance-sdk/src/tools/borsh.ts +++ b/packages/governance-sdk/src/tools/borsh.ts @@ -31,7 +31,6 @@ function deserializeField( if (typeof fieldType[0] === 'number') { return reader.readFixedArray(fieldType[0]); } - return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader), ); @@ -45,7 +44,6 @@ function deserializeField( return undefined; } - return deserializeStruct(schema, fieldType, reader); } catch (error) { if (error instanceof BorshError) { diff --git a/packages/governance-sdk/src/tools/index.ts b/packages/governance-sdk/src/tools/index.ts index 244f2c4..b3e78af 100644 --- a/packages/governance-sdk/src/tools/index.ts +++ b/packages/governance-sdk/src/tools/index.ts @@ -4,3 +4,4 @@ export * from './numbers'; export * from './script'; export * from './version'; export * from './walletAdapter'; +export * from './versionedTransaction'; diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts b/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts index 47f06ca..33fe644 100644 --- a/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts +++ b/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts @@ -7,7 +7,7 @@ import { PublicKey, TransactionInstruction, } from "@solana/web3.js"; -import { CompiledKeys } from "./compiled-keys"; +import { CompiledKeys } from "./compiledKeys"; export function compileToWrappedMessageV0({ payerKey, diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts b/packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts similarity index 100% rename from packages/governance-sdk/src/tools/versionedTransaction/compiled-keys.ts rename to packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts diff --git a/packages/governance-sdk/src/tools/versionedTransaction/index.ts b/packages/governance-sdk/src/tools/versionedTransaction/index.ts new file mode 100644 index 0000000..122c971 --- /dev/null +++ b/packages/governance-sdk/src/tools/versionedTransaction/index.ts @@ -0,0 +1,3 @@ +export * from './compileToWrappedMessageV0'; +export * from './compiledKeys'; +export * from './transactionMessage'; \ No newline at end of file diff --git a/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts b/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts index 55adc53..c92be4e 100644 --- a/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts +++ b/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts @@ -7,7 +7,7 @@ import { } from "@solana/web3.js"; import invariant from "../invariant"; import { compileToWrappedMessageV0 } from "./compileToWrappedMessageV0"; -import { getEphemeralSignerPda, ProposalCompiledInstruction, ProposalTransactionMessage } from "../../governance"; +import { getEphemeralSignerPda, ProposalCompiledInstruction, ProposalTransactionMessage } from "../../governance/accounts"; export function isStaticWritableIndex( message: ProposalTransactionMessage, @@ -41,25 +41,25 @@ export function isSignerIndex(message: ProposalTransactionMessage, index: number } /** We use custom serialization for `transaction_message` that ensures as small byte size as possible. */ -export function transactionMessageToMultisigTransactionMessageBytes({ +export function transactionMessageToRealmsTransactionMessageBytes({ message, addressLookupTableAccounts, - governancePda, - treasuryPda, + governancePk, + treasuryPk, }: { message: TransactionMessage; addressLookupTableAccounts?: AddressLookupTableAccount[]; - governancePda: PublicKey; - treasuryPda: PublicKey; + governancePk: PublicKey; + treasuryPk: PublicKey; }): Uint8Array { // Make sure authority is marked as non-signer in all instructions, // otherwise the message will be serialized in incorrect format. message.instructions.forEach((instruction) => { instruction.keys.forEach((key) => { - if (key.pubkey.equals(governancePda)) { + if (key.pubkey.equals(governancePk)) { key.isSigner = false; } - if (key.pubkey.equals(treasuryPda)) { + if (key.pubkey.equals(treasuryPk)) { key.isSigner = false; } }); @@ -113,8 +113,8 @@ export async function accountsForTransactionExecute({ connection, transactionProposalPda, transactionIndex, - governancePda, - treasuryPda, + governancePk, + treasuryPk, message, ephemeralSignerBumps, programId, @@ -123,8 +123,8 @@ export async function accountsForTransactionExecute({ message: ProposalTransactionMessage; ephemeralSignerBumps: number[]; transactionIndex: number; - governancePda: PublicKey; - treasuryPda: PublicKey; + governancePk: PublicKey; + treasuryPk: PublicKey; transactionProposalPda: PublicKey; programId: PublicKey; }): Promise<{ @@ -174,12 +174,12 @@ export async function accountsForTransactionExecute({ accountMetas.push({ pubkey: accountKey, isWritable: isStaticWritableIndex(message, accountIndex), - // NOTE: governancePda and treasuryPda and ephemeralSignerPdas cannot be marked as signers, + // NOTE: governancePk and treasuryPk and ephemeralSignerPdas cannot be marked as signers, // because they are PDAs and hence won't have their signatures on the transaction. isSigner: isSignerIndex(message, accountIndex) && - !accountKey.equals(treasuryPda) && - !accountKey.equals(governancePda) && + !accountKey.equals(treasuryPk) && + !accountKey.equals(governancePk) && !ephemeralSignerPdas.find((k) => accountKey.equals(k)), }); } diff --git a/packages/governance-sdk/tests/governance/api.smoke.test.ts b/packages/governance-sdk/tests/governance/api.smoke.test.ts index 03781bc..b3f4939 100644 --- a/packages/governance-sdk/tests/governance/api.smoke.test.ts +++ b/packages/governance-sdk/tests/governance/api.smoke.test.ts @@ -1,4 +1,4 @@ -import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'; +import { createMintToInstruction, TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { Connection, Keypair, @@ -245,13 +245,13 @@ test('setupRealm', async () => { instructions = []; signers = []; - const instruction = Token.createMintToInstruction( - TOKEN_PROGRAM_ID, + const instruction = createMintToInstruction( mintPk, ataPk, governancePk, - [], 1, + [], + TOKEN_PROGRAM_ID, ); const instructionData = createInstructionData(instruction); @@ -493,7 +493,7 @@ test('tryGetRealmConfig', async () => { const realmConfig = await tryGetRealmConfig(connection, programId, realmPk); // Assert - expect(realmConfig.account.realm).toEqual(realmPk); + expect(realmConfig?.account.realm).toEqual(realmPk); }); test('setGovernanceDelegate', async () => { diff --git a/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts index 5cff726..77d7795 100644 --- a/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts +++ b/packages/governance-sdk/tests/governance/api.v3.vtxn.test.ts @@ -1,6 +1,7 @@ -import { Keypair } from '@solana/web3.js'; +import { ComputeBudgetProgram, Keypair, LAMPORTS_PER_SOL, PublicKey, TransactionInstruction, TransactionMessage } from '@solana/web3.js'; import BN from 'bn.js'; import { + getProposalTransactionBufferAddress, GovernanceConfig, GoverningTokenConfigAccountArgs, GoverningTokenType, @@ -12,312 +13,315 @@ import { import { PROGRAM_VERSION_V3 } from '../../src/registry/constants'; import { BenchBuilder } from '../tools/builders'; import { getTimestampFromDays } from '../tools/units'; +import { createTestTransferInstruction } from '../tools/sdk'; +import { transactionMessageToRealmsTransactionMessageBytes } from '../../src'; +import * as crypto from "crypto"; -// test('getGovernanceProgramVersion', async () => { -// // Arrange -// // Act -// const builder = await BenchBuilder.withConnection(); - -// // Assert -// expect(builder.programVersion).toEqual(3); -// }); - -// test('createRealmWithTokenConfigs', async () => { -// // Arrange -// const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => -// b.withWallet(), -// ); - -// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ -// voterWeightAddin: Keypair.generate().publicKey, -// maxVoterWeightAddin: Keypair.generate().publicKey, -// tokenType: GoverningTokenType.Dormant, -// }); -// const councilTokenConfig = new GoverningTokenConfigAccountArgs({ -// voterWeightAddin: Keypair.generate().publicKey, -// maxVoterWeightAddin: Keypair.generate().publicKey, -// tokenType: GoverningTokenType.Membership, -// }); - -// // Act -// const realm = await bench -// .withRealm(communityTokenConfig, councilTokenConfig) -// .then(b => b.sendTx()); - -// // Assert -// const realmConfig = await realm.getRealmConfig(); - -// expect(realmConfig.account.realm).toEqual(realm.realmPk); - -// // communityTokenConfig -// expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( -// communityTokenConfig.tokenType, -// ); -// expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( -// communityTokenConfig.voterWeightAddin, -// ); -// expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( -// communityTokenConfig.maxVoterWeightAddin, -// ); - -// // councilTokenConfig -// expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( -// GoverningTokenType.Membership, -// ); -// expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( -// councilTokenConfig.voterWeightAddin, -// ); -// expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( -// councilTokenConfig.maxVoterWeightAddin, -// ); -// }); - -// test('createGovernanceWithConfig', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.sendTx()); - -// const config = new GovernanceConfig({ -// communityVoteThreshold: new VoteThreshold({ -// type: VoteThresholdType.YesVotePercentage, -// value: 20, -// }), -// minCommunityTokensToCreateProposal: new BN(1), -// minInstructionHoldUpTime: 0, -// baseVotingTime: getTimestampFromDays(3), -// communityVoteTipping: VoteTipping.Strict, -// councilVoteTipping: VoteTipping.Strict, -// minCouncilTokensToCreateProposal: new BN(1), -// councilVoteThreshold: new VoteThreshold({ -// type: VoteThresholdType.YesVotePercentage, -// value: 60, -// }), -// councilVetoVoteThreshold: new VoteThreshold({ -// type: VoteThresholdType.YesVotePercentage, -// value: 80, -// }), -// communityVetoVoteThreshold: new VoteThreshold({ -// type: VoteThresholdType.YesVotePercentage, -// value: 80, -// }), -// votingCoolOffTime: 5000, -// depositExemptProposalCount: 10, -// }); - -// // Act -// const governancePk = await realm.createGovernance(config); - -// // Assert -// const governance = await realm.getGovernance(governancePk); - -// expect(governance.account.config.communityVoteThreshold).toEqual( -// config.communityVoteThreshold, -// ); - -// expect(governance.account.config.councilVoteThreshold).toEqual( -// config.councilVoteThreshold, -// ); - -// expect(governance.account.config.councilVetoVoteThreshold).toEqual( -// config.councilVetoVoteThreshold, -// ); - -// expect(governance.account.config.baseVotingTime).toEqual( -// getTimestampFromDays(3), -// ); - -// expect(governance.account.config.votingCoolOffTime).toEqual(5000); - -// expect(governance.account.config.depositExemptProposalCount).toEqual(10); -// }); - -// test('setRealmConfigWithTokenConfigs', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.sendTx()); - -// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ -// voterWeightAddin: Keypair.generate().publicKey, -// maxVoterWeightAddin: Keypair.generate().publicKey, -// tokenType: GoverningTokenType.Dormant, -// }); -// const councilTokenConfig = new GoverningTokenConfigAccountArgs({ -// voterWeightAddin: Keypair.generate().publicKey, -// maxVoterWeightAddin: Keypair.generate().publicKey, -// tokenType: GoverningTokenType.Membership, -// }); - -// // Act -// await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); - -// // Assert -// const realmConfig = await realm.getRealmConfig(); - -// expect(realmConfig.account.realm).toEqual(realm.realmPk); - -// // communityTokenConfig -// expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( -// communityTokenConfig.tokenType, -// ); -// expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( -// communityTokenConfig.voterWeightAddin, -// ); -// expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( -// communityTokenConfig.maxVoterWeightAddin, -// ); - -// // councilTokenConfig -// expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( -// GoverningTokenType.Membership, -// ); -// expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( -// councilTokenConfig.voterWeightAddin, -// ); -// expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( -// councilTokenConfig.maxVoterWeightAddin, -// ); -// }); - -// test('revokeGoverningToken', async () => { -// // Arrange - -// const communityTokenConfig = new GoverningTokenConfigAccountArgs({ -// voterWeightAddin: undefined, -// maxVoterWeightAddin: undefined, -// tokenType: GoverningTokenType.Membership, -// }); - -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm(communityTokenConfig)) -// .then(b => b.withCommunityMember()) -// .then(b => b.sendTx()); - -// // Act -// await realm.revokeGoverningTokens(); - -// // Assert -// const tokenOwnerRecord = await realm.getTokenOwnerRecord( -// realm.communityOwnerRecordPk, -// ); - -// expect( -// tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), -// ).toEqual(0); -// }); - -// test('createProposal', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection() -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.sendTx()); - -// // Act -// const proposalPk = await realm.createProposal('proposal 1'); - -// // Assert -// const proposal = await realm.getProposal(proposalPk); - -// expect(proposal.account.name).toEqual('proposal 1'); -// expect(proposal.account.vetoVoteWeight.toNumber()).toEqual(0); - -// const governance = await realm.getGovernance(proposal.account.governance); -// expect(governance.account.activeProposalCount.toNumber()).toEqual(1); -// }); - - -// test('createTransactionBuffer', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.sendTx()) -// .then(b => b.withProposal()) -// .then(b => b.sendTx()); -// const bufferIndex = 0; -// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash -// const finalBufferSize = 100; -// const buffer = new Uint8Array([1, 2, 3, 4]); - -// // Act -// await realm.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer) -// .then(b => b.sendTx()); - -// // Assert -// const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); -// if (!transactionBuffer) throw Error("No transaction buffer found") -// expect(transactionBuffer.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); -// expect(transactionBuffer.creator.toBase58()).toEqual(realm.bench.walletPk.toBase58()); -// expect(transactionBuffer.bufferIndex).toEqual(bufferIndex); -// expect(Buffer.from(transactionBuffer.finalBufferHash)).toEqual(Buffer.from(finalBufferHash)); -// expect(transactionBuffer.finalBufferSize).toEqual(finalBufferSize); -// expect(Buffer.from(transactionBuffer.buffer)).toEqual(Buffer.from(buffer)); -// }); - -// test('extendTransactionBuffer', async () => { -// const bufferIndex = 0; -// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash -// const finalBufferSize = 100; -// const buffer = new Uint8Array([1, 2, 3, 4]); -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.sendTx()) -// .then(b => b.withProposal()) -// .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) -// .then(b => b.sendTx()); - -// const extensionBuffer = new Uint8Array([4, 5, 6]); - -// // Act -// await realm.extendTransactionBuffer(bufferIndex, extensionBuffer) -// .then(b => b.sendTx()); - -// // Assert -// const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); -// if (!transactionBuffer) throw Error("No transaction buffer found") -// expect(transactionBuffer.buffer.length).toBeGreaterThan(4); // Original was [1,2,3] -// }); - -// test('closeTransactionBuffer', async () => { -// const bufferIndex = 0; -// const finalBufferHash = new Uint8Array(32).fill(1); // Example hash -// const finalBufferSize = 100; -// const buffer = new Uint8Array([1, 2, 3, 4]); -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.sendTx()) -// .then(b => b.withProposal()) -// .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) -// .then(b => b.sendTx()); - -// // Act -// await realm.closeTransactionBuffer(bufferIndex) -// .then(b => b.sendTx()); - -// // Assert -// const accountInfo = await realm.bench.connection.getAccountInfo(realm.proposalTransactionBufferPk); -// expect(accountInfo).toBeNull(); // Account should be closed -// }); +test('getGovernanceProgramVersion', async () => { + // Arrange + // Act + const builder = await BenchBuilder.withConnection(); -test('insertVersionedTransactionFromBuffer', async () => { + // Assert + expect(builder.programVersion).toEqual(3); +}); + +test('createRealmWithTokenConfigs', async () => { + // Arrange + const bench = await BenchBuilder.withConnection(PROGRAM_VERSION_V3).then(b => + b.withWallet(), + ); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + const realm = await bench + .withRealm(communityTokenConfig, councilTokenConfig) + .then(b => b.sendTx()); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('createGovernanceWithConfig', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.sendTx()); + + const config = new GovernanceConfig({ + communityVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 20, + }), + minCommunityTokensToCreateProposal: new BN(1), + minInstructionHoldUpTime: 0, + baseVotingTime: getTimestampFromDays(3), + communityVoteTipping: VoteTipping.Strict, + councilVoteTipping: VoteTipping.Strict, + minCouncilTokensToCreateProposal: new BN(1), + councilVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 60, + }), + councilVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + communityVetoVoteThreshold: new VoteThreshold({ + type: VoteThresholdType.YesVotePercentage, + value: 80, + }), + votingCoolOffTime: 5000, + depositExemptProposalCount: 10, + }); + + // Act + const governancePk = await realm.createGovernance(config); + + // Assert + const governance = await realm.getGovernance(governancePk); + + expect(governance.account.config.communityVoteThreshold).toEqual( + config.communityVoteThreshold, + ); + + expect(governance.account.config.councilVoteThreshold).toEqual( + config.councilVoteThreshold, + ); + + expect(governance.account.config.councilVetoVoteThreshold).toEqual( + config.councilVetoVoteThreshold, + ); + + expect(governance.account.config.baseVotingTime).toEqual( + getTimestampFromDays(3), + ); + + expect(governance.account.config.votingCoolOffTime).toEqual(5000); + + expect(governance.account.config.depositExemptProposalCount).toEqual(10); +}); + +test('setRealmConfigWithTokenConfigs', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.sendTx()); + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Dormant, + }); + const councilTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: Keypair.generate().publicKey, + maxVoterWeightAddin: Keypair.generate().publicKey, + tokenType: GoverningTokenType.Membership, + }); + + // Act + await realm.setRealmConfig(communityTokenConfig, councilTokenConfig); + + // Assert + const realmConfig = await realm.getRealmConfig(); + + expect(realmConfig.account.realm).toEqual(realm.realmPk); + + // communityTokenConfig + expect(realmConfig.account.communityTokenConfig.tokenType).toEqual( + communityTokenConfig.tokenType, + ); + expect(realmConfig.account.communityTokenConfig.voterWeightAddin).toEqual( + communityTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.communityTokenConfig.maxVoterWeightAddin).toEqual( + communityTokenConfig.maxVoterWeightAddin, + ); + + // councilTokenConfig + expect(realmConfig.account.councilTokenConfig.tokenType).toEqual( + GoverningTokenType.Membership, + ); + expect(realmConfig.account.councilTokenConfig.voterWeightAddin).toEqual( + councilTokenConfig.voterWeightAddin, + ); + expect(realmConfig.account.councilTokenConfig.maxVoterWeightAddin).toEqual( + councilTokenConfig.maxVoterWeightAddin, + ); +}); + +test('revokeGoverningToken', async () => { + // Arrange + + const communityTokenConfig = new GoverningTokenConfigAccountArgs({ + voterWeightAddin: undefined, + maxVoterWeightAddin: undefined, + tokenType: GoverningTokenType.Membership, + }); + + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm(communityTokenConfig)) + .then(b => b.withCommunityMember()) + .then(b => b.sendTx()); + + // Act + await realm.revokeGoverningTokens(); + + // Assert + const tokenOwnerRecord = await realm.getTokenOwnerRecord( + realm.communityOwnerRecordPk, + ); + + expect( + tokenOwnerRecord.account.governingTokenDepositAmount.toNumber(), + ).toEqual(0); +}); + +test('createProposal', async () => { + // Arrange + const realm = await BenchBuilder.withConnection() + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()); + + // Act + const proposalPk = await realm.createProposal('proposal 1'); + + // Assert + const proposal = await realm.getProposal(proposalPk); + + expect(proposal.account.name).toEqual('proposal 1'); + expect(proposal.account.vetoVoteWeight.toNumber()).toEqual(0); + + const governance = await realm.getGovernance(proposal.account.governance); + expect(governance.account.activeProposalCount.toNumber()).toEqual(1); +}); + + +test('createTransactionBuffer', async () => { + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()) + .then(b => b.withProposal()) + .then(b => b.sendTx()); + const bufferIndex = 0; + const finalBufferHash = new Uint8Array(32).fill(1); // Example hash + const finalBufferSize = 100; + const buffer = new Uint8Array([1, 2, 3, 4]); + + // Act + await realm.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); + expect(transactionBuffer.creator.toBase58()).toEqual(realm.bench.walletPk.toBase58()); + expect(transactionBuffer.bufferIndex).toEqual(bufferIndex); + expect(Buffer.from(transactionBuffer.finalBufferHash)).toEqual(Buffer.from(finalBufferHash)); + expect(transactionBuffer.finalBufferSize).toEqual(finalBufferSize); + expect(Buffer.from(transactionBuffer.buffer)).toEqual(Buffer.from(buffer)); +}); + +test('extendTransactionBuffer', async () => { + const bufferIndex = 0; + const finalBufferHash = new Uint8Array(32).fill(1); // Example hash + const finalBufferSize = 100; + const buffer = new Uint8Array([1, 2, 3, 4]); + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()) + .then(b => b.withProposal()) + .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) + .then(b => b.sendTx()); + + const extensionBuffer = new Uint8Array([4, 5, 6]); + + // Act + await realm.extendTransactionBuffer(bufferIndex, extensionBuffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.buffer.length).toBeGreaterThan(4); // Original was [1,2,3] +}); + +test('closeTransactionBuffer', async () => { + const bufferIndex = 0; + const finalBufferHash = new Uint8Array(32).fill(1); // Example hash + const finalBufferSize = 100; + const buffer = new Uint8Array([1, 2, 3, 4]); + // Arrange + const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.sendTx()) + .then(b => b.withProposal()) + .then(b => b.withTransactionBuffer(bufferIndex, finalBufferHash, finalBufferSize, buffer)) + .then(b => b.sendTx()); + + // Act + await realm.closeTransactionBuffer(bufferIndex) + .then(b => b.sendTx()); + + // Assert + const accountInfo = await realm.bench.connection.getAccountInfo(realm.proposalTransactionBufferPk); + expect(accountInfo).toBeNull(); // Account should be closed +}); + +test('insertVersionedTransactionFromBuffer fails if final buffer hash is not correct', async () => { const bufferIndex = 0; const finalBufferHash = new Uint8Array(32).fill(1); // Example hash const finalBufferSize = 4; @@ -337,64 +341,332 @@ test('insertVersionedTransactionFromBuffer', async () => { const ephemeralSigners = 0; const transactionIndex = 0; + // Act + const txBuilder = await realm.withVersionedTransactionFromBuffer( + optionIndex, + ephemeralSigners, + transactionIndex, + bufferIndex + ); + + await expect(txBuilder.sendTx()).rejects.toThrow(); +}); + +test('insertVersionedTransactionFromBuffer', async () => { + const testPayee = Keypair.generate(); + const bufferIndex = 0; + // Arrange + let realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withNativeTreasury()) + .then(b => b.sendTx()) + + const testIx = createTestTransferInstruction( + realm.governancePk, + testPayee.publicKey, + 1 * LAMPORTS_PER_SOL + ); + + let instructions: TransactionInstruction[] = []; + + for (let i = 0; i <= 2; i++) { + instructions.push(testIx); + } + const testTransferMessage = new TransactionMessage({ + payerKey: realm.governancePk, + recentBlockhash: PublicKey.default.toString(), + instructions: instructions, + }); + + // // Serialize the message. Must be done with this util function + const messageBuffer = + transactionMessageToRealmsTransactionMessageBytes({ + message: testTransferMessage, + addressLookupTableAccounts: [], + governancePk: realm.governancePk, + treasuryPk: realm.treasuryPk! + }); + + const messageHash = crypto + .createHash("sha256") + .update(messageBuffer) + .digest(); + + realm = await realm.withProposal() + .then(b => b.sendTx()); + + await realm.withTransactionBuffer(bufferIndex, messageHash, messageBuffer.length, messageBuffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.buffer.length).toEqual(messageBuffer.length); + expect(transactionBuffer.finalBufferHash).toEqual(Uint8Array.from(messageHash)) +}); + +test('insertVersionedTransaction', async () => { + const testPayee = Keypair.generate(); + const bufferIndex = 0; + // Arrange + let realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withNativeTreasury()) + .then(b => b.sendTx()) + + const testIx = createTestTransferInstruction( + realm.governancePk, + testPayee.publicKey, + 1 * LAMPORTS_PER_SOL + ); + + let instructions: TransactionInstruction[] = []; + + for (let i = 0; i <= 2; i++) { + instructions.push(testIx); + } + const testTransferMessage = new TransactionMessage({ + payerKey: realm.governancePk, + recentBlockhash: PublicKey.default.toString(), + instructions: instructions, + }); + + // // Serialize the message. Must be done with this util function + const messageBuffer = + transactionMessageToRealmsTransactionMessageBytes({ + message: testTransferMessage, + addressLookupTableAccounts: [], + governancePk: realm.governancePk, + treasuryPk: realm.treasuryPk! + }); + + const messageHash = crypto + .createHash("sha256") + .update(messageBuffer) + .digest(); + + realm = await realm.withProposal() + .then(b => b.sendTx()); + + await realm.withTransactionBuffer(bufferIndex, messageHash, messageBuffer.length, messageBuffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.buffer.length).toEqual(messageBuffer.length); + expect(transactionBuffer.finalBufferHash).toEqual(Uint8Array.from(messageHash)) + + const optionIndex = 0; + const ephemeralSigners = 0; + const transactionIndex = 0; // Act await realm.withVersionedTransactionFromBuffer(optionIndex, ephemeralSigners, transactionIndex, bufferIndex) .then(b => b.sendTx()); // Assert - const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); - if (!versionedTx) throw Error("No versionedTx found") + const versionedTx = await realm.getVersionedTransactionProposal(realm.proposalVersionedTxPk); + if (!versionedTx) throw Error("No versioned transaction found") expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); expect(versionedTx.optionIndex).toEqual(optionIndex); expect(versionedTx.transactionIndex).toEqual(transactionIndex); expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); + expect(Buffer.from(versionedTx.message.serialize())).toEqual(Buffer.from(messageBuffer)); }); -// test('insertVersionedTransaction', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.withProposal()) -// .then(b => b.sendTx()); - -// const optionIndex = 0; -// const ephemeralSigners = 1; -// const transactionIndex = 0; -// const transactionMessage = new Uint8Array([1, 2, 3]); - -// // Act -// await realm.withVersionedTransaction(optionIndex, ephemeralSigners, transactionIndex, transactionMessage) -// .then(b => b.sendTx()); - -// // Assert -// const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); -// expect(versionedTx.proposal.toBase58()).toEqual(realm.proposalPk.toBase58()); -// expect(versionedTx.optionIndex).toEqual(optionIndex); -// expect(versionedTx.transactionIndex).toEqual(transactionIndex); -// expect(versionedTx.ephemeralSignerBumps.length).toEqual(ephemeralSigners); -// expect(Buffer.from(versionedTx.message.serialize())).toEqual(Buffer.from(transactionMessage)); -// }); - -// test('executeVersionedTransaction', async () => { -// // Arrange -// const realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) -// .then(b => b.withWallet()) -// .then(b => b.withRealm()) -// .then(b => b.withCommunityMember()) -// .then(b => b.withGovernance()) -// .then(b => b.withProposal()) -// .then(b => b.withVersionedTransaction()) // Creates with defaults -// .then(b => b.sendTx()); - -// // Act -// await realm.executeVersionedTransaction() -// .then(b => b.sendTx()); - -// // Assert -// const versionedTx = await realm.getVersionedTransaction(realm.proposalVersionedTxPk); -// expect(versionedTx.executionStatus).toEqual(TransactionExecutionStatus.Success); -// expect(versionedTx.executedAt).not.toBeNull(); -// }); \ No newline at end of file + +test('executeVersionedTransaction', async () => { + const testPayee = Keypair.generate(); + const bufferIndex = 0; + // Arrange + let realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withNativeTreasury()) + .then(b => b.sendTx()) + + // fund the treasury account + await realm.bench.connection.requestAirdrop( + realm.treasuryPk!, + LAMPORTS_PER_SOL * 10 + ) + const testIx = createTestTransferInstruction( + realm.treasuryPk!, + testPayee.publicKey, + 1 * LAMPORTS_PER_SOL + ); + + let instructions: TransactionInstruction[] = []; + + for (let i = 0; i <= 2; i++) { + instructions.push(testIx); + } + const testTransferMessage = new TransactionMessage({ + payerKey: realm.treasuryPk!, + recentBlockhash: PublicKey.default.toString(), + instructions: instructions, + }); + + // // Serialize the message. Must be done with this util function + const messageBuffer = + transactionMessageToRealmsTransactionMessageBytes({ + message: testTransferMessage, + addressLookupTableAccounts: [], + governancePk: realm.governancePk, + treasuryPk: realm.treasuryPk! + }); + + const messageHash = crypto + .createHash("sha256") + .update(messageBuffer) + .digest(); + + realm = await realm.withProposal() + .then(b => b.sendTx()); + + await realm.withTransactionBuffer(bufferIndex, messageHash, messageBuffer.length, messageBuffer) + .then(b => b.sendTx()); + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.buffer.length).toEqual(messageBuffer.length); + expect(transactionBuffer.finalBufferHash).toEqual(Uint8Array.from(messageHash)) + + const optionIndex = 0; + const ephemeralSigners = 0; + const transactionIndex = 0; + // Act + await realm.withVersionedTransactionFromBuffer(optionIndex, ephemeralSigners, transactionIndex, bufferIndex) + .then(b => b.sendTx()); + + await realm.withProposalSignOff() + .then(b => b.withCastVote()) + .then(b => b.sendTx()); + // Assert + + await new Promise(f => setTimeout(f, 2000)); + + await realm.executeVersionedTransaction() + .then(b => b.sendTx()); + + const versionedTx = await realm.getVersionedTransactionProposal(realm.proposalVersionedTxPk); + if (!versionedTx) throw Error("No versioned transaction found") + + expect(versionedTx.executionStatus).toEqual(1); // TransactionExecutionStatus.Success + expect(Number(versionedTx?.executedAt)).toBeLessThan(new Date().getTime() / 1000); +}); + + +test('executeVersionedTransaction with heaps and multiple buffers', async () => { + const testPayee = Keypair.generate(); + const bufferIndex = 0; + // Arrange + let realm = await BenchBuilder.withConnection(PROGRAM_VERSION_V3) + .then(b => b.withWallet()) + .then(b => b.withRealm()) + .then(b => b.withCommunityMember()) + .then(b => b.withGovernance()) + .then(b => b.withNativeTreasury()) + .then(b => b.sendTx()) + + // fund the treasury account + await realm.bench.connection.requestAirdrop( + realm.treasuryPk!, + LAMPORTS_PER_SOL * 100 + ) + const testIx = createTestTransferInstruction( + realm.treasuryPk!, + testPayee.publicKey, + 0.01 * LAMPORTS_PER_SOL + ); + + let instructions: TransactionInstruction[] = []; + + for (let i = 0; i <= 60; i++) { + instructions.push(testIx); + } + const testTransferMessage = new TransactionMessage({ + payerKey: realm.treasuryPk!, + recentBlockhash: PublicKey.default.toString(), + instructions: instructions, + }); + + // // Serialize the message. Must be done with this util function + const messageBuffer = + transactionMessageToRealmsTransactionMessageBytes({ + message: testTransferMessage, + addressLookupTableAccounts: [], + governancePk: realm.governancePk, + treasuryPk: realm.treasuryPk! + }); + + const messageHash = crypto + .createHash("sha256") + .update(messageBuffer) + .digest(); + + realm = await realm.withProposal() + .then(b => b.sendTx()); + const CHUNK_SIZE = 700; // Safe chunk size for buffer extension + + const firstSlice = messageBuffer.slice(0, CHUNK_SIZE); + + await realm.withTransactionBuffer(bufferIndex, messageHash, messageBuffer.length, firstSlice) + .then(b => b.sendTx()); + + const numChunks = Math.ceil(messageBuffer.length / CHUNK_SIZE); + for (let i = 1; i < numChunks; i++) { + const start = i * CHUNK_SIZE; + const end = Math.min(start + CHUNK_SIZE, messageBuffer.length); + const chunk = messageBuffer.slice(start, end); + await realm.extendTransactionBuffer(bufferIndex, chunk) + .then(b => b.sendTx()); + } + + // Assert + const transactionBuffer = await realm.getTransactionBuffer(realm.proposalTransactionBufferPk); + if (!transactionBuffer) throw Error("No transaction buffer found") + expect(transactionBuffer.buffer.length).toEqual(messageBuffer.length); + expect(transactionBuffer.finalBufferHash).toEqual(Uint8Array.from(messageHash)) + + const optionIndex = 0; + const ephemeralSigners = 0; + const transactionIndex = 0; + // Act + await realm.withVersionedTransactionFromBuffer(optionIndex, ephemeralSigners, transactionIndex, bufferIndex) + .then(b => b.sendTx()); + + await realm.withProposalSignOff() + .then(b => b.withCastVote()) + .then(b => b.sendTx()); + // Assert + + await new Promise(f => setTimeout(f, 2000)); + // add head frame + const requestHeapIx = ComputeBudgetProgram.requestHeapFrame({ + bytes: 262144, + }); + + const computeBudgetIxn = ComputeBudgetProgram.setComputeUnitLimit({ + units: 250_000, + }); + + realm.bench.instructions.push(requestHeapIx, computeBudgetIxn); + await realm.executeVersionedTransaction() + .then(b => b.sendTx()); + + const versionedTx = await realm.getVersionedTransactionProposal(realm.proposalVersionedTxPk); + if (!versionedTx) throw Error("No versioned transaction found") + + expect(versionedTx.executionStatus).toEqual(1); // TransactionExecutionStatus.Success + expect(Number(versionedTx?.executedAt)).toBeLessThan(new Date().getTime() / 1000); +}); diff --git a/packages/governance-sdk/tests/tools/builders.ts b/packages/governance-sdk/tests/tools/builders.ts index 929a257..fb6a48e 100644 --- a/packages/governance-sdk/tests/tools/builders.ts +++ b/packages/governance-sdk/tests/tools/builders.ts @@ -12,6 +12,7 @@ import { } from '@solana/web3.js'; import BN from 'bn.js'; import { + accountsForTransactionExecute, getGovernance, getProposal, getProposalDepositsByDepositPayer, @@ -25,6 +26,7 @@ import { withCastVote, withCloseTransactionBuffer, withCreateGovernance, + withCreateNativeTreasury, withCreateProposal, withCreateTransactionBuffer, withDepositGoverningTokens, @@ -57,7 +59,7 @@ import { import { getGovernanceProgramVersion } from '../../src/governance/version'; import { withCreateRealm } from '../../src/governance/withCreateRealm'; import { withSetRealmConfig } from '../../src/governance/withSetRealmConfig'; -import { requestAirdrop, sendTransaction } from './sdk'; +import { requestAirdrop, sendTransaction, sendV0Transaction } from './sdk'; import { rpcEndpoint, rpcProgramId } from './setup'; import { getTimestampFromDays } from './units'; import { withCreateAssociatedTokenAccount } from './withCreateAssociatedTokenAccount'; @@ -117,12 +119,13 @@ export class BenchBuilder { return this; } - async sendTx() { - await sendTransaction( + async sendTx(withSimulation) { + await sendV0Transaction( this.connection, this.instructions, this.signers, this.wallet, + withSimulation ); this.instructions = []; this.signers = []; @@ -155,6 +158,7 @@ export class RealmBuilder { governancePk: PublicKey; proposalPk: PublicKey; signatoryPk: PublicKey | undefined; + treasuryPk: PublicKey | undefined; voteRecordPk: PublicKey; proposalTransactionBufferPk: PublicKey; @@ -262,6 +266,29 @@ export class RealmBuilder { return getRealmConfig(this.bench.connection, realmConfigPk); } + async withdrawGoverningTokens(useToken2022?: boolean | undefined) { + const ataPk = await getAssociatedTokenAddress( + this.communityMintPk, + this.bench.walletPk, + false, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, + ); + + await withWithdrawGoverningTokens( + this.bench.instructions, + this.bench.programId, + this.bench.programVersion, + this.realmPk, + ataPk, + this.communityMintPk, + this.bench.walletPk, + useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, + ); + + await this.sendTx(); + } + async withCommunityMember(useToken2022?: boolean | undefined) { let ataPk = await withCreateAssociatedTokenAccount( this.bench.instructions, @@ -297,27 +324,15 @@ export class RealmBuilder { return this; } - async withdrawGoverningTokens(useToken2022?: boolean | undefined) { - const ataPk = await getAssociatedTokenAddress( - this.communityMintPk, - this.bench.walletPk, - false, - useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID, - ); - - await withWithdrawGoverningTokens( + async withNativeTreasury() { + this.treasuryPk = await withCreateNativeTreasury( this.bench.instructions, this.bench.programId, this.bench.programVersion, - this.realmPk, - ataPk, - this.communityMintPk, - this.bench.walletPk, - useToken2022 ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ID, + this.governancePk, + this.realmAuthorityPk ); - - await this.sendTx(); + return this } async revokeGoverningTokens(useToken2022?: boolean | undefined) { @@ -556,8 +571,8 @@ export class RealmBuilder { await this.sendTx(); } - async sendTx() { - await this.bench.sendTx(); + async sendTx(withSimulation: boolean = false) { + await this.bench.sendTx(withSimulation); return this; } @@ -658,12 +673,24 @@ export class RealmBuilder { } async executeVersionedTransaction() { + const versionedTransaction = await this.getVersionedTransactionProposal(this.proposalVersionedTxPk) + const {accountMetas, lookupTableAccounts: _lookupTableAccounts} = await accountsForTransactionExecute({ + connection: this.bench.connection, + transactionProposalPda: this.proposalVersionedTxPk, + transactionIndex: 0, + governancePk: this.governancePk, + treasuryPk: this.treasuryPk ?? this.communityMintPk, + message: versionedTransaction?.message!, + ephemeralSignerBumps: [], + programId: this.bench.programId, + }) await withExecuteVersionedTransaction( this.bench.instructions, this.bench.programId, this.governancePk, this.proposalPk, this.proposalVersionedTxPk, + accountMetas ); return this; } @@ -678,7 +705,7 @@ export class RealmBuilder { }); } - async getVersionedTransaction(txPk: PublicKey): Promise { + async getVersionedTransactionProposal(txPk: PublicKey): Promise { return this.bench.connection.getAccountInfo(txPk).then(account => { if (!account) return null return GovernanceAccountParser(ProposalVersionedTransaction)( diff --git a/packages/governance-sdk/tests/tools/sdk.ts b/packages/governance-sdk/tests/tools/sdk.ts index 3c4c704..2366c27 100644 --- a/packages/governance-sdk/tests/tools/sdk.ts +++ b/packages/governance-sdk/tests/tools/sdk.ts @@ -1,4 +1,4 @@ -import { Connection, Keypair, LAMPORTS_PER_SOL, PublicKey, Transaction, TransactionInstruction } from "@solana/web3.js"; +import { Connection, Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction, TransactionInstruction, TransactionMessage, VersionedTransaction } from "@solana/web3.js"; export async function sendTransaction(connection: Connection, instructions: TransactionInstruction[], signers: Keypair[], feePayer: Keypair) { let transaction = new Transaction({ feePayer: feePayer.publicKey }) @@ -9,6 +9,21 @@ export async function sendTransaction(connection: Connection, instructions: Tran await connection.confirmTransaction(tx, 'confirmed'); } +export async function sendV0Transaction(connection: Connection, instructions: TransactionInstruction[], signers: Keypair[], feePayer: Keypair, withSimulation: boolean) { + const messageV0 = new TransactionMessage({ + payerKey: feePayer.publicKey, + recentBlockhash: (await connection.getLatestBlockhash()).blockhash, + instructions, + }).compileToV0Message(); + + const transaction = new VersionedTransaction(messageV0); + transaction.sign([...signers, feePayer]); + withSimulation && console.log("Simulated Txn", await connection.simulateTransaction(transaction)); + + const tx = await connection.sendTransaction(transaction); + await connection.confirmTransaction(tx, 'confirmed'); +} + export async function requestAirdrop(connection: Connection, walletPk: PublicKey) { const airdropSignature = await connection.requestAirdrop( walletPk, @@ -16,4 +31,17 @@ export async function requestAirdrop(connection: Connection, walletPk: PublicKey ); await connection.confirmTransaction(airdropSignature); +} + + +export function createTestTransferInstruction( + authority: PublicKey, + recipient: PublicKey, + amount = 1000000 +) { + return SystemProgram.transfer({ + fromPubkey: authority, + lamports: amount, + toPubkey: recipient, + }); } \ No newline at end of file From 97b21d17efc1885bd4971fb4a03fba03fcacfbe2 Mon Sep 17 00:00:00 2001 From: crypt0miester Date: Sat, 26 Apr 2025 21:58:10 +0400 Subject: [PATCH 08/14] spl-gov --- .env | 1 - .prettierrc | 0 README.md | 74 +- assets/wallets/ledger.svg | 19 - assets/wallets/mathwallet.svg | 14 - assets/wallets/metamask.svg | 31 - assets/wallets/solflare.svg | 11 - assets/wallets/sollet.svg | 13 - assets/wallets/solong.png | Bin 1843 -> 0 bytes assets/wallets/torus.svg | 19 - assets/wallets/wormhole.svg | 3857 -- biome.json | 44 + bun.lock | 1089 + package.json | 125 +- packages/arweave-push/.gcloudignore | 16 - packages/arweave-push/README | 4 - packages/arweave-push/index.js | 348 - packages/arweave-push/package.json | 33 - packages/bridge-sdk/contracts/Address.json | 8234 ---- packages/bridge-sdk/contracts/BytesLib.json | 15462 -------- packages/bridge-sdk/contracts/Context.json | 558 - packages/bridge-sdk/contracts/ERC20.json | 13788 ------- packages/bridge-sdk/contracts/IERC20.json | 2160 -- .../bridge-sdk/contracts/ReentrancyGuard.json | 1000 - packages/bridge-sdk/contracts/SafeERC20.json | 6220 --- packages/bridge-sdk/contracts/SafeMath.json | 9420 ----- packages/bridge-sdk/contracts/WETH.json | 32099 --------------- packages/bridge-sdk/contracts/Wormhole.json | 32263 ---------------- .../bridge-sdk/contracts/WrappedAsset.json | 19868 ---------- packages/bridge-sdk/package.json | 83 - packages/bridge-sdk/src/bridge/claim.ts | 21 - packages/bridge-sdk/src/bridge/config.ts | 10 - packages/bridge-sdk/src/bridge/constants.ts | 4 - packages/bridge-sdk/src/bridge/custody.ts | 4 - packages/bridge-sdk/src/bridge/guardianSet.ts | 16 - packages/bridge-sdk/src/bridge/helpers.ts | 48 - packages/bridge-sdk/src/bridge/index.ts | 6 - packages/bridge-sdk/src/bridge/lock.ts | 123 - packages/bridge-sdk/src/bridge/meta.ts | 94 - .../bridge-sdk/src/bridge/signatureState.ts | 12 - .../src/bridge/transfer/fromSolana.ts | 281 - .../bridge-sdk/src/bridge/transfer/index.ts | 3 - .../src/bridge/transfer/interface.ts | 45 - .../src/bridge/transfer/toSolana.ts | 356 - .../src/bridge/transferOutProposal.ts | 23 - packages/bridge-sdk/src/contracts/ERC20.d.ts | 600 - .../bridge-sdk/src/contracts/ERC20Factory.ts | 332 - packages/bridge-sdk/src/contracts/IERC20.d.ts | 388 - .../bridge-sdk/src/contracts/IERC20Factory.ts | 200 - packages/bridge-sdk/src/contracts/WETH.d.ts | 436 - .../bridge-sdk/src/contracts/WETHFactory.ts | 220 - .../bridge-sdk/src/contracts/Wormhole.d.ts | 556 - .../src/contracts/WormholeFactory.ts | 448 - .../src/contracts/WrappedAsset.d.ts | 789 - .../src/contracts/WrappedAssetFactory.ts | 422 - packages/bridge-sdk/src/contracts/index.d.ts | 29 - packages/bridge-sdk/src/core/bridge.ts | 383 - packages/bridge-sdk/src/core/index.ts | 2 - packages/bridge-sdk/src/core/utils.ts | 22 - packages/bridge-sdk/src/index.ts | 10 - .../bridge-sdk/src/types/buffer-layout.d.ts | 4 - packages/bridge-sdk/tsconfig.json | 23 - packages/bridge/.env.production | 1 - packages/bridge/.gitignore | 1 - packages/bridge/_colors.less | 8 - packages/bridge/craco.config.js | 55 - packages/bridge/package.json | 119 - packages/bridge/public/CNAME | 1 - .../bridge/public/android-icon-144x144.png | Bin 13104 -> 0 bytes .../bridge/public/android-icon-192x192.png | Bin 18703 -> 0 bytes packages/bridge/public/android-icon-36x36.png | Bin 1970 -> 0 bytes packages/bridge/public/android-icon-48x48.png | Bin 2690 -> 0 bytes packages/bridge/public/android-icon-72x72.png | Bin 4098 -> 0 bytes packages/bridge/public/android-icon-96x96.png | Bin 6104 -> 0 bytes packages/bridge/public/appbar/logo.svg | 10 - packages/bridge/public/apple-icon-114x114.png | Bin 9379 -> 0 bytes packages/bridge/public/apple-icon-120x120.png | Bin 9840 -> 0 bytes packages/bridge/public/apple-icon-144x144.png | Bin 13104 -> 0 bytes packages/bridge/public/apple-icon-152x152.png | Bin 14195 -> 0 bytes packages/bridge/public/apple-icon-180x180.png | Bin 18411 -> 0 bytes packages/bridge/public/apple-icon-57x57.png | Bin 3411 -> 0 bytes packages/bridge/public/apple-icon-60x60.png | Bin 3416 -> 0 bytes packages/bridge/public/apple-icon-72x72.png | Bin 4098 -> 0 bytes packages/bridge/public/apple-icon-76x76.png | Bin 4553 -> 0 bytes .../bridge/public/apple-icon-precomposed.png | Bin 19277 -> 0 bytes packages/bridge/public/apple-icon.png | Bin 19277 -> 0 bytes packages/bridge/public/blockchains/ETH.svg | 10 - .../bridge/public/blockchains/solana.webp | Bin 1214 -> 0 bytes .../public/blockchains/walletconnect.svg | 12 - packages/bridge/public/favicon-16x16.png | Bin 1742 -> 0 bytes packages/bridge/public/favicon-32x32.png | Bin 1856 -> 0 bytes packages/bridge/public/favicon-96x96.png | Bin 6104 -> 0 bytes packages/bridge/public/help/overview.svg | 16 - packages/bridge/public/home/background.svg | 82 - packages/bridge/public/home/footer.svg | 16 - packages/bridge/public/home/get-started.svg | 4 - .../public/home/icons/bridge-direction.svg | 4 - .../bridge/public/home/icons/down-arrow.svg | 3 - packages/bridge/public/home/icons/layers.svg | 4 - packages/bridge/public/home/icons/sd-card.svg | 3 - packages/bridge/public/home/main-logo.svg | 44 - packages/bridge/public/index.html | 90 - packages/bridge/public/logo.ico | Bin 5430 -> 0 bytes packages/bridge/public/manifest.json | 46 - packages/bridge/public/ms-icon-144x144.png | Bin 13104 -> 0 bytes packages/bridge/public/ms-icon-150x150.png | Bin 14002 -> 0 bytes packages/bridge/public/ms-icon-310x310.png | Bin 42733 -> 0 bytes packages/bridge/public/ms-icon-70x70.png | Bin 4306 -> 0 bytes packages/bridge/public/robots.txt | 3 - .../bridge/public/transfer/background.svg | 97 - packages/bridge/public/transfer/input.svg | 3 - packages/bridge/public/transfer/select-bg.svg | 3 - packages/bridge/src/App.less | 341 - packages/bridge/src/App.tsx | 9 - packages/bridge/src/actions/index.ts | 1 - packages/bridge/src/ant-custom.less | 15 - packages/bridge/src/assets/metamask.svg | 31 - packages/bridge/src/assets/walletconnect.svg | 12 - packages/bridge/src/assets/wormhole.svg | 4719 --- .../bridge/src/components/AppBar/index.less | 102 - .../bridge/src/components/AppBar/index.tsx | 82 - .../src/components/AssetsTable/index.less | 45 - .../src/components/AssetsTable/index.tsx | 134 - .../CurrentUserWalletBadge/index.tsx | 31 - .../src/components/EthereumConnect/index.less | 58 - .../src/components/EthereumConnect/index.tsx | 64 - .../bridge/src/components/Footer/index.less | 3 - .../bridge/src/components/Footer/index.tsx | 27 - .../bridge/src/components/Input/index.tsx | 1 - .../bridge/src/components/Input/input.tsx | 87 - .../bridge/src/components/Input/style.less | 228 - .../bridge/src/components/Layout/index.less | 5 - .../bridge/src/components/Layout/index.tsx | 36 - .../RecentTransactionsTable/index.less | 54 - .../RecentTransactionsTable/index.tsx | 349 - .../components/SecurityAuditButton/index.less | 7 - .../components/SecurityAuditButton/index.tsx | 16 - .../bridge/src/components/Settings/index.tsx | 34 - .../src/components/TokenDisplay/index.tsx | 27 - .../src/components/TokenDisplay/style.less | 29 - .../components/TokenDisplay/tokenChain.tsx | 20 - .../src/components/TokenSelectModal/index.tsx | 175 - .../components/TokenSelectModal/style.less | 51 - .../bridge/src/components/Transfer/index.tsx | 318 - .../bridge/src/components/Transfer/style.less | 123 - .../bridge/src/components/Wormhole/Camera.tsx | 26 - .../bridge/src/components/Wormhole/Utils.ts | 78 - .../components/Wormhole/WormholeCanvas.tsx | 29 - .../components/Wormhole/WormholeGeometry.tsx | 80 - .../bridge/src/components/Wormhole/disc.png | Bin 1399 -> 0 bytes .../bridge/src/components/Wormhole/index.tsx | 32 - .../src/components/Wormhole/wormhole.less | 7 - packages/bridge/src/constants/index.tsx | 2 - packages/bridge/src/constants/labels.ts | 23 - packages/bridge/src/constants/style.tsx | 5 - packages/bridge/src/contexts/bridge.tsx | 31 - packages/bridge/src/contexts/chainPair.tsx | 405 - packages/bridge/src/contexts/coingecko.tsx | 49 - packages/bridge/src/contexts/ethereum.tsx | 261 - packages/bridge/src/contexts/index.tsx | 3 - packages/bridge/src/contexts/market.tsx | 361 - packages/bridge/src/contexts/tokenPair.tsx | 255 - packages/bridge/src/hooks/index.ts | 1 - .../bridge/src/hooks/useCorrectNetwork.tsx | 27 - .../bridge/src/hooks/useWormholeAccounts.tsx | 381 - .../src/hooks/useWormholeTransactions.tsx | 424 - packages/bridge/src/index.css | 33 - packages/bridge/src/index.tsx | 18 - packages/bridge/src/manifest.json | 22 - packages/bridge/src/models/dex/index.ts | 1 - packages/bridge/src/models/dex/market.ts | 47 - packages/bridge/src/models/index.ts | 1 - packages/bridge/src/models/marketOverrides.ts | 2 - packages/bridge/src/models/totals.ts | 12 - packages/bridge/src/react-app-env.d.ts | 1 - packages/bridge/src/routes.tsx | 75 - packages/bridge/src/serviceWorker.ts | 146 - packages/bridge/src/setupTests.ts | 5 - packages/bridge/src/types/buffer-layout.d.ts | 9 - packages/bridge/src/utils/assets.ts | 76 - packages/bridge/src/utils/helpers.ts | 19 - packages/bridge/src/utils/ids.ts | 37 - packages/bridge/src/utils/layout.ts | 121 - packages/bridge/src/views/faq/index.less | 0 packages/bridge/src/views/faq/index.tsx | 12 - packages/bridge/src/views/faucet/index.tsx | 57 - packages/bridge/src/views/help/index.less | 28 - packages/bridge/src/views/help/index.tsx | 53 - packages/bridge/src/views/home/index.less | 184 - packages/bridge/src/views/home/index.tsx | 80 - packages/bridge/src/views/home/item.tsx | 39 - packages/bridge/src/views/home/itemStyle.less | 37 - packages/bridge/src/views/index.tsx | 7 - .../src/views/proof-of-assets/index.less | 3 - .../src/views/proof-of-assets/index.tsx | 15 - packages/bridge/src/views/renbtc-debug.tsx | 185 - packages/bridge/src/views/transfer/index.less | 7 - packages/bridge/src/views/transfer/index.tsx | 16 - .../bridge/src/wallet-adapters/metamask.tsx | 104 - .../src/wallet-adapters/wallet-connect.tsx | 107 - packages/bridge/src/wdyr.ts | 8 - packages/bridge/tsconfig.json | 22 - packages/bridge/types/buffer-layout.d.ts | 9 - packages/common/.env.sample | 2 - packages/common/package.json | 80 - packages/common/src/actions/account.ts | 284 - packages/common/src/actions/auction.ts | 630 - packages/common/src/actions/index.ts | 4 - packages/common/src/actions/metadata.ts | 780 - packages/common/src/actions/vault.ts | 695 - .../components/ActionConfirmation/index.tsx | 31 - .../components/ActionConfirmation/style.less | 5 - .../common/src/components/AppBar/index.tsx | 50 - .../common/src/components/AppBar/style.less | 57 - .../src/components/BackButton/index.tsx | 13 - .../src/components/ConnectButton/index.tsx | 47 - .../src/components/CurrentUserBadge/index.tsx | 73 - .../components/CurrentUserBadge/styles.less | 15 - .../src/components/EtherscanLink/index.tsx | 39 - .../src/components/ExplorerLink/index.tsx | 52 - packages/common/src/components/Icons/info.tsx | 20 - .../common/src/components/Identicon/index.tsx | 40 - .../src/components/Identicon/style.less | 8 - .../common/src/components/Input/numeric.tsx | 43 - .../common/src/components/Settings/index.tsx | 69 - .../src/components/TokenDisplay/index.tsx | 58 - .../common/src/components/TokenIcon/index.tsx | 76 - packages/common/src/components/index.tsx | 13 - packages/common/src/constants/index.ts | 2 - packages/common/src/constants/labels.ts | 15 - packages/common/src/constants/math.ts | 7 - packages/common/src/contexts/accounts.tsx | 666 - packages/common/src/contexts/connection.tsx | 721 - packages/common/src/contexts/index.tsx | 6 - packages/common/src/contexts/wallet.tsx | 217 - packages/common/src/contracts/token.ts | 118 - packages/common/src/hooks/index.ts | 4 - packages/common/src/hooks/useAccountByMint.ts | 17 - packages/common/src/hooks/useThatState.ts | 16 - packages/common/src/hooks/useTokenName.ts | 10 - packages/common/src/hooks/useUserAccounts.ts | 9 - packages/common/src/index.tsx | 14 - packages/common/src/models/account.ts | 93 - packages/common/src/models/index.ts | 2 - packages/common/src/models/tokenSwap.ts | 84 - packages/common/src/types/buffer-layout.d.ts | 9 - packages/common/src/types/u64.d.ts | 6 - packages/common/src/utils/borsh.ts | 110 - packages/common/src/utils/errors.ts | 45 - packages/common/src/utils/eventEmitter.ts | 60 - packages/common/src/utils/explorer.ts | 64 - packages/common/src/utils/ids.ts | 177 - packages/common/src/utils/index.tsx | 10 - packages/common/src/utils/layout.ts | 121 - packages/common/src/utils/notifications.tsx | 33 - packages/common/src/utils/shortvec.ts | 30 - packages/common/src/utils/strings.ts | 74 - packages/common/src/utils/utils.ts | 261 - packages/common/tsconfig.json | 23 - packages/governance-sdk/README.md | 19 - packages/governance-sdk/package.json | 62 - .../governance-sdk/src/addins/accounts.ts | 118 - packages/governance-sdk/src/addins/api.ts | 45 - packages/governance-sdk/src/addins/index.ts | 3 - .../src/addins/serialisation.ts | 42 - packages/governance-sdk/src/chat/accounts.ts | 62 - packages/governance-sdk/src/chat/api.ts | 38 - packages/governance-sdk/src/chat/index.ts | 5 - .../governance-sdk/src/chat/instructions.ts | 15 - .../governance-sdk/src/chat/serialisation.ts | 48 - .../src/chat/withPostChatMessage.ts | 105 - packages/governance-sdk/src/core/api.ts | 128 - packages/governance-sdk/src/core/index.ts | 3 - .../governance-sdk/src/core/serialisation.ts | 25 - .../governance-sdk/src/governance/accounts.ts | 1823 - packages/governance-sdk/src/governance/api.ts | 386 - .../governance/createRevokeGoverningTokens.ts | 27 - .../governance/createSetGovernanceConfig.ts | 35 - .../src/governance/createSetRealmAuthority.ts | 26 - .../src/governance/createSetRealmConfig.ts | 37 - .../governance-sdk/src/governance/enums.ts | 11 - .../governance-sdk/src/governance/errors.ts | 178 - .../governance-sdk/src/governance/index.ts | 44 - .../src/governance/instructions.ts | 485 - .../src/governance/serialisation.ts | 1126 - .../governance-sdk/src/governance/tools.ts | 139 - .../governance-sdk/src/governance/version.ts | 114 - .../src/governance/withAddSignatory.ts | 84 - .../src/governance/withCancelProposal.ts | 77 - .../src/governance/withCastVote.ts | 134 - .../governance/withCloseTransactionBuffer.ts | 41 - .../src/governance/withCreateGovernance.ts | 111 - .../governance/withCreateMintGovernance.ts | 118 - .../governance/withCreateNativeTreasury.ts | 57 - .../governance/withCreateProgramGovernance.ts | 131 - .../src/governance/withCreateProposal.ts | 171 - .../src/governance/withCreateRealm.ts | 161 - .../governance/withCreateTokenGovernance.ts | 122 - .../governance/withCreateTokenOwnerRecord.ts | 71 - .../governance/withCreateTransactionBuffer.ts | 54 - .../governance/withDepositGoverningTokens.ts | 126 - .../src/governance/withExecuteTransaction.ts | 89 - .../withExecuteVersionedTransaction.ts | 30 - .../governance/withExtendTransactionBuffer.ts | 38 - .../src/governance/withFinalizeVote.ts | 81 - .../governance/withFlagTransactionError.ts | 62 - .../src/governance/withInsertTransaction.ts | 104 - .../withInsertVersionedTransaction.ts | 53 - ...ithInsertVersionedTransactionFromBuffer.ts | 61 - .../withRealmConfigPluginAccounts.ts | 34 - .../governance/withRefundProposalDeposit.ts | 50 - .../src/governance/withRelinquishVote.ts | 87 - .../src/governance/withRemoveTransaction.ts | 56 - .../governance/withRevokeGoverningTokens.ts | 89 - .../governance/withSetGovernanceDelegate.ts | 51 - .../src/governance/withSetRealmAuthority.ts | 52 - .../src/governance/withSetRealmConfig.ts | 117 - .../src/governance/withSignOffProposal.ts | 98 - .../governance/withUpdateProgramMetadata.ts | 47 - .../governance/withWithdrawGoverningTokens.ts | 81 - packages/governance-sdk/src/index.ts | 6 - packages/governance-sdk/src/registry/index.ts | 1 - packages/governance-sdk/src/tools/borsh.ts | 102 - packages/governance-sdk/src/tools/index.ts | 7 - .../governance-sdk/src/tools/invariant.ts | 48 - packages/governance-sdk/src/tools/script.ts | 7 - .../src/tools/sdk/bpfUpgradeableLoader.ts | 65 - .../governance-sdk/src/tools/sdk/index.ts | 3 - .../governance-sdk/src/tools/sdk/runtime.ts | 55 - .../governance-sdk/src/tools/sdk/splToken.ts | 5 - packages/governance-sdk/src/tools/version.ts | 13 - .../compileToWrappedMessageV0.ts | 54 - .../versionedTransaction/compiledKeys.ts | 179 - .../src/tools/versionedTransaction/index.ts | 3 - .../transactionMessage.ts | 232 - .../governance-sdk/src/tools/walletAdapter.ts | 22 - packages/governance-sdk/tsconfig.json | 22 - packages/governance/.env | 15 - packages/governance/.env.development | 1 - packages/governance/.env.production | 1 - packages/governance/README.md | 63 - packages/governance/craco.config.js | 31 - packages/governance/package.json | 86 - packages/governance/public/index.html | 81 - packages/governance/public/logo.ico | Bin 5430 -> 0 bytes packages/governance/public/manifest.json | 25 - packages/governance/public/robots.txt | 3 - packages/governance/public/splash.svg | 2222 -- packages/governance/src/App.less | 277 - packages/governance/src/App.tsx | 9 - .../governance/src/actions/cancelProposal.ts | 40 - packages/governance/src/actions/castVote.ts | 46 - .../src/actions/chat/postChatMessage.ts | 48 - .../src/actions/createNativeTreasury.ts | 35 - .../governance/src/actions/createProposal.ts | 71 - .../src/actions/createTreasuryAccount.ts | 57 - .../src/actions/depositGoverningTokens.ts | 52 - .../src/actions/devtools/createAccount.ts | 59 - .../devtools/generateGovernanceArtifacts.ts | 273 - .../src/actions/devtools/generateMint.ts | 57 - .../src/actions/dryRunInstruction.ts | 32 - .../src/actions/executeInstruction.ts | 36 - .../governance/src/actions/finalizeVote.ts | 37 - .../src/actions/flagInstructionError.ts | 38 - .../src/actions/insertInstruction.ts | 51 - .../src/actions/registerGovernance.ts | 106 - .../governance/src/actions/registerRealm.ts | 56 - .../governance/src/actions/relinquishVote.ts | 45 - .../src/actions/removeInstruction.ts | 40 - .../src/actions/setRealmAuthority.ts | 37 - .../governance/src/actions/signOffProposal.ts | 39 - .../src/actions/updateProgramMetadata.ts | 33 - .../src/actions/withdrawGoverningTokens.ts | 33 - packages/governance/src/ant-custom.less | 15 - .../AccountFormItem/accountFormItem.tsx | 57 - .../src/components/Background/index.tsx | 12 - .../src/components/Background/styles.less | 7 - .../GovernanceBadge/governanceBadge.tsx | 98 - .../src/components/GovernanceBadge/style.less | 6 - ...ark-horizontal-combined-rainbow.inline.svg | 20 - .../src/components/Layout/layout.tsx | 72 - .../components/MintFormItem/mintFormItem.tsx | 61 - .../ModalFormAction/modalFormAction.tsx | 247 - .../src/components/ModalFormAction/style.less | 6 - .../src/components/RealmBadge/realmBadge.tsx | 33 - .../src/components/RealmBadge/style.less | 6 - .../RealmDepositBadge/realmDepositBadge.tsx | 85 - .../appErrorBanner/appErrorBanner.tsx | 34 - .../governanceConfigFormItem.tsx | 272 - .../realmMintSupplyConfigFormItem.tsx | 134 - .../realmMintTokensFormItem.tsx | 109 - .../votingMintConfigFormItem.tsx | 132 - packages/governance/src/constants/index.tsx | 2 - packages/governance/src/constants/labels.ts | 196 - packages/governance/src/constants/style.tsx | 5 - .../src/contexts/GovernanceContext.tsx | 230 - packages/governance/src/hooks/accountHooks.ts | 275 - packages/governance/src/hooks/apiHooks.ts | 218 - .../src/hooks/useHasVoteTimeExpired.ts | 17 - .../src/hooks/useIsBeyondTimestamp.ts | 43 - packages/governance/src/hooks/useKeyParam.ts | 7 - .../governance/src/hooks/useRpcContext.ts | 41 - .../src/hooks/useVoterStakeRegistryClient.ts | 36 - packages/governance/src/index.tsx | 17 - packages/governance/src/manifest.json | 22 - packages/governance/src/react-app-env.d.ts | 1 - packages/governance/src/routes.tsx | 67 - packages/governance/src/serviceWorker.ts | 146 - packages/governance/src/setupTests.ts | 5 - .../src/tools/anchor/anchorHooks.ts | 44 - .../src/tools/anchor/idlInstructions.ts | 74 - packages/governance/src/tools/forms.ts | 16 - packages/governance/src/tools/option.ts | 75 - .../governance/src/tools/raydium/raydium.ts | 168 - packages/governance/src/tools/routeTools.ts | 38 - packages/governance/src/tools/script.ts | 27 - .../sdk/bpfUpgradeableLoader/accounts.ts | 48 - .../createSetUpgradeAuthority.ts | 39 - .../createUpgradeInstruction.ts | 65 - .../src/tools/sdk/core/connection.tsx | 305 - .../src/tools/sdk/token/splToken.ts | 104 - .../governance/src/tools/transactions.tsx | 99 - packages/governance/src/tools/units.ts | 218 - .../src/tools/validators/accounts/token.ts | 57 - .../accounts/upgradeable-program.ts | 68 - .../governance/src/tools/validators/pubkey.ts | 8 - .../src/tools/validators/voterWeightPlugin.ts | 11 - .../src/tools/voterStakeRegistry/accounts.ts | 36 - .../voterStakeRegistry/voterStakeRegistry.ts | 10 - .../governance/src/types/buffer-layout.d.ts | 90 - .../src/views/devtools/DevToolsView.tsx | 107 - .../src/views/devtools/controlTests.tsx | 88 - .../src/views/devtools/createMint.tsx | 119 - .../governance/src/views/devtools/style.less | 8 - .../buttons/addNativeTreasuryButton.tsx | 48 - .../buttons/governanceActionBar.tsx | 51 - .../governance/buttons/newProposalButton.tsx | 167 - .../src/views/governance/governanceView.tsx | 209 - .../src/views/governance/style.less | 58 - .../governance/src/views/home/HomeView.tsx | 95 - .../views/home/buttons/programActionBar.tsx | 38 - .../home/buttons/registerRealmButton.tsx | 188 - .../buttons/updateProgramMetadataButton.tsx | 31 - packages/governance/src/views/home/style.less | 93 - packages/governance/src/views/index.tsx | 2 - .../src/views/member/memberView.tsx | 81 - .../components/buttons/addSignersButton.tsx | 172 - .../components/buttons/cancelButton.tsx | 60 - .../components/buttons/castVoteButton.tsx | 98 - .../components/buttons/finalizeVoteButton.tsx | 41 - .../buttons/postChatMessageButton.tsx | 50 - .../components/buttons/proposalActionBar.tsx | 95 - .../buttons/relinquishVoteButton.tsx | 107 - .../components/buttons/signOffButton.tsx | 60 - .../components/header/proposalStateBadge.tsx | 49 - .../components/header/voteCountdown.tsx | 137 - .../buttons/dryRunInstructionButton.tsx | 209 - .../buttons/dryRunProposalButton.tsx | 220 - .../buttons/executeInstructionButton.tsx | 120 - .../buttons/flagInstructionErrorButton.tsx | 55 - .../instruction/instructionCard.tsx | 139 - .../instruction/newInstructionCard.tsx | 156 - .../accountInstructionsForm.tsx | 62 - .../anchorIdlSetBufferForm.tsx | 68 - .../instructionInput/governanceConfigForm.tsx | 66 - .../governanceInstructionForm.tsx | 99 - .../instructionInput/instructionInput.tsx | 133 - .../instructionInput/instructionSelector.tsx | 58 - .../instructionInput/mintInstructionsForm.tsx | 68 - .../nativeTokenTransferForm.tsx | 77 - .../programInstructionsForm.tsx | 87 - .../instructionInput/programUpgradeForm.tsx | 72 - .../raydiumAddLiquidityForm.tsx | 102 - .../instructionInput/raydiumStakeLPForm.tsx | 100 - .../instructionInput/raydiumStakeRAYForm.tsx | 91 - .../instructionInput/realmConfigForm.tsx | 191 - .../instructionInput/setRealmAuthority.tsx | 89 - .../instructionInput/splTokenMintToForm.tsx | 107 - .../instructionInput/splTokenTransferForm.tsx | 109 - .../tokenInstructionsForm.tsx | 125 - .../voterStakeConfigureMintForm.tsx | 120 - .../voterStakeCreateRegistrarForm.tsx | 75 - .../instructionInput/yieldFarming.ts | 78 - .../src/views/proposal/components/style.less | 45 - .../proposal/components/vote/voteScore.tsx | 294 - .../components/vote/voterBubbleGraph.tsx | 136 - .../proposal/components/vote/voterTable.tsx | 98 - .../src/views/proposal/proposalView.tsx | 530 - .../governance/src/views/proposal/style.less | 34 - .../buttons/createTreasuryAccountButton.tsx | 119 - .../buttons/depositGoverningTokensButton.tsx | 69 - .../views/realm/buttons/realmActionBar.tsx | 98 - .../buttons/registerGovernanceButton.tsx | 163 - .../realm/buttons/setRealmAuthorityButton.tsx | 56 - .../buttons/withdrawGoverningTokensButton.tsx | 82 - .../realm/components/accountDescription.tsx | 59 - .../realm/components/realmPopUpDetails.tsx | 88 - .../governance/src/views/realm/realmView.tsx | 156 - .../governance/src/views/realm/style.less | 110 - packages/governance/src/wdyr.ts | 8 - packages/governance/tsconfig.json | 22 - packages/lending/.env | 5 - packages/lending/.env.production | 1 - packages/lending/craco.config.js | 57 - packages/lending/package.json | 99 - packages/lending/public/index.html | 78 - packages/lending/public/logo.ico | Bin 5430 -> 0 bytes packages/lending/public/manifest.json | 25 - packages/lending/public/robots.txt | 3 - packages/lending/public/splash.svg | 2222 -- packages/lending/src/App.less | 305 - packages/lending/src/App.tsx | 9 - packages/lending/src/actions/borrow.tsx | 294 - packages/lending/src/actions/deposit.tsx | 155 - packages/lending/src/actions/index.ts | 5 - packages/lending/src/actions/liquidate.tsx | 162 - packages/lending/src/actions/obligation.tsx | 30 - packages/lending/src/actions/repay.tsx | 160 - packages/lending/src/actions/withdraw.tsx | 108 - packages/lending/src/ant-custom.less | 5 - .../components/BarChartStatistic/index.tsx | 55 - .../src/components/BorrowInput/index.tsx | 271 - .../src/components/BorrowInput/style.less | 8 - .../src/components/CollateralInput/index.tsx | 216 - .../src/components/CollateralInput/style.less | 62 - .../components/CollateralSelector/index.tsx | 99 - .../src/components/DepositInfoLine/index.tsx | 58 - .../src/components/DepositInfoLine/style.less | 10 - .../src/components/DepositInput/index.tsx | 138 - .../src/components/DepositInput/style.less | 8 - .../lending/src/components/Layout/index.tsx | 177 - .../src/components/LiquidateInput/index.tsx | 250 - .../src/components/LiquidateInput/style.less | 8 - .../src/components/LoanInfoLine/index.tsx | 96 - .../components/NothingBorrowedPanel/index.tsx | 35 - .../src/components/PoolPrice/index.tsx | 64 - .../src/components/RepayInput/index.tsx | 262 - .../src/components/RepayInput/style.less | 8 - .../src/components/ReserveStatus/index.tsx | 161 - .../src/components/ReserveStatus/style.less | 0 .../ReserveUtilizationChart/index.tsx | 45 - .../src/components/RiskSlider/index.tsx | 15 - .../src/components/RiskSlider/style.less | 9 - .../components/SideReserveOverview/index.tsx | 138 - .../src/components/SupplyOverview/index.tsx | 101 - .../src/components/UserLendingCard/index.tsx | 172 - .../src/components/WaterWave/index.less | 31 - .../src/components/WaterWave/index.tsx | 192 - .../src/components/WithdrawInput/index.tsx | 156 - .../src/components/WithdrawInput/style.less | 8 - packages/lending/src/constants/index.tsx | 3 - packages/lending/src/constants/labels.ts | 100 - packages/lending/src/constants/marks.ts | 23 - packages/lending/src/constants/style.tsx | 5 - packages/lending/src/contexts/lending.tsx | 167 - packages/lending/src/contexts/market.tsx | 682 - packages/lending/src/contexts/pools.tsx | 18 - packages/lending/src/hooks/index.ts | 12 - .../lending/src/hooks/useBorrowedAmount.ts | 99 - .../lending/src/hooks/useBorrowingPower.ts | 69 - .../lending/src/hooks/useCollateralBalance.ts | 71 - .../hooks/useEnrichedLendingObligations.ts | 176 - .../lending/src/hooks/useLendingMarket.ts | 55 - .../src/hooks/useLendingObligations.ts | 53 - .../lending/src/hooks/useLendingReserves.ts | 79 - packages/lending/src/hooks/useSliderInput.ts | 36 - packages/lending/src/hooks/useUserBalance.ts | 69 - packages/lending/src/hooks/useUserDeposits.ts | 123 - .../src/hooks/useUserObligationByReserve.ts | 34 - .../lending/src/hooks/useUserObligations.ts | 48 - packages/lending/src/index.css | 13 - packages/lending/src/index.tsx | 18 - packages/lending/src/manifest.json | 22 - packages/lending/src/models/airdrops.ts | 11 - packages/lending/src/models/dex/index.ts | 1 - packages/lending/src/models/dex/market.ts | 47 - packages/lending/src/models/index.ts | 3 - packages/lending/src/models/lending/borrow.ts | 149 - .../lending/src/models/lending/deposit.ts | 77 - packages/lending/src/models/lending/index.ts | 7 - .../lending/src/models/lending/lending.ts | 11 - .../lending/src/models/lending/liquidate.ts | 94 - packages/lending/src/models/lending/market.ts | 49 - .../lending/src/models/lending/obligation.ts | 114 - packages/lending/src/models/lending/repay.ts | 91 - .../lending/src/models/lending/reserve.ts | 286 - .../lending/src/models/lending/withdraw.ts | 56 - .../lending/src/models/marketOverrides.ts | 2 - packages/lending/src/models/pool.ts | 47 - packages/lending/src/models/totals.ts | 13 - packages/lending/src/react-app-env.d.ts | 1 - packages/lending/src/routes.tsx | 96 - packages/lending/src/serviceWorker.ts | 146 - packages/lending/src/setupTests.ts | 5 - packages/lending/src/types/buffer-layout.d.ts | 9 - packages/lending/src/utils/layout.ts | 121 - packages/lending/src/utils/pools.ts | 361 - packages/lending/src/utils/utils.ts | 11 - packages/lending/src/views/borrow/index.tsx | 30 - packages/lending/src/views/borrow/item.tsx | 50 - .../lending/src/views/borrow/itemStyle.less | 32 - .../lending/src/views/borrowReserve/index.tsx | 91 - .../src/views/borrowReserve/style.less | 16 - .../src/views/dashboard/deposit/index.tsx | 43 - .../src/views/dashboard/deposit/item.tsx | 51 - .../lending/src/views/dashboard/index.tsx | 56 - .../src/views/dashboard/obligation/index.tsx | 47 - .../src/views/dashboard/obligation/item.tsx | 104 - .../lending/src/views/dashboard/style.less | 84 - packages/lending/src/views/deposit/index.tsx | 1 - .../lending/src/views/deposit/view/index.tsx | 29 - .../lending/src/views/deposit/view/item.tsx | 63 - .../src/views/deposit/view/itemStyle.less | 33 - .../src/views/depositReserve/index.tsx | 49 - .../src/views/depositReserve/style.less | 30 - packages/lending/src/views/faucet/index.tsx | 58 - packages/lending/src/views/home/index.tsx | 158 - packages/lending/src/views/home/item.tsx | 81 - .../lending/src/views/home/itemStyle.less | 36 - packages/lending/src/views/index.tsx | 13 - .../lending/src/views/liquidate/index.tsx | 119 - packages/lending/src/views/liquidate/item.tsx | 95 - .../lending/src/views/liquidate/style.less | 48 - .../src/views/liquidateReserve/index.tsx | 51 - .../src/views/liquidateReserve/style.less | 30 - packages/lending/src/views/margin/index.tsx | 26 - packages/lending/src/views/margin/item.tsx | 56 - .../lending/src/views/margin/itemStyle.less | 32 - .../views/margin/newPosition/Breakdown.tsx | 133 - .../views/margin/newPosition/GainsChart.tsx | 297 - .../margin/newPosition/NewPositionForm.tsx | 222 - .../views/margin/newPosition/PoolHealth.tsx | 21 - .../src/views/margin/newPosition/index.tsx | 47 - .../views/margin/newPosition/interfaces.tsx | 22 - .../src/views/margin/newPosition/leverage.ts | 94 - .../src/views/margin/newPosition/style.less | 46 - .../src/views/margin/newPosition/utils.ts | 49 - packages/lending/src/views/margin/style.less | 46 - .../lending/src/views/repayReserve/index.tsx | 110 - .../lending/src/views/repayReserve/style.less | 30 - packages/lending/src/views/reserve/index.tsx | 36 - packages/lending/src/views/reserve/style.less | 9 - packages/lending/src/views/withdraw/index.tsx | 43 - .../lending/src/views/withdraw/style.less | 30 - packages/lending/src/wdyr.ts | 8 - packages/lending/tsconfig.json | 22 - packages/lending/types/buffer-layout.d.ts | 9 - packages/metavinci/.env.production | 1 - packages/metavinci/.gitignore | 2 - packages/metavinci/_colors.less | 5 - packages/metavinci/craco.config.js | 58 - packages/metavinci/landing/image.png | Bin 225325 -> 0 bytes packages/metavinci/landing/index.html | 49 - packages/metavinci/landing/landing.css | 101 - packages/metavinci/package.json | 105 - packages/metavinci/public/favicon-16x16.png | Bin 1742 -> 0 bytes packages/metavinci/public/favicon-32x32.png | Bin 1856 -> 0 bytes packages/metavinci/public/favicon-96x96.png | Bin 6104 -> 0 bytes packages/metavinci/public/img/artist1.jpeg | Bin 17967 -> 0 bytes packages/metavinci/public/img/artist2.jpeg | Bin 17896 -> 0 bytes packages/metavinci/public/img/artist3.jpeg | Bin 21618 -> 0 bytes packages/metavinci/public/img/artist4.jpeg | Bin 11364 -> 0 bytes packages/metavinci/public/img/banner1.jpeg | Bin 86687 -> 0 bytes packages/metavinci/public/index.html | 96 - packages/metavinci/public/logo.ico | Bin 5430 -> 0 bytes packages/metavinci/public/manifest.json | 46 - packages/metavinci/public/robots.txt | 3 - packages/metavinci/src/App.less | 120 - packages/metavinci/src/App.tsx | 9 - .../metavinci/src/actions/addTokensToVault.ts | 103 - packages/metavinci/src/actions/closeVault.ts | 140 - .../src/actions/createAuctionManager.ts | 334 - .../src/actions/createExternalPriceAccount.ts | 90 - packages/metavinci/src/actions/createVault.ts | 119 - packages/metavinci/src/actions/index.ts | 3 - packages/metavinci/src/actions/makeAuction.ts | 63 - packages/metavinci/src/actions/nft.tsx | 306 - .../metavinci/src/actions/sendPlaceBid.ts | 82 - .../metavinci/src/actions/sendRedeemBid.ts | 503 - packages/metavinci/src/ant-custom.less | 1 - .../src/components/AppBar/index.less | 72 - .../metavinci/src/components/AppBar/index.tsx | 48 - .../src/components/AppBar/searchBox.less | 7 - .../src/components/AppBar/searchBox.tsx | 18 - .../src/components/ArtCard/index.less | 63 - .../src/components/ArtCard/index.tsx | 83 - .../src/components/ArtContent/index.tsx | 28 - .../src/components/ArtistCard/index.less | 11 - .../src/components/ArtistCard/index.tsx | 26 - .../src/components/AuctionCard/index.less | 9 - .../src/components/AuctionCard/index.tsx | 176 - .../src/components/Confetti/index.tsx | 53 - .../src/components/Footer/index.less | 3 - .../metavinci/src/components/Footer/index.tsx | 25 - .../src/components/Layout/index.less | 17 - .../metavinci/src/components/Layout/index.tsx | 27 - .../src/components/MainAuctionCard/index.less | 44 - .../src/components/MainAuctionCard/index.tsx | 20 - .../src/components/PreSaleBanner/index.less | 26 - .../src/components/PreSaleBanner/index.tsx | 58 - .../src/components/Settings/index.tsx | 34 - .../src/components/UserSearch/index.tsx | 93 - .../src/components/UserSearch/styles.less | 11 - packages/metavinci/src/constants/index.tsx | 2 - packages/metavinci/src/constants/labels.ts | 19 - packages/metavinci/src/constants/style.tsx | 5 - packages/metavinci/src/contexts/coingecko.tsx | 49 - packages/metavinci/src/contexts/index.tsx | 2 - packages/metavinci/src/contexts/market.tsx | 365 - packages/metavinci/src/contexts/meta.tsx | 556 - packages/metavinci/src/hooks/index.ts | 5 - packages/metavinci/src/hooks/useArt.ts | 65 - packages/metavinci/src/hooks/useAuction.ts | 64 - packages/metavinci/src/hooks/useAuctions.ts | 291 - .../metavinci/src/hooks/useBidsForAuction.ts | 44 - packages/metavinci/src/hooks/useUserArts.ts | 54 - packages/metavinci/src/index.tsx | 17 - packages/metavinci/src/manifest.json | 22 - packages/metavinci/src/models/dex/index.ts | 1 - packages/metavinci/src/models/dex/market.ts | 47 - packages/metavinci/src/models/index.ts | 1 - .../metavinci/src/models/marketOverrides.ts | 2 - .../metavinci/src/models/metaplex/index.ts | 411 - .../src/models/metaplex/initAuctionManager.ts | 146 - .../src/models/metaplex/redeemBid.ts | 141 - .../metaplex/redeemLimitedEditionBid.ts | 174 - .../models/metaplex/redeemMasterEditionBid.ts | 164 - .../models/metaplex/redeemOpenEditionBid.ts | 166 - .../src/models/metaplex/startAuction.ts | 60 - .../metaplex/validateSafetyDepositBox.ts | 148 - packages/metavinci/src/models/totals.ts | 12 - packages/metavinci/src/react-app-env.d.ts | 1 - packages/metavinci/src/routes.tsx | 78 - packages/metavinci/src/serviceWorker.ts | 146 - packages/metavinci/src/setupTests.ts | 5 - .../metavinci/src/types/buffer-layout.d.ts | 9 - packages/metavinci/src/types/index.ts | 42 - packages/metavinci/src/utils/assets.ts | 89 - packages/metavinci/src/utils/ids.ts | 18 - packages/metavinci/src/utils/layout.ts | 121 - packages/metavinci/src/utils/utils.ts | 25 - packages/metavinci/src/views/art/index.less | 32 - packages/metavinci/src/views/art/index.tsx | 45 - .../metavinci/src/views/artCreate/index.tsx | 802 - packages/metavinci/src/views/artist/index.tsx | 9 - .../metavinci/src/views/artists/index.tsx | 9 - .../metavinci/src/views/artworks/index.tsx | 85 - .../metavinci/src/views/auction/index.tsx | 55 - .../src/views/auctionCreate/artSelector.tsx | 157 - .../src/views/auctionCreate/index.tsx | 1557 - packages/metavinci/src/views/home/index.less | 74 - packages/metavinci/src/views/home/index.tsx | 94 - .../metavinci/src/views/home/sampleData.ts | 122 - packages/metavinci/src/views/index.tsx | 8 - packages/metavinci/src/views/styles.less | 306 - packages/metavinci/src/wdyr.ts | 8 - packages/metavinci/tsconfig.json | 22 - packages/metavinci/types/buffer-layout.d.ts | 9 - src/addins/accounts.ts | 112 + src/addins/api.ts | 26 + src/addins/index.ts | 3 + src/addins/serialisation.ts | 37 + src/chat/accounts.ts | 60 + src/chat/api.ts | 18 + src/chat/index.ts | 5 + src/chat/instructions.ts | 14 + src/chat/serialisation.ts | 44 + src/chat/withPostChatMessage.ts | 100 + .../src => src}/core/accounts.ts | 2 +- src/core/api.ts | 140 + src/core/index.ts | 3 + src/core/serialisation.ts | 21 + src/governance/accounts.ts | 1720 + src/governance/api.ts | 298 + src/governance/createRevokeGoverningTokens.ts | 27 + src/governance/createSetGovernanceConfig.ts | 33 + src/governance/createSetRealmAuthority.ts | 18 + src/governance/createSetRealmConfig.ts | 34 + src/governance/enums.ts | 11 + src/governance/errors.ts | 175 + src/governance/index.ts | 44 + src/governance/instructions.ts | 471 + src/governance/serialisation.ts | 1114 + src/governance/tools.ts | 124 + src/governance/version.ts | 90 + src/governance/withAddSignatory.ts | 74 + src/governance/withCancelProposal.ts | 70 + src/governance/withCastVote.ts | 116 + src/governance/withCloseTransactionBuffer.ts | 38 + src/governance/withCreateGovernance.ts | 95 + src/governance/withCreateMintGovernance.ts | 107 + src/governance/withCreateNativeTreasury.ts | 52 + src/governance/withCreateProgramGovernance.ts | 113 + src/governance/withCreateProposal.ts | 138 + src/governance/withCreateRealm.ts | 144 + src/governance/withCreateTokenGovernance.ts | 107 + src/governance/withCreateTokenOwnerRecord.ts | 69 + src/governance/withCreateTransactionBuffer.ts | 48 + src/governance/withDepositGoverningTokens.ts | 113 + src/governance/withExecuteTransaction.ts | 77 + .../withExecuteVersionedTransaction.ts | 51 + src/governance/withExtendTransactionBuffer.ts | 35 + src/governance/withFinalizeVote.ts | 68 + src/governance/withFlagTransactionError.ts | 56 + src/governance/withInsertTransaction.ts | 92 + .../withInsertVersionedTransaction.ts | 49 + ...ithInsertVersionedTransactionFromBuffer.ts | 56 + .../withRealmConfigPluginAccounts.ts | 34 + src/governance/withRefundProposalDeposit.ts | 44 + src/governance/withRelinquishVote.ts | 85 + src/governance/withRemoveTransaction.ts | 54 + src/governance/withRevokeGoverningTokens.ts | 79 + src/governance/withSetGovernanceDelegate.ts | 49 + src/governance/withSetRealmAuthority.ts | 50 + src/governance/withSetRealmConfig.ts | 111 + src/governance/withSignOffProposal.ts | 91 + src/governance/withUpdateProgramMetadata.ts | 45 + src/governance/withWithdrawGoverningTokens.ts | 75 + src/index.ts | 6 + .../src => src}/registry/constants.ts | 0 src/registry/index.ts | 1 + src/tools/borsh.ts | 80 + src/tools/index.ts | 6 + src/tools/invariant.ts | 48 + .../src => src}/tools/numbers.ts | 2 +- src/tools/script.ts | 7 + src/tools/sdk/bpfUpgradeableLoader.ts | 45 + src/tools/sdk/index.ts | 3 + src/tools/sdk/runtime.ts | 53 + src/tools/sdk/splToken.ts | 3 + src/tools/version.ts | 13 + .../compileToWrappedMessageV0.ts | 51 + .../versionedTransaction/compiledKeys.ts | 156 + src/tools/versionedTransaction/index.ts | 3 + .../transactionMessage.ts | 235 + .../tests => tests}/addins/api.smoke.test.ts | 0 .../tests => tests}/chat/api.test.ts | 0 .../governance/api.smoke.test.ts | 4 +- .../tests => tests}/governance/api.test.ts | 0 .../tests => tests}/governance/api.v1.test.ts | 0 .../tests => tests}/governance/api.v2.test.ts | 0 .../governance/api.v2.v3.test.ts | 0 .../governance/api.v3.t2022.test.ts | 0 .../tests => tests}/governance/api.v3.test.ts | 0 .../governance/api.v3.vtxn.test.ts | 23 +- .../tests => tests}/tools/builders.ts | 0 .../tests => tests}/tools/sdk.ts | 0 .../tests => tests}/tools/setup.ts | 0 .../tests => tests}/tools/units.ts | 0 .../tools/withCreateAssociatedTokenAccount.ts | 0 .../tests => tests}/tools/withCreateMint.ts | 0 .../tests => tests}/tools/withMintTo.ts | 0 tsconfig.json | 28 +- yarn.lock | 27579 ++----------- 854 files changed, 12449 insertions(+), 242016 deletions(-) delete mode 100644 .env delete mode 100644 .prettierrc delete mode 100644 assets/wallets/ledger.svg delete mode 100644 assets/wallets/mathwallet.svg delete mode 100644 assets/wallets/metamask.svg delete mode 100644 assets/wallets/solflare.svg delete mode 100644 assets/wallets/sollet.svg delete mode 100644 assets/wallets/solong.png delete mode 100644 assets/wallets/torus.svg delete mode 100644 assets/wallets/wormhole.svg create mode 100644 biome.json create mode 100644 bun.lock delete mode 100644 packages/arweave-push/.gcloudignore delete mode 100644 packages/arweave-push/README delete mode 100644 packages/arweave-push/index.js delete mode 100644 packages/arweave-push/package.json delete mode 100644 packages/bridge-sdk/contracts/Address.json delete mode 100644 packages/bridge-sdk/contracts/BytesLib.json delete mode 100644 packages/bridge-sdk/contracts/Context.json delete mode 100644 packages/bridge-sdk/contracts/ERC20.json delete mode 100644 packages/bridge-sdk/contracts/IERC20.json delete mode 100644 packages/bridge-sdk/contracts/ReentrancyGuard.json delete mode 100644 packages/bridge-sdk/contracts/SafeERC20.json delete mode 100644 packages/bridge-sdk/contracts/SafeMath.json delete mode 100644 packages/bridge-sdk/contracts/WETH.json delete mode 100644 packages/bridge-sdk/contracts/Wormhole.json delete mode 100644 packages/bridge-sdk/contracts/WrappedAsset.json delete mode 100644 packages/bridge-sdk/package.json delete mode 100644 packages/bridge-sdk/src/bridge/claim.ts delete mode 100644 packages/bridge-sdk/src/bridge/config.ts delete mode 100644 packages/bridge-sdk/src/bridge/constants.ts delete mode 100644 packages/bridge-sdk/src/bridge/custody.ts delete mode 100644 packages/bridge-sdk/src/bridge/guardianSet.ts delete mode 100644 packages/bridge-sdk/src/bridge/helpers.ts delete mode 100644 packages/bridge-sdk/src/bridge/index.ts delete mode 100644 packages/bridge-sdk/src/bridge/lock.ts delete mode 100644 packages/bridge-sdk/src/bridge/meta.ts delete mode 100644 packages/bridge-sdk/src/bridge/signatureState.ts delete mode 100644 packages/bridge-sdk/src/bridge/transfer/fromSolana.ts delete mode 100644 packages/bridge-sdk/src/bridge/transfer/index.ts delete mode 100644 packages/bridge-sdk/src/bridge/transfer/interface.ts delete mode 100644 packages/bridge-sdk/src/bridge/transfer/toSolana.ts delete mode 100644 packages/bridge-sdk/src/bridge/transferOutProposal.ts delete mode 100644 packages/bridge-sdk/src/contracts/ERC20.d.ts delete mode 100644 packages/bridge-sdk/src/contracts/ERC20Factory.ts delete mode 100644 packages/bridge-sdk/src/contracts/IERC20.d.ts delete mode 100644 packages/bridge-sdk/src/contracts/IERC20Factory.ts delete mode 100644 packages/bridge-sdk/src/contracts/WETH.d.ts delete mode 100644 packages/bridge-sdk/src/contracts/WETHFactory.ts delete mode 100644 packages/bridge-sdk/src/contracts/Wormhole.d.ts delete mode 100644 packages/bridge-sdk/src/contracts/WormholeFactory.ts delete mode 100644 packages/bridge-sdk/src/contracts/WrappedAsset.d.ts delete mode 100644 packages/bridge-sdk/src/contracts/WrappedAssetFactory.ts delete mode 100644 packages/bridge-sdk/src/contracts/index.d.ts delete mode 100644 packages/bridge-sdk/src/core/bridge.ts delete mode 100644 packages/bridge-sdk/src/core/index.ts delete mode 100644 packages/bridge-sdk/src/core/utils.ts delete mode 100644 packages/bridge-sdk/src/index.ts delete mode 100644 packages/bridge-sdk/src/types/buffer-layout.d.ts delete mode 100644 packages/bridge-sdk/tsconfig.json delete mode 100644 packages/bridge/.env.production delete mode 100644 packages/bridge/.gitignore delete mode 100644 packages/bridge/_colors.less delete mode 100644 packages/bridge/craco.config.js delete mode 100644 packages/bridge/package.json delete mode 100644 packages/bridge/public/CNAME delete mode 100644 packages/bridge/public/android-icon-144x144.png delete mode 100644 packages/bridge/public/android-icon-192x192.png delete mode 100644 packages/bridge/public/android-icon-36x36.png delete mode 100644 packages/bridge/public/android-icon-48x48.png delete mode 100644 packages/bridge/public/android-icon-72x72.png delete mode 100644 packages/bridge/public/android-icon-96x96.png delete mode 100644 packages/bridge/public/appbar/logo.svg delete mode 100644 packages/bridge/public/apple-icon-114x114.png delete mode 100644 packages/bridge/public/apple-icon-120x120.png delete mode 100644 packages/bridge/public/apple-icon-144x144.png delete mode 100644 packages/bridge/public/apple-icon-152x152.png delete mode 100644 packages/bridge/public/apple-icon-180x180.png delete mode 100644 packages/bridge/public/apple-icon-57x57.png delete mode 100644 packages/bridge/public/apple-icon-60x60.png delete mode 100644 packages/bridge/public/apple-icon-72x72.png delete mode 100644 packages/bridge/public/apple-icon-76x76.png delete mode 100644 packages/bridge/public/apple-icon-precomposed.png delete mode 100644 packages/bridge/public/apple-icon.png delete mode 100644 packages/bridge/public/blockchains/ETH.svg delete mode 100644 packages/bridge/public/blockchains/solana.webp delete mode 100644 packages/bridge/public/blockchains/walletconnect.svg delete mode 100644 packages/bridge/public/favicon-16x16.png delete mode 100644 packages/bridge/public/favicon-32x32.png delete mode 100644 packages/bridge/public/favicon-96x96.png delete mode 100644 packages/bridge/public/help/overview.svg delete mode 100644 packages/bridge/public/home/background.svg delete mode 100644 packages/bridge/public/home/footer.svg delete mode 100644 packages/bridge/public/home/get-started.svg delete mode 100644 packages/bridge/public/home/icons/bridge-direction.svg delete mode 100644 packages/bridge/public/home/icons/down-arrow.svg delete mode 100644 packages/bridge/public/home/icons/layers.svg delete mode 100644 packages/bridge/public/home/icons/sd-card.svg delete mode 100644 packages/bridge/public/home/main-logo.svg delete mode 100644 packages/bridge/public/index.html delete mode 100644 packages/bridge/public/logo.ico delete mode 100644 packages/bridge/public/manifest.json delete mode 100644 packages/bridge/public/ms-icon-144x144.png delete mode 100644 packages/bridge/public/ms-icon-150x150.png delete mode 100644 packages/bridge/public/ms-icon-310x310.png delete mode 100644 packages/bridge/public/ms-icon-70x70.png delete mode 100644 packages/bridge/public/robots.txt delete mode 100644 packages/bridge/public/transfer/background.svg delete mode 100644 packages/bridge/public/transfer/input.svg delete mode 100644 packages/bridge/public/transfer/select-bg.svg delete mode 100644 packages/bridge/src/App.less delete mode 100644 packages/bridge/src/App.tsx delete mode 100644 packages/bridge/src/actions/index.ts delete mode 100644 packages/bridge/src/ant-custom.less delete mode 100644 packages/bridge/src/assets/metamask.svg delete mode 100644 packages/bridge/src/assets/walletconnect.svg delete mode 100644 packages/bridge/src/assets/wormhole.svg delete mode 100644 packages/bridge/src/components/AppBar/index.less delete mode 100644 packages/bridge/src/components/AppBar/index.tsx delete mode 100644 packages/bridge/src/components/AssetsTable/index.less delete mode 100644 packages/bridge/src/components/AssetsTable/index.tsx delete mode 100644 packages/bridge/src/components/CurrentUserWalletBadge/index.tsx delete mode 100644 packages/bridge/src/components/EthereumConnect/index.less delete mode 100644 packages/bridge/src/components/EthereumConnect/index.tsx delete mode 100644 packages/bridge/src/components/Footer/index.less delete mode 100644 packages/bridge/src/components/Footer/index.tsx delete mode 100644 packages/bridge/src/components/Input/index.tsx delete mode 100644 packages/bridge/src/components/Input/input.tsx delete mode 100644 packages/bridge/src/components/Input/style.less delete mode 100644 packages/bridge/src/components/Layout/index.less delete mode 100644 packages/bridge/src/components/Layout/index.tsx delete mode 100644 packages/bridge/src/components/RecentTransactionsTable/index.less delete mode 100644 packages/bridge/src/components/RecentTransactionsTable/index.tsx delete mode 100644 packages/bridge/src/components/SecurityAuditButton/index.less delete mode 100644 packages/bridge/src/components/SecurityAuditButton/index.tsx delete mode 100644 packages/bridge/src/components/Settings/index.tsx delete mode 100644 packages/bridge/src/components/TokenDisplay/index.tsx delete mode 100644 packages/bridge/src/components/TokenDisplay/style.less delete mode 100644 packages/bridge/src/components/TokenDisplay/tokenChain.tsx delete mode 100644 packages/bridge/src/components/TokenSelectModal/index.tsx delete mode 100644 packages/bridge/src/components/TokenSelectModal/style.less delete mode 100644 packages/bridge/src/components/Transfer/index.tsx delete mode 100644 packages/bridge/src/components/Transfer/style.less delete mode 100644 packages/bridge/src/components/Wormhole/Camera.tsx delete mode 100644 packages/bridge/src/components/Wormhole/Utils.ts delete mode 100644 packages/bridge/src/components/Wormhole/WormholeCanvas.tsx delete mode 100644 packages/bridge/src/components/Wormhole/WormholeGeometry.tsx delete mode 100644 packages/bridge/src/components/Wormhole/disc.png delete mode 100644 packages/bridge/src/components/Wormhole/index.tsx delete mode 100644 packages/bridge/src/components/Wormhole/wormhole.less delete mode 100644 packages/bridge/src/constants/index.tsx delete mode 100644 packages/bridge/src/constants/labels.ts delete mode 100644 packages/bridge/src/constants/style.tsx delete mode 100644 packages/bridge/src/contexts/bridge.tsx delete mode 100644 packages/bridge/src/contexts/chainPair.tsx delete mode 100644 packages/bridge/src/contexts/coingecko.tsx delete mode 100644 packages/bridge/src/contexts/ethereum.tsx delete mode 100644 packages/bridge/src/contexts/index.tsx delete mode 100644 packages/bridge/src/contexts/market.tsx delete mode 100644 packages/bridge/src/contexts/tokenPair.tsx delete mode 100644 packages/bridge/src/hooks/index.ts delete mode 100644 packages/bridge/src/hooks/useCorrectNetwork.tsx delete mode 100644 packages/bridge/src/hooks/useWormholeAccounts.tsx delete mode 100644 packages/bridge/src/hooks/useWormholeTransactions.tsx delete mode 100644 packages/bridge/src/index.css delete mode 100644 packages/bridge/src/index.tsx delete mode 100644 packages/bridge/src/manifest.json delete mode 100644 packages/bridge/src/models/dex/index.ts delete mode 100644 packages/bridge/src/models/dex/market.ts delete mode 100644 packages/bridge/src/models/index.ts delete mode 100644 packages/bridge/src/models/marketOverrides.ts delete mode 100644 packages/bridge/src/models/totals.ts delete mode 100644 packages/bridge/src/react-app-env.d.ts delete mode 100644 packages/bridge/src/routes.tsx delete mode 100644 packages/bridge/src/serviceWorker.ts delete mode 100644 packages/bridge/src/setupTests.ts delete mode 100644 packages/bridge/src/types/buffer-layout.d.ts delete mode 100644 packages/bridge/src/utils/assets.ts delete mode 100644 packages/bridge/src/utils/helpers.ts delete mode 100644 packages/bridge/src/utils/ids.ts delete mode 100644 packages/bridge/src/utils/layout.ts delete mode 100644 packages/bridge/src/views/faq/index.less delete mode 100644 packages/bridge/src/views/faq/index.tsx delete mode 100644 packages/bridge/src/views/faucet/index.tsx delete mode 100644 packages/bridge/src/views/help/index.less delete mode 100644 packages/bridge/src/views/help/index.tsx delete mode 100644 packages/bridge/src/views/home/index.less delete mode 100644 packages/bridge/src/views/home/index.tsx delete mode 100644 packages/bridge/src/views/home/item.tsx delete mode 100644 packages/bridge/src/views/home/itemStyle.less delete mode 100644 packages/bridge/src/views/index.tsx delete mode 100644 packages/bridge/src/views/proof-of-assets/index.less delete mode 100644 packages/bridge/src/views/proof-of-assets/index.tsx delete mode 100644 packages/bridge/src/views/renbtc-debug.tsx delete mode 100644 packages/bridge/src/views/transfer/index.less delete mode 100644 packages/bridge/src/views/transfer/index.tsx delete mode 100644 packages/bridge/src/wallet-adapters/metamask.tsx delete mode 100644 packages/bridge/src/wallet-adapters/wallet-connect.tsx delete mode 100644 packages/bridge/src/wdyr.ts delete mode 100644 packages/bridge/tsconfig.json delete mode 100644 packages/bridge/types/buffer-layout.d.ts delete mode 100644 packages/common/.env.sample delete mode 100644 packages/common/package.json delete mode 100644 packages/common/src/actions/account.ts delete mode 100644 packages/common/src/actions/auction.ts delete mode 100644 packages/common/src/actions/index.ts delete mode 100644 packages/common/src/actions/metadata.ts delete mode 100644 packages/common/src/actions/vault.ts delete mode 100644 packages/common/src/components/ActionConfirmation/index.tsx delete mode 100644 packages/common/src/components/ActionConfirmation/style.less delete mode 100644 packages/common/src/components/AppBar/index.tsx delete mode 100644 packages/common/src/components/AppBar/style.less delete mode 100644 packages/common/src/components/BackButton/index.tsx delete mode 100644 packages/common/src/components/ConnectButton/index.tsx delete mode 100644 packages/common/src/components/CurrentUserBadge/index.tsx delete mode 100644 packages/common/src/components/CurrentUserBadge/styles.less delete mode 100644 packages/common/src/components/EtherscanLink/index.tsx delete mode 100644 packages/common/src/components/ExplorerLink/index.tsx delete mode 100644 packages/common/src/components/Icons/info.tsx delete mode 100644 packages/common/src/components/Identicon/index.tsx delete mode 100644 packages/common/src/components/Identicon/style.less delete mode 100644 packages/common/src/components/Input/numeric.tsx delete mode 100644 packages/common/src/components/Settings/index.tsx delete mode 100644 packages/common/src/components/TokenDisplay/index.tsx delete mode 100644 packages/common/src/components/TokenIcon/index.tsx delete mode 100644 packages/common/src/components/index.tsx delete mode 100644 packages/common/src/constants/index.ts delete mode 100644 packages/common/src/constants/labels.ts delete mode 100644 packages/common/src/constants/math.ts delete mode 100644 packages/common/src/contexts/accounts.tsx delete mode 100644 packages/common/src/contexts/connection.tsx delete mode 100644 packages/common/src/contexts/index.tsx delete mode 100644 packages/common/src/contexts/wallet.tsx delete mode 100644 packages/common/src/contracts/token.ts delete mode 100644 packages/common/src/hooks/index.ts delete mode 100644 packages/common/src/hooks/useAccountByMint.ts delete mode 100644 packages/common/src/hooks/useThatState.ts delete mode 100644 packages/common/src/hooks/useTokenName.ts delete mode 100644 packages/common/src/hooks/useUserAccounts.ts delete mode 100644 packages/common/src/index.tsx delete mode 100644 packages/common/src/models/account.ts delete mode 100644 packages/common/src/models/index.ts delete mode 100644 packages/common/src/models/tokenSwap.ts delete mode 100644 packages/common/src/types/buffer-layout.d.ts delete mode 100644 packages/common/src/types/u64.d.ts delete mode 100644 packages/common/src/utils/borsh.ts delete mode 100644 packages/common/src/utils/errors.ts delete mode 100644 packages/common/src/utils/eventEmitter.ts delete mode 100644 packages/common/src/utils/explorer.ts delete mode 100644 packages/common/src/utils/ids.ts delete mode 100644 packages/common/src/utils/index.tsx delete mode 100644 packages/common/src/utils/layout.ts delete mode 100644 packages/common/src/utils/notifications.tsx delete mode 100644 packages/common/src/utils/shortvec.ts delete mode 100644 packages/common/src/utils/strings.ts delete mode 100644 packages/common/src/utils/utils.ts delete mode 100644 packages/common/tsconfig.json delete mode 100644 packages/governance-sdk/README.md delete mode 100644 packages/governance-sdk/package.json delete mode 100644 packages/governance-sdk/src/addins/accounts.ts delete mode 100644 packages/governance-sdk/src/addins/api.ts delete mode 100644 packages/governance-sdk/src/addins/index.ts delete mode 100644 packages/governance-sdk/src/addins/serialisation.ts delete mode 100644 packages/governance-sdk/src/chat/accounts.ts delete mode 100644 packages/governance-sdk/src/chat/api.ts delete mode 100644 packages/governance-sdk/src/chat/index.ts delete mode 100644 packages/governance-sdk/src/chat/instructions.ts delete mode 100644 packages/governance-sdk/src/chat/serialisation.ts delete mode 100644 packages/governance-sdk/src/chat/withPostChatMessage.ts delete mode 100644 packages/governance-sdk/src/core/api.ts delete mode 100644 packages/governance-sdk/src/core/index.ts delete mode 100644 packages/governance-sdk/src/core/serialisation.ts delete mode 100644 packages/governance-sdk/src/governance/accounts.ts delete mode 100644 packages/governance-sdk/src/governance/api.ts delete mode 100644 packages/governance-sdk/src/governance/createRevokeGoverningTokens.ts delete mode 100644 packages/governance-sdk/src/governance/createSetGovernanceConfig.ts delete mode 100644 packages/governance-sdk/src/governance/createSetRealmAuthority.ts delete mode 100644 packages/governance-sdk/src/governance/createSetRealmConfig.ts delete mode 100644 packages/governance-sdk/src/governance/enums.ts delete mode 100644 packages/governance-sdk/src/governance/errors.ts delete mode 100644 packages/governance-sdk/src/governance/index.ts delete mode 100644 packages/governance-sdk/src/governance/instructions.ts delete mode 100644 packages/governance-sdk/src/governance/serialisation.ts delete mode 100644 packages/governance-sdk/src/governance/tools.ts delete mode 100644 packages/governance-sdk/src/governance/version.ts delete mode 100644 packages/governance-sdk/src/governance/withAddSignatory.ts delete mode 100644 packages/governance-sdk/src/governance/withCancelProposal.ts delete mode 100644 packages/governance-sdk/src/governance/withCastVote.ts delete mode 100644 packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateGovernance.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateMintGovernance.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateNativeTreasury.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateProgramGovernance.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateProposal.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateRealm.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateTokenGovernance.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateTokenOwnerRecord.ts delete mode 100644 packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts delete mode 100644 packages/governance-sdk/src/governance/withDepositGoverningTokens.ts delete mode 100644 packages/governance-sdk/src/governance/withExecuteTransaction.ts delete mode 100644 packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts delete mode 100644 packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts delete mode 100644 packages/governance-sdk/src/governance/withFinalizeVote.ts delete mode 100644 packages/governance-sdk/src/governance/withFlagTransactionError.ts delete mode 100644 packages/governance-sdk/src/governance/withInsertTransaction.ts delete mode 100644 packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts delete mode 100644 packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts delete mode 100644 packages/governance-sdk/src/governance/withRealmConfigPluginAccounts.ts delete mode 100644 packages/governance-sdk/src/governance/withRefundProposalDeposit.ts delete mode 100644 packages/governance-sdk/src/governance/withRelinquishVote.ts delete mode 100644 packages/governance-sdk/src/governance/withRemoveTransaction.ts delete mode 100644 packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts delete mode 100644 packages/governance-sdk/src/governance/withSetGovernanceDelegate.ts delete mode 100644 packages/governance-sdk/src/governance/withSetRealmAuthority.ts delete mode 100644 packages/governance-sdk/src/governance/withSetRealmConfig.ts delete mode 100644 packages/governance-sdk/src/governance/withSignOffProposal.ts delete mode 100644 packages/governance-sdk/src/governance/withUpdateProgramMetadata.ts delete mode 100644 packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts delete mode 100644 packages/governance-sdk/src/index.ts delete mode 100644 packages/governance-sdk/src/registry/index.ts delete mode 100644 packages/governance-sdk/src/tools/borsh.ts delete mode 100644 packages/governance-sdk/src/tools/index.ts delete mode 100644 packages/governance-sdk/src/tools/invariant.ts delete mode 100644 packages/governance-sdk/src/tools/script.ts delete mode 100644 packages/governance-sdk/src/tools/sdk/bpfUpgradeableLoader.ts delete mode 100644 packages/governance-sdk/src/tools/sdk/index.ts delete mode 100644 packages/governance-sdk/src/tools/sdk/runtime.ts delete mode 100644 packages/governance-sdk/src/tools/sdk/splToken.ts delete mode 100644 packages/governance-sdk/src/tools/version.ts delete mode 100644 packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts delete mode 100644 packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts delete mode 100644 packages/governance-sdk/src/tools/versionedTransaction/index.ts delete mode 100644 packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts delete mode 100644 packages/governance-sdk/src/tools/walletAdapter.ts delete mode 100644 packages/governance-sdk/tsconfig.json delete mode 100644 packages/governance/.env delete mode 100644 packages/governance/.env.development delete mode 100644 packages/governance/.env.production delete mode 100644 packages/governance/README.md delete mode 100644 packages/governance/craco.config.js delete mode 100644 packages/governance/package.json delete mode 100644 packages/governance/public/index.html delete mode 100644 packages/governance/public/logo.ico delete mode 100644 packages/governance/public/manifest.json delete mode 100644 packages/governance/public/robots.txt delete mode 100644 packages/governance/public/splash.svg delete mode 100644 packages/governance/src/App.less delete mode 100644 packages/governance/src/App.tsx delete mode 100644 packages/governance/src/actions/cancelProposal.ts delete mode 100644 packages/governance/src/actions/castVote.ts delete mode 100644 packages/governance/src/actions/chat/postChatMessage.ts delete mode 100644 packages/governance/src/actions/createNativeTreasury.ts delete mode 100644 packages/governance/src/actions/createProposal.ts delete mode 100644 packages/governance/src/actions/createTreasuryAccount.ts delete mode 100644 packages/governance/src/actions/depositGoverningTokens.ts delete mode 100644 packages/governance/src/actions/devtools/createAccount.ts delete mode 100644 packages/governance/src/actions/devtools/generateGovernanceArtifacts.ts delete mode 100644 packages/governance/src/actions/devtools/generateMint.ts delete mode 100644 packages/governance/src/actions/dryRunInstruction.ts delete mode 100644 packages/governance/src/actions/executeInstruction.ts delete mode 100644 packages/governance/src/actions/finalizeVote.ts delete mode 100644 packages/governance/src/actions/flagInstructionError.ts delete mode 100644 packages/governance/src/actions/insertInstruction.ts delete mode 100644 packages/governance/src/actions/registerGovernance.ts delete mode 100644 packages/governance/src/actions/registerRealm.ts delete mode 100644 packages/governance/src/actions/relinquishVote.ts delete mode 100644 packages/governance/src/actions/removeInstruction.ts delete mode 100644 packages/governance/src/actions/setRealmAuthority.ts delete mode 100644 packages/governance/src/actions/signOffProposal.ts delete mode 100644 packages/governance/src/actions/updateProgramMetadata.ts delete mode 100644 packages/governance/src/actions/withdrawGoverningTokens.ts delete mode 100644 packages/governance/src/ant-custom.less delete mode 100644 packages/governance/src/components/AccountFormItem/accountFormItem.tsx delete mode 100644 packages/governance/src/components/Background/index.tsx delete mode 100644 packages/governance/src/components/Background/styles.less delete mode 100644 packages/governance/src/components/GovernanceBadge/governanceBadge.tsx delete mode 100644 packages/governance/src/components/GovernanceBadge/style.less delete mode 100644 packages/governance/src/components/Layout/dark-horizontal-combined-rainbow.inline.svg delete mode 100644 packages/governance/src/components/Layout/layout.tsx delete mode 100644 packages/governance/src/components/MintFormItem/mintFormItem.tsx delete mode 100644 packages/governance/src/components/ModalFormAction/modalFormAction.tsx delete mode 100644 packages/governance/src/components/ModalFormAction/style.less delete mode 100644 packages/governance/src/components/RealmBadge/realmBadge.tsx delete mode 100644 packages/governance/src/components/RealmBadge/style.less delete mode 100644 packages/governance/src/components/RealmDepositBadge/realmDepositBadge.tsx delete mode 100644 packages/governance/src/components/appErrorBanner/appErrorBanner.tsx delete mode 100644 packages/governance/src/components/governanceConfigFormItem/governanceConfigFormItem.tsx delete mode 100644 packages/governance/src/components/realmMintSupplyConfigFormItem/realmMintSupplyConfigFormItem.tsx delete mode 100644 packages/governance/src/components/realmMintTokensFormItem/realmMintTokensFormItem.tsx delete mode 100644 packages/governance/src/components/voterStakeRegistry/votingMintConfigFormItem.tsx delete mode 100644 packages/governance/src/constants/index.tsx delete mode 100644 packages/governance/src/constants/labels.ts delete mode 100644 packages/governance/src/constants/style.tsx delete mode 100644 packages/governance/src/contexts/GovernanceContext.tsx delete mode 100644 packages/governance/src/hooks/accountHooks.ts delete mode 100644 packages/governance/src/hooks/apiHooks.ts delete mode 100644 packages/governance/src/hooks/useHasVoteTimeExpired.ts delete mode 100644 packages/governance/src/hooks/useIsBeyondTimestamp.ts delete mode 100644 packages/governance/src/hooks/useKeyParam.ts delete mode 100644 packages/governance/src/hooks/useRpcContext.ts delete mode 100644 packages/governance/src/hooks/useVoterStakeRegistryClient.ts delete mode 100644 packages/governance/src/index.tsx delete mode 100644 packages/governance/src/manifest.json delete mode 100644 packages/governance/src/react-app-env.d.ts delete mode 100644 packages/governance/src/routes.tsx delete mode 100644 packages/governance/src/serviceWorker.ts delete mode 100644 packages/governance/src/setupTests.ts delete mode 100644 packages/governance/src/tools/anchor/anchorHooks.ts delete mode 100644 packages/governance/src/tools/anchor/idlInstructions.ts delete mode 100644 packages/governance/src/tools/forms.ts delete mode 100644 packages/governance/src/tools/option.ts delete mode 100644 packages/governance/src/tools/raydium/raydium.ts delete mode 100644 packages/governance/src/tools/routeTools.ts delete mode 100644 packages/governance/src/tools/script.ts delete mode 100644 packages/governance/src/tools/sdk/bpfUpgradeableLoader/accounts.ts delete mode 100644 packages/governance/src/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts delete mode 100644 packages/governance/src/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts delete mode 100644 packages/governance/src/tools/sdk/core/connection.tsx delete mode 100644 packages/governance/src/tools/sdk/token/splToken.ts delete mode 100644 packages/governance/src/tools/transactions.tsx delete mode 100644 packages/governance/src/tools/units.ts delete mode 100644 packages/governance/src/tools/validators/accounts/token.ts delete mode 100644 packages/governance/src/tools/validators/accounts/upgradeable-program.ts delete mode 100644 packages/governance/src/tools/validators/pubkey.ts delete mode 100644 packages/governance/src/tools/validators/voterWeightPlugin.ts delete mode 100644 packages/governance/src/tools/voterStakeRegistry/accounts.ts delete mode 100644 packages/governance/src/tools/voterStakeRegistry/voterStakeRegistry.ts delete mode 100644 packages/governance/src/types/buffer-layout.d.ts delete mode 100644 packages/governance/src/views/devtools/DevToolsView.tsx delete mode 100644 packages/governance/src/views/devtools/controlTests.tsx delete mode 100644 packages/governance/src/views/devtools/createMint.tsx delete mode 100644 packages/governance/src/views/devtools/style.less delete mode 100644 packages/governance/src/views/governance/buttons/addNativeTreasuryButton.tsx delete mode 100644 packages/governance/src/views/governance/buttons/governanceActionBar.tsx delete mode 100644 packages/governance/src/views/governance/buttons/newProposalButton.tsx delete mode 100644 packages/governance/src/views/governance/governanceView.tsx delete mode 100644 packages/governance/src/views/governance/style.less delete mode 100644 packages/governance/src/views/home/HomeView.tsx delete mode 100644 packages/governance/src/views/home/buttons/programActionBar.tsx delete mode 100644 packages/governance/src/views/home/buttons/registerRealmButton.tsx delete mode 100644 packages/governance/src/views/home/buttons/updateProgramMetadataButton.tsx delete mode 100644 packages/governance/src/views/home/style.less delete mode 100644 packages/governance/src/views/index.tsx delete mode 100644 packages/governance/src/views/member/memberView.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/addSignersButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/cancelButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/castVoteButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/finalizeVoteButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/postChatMessageButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/proposalActionBar.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/relinquishVoteButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/buttons/signOffButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/header/proposalStateBadge.tsx delete mode 100644 packages/governance/src/views/proposal/components/header/voteCountdown.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/buttons/dryRunInstructionButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/buttons/dryRunProposalButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/buttons/executeInstructionButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/buttons/flagInstructionErrorButton.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/instructionCard.tsx delete mode 100644 packages/governance/src/views/proposal/components/instruction/newInstructionCard.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/accountInstructionsForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/anchorIdlSetBufferForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/governanceConfigForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/governanceInstructionForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/instructionInput.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/instructionSelector.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/mintInstructionsForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/nativeTokenTransferForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/programInstructionsForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/programUpgradeForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/raydiumAddLiquidityForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/raydiumStakeLPForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/raydiumStakeRAYForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/realmConfigForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/setRealmAuthority.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/splTokenMintToForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/splTokenTransferForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/tokenInstructionsForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/voterStakeRegistry/voterStakeConfigureMintForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/voterStakeRegistry/voterStakeCreateRegistrarForm.tsx delete mode 100644 packages/governance/src/views/proposal/components/instructionInput/yieldFarming.ts delete mode 100644 packages/governance/src/views/proposal/components/style.less delete mode 100644 packages/governance/src/views/proposal/components/vote/voteScore.tsx delete mode 100644 packages/governance/src/views/proposal/components/vote/voterBubbleGraph.tsx delete mode 100644 packages/governance/src/views/proposal/components/vote/voterTable.tsx delete mode 100644 packages/governance/src/views/proposal/proposalView.tsx delete mode 100644 packages/governance/src/views/proposal/style.less delete mode 100644 packages/governance/src/views/realm/buttons/createTreasuryAccountButton.tsx delete mode 100644 packages/governance/src/views/realm/buttons/depositGoverningTokensButton.tsx delete mode 100644 packages/governance/src/views/realm/buttons/realmActionBar.tsx delete mode 100644 packages/governance/src/views/realm/buttons/registerGovernanceButton.tsx delete mode 100644 packages/governance/src/views/realm/buttons/setRealmAuthorityButton.tsx delete mode 100644 packages/governance/src/views/realm/buttons/withdrawGoverningTokensButton.tsx delete mode 100644 packages/governance/src/views/realm/components/accountDescription.tsx delete mode 100644 packages/governance/src/views/realm/components/realmPopUpDetails.tsx delete mode 100644 packages/governance/src/views/realm/realmView.tsx delete mode 100644 packages/governance/src/views/realm/style.less delete mode 100644 packages/governance/src/wdyr.ts delete mode 100644 packages/governance/tsconfig.json delete mode 100644 packages/lending/.env delete mode 100644 packages/lending/.env.production delete mode 100644 packages/lending/craco.config.js delete mode 100644 packages/lending/package.json delete mode 100644 packages/lending/public/index.html delete mode 100644 packages/lending/public/logo.ico delete mode 100644 packages/lending/public/manifest.json delete mode 100644 packages/lending/public/robots.txt delete mode 100644 packages/lending/public/splash.svg delete mode 100644 packages/lending/src/App.less delete mode 100644 packages/lending/src/App.tsx delete mode 100644 packages/lending/src/actions/borrow.tsx delete mode 100644 packages/lending/src/actions/deposit.tsx delete mode 100644 packages/lending/src/actions/index.ts delete mode 100644 packages/lending/src/actions/liquidate.tsx delete mode 100644 packages/lending/src/actions/obligation.tsx delete mode 100644 packages/lending/src/actions/repay.tsx delete mode 100644 packages/lending/src/actions/withdraw.tsx delete mode 100644 packages/lending/src/ant-custom.less delete mode 100644 packages/lending/src/components/BarChartStatistic/index.tsx delete mode 100644 packages/lending/src/components/BorrowInput/index.tsx delete mode 100644 packages/lending/src/components/BorrowInput/style.less delete mode 100644 packages/lending/src/components/CollateralInput/index.tsx delete mode 100644 packages/lending/src/components/CollateralInput/style.less delete mode 100644 packages/lending/src/components/CollateralSelector/index.tsx delete mode 100644 packages/lending/src/components/DepositInfoLine/index.tsx delete mode 100644 packages/lending/src/components/DepositInfoLine/style.less delete mode 100644 packages/lending/src/components/DepositInput/index.tsx delete mode 100644 packages/lending/src/components/DepositInput/style.less delete mode 100644 packages/lending/src/components/Layout/index.tsx delete mode 100644 packages/lending/src/components/LiquidateInput/index.tsx delete mode 100644 packages/lending/src/components/LiquidateInput/style.less delete mode 100644 packages/lending/src/components/LoanInfoLine/index.tsx delete mode 100644 packages/lending/src/components/NothingBorrowedPanel/index.tsx delete mode 100644 packages/lending/src/components/PoolPrice/index.tsx delete mode 100644 packages/lending/src/components/RepayInput/index.tsx delete mode 100644 packages/lending/src/components/RepayInput/style.less delete mode 100644 packages/lending/src/components/ReserveStatus/index.tsx delete mode 100644 packages/lending/src/components/ReserveStatus/style.less delete mode 100644 packages/lending/src/components/ReserveUtilizationChart/index.tsx delete mode 100644 packages/lending/src/components/RiskSlider/index.tsx delete mode 100644 packages/lending/src/components/RiskSlider/style.less delete mode 100644 packages/lending/src/components/SideReserveOverview/index.tsx delete mode 100644 packages/lending/src/components/SupplyOverview/index.tsx delete mode 100644 packages/lending/src/components/UserLendingCard/index.tsx delete mode 100644 packages/lending/src/components/WaterWave/index.less delete mode 100644 packages/lending/src/components/WaterWave/index.tsx delete mode 100644 packages/lending/src/components/WithdrawInput/index.tsx delete mode 100644 packages/lending/src/components/WithdrawInput/style.less delete mode 100644 packages/lending/src/constants/index.tsx delete mode 100644 packages/lending/src/constants/labels.ts delete mode 100644 packages/lending/src/constants/marks.ts delete mode 100644 packages/lending/src/constants/style.tsx delete mode 100644 packages/lending/src/contexts/lending.tsx delete mode 100644 packages/lending/src/contexts/market.tsx delete mode 100644 packages/lending/src/contexts/pools.tsx delete mode 100644 packages/lending/src/hooks/index.ts delete mode 100644 packages/lending/src/hooks/useBorrowedAmount.ts delete mode 100644 packages/lending/src/hooks/useBorrowingPower.ts delete mode 100644 packages/lending/src/hooks/useCollateralBalance.ts delete mode 100644 packages/lending/src/hooks/useEnrichedLendingObligations.ts delete mode 100644 packages/lending/src/hooks/useLendingMarket.ts delete mode 100644 packages/lending/src/hooks/useLendingObligations.ts delete mode 100644 packages/lending/src/hooks/useLendingReserves.ts delete mode 100644 packages/lending/src/hooks/useSliderInput.ts delete mode 100644 packages/lending/src/hooks/useUserBalance.ts delete mode 100644 packages/lending/src/hooks/useUserDeposits.ts delete mode 100644 packages/lending/src/hooks/useUserObligationByReserve.ts delete mode 100644 packages/lending/src/hooks/useUserObligations.ts delete mode 100644 packages/lending/src/index.css delete mode 100644 packages/lending/src/index.tsx delete mode 100644 packages/lending/src/manifest.json delete mode 100644 packages/lending/src/models/airdrops.ts delete mode 100644 packages/lending/src/models/dex/index.ts delete mode 100644 packages/lending/src/models/dex/market.ts delete mode 100644 packages/lending/src/models/index.ts delete mode 100644 packages/lending/src/models/lending/borrow.ts delete mode 100644 packages/lending/src/models/lending/deposit.ts delete mode 100644 packages/lending/src/models/lending/index.ts delete mode 100644 packages/lending/src/models/lending/lending.ts delete mode 100644 packages/lending/src/models/lending/liquidate.ts delete mode 100644 packages/lending/src/models/lending/market.ts delete mode 100644 packages/lending/src/models/lending/obligation.ts delete mode 100644 packages/lending/src/models/lending/repay.ts delete mode 100644 packages/lending/src/models/lending/reserve.ts delete mode 100644 packages/lending/src/models/lending/withdraw.ts delete mode 100644 packages/lending/src/models/marketOverrides.ts delete mode 100644 packages/lending/src/models/pool.ts delete mode 100644 packages/lending/src/models/totals.ts delete mode 100644 packages/lending/src/react-app-env.d.ts delete mode 100644 packages/lending/src/routes.tsx delete mode 100644 packages/lending/src/serviceWorker.ts delete mode 100644 packages/lending/src/setupTests.ts delete mode 100644 packages/lending/src/types/buffer-layout.d.ts delete mode 100644 packages/lending/src/utils/layout.ts delete mode 100644 packages/lending/src/utils/pools.ts delete mode 100644 packages/lending/src/utils/utils.ts delete mode 100644 packages/lending/src/views/borrow/index.tsx delete mode 100644 packages/lending/src/views/borrow/item.tsx delete mode 100644 packages/lending/src/views/borrow/itemStyle.less delete mode 100644 packages/lending/src/views/borrowReserve/index.tsx delete mode 100644 packages/lending/src/views/borrowReserve/style.less delete mode 100644 packages/lending/src/views/dashboard/deposit/index.tsx delete mode 100644 packages/lending/src/views/dashboard/deposit/item.tsx delete mode 100644 packages/lending/src/views/dashboard/index.tsx delete mode 100644 packages/lending/src/views/dashboard/obligation/index.tsx delete mode 100644 packages/lending/src/views/dashboard/obligation/item.tsx delete mode 100644 packages/lending/src/views/dashboard/style.less delete mode 100644 packages/lending/src/views/deposit/index.tsx delete mode 100644 packages/lending/src/views/deposit/view/index.tsx delete mode 100644 packages/lending/src/views/deposit/view/item.tsx delete mode 100644 packages/lending/src/views/deposit/view/itemStyle.less delete mode 100644 packages/lending/src/views/depositReserve/index.tsx delete mode 100644 packages/lending/src/views/depositReserve/style.less delete mode 100644 packages/lending/src/views/faucet/index.tsx delete mode 100644 packages/lending/src/views/home/index.tsx delete mode 100644 packages/lending/src/views/home/item.tsx delete mode 100644 packages/lending/src/views/home/itemStyle.less delete mode 100644 packages/lending/src/views/index.tsx delete mode 100644 packages/lending/src/views/liquidate/index.tsx delete mode 100644 packages/lending/src/views/liquidate/item.tsx delete mode 100644 packages/lending/src/views/liquidate/style.less delete mode 100644 packages/lending/src/views/liquidateReserve/index.tsx delete mode 100644 packages/lending/src/views/liquidateReserve/style.less delete mode 100644 packages/lending/src/views/margin/index.tsx delete mode 100644 packages/lending/src/views/margin/item.tsx delete mode 100644 packages/lending/src/views/margin/itemStyle.less delete mode 100644 packages/lending/src/views/margin/newPosition/Breakdown.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/GainsChart.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/NewPositionForm.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/PoolHealth.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/index.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/interfaces.tsx delete mode 100644 packages/lending/src/views/margin/newPosition/leverage.ts delete mode 100644 packages/lending/src/views/margin/newPosition/style.less delete mode 100644 packages/lending/src/views/margin/newPosition/utils.ts delete mode 100644 packages/lending/src/views/margin/style.less delete mode 100644 packages/lending/src/views/repayReserve/index.tsx delete mode 100644 packages/lending/src/views/repayReserve/style.less delete mode 100644 packages/lending/src/views/reserve/index.tsx delete mode 100644 packages/lending/src/views/reserve/style.less delete mode 100644 packages/lending/src/views/withdraw/index.tsx delete mode 100644 packages/lending/src/views/withdraw/style.less delete mode 100644 packages/lending/src/wdyr.ts delete mode 100644 packages/lending/tsconfig.json delete mode 100644 packages/lending/types/buffer-layout.d.ts delete mode 100644 packages/metavinci/.env.production delete mode 100644 packages/metavinci/.gitignore delete mode 100644 packages/metavinci/_colors.less delete mode 100644 packages/metavinci/craco.config.js delete mode 100644 packages/metavinci/landing/image.png delete mode 100644 packages/metavinci/landing/index.html delete mode 100644 packages/metavinci/landing/landing.css delete mode 100644 packages/metavinci/package.json delete mode 100644 packages/metavinci/public/favicon-16x16.png delete mode 100644 packages/metavinci/public/favicon-32x32.png delete mode 100644 packages/metavinci/public/favicon-96x96.png delete mode 100644 packages/metavinci/public/img/artist1.jpeg delete mode 100644 packages/metavinci/public/img/artist2.jpeg delete mode 100644 packages/metavinci/public/img/artist3.jpeg delete mode 100644 packages/metavinci/public/img/artist4.jpeg delete mode 100644 packages/metavinci/public/img/banner1.jpeg delete mode 100644 packages/metavinci/public/index.html delete mode 100644 packages/metavinci/public/logo.ico delete mode 100644 packages/metavinci/public/manifest.json delete mode 100644 packages/metavinci/public/robots.txt delete mode 100644 packages/metavinci/src/App.less delete mode 100644 packages/metavinci/src/App.tsx delete mode 100644 packages/metavinci/src/actions/addTokensToVault.ts delete mode 100644 packages/metavinci/src/actions/closeVault.ts delete mode 100644 packages/metavinci/src/actions/createAuctionManager.ts delete mode 100644 packages/metavinci/src/actions/createExternalPriceAccount.ts delete mode 100644 packages/metavinci/src/actions/createVault.ts delete mode 100644 packages/metavinci/src/actions/index.ts delete mode 100644 packages/metavinci/src/actions/makeAuction.ts delete mode 100644 packages/metavinci/src/actions/nft.tsx delete mode 100644 packages/metavinci/src/actions/sendPlaceBid.ts delete mode 100644 packages/metavinci/src/actions/sendRedeemBid.ts delete mode 100644 packages/metavinci/src/ant-custom.less delete mode 100644 packages/metavinci/src/components/AppBar/index.less delete mode 100644 packages/metavinci/src/components/AppBar/index.tsx delete mode 100644 packages/metavinci/src/components/AppBar/searchBox.less delete mode 100644 packages/metavinci/src/components/AppBar/searchBox.tsx delete mode 100644 packages/metavinci/src/components/ArtCard/index.less delete mode 100644 packages/metavinci/src/components/ArtCard/index.tsx delete mode 100644 packages/metavinci/src/components/ArtContent/index.tsx delete mode 100644 packages/metavinci/src/components/ArtistCard/index.less delete mode 100644 packages/metavinci/src/components/ArtistCard/index.tsx delete mode 100644 packages/metavinci/src/components/AuctionCard/index.less delete mode 100644 packages/metavinci/src/components/AuctionCard/index.tsx delete mode 100644 packages/metavinci/src/components/Confetti/index.tsx delete mode 100644 packages/metavinci/src/components/Footer/index.less delete mode 100644 packages/metavinci/src/components/Footer/index.tsx delete mode 100644 packages/metavinci/src/components/Layout/index.less delete mode 100644 packages/metavinci/src/components/Layout/index.tsx delete mode 100644 packages/metavinci/src/components/MainAuctionCard/index.less delete mode 100644 packages/metavinci/src/components/MainAuctionCard/index.tsx delete mode 100644 packages/metavinci/src/components/PreSaleBanner/index.less delete mode 100644 packages/metavinci/src/components/PreSaleBanner/index.tsx delete mode 100644 packages/metavinci/src/components/Settings/index.tsx delete mode 100644 packages/metavinci/src/components/UserSearch/index.tsx delete mode 100644 packages/metavinci/src/components/UserSearch/styles.less delete mode 100644 packages/metavinci/src/constants/index.tsx delete mode 100644 packages/metavinci/src/constants/labels.ts delete mode 100644 packages/metavinci/src/constants/style.tsx delete mode 100644 packages/metavinci/src/contexts/coingecko.tsx delete mode 100644 packages/metavinci/src/contexts/index.tsx delete mode 100644 packages/metavinci/src/contexts/market.tsx delete mode 100644 packages/metavinci/src/contexts/meta.tsx delete mode 100644 packages/metavinci/src/hooks/index.ts delete mode 100644 packages/metavinci/src/hooks/useArt.ts delete mode 100644 packages/metavinci/src/hooks/useAuction.ts delete mode 100644 packages/metavinci/src/hooks/useAuctions.ts delete mode 100644 packages/metavinci/src/hooks/useBidsForAuction.ts delete mode 100644 packages/metavinci/src/hooks/useUserArts.ts delete mode 100644 packages/metavinci/src/index.tsx delete mode 100644 packages/metavinci/src/manifest.json delete mode 100644 packages/metavinci/src/models/dex/index.ts delete mode 100644 packages/metavinci/src/models/dex/market.ts delete mode 100644 packages/metavinci/src/models/index.ts delete mode 100644 packages/metavinci/src/models/marketOverrides.ts delete mode 100644 packages/metavinci/src/models/metaplex/index.ts delete mode 100644 packages/metavinci/src/models/metaplex/initAuctionManager.ts delete mode 100644 packages/metavinci/src/models/metaplex/redeemBid.ts delete mode 100644 packages/metavinci/src/models/metaplex/redeemLimitedEditionBid.ts delete mode 100644 packages/metavinci/src/models/metaplex/redeemMasterEditionBid.ts delete mode 100644 packages/metavinci/src/models/metaplex/redeemOpenEditionBid.ts delete mode 100644 packages/metavinci/src/models/metaplex/startAuction.ts delete mode 100644 packages/metavinci/src/models/metaplex/validateSafetyDepositBox.ts delete mode 100644 packages/metavinci/src/models/totals.ts delete mode 100644 packages/metavinci/src/react-app-env.d.ts delete mode 100644 packages/metavinci/src/routes.tsx delete mode 100644 packages/metavinci/src/serviceWorker.ts delete mode 100644 packages/metavinci/src/setupTests.ts delete mode 100644 packages/metavinci/src/types/buffer-layout.d.ts delete mode 100644 packages/metavinci/src/types/index.ts delete mode 100644 packages/metavinci/src/utils/assets.ts delete mode 100644 packages/metavinci/src/utils/ids.ts delete mode 100644 packages/metavinci/src/utils/layout.ts delete mode 100644 packages/metavinci/src/utils/utils.ts delete mode 100644 packages/metavinci/src/views/art/index.less delete mode 100644 packages/metavinci/src/views/art/index.tsx delete mode 100644 packages/metavinci/src/views/artCreate/index.tsx delete mode 100644 packages/metavinci/src/views/artist/index.tsx delete mode 100644 packages/metavinci/src/views/artists/index.tsx delete mode 100644 packages/metavinci/src/views/artworks/index.tsx delete mode 100644 packages/metavinci/src/views/auction/index.tsx delete mode 100644 packages/metavinci/src/views/auctionCreate/artSelector.tsx delete mode 100644 packages/metavinci/src/views/auctionCreate/index.tsx delete mode 100644 packages/metavinci/src/views/home/index.less delete mode 100644 packages/metavinci/src/views/home/index.tsx delete mode 100644 packages/metavinci/src/views/home/sampleData.ts delete mode 100644 packages/metavinci/src/views/index.tsx delete mode 100644 packages/metavinci/src/views/styles.less delete mode 100644 packages/metavinci/src/wdyr.ts delete mode 100644 packages/metavinci/tsconfig.json delete mode 100644 packages/metavinci/types/buffer-layout.d.ts create mode 100644 src/addins/accounts.ts create mode 100644 src/addins/api.ts create mode 100644 src/addins/index.ts create mode 100644 src/addins/serialisation.ts create mode 100644 src/chat/accounts.ts create mode 100644 src/chat/api.ts create mode 100644 src/chat/index.ts create mode 100644 src/chat/instructions.ts create mode 100644 src/chat/serialisation.ts create mode 100644 src/chat/withPostChatMessage.ts rename {packages/governance-sdk/src => src}/core/accounts.ts (79%) create mode 100644 src/core/api.ts create mode 100644 src/core/index.ts create mode 100644 src/core/serialisation.ts create mode 100644 src/governance/accounts.ts create mode 100644 src/governance/api.ts create mode 100644 src/governance/createRevokeGoverningTokens.ts create mode 100644 src/governance/createSetGovernanceConfig.ts create mode 100644 src/governance/createSetRealmAuthority.ts create mode 100644 src/governance/createSetRealmConfig.ts create mode 100644 src/governance/enums.ts create mode 100644 src/governance/errors.ts create mode 100644 src/governance/index.ts create mode 100644 src/governance/instructions.ts create mode 100644 src/governance/serialisation.ts create mode 100644 src/governance/tools.ts create mode 100644 src/governance/version.ts create mode 100644 src/governance/withAddSignatory.ts create mode 100644 src/governance/withCancelProposal.ts create mode 100644 src/governance/withCastVote.ts create mode 100644 src/governance/withCloseTransactionBuffer.ts create mode 100644 src/governance/withCreateGovernance.ts create mode 100644 src/governance/withCreateMintGovernance.ts create mode 100644 src/governance/withCreateNativeTreasury.ts create mode 100644 src/governance/withCreateProgramGovernance.ts create mode 100644 src/governance/withCreateProposal.ts create mode 100644 src/governance/withCreateRealm.ts create mode 100644 src/governance/withCreateTokenGovernance.ts create mode 100644 src/governance/withCreateTokenOwnerRecord.ts create mode 100644 src/governance/withCreateTransactionBuffer.ts create mode 100644 src/governance/withDepositGoverningTokens.ts create mode 100644 src/governance/withExecuteTransaction.ts create mode 100644 src/governance/withExecuteVersionedTransaction.ts create mode 100644 src/governance/withExtendTransactionBuffer.ts create mode 100644 src/governance/withFinalizeVote.ts create mode 100644 src/governance/withFlagTransactionError.ts create mode 100644 src/governance/withInsertTransaction.ts create mode 100644 src/governance/withInsertVersionedTransaction.ts create mode 100644 src/governance/withInsertVersionedTransactionFromBuffer.ts create mode 100644 src/governance/withRealmConfigPluginAccounts.ts create mode 100644 src/governance/withRefundProposalDeposit.ts create mode 100644 src/governance/withRelinquishVote.ts create mode 100644 src/governance/withRemoveTransaction.ts create mode 100644 src/governance/withRevokeGoverningTokens.ts create mode 100644 src/governance/withSetGovernanceDelegate.ts create mode 100644 src/governance/withSetRealmAuthority.ts create mode 100644 src/governance/withSetRealmConfig.ts create mode 100644 src/governance/withSignOffProposal.ts create mode 100644 src/governance/withUpdateProgramMetadata.ts create mode 100644 src/governance/withWithdrawGoverningTokens.ts create mode 100644 src/index.ts rename {packages/governance-sdk/src => src}/registry/constants.ts (100%) create mode 100644 src/registry/index.ts create mode 100644 src/tools/borsh.ts create mode 100644 src/tools/index.ts create mode 100644 src/tools/invariant.ts rename {packages/governance-sdk/src => src}/tools/numbers.ts (59%) create mode 100644 src/tools/script.ts create mode 100644 src/tools/sdk/bpfUpgradeableLoader.ts create mode 100644 src/tools/sdk/index.ts create mode 100644 src/tools/sdk/runtime.ts create mode 100644 src/tools/sdk/splToken.ts create mode 100644 src/tools/version.ts create mode 100644 src/tools/versionedTransaction/compileToWrappedMessageV0.ts create mode 100644 src/tools/versionedTransaction/compiledKeys.ts create mode 100644 src/tools/versionedTransaction/index.ts create mode 100644 src/tools/versionedTransaction/transactionMessage.ts rename {packages/governance-sdk/tests => tests}/addins/api.smoke.test.ts (100%) rename {packages/governance-sdk/tests => tests}/chat/api.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.smoke.test.ts (99%) rename {packages/governance-sdk/tests => tests}/governance/api.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v1.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v2.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v2.v3.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v3.t2022.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v3.test.ts (100%) rename {packages/governance-sdk/tests => tests}/governance/api.v3.vtxn.test.ts (96%) rename {packages/governance-sdk/tests => tests}/tools/builders.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/sdk.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/setup.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/units.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/withCreateAssociatedTokenAccount.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/withCreateMint.ts (100%) rename {packages/governance-sdk/tests => tests}/tools/withMintTo.ts (100%) diff --git a/.env b/.env deleted file mode 100644 index c703376..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -REACT_APP_CLIENT_ID=BNxdRWx08cSTPlzMAaShlM62d4f8Tp6racfnCg_gaH0XQ1NfSGo3h5B_IkLtgSnPMhlxsSvhqugWm0x8x-VkUXA diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index ea27563..7dcfd34 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,19 @@ -## Setup +# `spl-governance SDK` -Be sure to be running Node v12.16.2 and yarn version 1.22.10. +SPL Governance Client API for spl-governance program -`yarn bootstrap` +## Installation -Then run: +`(npm|pnpm|yarn) add @solana/spl-governance @solana/web3.js` -`yarn start lending` +## Usage -You may have to rebuild your package more than one time to secure a -running environment. +```typescript +import { getRealms } from '@solana/spl-governance'; +import { Connection, PublicKey } from '@solana/web3.js'; -## Known Issues +const connection = new Connection("https://api.mainnet-beta.solana.com", 'recent'); +const programId = new PublicKey('GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw'); -### Can't find CSS files in common +const realms = getRealms(connection, programId); -Common currently uses a less library to compile down less files into css in both the src directory for the TS server -in vscode to pick up and in the dist folder for importers like lending and proposal projects to pick up. If you do not see these files appear when running the `npm start lending` or other commands, and you see missing CSS errors, -you likely did not install the packages for common correctly. Try running: - -`lerna exec npm install --scope @oyster/common` to specifically install packages for common. - -Then, test that css transpiling is working: - -`lerna exec npm watch-css-src --scope @oyster/common` and verify css files appear next to their less counterparts in src. - -## ⚠️ Warning - -Any content produced by Solana, or developer resources that Solana provides, are for educational and inspiration purposes only. Solana does not encourage, induce or sanction the deployment of any such applications in violation of applicable laws or regulations. - -# Disclaimer - -All claims, content, designs, algorithms, estimates, roadmaps, -specifications, and performance measurements described in this project -are done with the Solana Foundation's ("SF") best efforts. It is up to -the reader to check and validate their accuracy and truthfulness. -Furthermore nothing in this project constitutes a solicitation for -investment. - -Any content produced by SF or developer resources that SF provides, are -for educational and inspiration purposes only. SF does not encourage, -induce or sanction the deployment, integration or use of any such -applications (including the code comprising the Solana blockchain -protocol) in violation of applicable laws or regulations and hereby -prohibits any such deployment, integration or use. This includes use of -any such applications by the reader (a) in violation of export control -or sanctions laws of the United States or any other applicable -jurisdiction, (b) if the reader is located in or ordinarily resident in -a country or territory subject to comprehensive sanctions administered -by the U.S. Office of Foreign Assets Control (OFAC), or (c) if the -reader is or is working on behalf of a Specially Designated National -(SDN) or a person subject to similar blocking or denied party -prohibitions. - -The reader should be aware that U.S. export control and sanctions laws -prohibit U.S. persons (and other persons that are subject to such laws) -from transacting with persons in certain countries and territories or -that are on the SDN list. As a project based primarily on open-source -software, it is possible that such sanctioned persons may nevertheless -bypass prohibitions, obtain the code comprising the Solana blockchain -protocol (or other project code or applications) and deploy, integrate, -or otherwise use it. Accordingly, there is a risk to individuals that -other persons using the Solana blockchain protocol may be sanctioned -persons and that transactions with such persons would be a violation of -U.S. export controls and sanctions law. This risk applies to -individuals, organizations, and other ecosystem participants that -deploy, integrate, or use the Solana blockchain protocol code directly -(e.g., as a node operator), and individuals that transact on the Solana -blockchain through light clients, third party interfaces, and/or wallet -software. diff --git a/assets/wallets/ledger.svg b/assets/wallets/ledger.svg deleted file mode 100644 index feb6840..0000000 --- a/assets/wallets/ledger.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/wallets/mathwallet.svg b/assets/wallets/mathwallet.svg deleted file mode 100644 index 588ace9..0000000 --- a/assets/wallets/mathwallet.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - Logo_Icon_White - Created with Sketch. - - - - - - - - - \ No newline at end of file diff --git a/assets/wallets/metamask.svg b/assets/wallets/metamask.svg deleted file mode 100644 index a04dcfe..0000000 --- a/assets/wallets/metamask.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/wallets/solflare.svg b/assets/wallets/solflare.svg deleted file mode 100644 index 73352b8..0000000 --- a/assets/wallets/solflare.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/assets/wallets/sollet.svg b/assets/wallets/sollet.svg deleted file mode 100644 index 3440890..0000000 --- a/assets/wallets/sollet.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - background - - - - Layer 1 - - - - - \ No newline at end of file diff --git a/assets/wallets/solong.png b/assets/wallets/solong.png deleted file mode 100644 index 4ad300895bb97fc852fff6bf221f0320b644e21f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1843 zcmV-32h8}1P)%xKL7v#2XskIMF->x9Rn2roH0C_000KkNklvTA|X~qV`7XADr)qH291asHK9WAMHG@IpwWcjBPJN+(Y?G8 z@R5k1Q3M}o4Mf^qY5{?EJTrGNbUWYlLVNe_&^gJMY&Lu6%zS%h&SPe-<5;m`#flXx zR;*aDVkIPDiGG9!2-5+o9JV3S>5-abKC5ZDpD-O@3Y*jxNz;={xKE?!PSO)KjJ&lG z>UaZz0endqo#UDbQF;H zE#X3io>7E0pywyTNK>cp8ZfBc4s!=7AE{|s2FPn73Ku>@FOJE0Pg zS4?P8kk>(&2K3}pd;0)^4~pq+sP$D~>r3PT04#Zxh$XBgp_LeEh`zRBMA zWQ)e)N z>!O~uDXrsc5sIj%as#l!-7KEW2NpjU=-H1Pmnl=Zl<+UGj*05Huw^Kbl?1u*T|m$I zgeI698y**a0OK_r7cKx+_^C$EOF+*$(>-z(7}#$#uqYs~0_4Xjc3Ub3=ot;xTwXIA zV6rnA2=Z21_}z;DfklM1gjx(6Rjodo^0N%I^cw31%{elJ=>TzH zok9;^B3=d_nBz%P3#;#I_H0+uZ*n^a(9OKC`i^FAcnf7Bu{1s0^5%i^KF2OmwK2@{ z@(3@;?M)Syr`PK!`{0)M6k!d(3R?R{DJ*Y>M$bw!H`c9K$<$Q6SDp?C8;|)9=-p!a z{UpLOgf|Iq$^MR=R{4ZONAy>YU^7B zddJ^t<#CVGZS$}=TiCY=OpNokIM2A<)?lkR*-Ri$-EazdI{3z6>!W>hfe-tL@7gq*P^aRdpgLJ7T|998Zb`_~ zcyBKR(fi0!3j*ro7Dw;;6ZeE{g;O=o#1D>(HUjSCqnZwE4la-M)wjVtC?<4>}Ft=2bounN(b19d0b9z8rvAhv=$cMf!#N{6& zge7kDIVg_rWiWoR!xs5zJ1TSVIo)iMpNb#RS?p{ku~Kv45S5wu^nb&9=RqP)xJllC zpDF{}B_0_fUh~`TZge-#6iaLhakp-pc(;Pl!r$HEy(=cu*t&m;vMy!4epBc zHvaT3VmC&dvr70CeD5aFGEMQJC*bSttAv5hSuJeS$*iS8=A=C#t;5SK5-$ob-sgl@ zti{{a67Lay^+_5J#CH&07k7@C8*{AuUj(>7dTxI5^>MK= - - - -Created by potrace 1.16, written by Peter Selinger 2001-2019 - - - - - - diff --git a/assets/wallets/wormhole.svg b/assets/wallets/wormhole.svg deleted file mode 100644 index aecd949..0000000 --- a/assets/wallets/wormhole.svg +++ /dev/null @@ -1,3857 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..625f819 --- /dev/null +++ b/biome.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false, + "ignore": ["lib", "node_modules"] + }, + "formatter": { + "enabled": true, + "indentStyle": "tab", + "lineWidth": 120, + "indentWidth": 2 + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "style": { + "noNonNullAssertion": "off" + }, + "suspicious": { + "noExplicitAny": "off" + }, + "complexity": { + "noBannedTypes": "off" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double", + "lineWidth": 120, + "semicolons": "always", + "indentWidth": 2 + } + } +} diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..9636381 --- /dev/null +++ b/bun.lock @@ -0,0 +1,1089 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "@realms-today/spl-governance", + "dependencies": { + "@solana/web3.js": "=1.98.0", + "bignumber.js": "^9.0.1", + "bn.js": "^5.1.3", + "borsh": "^0.7.0", + "bs58": "^5.0.0", + "superstruct": "^0.15.2", + }, + "devDependencies": { + "@solana/spl-token": "*", + "@types/bn.js": "^5.1.6", + "@types/bs58": "^5.0.0", + "@types/bun-test": "npm:@travvy/bun-test", + "@types/jest": "29.2.0", + "bun-types": "latest", + "esbuild": "^0.14.11", + "esbuild-jest": "^0.5.0", + "jest": "^29.2.0", + "typescript": "^5.3.3", + }, + }, + }, + "packages": { + "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + + "@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], + + "@babel/compat-data": ["@babel/compat-data@7.26.8", "", {}, "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ=="], + + "@babel/core": ["@babel/core@7.26.10", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.10", "@babel/helper-compilation-targets": "^7.26.5", "@babel/helper-module-transforms": "^7.26.0", "@babel/helpers": "^7.26.10", "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", "@babel/traverse": "^7.26.10", "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ=="], + + "@babel/generator": ["@babel/generator@7.27.0", "", { "dependencies": { "@babel/parser": "^7.27.0", "@babel/types": "^7.27.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.27.0", "", { "dependencies": { "@babel/compat-data": "^7.26.8", "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.25.9", "", { "dependencies": { "@babel/traverse": "^7.25.9", "@babel/types": "^7.25.9" } }, "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.26.0", "", { "dependencies": { "@babel/helper-module-imports": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9", "@babel/traverse": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.26.5", "", {}, "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.25.9", "", {}, "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.25.9", "", {}, "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], + + "@babel/helpers": ["@babel/helpers@7.27.0", "", { "dependencies": { "@babel/template": "^7.27.0", "@babel/types": "^7.27.0" } }, "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg=="], + + "@babel/parser": ["@babel/parser@7.27.0", "", { "dependencies": { "@babel/types": "^7.27.0" }, "bin": "./bin/babel-parser.js" }, "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg=="], + + "@babel/plugin-syntax-async-generators": ["@babel/plugin-syntax-async-generators@7.8.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw=="], + + "@babel/plugin-syntax-bigint": ["@babel/plugin-syntax-bigint@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg=="], + + "@babel/plugin-syntax-class-properties": ["@babel/plugin-syntax-class-properties@7.12.13", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA=="], + + "@babel/plugin-syntax-class-static-block": ["@babel/plugin-syntax-class-static-block@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw=="], + + "@babel/plugin-syntax-import-attributes": ["@babel/plugin-syntax-import-attributes@7.26.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A=="], + + "@babel/plugin-syntax-import-meta": ["@babel/plugin-syntax-import-meta@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g=="], + + "@babel/plugin-syntax-json-strings": ["@babel/plugin-syntax-json-strings@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA=="], + + "@babel/plugin-syntax-jsx": ["@babel/plugin-syntax-jsx@7.25.9", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA=="], + + "@babel/plugin-syntax-logical-assignment-operators": ["@babel/plugin-syntax-logical-assignment-operators@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig=="], + + "@babel/plugin-syntax-nullish-coalescing-operator": ["@babel/plugin-syntax-nullish-coalescing-operator@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ=="], + + "@babel/plugin-syntax-numeric-separator": ["@babel/plugin-syntax-numeric-separator@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug=="], + + "@babel/plugin-syntax-object-rest-spread": ["@babel/plugin-syntax-object-rest-spread@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA=="], + + "@babel/plugin-syntax-optional-catch-binding": ["@babel/plugin-syntax-optional-catch-binding@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q=="], + + "@babel/plugin-syntax-optional-chaining": ["@babel/plugin-syntax-optional-chaining@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg=="], + + "@babel/plugin-syntax-private-property-in-object": ["@babel/plugin-syntax-private-property-in-object@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg=="], + + "@babel/plugin-syntax-top-level-await": ["@babel/plugin-syntax-top-level-await@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw=="], + + "@babel/plugin-syntax-typescript": ["@babel/plugin-syntax-typescript@7.25.9", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ=="], + + "@babel/plugin-transform-modules-commonjs": ["@babel/plugin-transform-modules-commonjs@7.26.3", "", { "dependencies": { "@babel/helper-module-transforms": "^7.26.0", "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ=="], + + "@babel/runtime": ["@babel/runtime@7.27.0", "", { "dependencies": { "regenerator-runtime": "^0.14.0" } }, "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw=="], + + "@babel/template": ["@babel/template@7.27.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/parser": "^7.27.0", "@babel/types": "^7.27.0" } }, "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA=="], + + "@babel/traverse": ["@babel/traverse@7.27.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.27.0", "@babel/parser": "^7.27.0", "@babel/template": "^7.27.0", "@babel/types": "^7.27.0", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA=="], + + "@babel/types": ["@babel/types@7.27.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" } }, "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg=="], + + "@bcoe/v8-coverage": ["@bcoe/v8-coverage@0.2.3", "", {}, "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="], + + "@cnakazawa/watch": ["@cnakazawa/watch@1.0.4", "", { "dependencies": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" }, "bin": { "watch": "cli.js" } }, "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.14.54", "", { "os": "linux", "cpu": "none" }, "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw=="], + + "@istanbuljs/load-nyc-config": ["@istanbuljs/load-nyc-config@1.1.0", "", { "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" } }, "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ=="], + + "@istanbuljs/schema": ["@istanbuljs/schema@0.1.3", "", {}, "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA=="], + + "@jest/console": ["@jest/console@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg=="], + + "@jest/core": ["@jest/core@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.7.0", "jest-config": "^29.7.0", "jest-haste-map": "^29.7.0", "jest-message-util": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-resolve-dependencies": "^29.7.0", "jest-runner": "^29.7.0", "jest-runtime": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"] }, "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg=="], + + "@jest/environment": ["@jest/environment@29.7.0", "", { "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "jest-mock": "^29.7.0" } }, "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw=="], + + "@jest/expect": ["@jest/expect@29.7.0", "", { "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" } }, "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ=="], + + "@jest/expect-utils": ["@jest/expect-utils@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3" } }, "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA=="], + + "@jest/fake-timers": ["@jest/fake-timers@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ=="], + + "@jest/globals": ["@jest/globals@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/types": "^29.6.3", "jest-mock": "^29.7.0" } }, "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ=="], + + "@jest/reporters": ["@jest/reporters@29.7.0", "", { "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", "v8-to-istanbul": "^9.0.1" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"] }, "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg=="], + + "@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], + + "@jest/source-map": ["@jest/source-map@29.6.3", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw=="], + + "@jest/test-result": ["@jest/test-result@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA=="], + + "@jest/test-sequencer": ["@jest/test-sequencer@29.7.0", "", { "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw=="], + + "@jest/transform": ["@jest/transform@26.6.2", "", { "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^26.6.2", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", "jest-haste-map": "^26.6.2", "jest-regex-util": "^26.0.0", "jest-util": "^26.6.2", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" } }, "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA=="], + + "@jest/types": ["@jest/types@29.6.3", "", { "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", "@types/yargs": "^17.0.8", "chalk": "^4.0.0" } }, "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + + "@noble/curves": ["@noble/curves@1.9.0", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg=="], + + "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + + "@sinclair/typebox": ["@sinclair/typebox@0.27.8", "", {}, "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="], + + "@sinonjs/commons": ["@sinonjs/commons@3.0.1", "", { "dependencies": { "type-detect": "4.0.8" } }, "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ=="], + + "@sinonjs/fake-timers": ["@sinonjs/fake-timers@10.3.0", "", { "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA=="], + + "@solana/buffer-layout": ["@solana/buffer-layout@4.0.1", "", { "dependencies": { "buffer": "~6.0.3" } }, "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA=="], + + "@solana/buffer-layout-utils": ["@solana/buffer-layout-utils@0.2.0", "", { "dependencies": { "@solana/buffer-layout": "^4.0.0", "@solana/web3.js": "^1.32.0", "bigint-buffer": "^1.1.5", "bignumber.js": "^9.0.1" } }, "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g=="], + + "@solana/codecs": ["@solana/codecs@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-data-structures": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/codecs-strings": "2.0.0-rc.1", "@solana/options": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ=="], + + "@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + + "@solana/codecs-data-structures": ["@solana/codecs-data-structures@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog=="], + + "@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + + "@solana/codecs-strings": ["@solana/codecs-strings@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "fastestsmallesttextencoderdecoder": "^1.0.22", "typescript": ">=5" } }, "sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g=="], + + "@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + + "@solana/options": ["@solana/options@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-data-structures": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/codecs-strings": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA=="], + + "@solana/spl-token": ["@solana/spl-token@0.4.13", "", { "dependencies": { "@solana/buffer-layout": "^4.0.0", "@solana/buffer-layout-utils": "^0.2.0", "@solana/spl-token-group": "^0.0.7", "@solana/spl-token-metadata": "^0.1.6", "buffer": "^6.0.3" }, "peerDependencies": { "@solana/web3.js": "^1.95.5" } }, "sha512-cite/pYWQZZVvLbg5lsodSovbetK/eA24gaR0eeUeMuBAMNrT8XFCwaygKy0N2WSg3gSyjjNpIeAGBAKZaY/1w=="], + + "@solana/spl-token-group": ["@solana/spl-token-group@0.0.7", "", { "dependencies": { "@solana/codecs": "2.0.0-rc.1" }, "peerDependencies": { "@solana/web3.js": "^1.95.3" } }, "sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug=="], + + "@solana/spl-token-metadata": ["@solana/spl-token-metadata@0.1.6", "", { "dependencies": { "@solana/codecs": "2.0.0-rc.1" }, "peerDependencies": { "@solana/web3.js": "^1.95.3" } }, "sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA=="], + + "@solana/web3.js": ["@solana/web3.js@1.98.0", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", "bigint-buffer": "^1.1.5", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA=="], + + "@swc/helpers": ["@swc/helpers@0.5.17", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="], + + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], + + "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], + + "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], + + "@types/babel__traverse": ["@types/babel__traverse@7.20.7", "", { "dependencies": { "@babel/types": "^7.20.7" } }, "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng=="], + + "@types/bn.js": ["@types/bn.js@5.1.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w=="], + + "@types/bs58": ["@types/bs58@5.0.0", "", { "dependencies": { "bs58": "*" } }, "sha512-cAw/jKBzo98m6Xz1X5ETqymWfIMbXbu6nK15W4LQYjeHJkVqSmM5PO8Bd9KVHQJ/F4rHcSso9LcjtgCW6TGu2w=="], + + "@types/bun-test": ["@travvy/bun-test@0.0.13", "", {}, "sha512-PALDYyVu4Wk0OBOUo/lgE9Ic2T6fZmUwRNmh/LDvocIWd6Tb8MDedPsBoVAnKJDe3FvYGxXMWd4DpySYKgWqoQ=="], + + "@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="], + + "@types/graceful-fs": ["@types/graceful-fs@4.1.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ=="], + + "@types/istanbul-lib-coverage": ["@types/istanbul-lib-coverage@2.0.6", "", {}, "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w=="], + + "@types/istanbul-lib-report": ["@types/istanbul-lib-report@3.0.3", "", { "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA=="], + + "@types/istanbul-reports": ["@types/istanbul-reports@3.0.4", "", { "dependencies": { "@types/istanbul-lib-report": "*" } }, "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ=="], + + "@types/jest": ["@types/jest@29.2.0", "", { "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, "sha512-KO7bPV21d65PKwv3LLsD8Jn3E05pjNjRZvkm+YTacWhVmykAb07wW6IkZUmQAltwQafNcDUEUrMO2h3jeBSisg=="], + + "@types/node": ["@types/node@22.15.2", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-uKXqKN9beGoMdBfcaTY1ecwz6ctxuJAcUlwE55938g0ZJ8lRxwAZqRz2AJ4pzpt5dHdTPMB863UZ0ESiFUcP7A=="], + + "@types/stack-utils": ["@types/stack-utils@2.0.3", "", {}, "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="], + + "@types/uuid": ["@types/uuid@8.3.4", "", {}, "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="], + + "@types/ws": ["@types/ws@7.4.7", "", { "dependencies": { "@types/node": "*" } }, "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww=="], + + "@types/yargs": ["@types/yargs@17.0.33", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA=="], + + "@types/yargs-parser": ["@types/yargs-parser@21.0.3", "", {}, "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ=="], + + "agentkeepalive": ["agentkeepalive@4.6.0", "", { "dependencies": { "humanize-ms": "^1.2.1" } }, "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ=="], + + "ansi-escapes": ["ansi-escapes@4.3.2", "", { "dependencies": { "type-fest": "^0.21.3" } }, "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ=="], + + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], + + "arr-diff": ["arr-diff@4.0.0", "", {}, "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA=="], + + "arr-flatten": ["arr-flatten@1.1.0", "", {}, "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="], + + "arr-union": ["arr-union@3.1.0", "", {}, "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q=="], + + "array-unique": ["array-unique@0.3.2", "", {}, "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ=="], + + "assign-symbols": ["assign-symbols@1.0.0", "", {}, "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw=="], + + "atob": ["atob@2.1.2", "", { "bin": { "atob": "bin/atob.js" } }, "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="], + + "babel-jest": ["babel-jest@26.6.3", "", { "dependencies": { "@jest/transform": "^26.6.2", "@jest/types": "^26.6.2", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.6.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA=="], + + "babel-plugin-istanbul": ["babel-plugin-istanbul@6.1.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" } }, "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA=="], + + "babel-plugin-jest-hoist": ["babel-plugin-jest-hoist@26.6.2", "", { "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", "@types/babel__core": "^7.0.0", "@types/babel__traverse": "^7.0.6" } }, "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw=="], + + "babel-preset-current-node-syntax": ["babel-preset-current-node-syntax@1.1.0", "", { "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-import-attributes": "^7.24.7", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw=="], + + "babel-preset-jest": ["babel-preset-jest@26.6.2", "", { "dependencies": { "babel-plugin-jest-hoist": "^26.6.2", "babel-preset-current-node-syntax": "^1.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "base": ["base@0.11.2", "", { "dependencies": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", "component-emitter": "^1.2.1", "define-property": "^1.0.0", "isobject": "^3.0.1", "mixin-deep": "^1.2.0", "pascalcase": "^0.1.1" } }, "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg=="], + + "base-x": ["base-x@4.0.1", "", {}, "sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw=="], + + "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], + + "bigint-buffer": ["bigint-buffer@1.1.5", "", { "dependencies": { "bindings": "^1.3.0" } }, "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA=="], + + "bignumber.js": ["bignumber.js@9.3.0", "", {}, "sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA=="], + + "bindings": ["bindings@1.5.0", "", { "dependencies": { "file-uri-to-path": "1.0.0" } }, "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ=="], + + "bn.js": ["bn.js@5.2.2", "", {}, "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw=="], + + "borsh": ["borsh@0.7.0", "", { "dependencies": { "bn.js": "^5.2.0", "bs58": "^4.0.0", "text-encoding-utf-8": "^1.0.2" } }, "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA=="], + + "brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "browserslist": ["browserslist@4.24.4", "", { "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" } }, "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A=="], + + "bs58": ["bs58@5.0.0", "", { "dependencies": { "base-x": "^4.0.0" } }, "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ=="], + + "bser": ["bser@2.1.1", "", { "dependencies": { "node-int64": "^0.4.0" } }, "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ=="], + + "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="], + + "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + + "bufferutil": ["bufferutil@4.0.9", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw=="], + + "bun-types": ["bun-types@1.2.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-b5ITZMnVdf3m1gMvJHG+gIfeJHiQPJak0f7925Hxu6ZN5VKA8AGy4GZ4lM+Xkn6jtWxg5S3ldWvfmXdvnkp3GQ=="], + + "cache-base": ["cache-base@1.0.1", "", { "dependencies": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", "get-value": "^2.0.6", "has-value": "^1.0.0", "isobject": "^3.0.1", "set-value": "^2.0.0", "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" } }, "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ=="], + + "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], + + "camelcase": ["camelcase@6.3.0", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001715", "", {}, "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw=="], + + "capture-exit": ["capture-exit@2.0.0", "", { "dependencies": { "rsvp": "^4.8.4" } }, "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g=="], + + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], + + "ci-info": ["ci-info@3.9.0", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="], + + "cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="], + + "class-utils": ["class-utils@0.3.6", "", { "dependencies": { "arr-union": "^3.1.0", "define-property": "^0.2.5", "isobject": "^3.0.0", "static-extend": "^0.1.1" } }, "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg=="], + + "cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="], + + "co": ["co@4.6.0", "", {}, "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ=="], + + "collect-v8-coverage": ["collect-v8-coverage@1.0.2", "", {}, "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q=="], + + "collection-visit": ["collection-visit@1.0.0", "", { "dependencies": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" } }, "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + + "component-emitter": ["component-emitter@1.3.1", "", {}, "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ=="], + + "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "copy-descriptor": ["copy-descriptor@0.1.1", "", {}, "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw=="], + + "create-jest": ["create-jest@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-config": "^29.7.0", "jest-util": "^29.7.0", "prompts": "^2.0.1" }, "bin": { "create-jest": "bin/create-jest.js" } }, "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], + + "decode-uri-component": ["decode-uri-component@0.2.2", "", {}, "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="], + + "dedent": ["dedent@1.5.3", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ=="], + + "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + + "define-property": ["define-property@2.0.2", "", { "dependencies": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" } }, "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ=="], + + "delay": ["delay@5.0.0", "", {}, "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw=="], + + "detect-newline": ["detect-newline@3.1.0", "", {}, "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA=="], + + "diff-sequences": ["diff-sequences@29.6.3", "", {}, "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.142", "", {}, "sha512-Ah2HgkTu/9RhTDNThBtzu2Wirdy4DC9b0sMT1pUhbkZQ5U/iwmE+PHZX1MpjD5IkJCc2wSghgGG/B04szAx07w=="], + + "emittery": ["emittery@0.13.1", "", {}, "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ=="], + + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "end-of-stream": ["end-of-stream@1.4.4", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q=="], + + "error-ex": ["error-ex@1.3.2", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g=="], + + "es6-promise": ["es6-promise@4.2.8", "", {}, "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="], + + "es6-promisify": ["es6-promisify@5.0.0", "", { "dependencies": { "es6-promise": "^4.0.3" } }, "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ=="], + + "esbuild": ["esbuild@0.14.54", "", { "optionalDependencies": { "@esbuild/linux-loong64": "0.14.54", "esbuild-android-64": "0.14.54", "esbuild-android-arm64": "0.14.54", "esbuild-darwin-64": "0.14.54", "esbuild-darwin-arm64": "0.14.54", "esbuild-freebsd-64": "0.14.54", "esbuild-freebsd-arm64": "0.14.54", "esbuild-linux-32": "0.14.54", "esbuild-linux-64": "0.14.54", "esbuild-linux-arm": "0.14.54", "esbuild-linux-arm64": "0.14.54", "esbuild-linux-mips64le": "0.14.54", "esbuild-linux-ppc64le": "0.14.54", "esbuild-linux-riscv64": "0.14.54", "esbuild-linux-s390x": "0.14.54", "esbuild-netbsd-64": "0.14.54", "esbuild-openbsd-64": "0.14.54", "esbuild-sunos-64": "0.14.54", "esbuild-windows-32": "0.14.54", "esbuild-windows-64": "0.14.54", "esbuild-windows-arm64": "0.14.54" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA=="], + + "esbuild-android-64": ["esbuild-android-64@0.14.54", "", { "os": "android", "cpu": "x64" }, "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ=="], + + "esbuild-android-arm64": ["esbuild-android-arm64@0.14.54", "", { "os": "android", "cpu": "arm64" }, "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg=="], + + "esbuild-darwin-64": ["esbuild-darwin-64@0.14.54", "", { "os": "darwin", "cpu": "x64" }, "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug=="], + + "esbuild-darwin-arm64": ["esbuild-darwin-arm64@0.14.54", "", { "os": "darwin", "cpu": "arm64" }, "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw=="], + + "esbuild-freebsd-64": ["esbuild-freebsd-64@0.14.54", "", { "os": "freebsd", "cpu": "x64" }, "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg=="], + + "esbuild-freebsd-arm64": ["esbuild-freebsd-arm64@0.14.54", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q=="], + + "esbuild-jest": ["esbuild-jest@0.5.0", "", { "dependencies": { "@babel/core": "^7.12.17", "@babel/plugin-transform-modules-commonjs": "^7.12.13", "babel-jest": "^26.6.3" }, "peerDependencies": { "esbuild": ">=0.8.50" } }, "sha512-AMZZCdEpXfNVOIDvURlqYyHwC8qC1/BFjgsrOiSL1eyiIArVtHL8YAC83Shhn16cYYoAWEW17yZn0W/RJKJKHQ=="], + + "esbuild-linux-32": ["esbuild-linux-32@0.14.54", "", { "os": "linux", "cpu": "ia32" }, "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw=="], + + "esbuild-linux-64": ["esbuild-linux-64@0.14.54", "", { "os": "linux", "cpu": "x64" }, "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg=="], + + "esbuild-linux-arm": ["esbuild-linux-arm@0.14.54", "", { "os": "linux", "cpu": "arm" }, "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw=="], + + "esbuild-linux-arm64": ["esbuild-linux-arm64@0.14.54", "", { "os": "linux", "cpu": "arm64" }, "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig=="], + + "esbuild-linux-mips64le": ["esbuild-linux-mips64le@0.14.54", "", { "os": "linux", "cpu": "none" }, "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw=="], + + "esbuild-linux-ppc64le": ["esbuild-linux-ppc64le@0.14.54", "", { "os": "linux", "cpu": "ppc64" }, "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ=="], + + "esbuild-linux-riscv64": ["esbuild-linux-riscv64@0.14.54", "", { "os": "linux", "cpu": "none" }, "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg=="], + + "esbuild-linux-s390x": ["esbuild-linux-s390x@0.14.54", "", { "os": "linux", "cpu": "s390x" }, "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA=="], + + "esbuild-netbsd-64": ["esbuild-netbsd-64@0.14.54", "", { "os": "none", "cpu": "x64" }, "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w=="], + + "esbuild-openbsd-64": ["esbuild-openbsd-64@0.14.54", "", { "os": "openbsd", "cpu": "x64" }, "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw=="], + + "esbuild-sunos-64": ["esbuild-sunos-64@0.14.54", "", { "os": "sunos", "cpu": "x64" }, "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw=="], + + "esbuild-windows-32": ["esbuild-windows-32@0.14.54", "", { "os": "win32", "cpu": "ia32" }, "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w=="], + + "esbuild-windows-64": ["esbuild-windows-64@0.14.54", "", { "os": "win32", "cpu": "x64" }, "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ=="], + + "esbuild-windows-arm64": ["esbuild-windows-arm64@0.14.54", "", { "os": "win32", "cpu": "arm64" }, "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "escape-string-regexp": ["escape-string-regexp@2.0.0", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="], + + "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + + "eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="], + + "exec-sh": ["exec-sh@0.3.6", "", {}, "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w=="], + + "execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], + + "exit": ["exit@0.1.2", "", {}, "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ=="], + + "expand-brackets": ["expand-brackets@2.1.4", "", { "dependencies": { "debug": "^2.3.3", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "posix-character-classes": "^0.1.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" } }, "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA=="], + + "expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], + + "extend-shallow": ["extend-shallow@3.0.2", "", { "dependencies": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" } }, "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q=="], + + "extglob": ["extglob@2.0.4", "", { "dependencies": { "array-unique": "^0.3.2", "define-property": "^1.0.0", "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", "fragment-cache": "^0.2.1", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" } }, "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw=="], + + "eyes": ["eyes@0.1.8", "", {}, "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ=="], + + "fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="], + + "fast-stable-stringify": ["fast-stable-stringify@1.0.0", "", {}, "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag=="], + + "fastestsmallesttextencoderdecoder": ["fastestsmallesttextencoderdecoder@1.0.22", "", {}, "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw=="], + + "fb-watchman": ["fb-watchman@2.0.2", "", { "dependencies": { "bser": "2.1.1" } }, "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA=="], + + "file-uri-to-path": ["file-uri-to-path@1.0.0", "", {}, "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], + + "for-in": ["for-in@1.0.2", "", {}, "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ=="], + + "fragment-cache": ["fragment-cache@0.2.1", "", { "dependencies": { "map-cache": "^0.2.2" } }, "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA=="], + + "fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-package-type": ["get-package-type@0.1.0", "", {}, "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q=="], + + "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], + + "get-value": ["get-value@2.0.6", "", {}, "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA=="], + + "glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + + "globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "has-value": ["has-value@1.0.0", "", { "dependencies": { "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" } }, "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw=="], + + "has-values": ["has-values@1.0.0", "", { "dependencies": { "is-number": "^3.0.0", "kind-of": "^4.0.0" } }, "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "html-escaper": ["html-escaper@2.0.2", "", {}, "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg=="], + + "human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="], + + "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], + + "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], + + "import-local": ["import-local@3.2.0", "", { "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" }, "bin": { "import-local-fixture": "fixtures/cli.js" } }, "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA=="], + + "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="], + + "inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="], + + "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + + "is-accessor-descriptor": ["is-accessor-descriptor@1.0.1", "", { "dependencies": { "hasown": "^2.0.0" } }, "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA=="], + + "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], + + "is-buffer": ["is-buffer@1.1.6", "", {}, "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="], + + "is-ci": ["is-ci@2.0.0", "", { "dependencies": { "ci-info": "^2.0.0" }, "bin": { "is-ci": "bin.js" } }, "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-data-descriptor": ["is-data-descriptor@1.0.1", "", { "dependencies": { "hasown": "^2.0.0" } }, "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw=="], + + "is-descriptor": ["is-descriptor@1.0.3", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw=="], + + "is-extendable": ["is-extendable@1.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4" } }, "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-generator-fn": ["is-generator-fn@2.1.0", "", {}, "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-plain-object": ["is-plain-object@2.0.4", "", { "dependencies": { "isobject": "^3.0.1" } }, "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og=="], + + "is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "is-typedarray": ["is-typedarray@1.0.0", "", {}, "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="], + + "is-windows": ["is-windows@1.0.2", "", {}, "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="], + + "isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "isobject": ["isobject@3.0.1", "", {}, "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="], + + "isomorphic-ws": ["isomorphic-ws@4.0.1", "", { "peerDependencies": { "ws": "*" } }, "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w=="], + + "istanbul-lib-coverage": ["istanbul-lib-coverage@3.2.2", "", {}, "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg=="], + + "istanbul-lib-instrument": ["istanbul-lib-instrument@5.2.1", "", { "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" } }, "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg=="], + + "istanbul-lib-report": ["istanbul-lib-report@3.0.1", "", { "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw=="], + + "istanbul-lib-source-maps": ["istanbul-lib-source-maps@4.0.1", "", { "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" } }, "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw=="], + + "istanbul-reports": ["istanbul-reports@3.1.7", "", { "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g=="], + + "jayson": ["jayson@4.2.0", "", { "dependencies": { "@types/connect": "^3.4.33", "@types/node": "^12.12.54", "@types/ws": "^7.4.4", "commander": "^2.20.3", "delay": "^5.0.0", "es6-promisify": "^5.0.0", "eyes": "^0.1.8", "isomorphic-ws": "^4.0.1", "json-stringify-safe": "^5.0.1", "stream-json": "^1.9.1", "uuid": "^8.3.2", "ws": "^7.5.10" }, "bin": { "jayson": "bin/jayson.js" } }, "sha512-VfJ9t1YLwacIubLhONk0KFeosUBwstRWQ0IRT1KDjEjnVnSOVHC3uwugyV7L0c7R9lpVyrUGT2XWiBA1UTtpyg=="], + + "jest": ["jest@29.7.0", "", { "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", "import-local": "^3.0.2", "jest-cli": "^29.7.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"], "bin": { "jest": "bin/jest.js" } }, "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw=="], + + "jest-changed-files": ["jest-changed-files@29.7.0", "", { "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w=="], + + "jest-circus": ["jest-circus@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", "jest-each": "^29.7.0", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-runtime": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "p-limit": "^3.1.0", "pretty-format": "^29.7.0", "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw=="], + + "jest-cli": ["jest-cli@29.7.0", "", { "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "chalk": "^4.0.0", "create-jest": "^29.7.0", "exit": "^0.1.2", "import-local": "^3.0.2", "jest-config": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"], "bin": { "jest": "bin/jest.js" } }, "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg=="], + + "jest-config": ["jest-config@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", "@jest/types": "^29.6.3", "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "jest-circus": "^29.7.0", "jest-environment-node": "^29.7.0", "jest-get-type": "^29.6.3", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-runner": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "peerDependencies": { "@types/node": "*", "ts-node": ">=9.0.0" }, "optionalPeers": ["@types/node", "ts-node"] }, "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ=="], + + "jest-diff": ["jest-diff@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw=="], + + "jest-docblock": ["jest-docblock@29.7.0", "", { "dependencies": { "detect-newline": "^3.0.0" } }, "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g=="], + + "jest-each": ["jest-each@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", "jest-get-type": "^29.6.3", "jest-util": "^29.7.0", "pretty-format": "^29.7.0" } }, "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ=="], + + "jest-environment-node": ["jest-environment-node@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "jest-mock": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw=="], + + "jest-get-type": ["jest-get-type@29.6.3", "", {}, "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw=="], + + "jest-haste-map": ["jest-haste-map@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, "optionalDependencies": { "fsevents": "^2.3.2" } }, "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA=="], + + "jest-leak-detector": ["jest-leak-detector@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw=="], + + "jest-matcher-utils": ["jest-matcher-utils@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g=="], + + "jest-message-util": ["jest-message-util@29.7.0", "", { "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w=="], + + "jest-mock": ["jest-mock@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "jest-util": "^29.7.0" } }, "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw=="], + + "jest-pnp-resolver": ["jest-pnp-resolver@1.2.3", "", { "peerDependencies": { "jest-resolve": "*" }, "optionalPeers": ["jest-resolve"] }, "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w=="], + + "jest-regex-util": ["jest-regex-util@29.6.3", "", {}, "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg=="], + + "jest-resolve": ["jest-resolve@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA=="], + + "jest-resolve-dependencies": ["jest-resolve-dependencies@29.7.0", "", { "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" } }, "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA=="], + + "jest-runner": ["jest-runner@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", "jest-docblock": "^29.7.0", "jest-environment-node": "^29.7.0", "jest-haste-map": "^29.7.0", "jest-leak-detector": "^29.7.0", "jest-message-util": "^29.7.0", "jest-resolve": "^29.7.0", "jest-runtime": "^29.7.0", "jest-util": "^29.7.0", "jest-watcher": "^29.7.0", "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ=="], + + "jest-runtime": ["jest-runtime@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", "@jest/globals": "^29.7.0", "@jest/source-map": "^29.6.3", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ=="], + + "jest-serializer": ["jest-serializer@26.6.2", "", { "dependencies": { "@types/node": "*", "graceful-fs": "^4.2.4" } }, "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g=="], + + "jest-snapshot": ["jest-snapshot@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/types": "^7.3.3", "@jest/expect-utils": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", "expect": "^29.7.0", "graceful-fs": "^4.2.9", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "natural-compare": "^1.4.0", "pretty-format": "^29.7.0", "semver": "^7.5.3" } }, "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw=="], + + "jest-util": ["jest-util@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" } }, "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA=="], + + "jest-validate": ["jest-validate@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.6.3", "leven": "^3.1.0", "pretty-format": "^29.7.0" } }, "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw=="], + + "jest-watcher": ["jest-watcher@29.7.0", "", { "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g=="], + + "jest-worker": ["jest-worker@29.7.0", "", { "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "json-parse-even-better-errors": ["json-parse-even-better-errors@2.3.1", "", {}, "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="], + + "json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="], + + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + + "kind-of": ["kind-of@6.0.3", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="], + + "kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + + "leven": ["leven@3.1.0", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="], + + "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], + + "locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], + + "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "make-dir": ["make-dir@4.0.0", "", { "dependencies": { "semver": "^7.5.3" } }, "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw=="], + + "makeerror": ["makeerror@1.0.12", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="], + + "map-cache": ["map-cache@0.2.2", "", {}, "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg=="], + + "map-visit": ["map-visit@1.0.0", "", { "dependencies": { "object-visit": "^1.0.0" } }, "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w=="], + + "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], + + "minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], + + "mixin-deep": ["mixin-deep@1.3.2", "", { "dependencies": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" } }, "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "nanomatch": ["nanomatch@1.2.13", "", { "dependencies": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" } }, "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA=="], + + "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], + + "nice-try": ["nice-try@1.0.5", "", {}, "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="], + + "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], + + "node-gyp-build": ["node-gyp-build@4.8.4", "", { "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ=="], + + "node-int64": ["node-int64@0.4.0", "", {}, "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw=="], + + "node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="], + + "object-copy": ["object-copy@0.1.0", "", { "dependencies": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", "kind-of": "^3.0.3" } }, "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ=="], + + "object-visit": ["object-visit@1.0.1", "", { "dependencies": { "isobject": "^3.0.0" } }, "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA=="], + + "object.pick": ["object.pick@1.3.0", "", { "dependencies": { "isobject": "^3.0.1" } }, "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ=="], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + + "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], + + "p-finally": ["p-finally@1.0.0", "", {}, "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="], + + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + + "p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="], + + "p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="], + + "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], + + "pascalcase": ["pascalcase@0.1.1", "", {}, "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw=="], + + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + + "path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="], + + "pkg-dir": ["pkg-dir@4.2.0", "", { "dependencies": { "find-up": "^4.0.0" } }, "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ=="], + + "posix-character-classes": ["posix-character-classes@0.1.1", "", {}, "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg=="], + + "pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], + + "pump": ["pump@3.0.2", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw=="], + + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], + + "react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "regenerator-runtime": ["regenerator-runtime@0.14.1", "", {}, "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="], + + "regex-not": ["regex-not@1.0.2", "", { "dependencies": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" } }, "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A=="], + + "remove-trailing-separator": ["remove-trailing-separator@1.1.0", "", {}, "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw=="], + + "repeat-element": ["repeat-element@1.1.4", "", {}, "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ=="], + + "repeat-string": ["repeat-string@1.6.1", "", {}, "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w=="], + + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + + "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], + + "resolve-cwd": ["resolve-cwd@3.0.0", "", { "dependencies": { "resolve-from": "^5.0.0" } }, "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg=="], + + "resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], + + "resolve-url": ["resolve-url@0.2.1", "", {}, "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg=="], + + "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="], + + "ret": ["ret@0.1.15", "", {}, "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="], + + "rpc-websockets": ["rpc-websockets@9.1.1", "", { "dependencies": { "@swc/helpers": "^0.5.11", "@types/uuid": "^8.3.4", "@types/ws": "^8.2.2", "buffer": "^6.0.3", "eventemitter3": "^5.0.1", "uuid": "^8.3.2", "ws": "^8.5.0" }, "optionalDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" } }, "sha512-1IXGM/TfPT6nfYMIXkJdzn+L4JEsmb0FL1O2OBjaH03V3yuUDdKFulGLMFG6ErV+8pZ5HVC0limve01RyO+saA=="], + + "rsvp": ["rsvp@4.8.5", "", {}, "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA=="], + + "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + + "safe-regex": ["safe-regex@1.1.0", "", { "dependencies": { "ret": "~0.1.10" } }, "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg=="], + + "sane": ["sane@4.1.0", "", { "dependencies": { "@cnakazawa/watch": "^1.0.3", "anymatch": "^2.0.0", "capture-exit": "^2.0.0", "exec-sh": "^0.3.2", "execa": "^1.0.0", "fb-watchman": "^2.0.0", "micromatch": "^3.1.4", "minimist": "^1.1.1", "walker": "~1.0.5" }, "bin": { "sane": "./src/cli.js" } }, "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA=="], + + "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "set-value": ["set-value@2.0.1", "", { "dependencies": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" } }, "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + + "slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="], + + "snapdragon": ["snapdragon@0.8.2", "", { "dependencies": { "base": "^0.11.1", "debug": "^2.2.0", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "map-cache": "^0.2.2", "source-map": "^0.5.6", "source-map-resolve": "^0.5.0", "use": "^3.1.0" } }, "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg=="], + + "snapdragon-node": ["snapdragon-node@2.1.1", "", { "dependencies": { "define-property": "^1.0.0", "isobject": "^3.0.0", "snapdragon-util": "^3.0.1" } }, "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw=="], + + "snapdragon-util": ["snapdragon-util@3.0.1", "", { "dependencies": { "kind-of": "^3.2.0" } }, "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ=="], + + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "source-map-resolve": ["source-map-resolve@0.5.3", "", { "dependencies": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" } }, "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw=="], + + "source-map-support": ["source-map-support@0.5.13", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w=="], + + "source-map-url": ["source-map-url@0.4.1", "", {}, "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="], + + "split-string": ["split-string@3.1.0", "", { "dependencies": { "extend-shallow": "^3.0.0" } }, "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw=="], + + "sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="], + + "stack-utils": ["stack-utils@2.0.6", "", { "dependencies": { "escape-string-regexp": "^2.0.0" } }, "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ=="], + + "static-extend": ["static-extend@0.1.2", "", { "dependencies": { "define-property": "^0.2.5", "object-copy": "^0.1.0" } }, "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g=="], + + "stream-chain": ["stream-chain@2.2.5", "", {}, "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA=="], + + "stream-json": ["stream-json@1.9.1", "", { "dependencies": { "stream-chain": "^2.2.5" } }, "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw=="], + + "string-length": ["string-length@4.0.2", "", { "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" } }, "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ=="], + + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "strip-bom": ["strip-bom@4.0.0", "", {}, "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w=="], + + "strip-eof": ["strip-eof@1.0.0", "", {}, "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q=="], + + "strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], + + "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + + "superstruct": ["superstruct@0.15.5", "", {}, "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ=="], + + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + + "test-exclude": ["test-exclude@6.0.0", "", { "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" } }, "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w=="], + + "text-encoding-utf-8": ["text-encoding-utf-8@1.0.2", "", {}, "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg=="], + + "tmpl": ["tmpl@1.0.5", "", {}, "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="], + + "to-object-path": ["to-object-path@0.3.0", "", { "dependencies": { "kind-of": "^3.0.2" } }, "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg=="], + + "to-regex": ["to-regex@3.0.2", "", { "dependencies": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" } }, "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "type-detect": ["type-detect@4.0.8", "", {}, "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="], + + "type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="], + + "typedarray-to-buffer": ["typedarray-to-buffer@3.1.5", "", { "dependencies": { "is-typedarray": "^1.0.0" } }, "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q=="], + + "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], + + "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], + + "union-value": ["union-value@1.0.1", "", { "dependencies": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" } }, "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg=="], + + "unset-value": ["unset-value@1.0.0", "", { "dependencies": { "has-value": "^0.3.1", "isobject": "^3.0.0" } }, "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ=="], + + "update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], + + "urix": ["urix@0.1.0", "", {}, "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg=="], + + "use": ["use@3.1.1", "", {}, "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="], + + "utf-8-validate": ["utf-8-validate@5.0.10", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ=="], + + "uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + + "v8-to-istanbul": ["v8-to-istanbul@9.3.0", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^2.0.0" } }, "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA=="], + + "walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="], + + "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], + + "whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + + "write-file-atomic": ["write-file-atomic@3.0.3", "", { "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q=="], + + "ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], + + "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], + + "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + + "@istanbuljs/load-nyc-config/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], + + "@jest/core/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "@jest/reporters/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "@jest/reporters/istanbul-lib-instrument": ["istanbul-lib-instrument@6.0.3", "", { "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", "semver": "^7.5.4" } }, "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q=="], + + "@jest/transform/@jest/types": ["@jest/types@26.6.2", "", { "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } }, "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ=="], + + "@jest/transform/convert-source-map": ["convert-source-map@1.9.0", "", {}, "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="], + + "@jest/transform/jest-haste-map": ["jest-haste-map@26.6.2", "", { "dependencies": { "@jest/types": "^26.6.2", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", "jest-serializer": "^26.6.2", "jest-util": "^26.6.2", "jest-worker": "^26.6.2", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" }, "optionalDependencies": { "fsevents": "^2.1.2" } }, "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w=="], + + "@jest/transform/jest-regex-util": ["jest-regex-util@26.0.0", "", {}, "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A=="], + + "@jest/transform/jest-util": ["jest-util@26.6.2", "", { "dependencies": { "@jest/types": "^26.6.2", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", "micromatch": "^4.0.2" } }, "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q=="], + + "@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + + "@solana/web3.js/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + + "@solana/web3.js/superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], + + "@types/bs58/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + + "babel-jest/@jest/types": ["@jest/types@26.6.2", "", { "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } }, "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ=="], + + "base/define-property": ["define-property@1.0.0", "", { "dependencies": { "is-descriptor": "^1.0.0" } }, "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA=="], + + "borsh/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + + "chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "class-utils/define-property": ["define-property@0.2.5", "", { "dependencies": { "is-descriptor": "^0.1.0" } }, "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA=="], + + "expand-brackets/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + + "expand-brackets/define-property": ["define-property@0.2.5", "", { "dependencies": { "is-descriptor": "^0.1.0" } }, "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA=="], + + "expand-brackets/extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + + "extglob/define-property": ["define-property@1.0.0", "", { "dependencies": { "is-descriptor": "^1.0.0" } }, "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA=="], + + "extglob/extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + + "has-values/is-number": ["is-number@3.0.0", "", { "dependencies": { "kind-of": "^3.0.2" } }, "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg=="], + + "has-values/kind-of": ["kind-of@4.0.0", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw=="], + + "is-ci/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="], + + "jayson/@types/node": ["@types/node@12.20.55", "", {}, "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="], + + "jest-config/babel-jest": ["babel-jest@29.7.0", "", { "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" } }, "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg=="], + + "jest-runner/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "jest-runtime/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "jest-snapshot/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "jest-snapshot/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="], + + "jest-worker/supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + + "make-dir/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="], + + "object-copy/define-property": ["define-property@0.2.5", "", { "dependencies": { "is-descriptor": "^0.1.0" } }, "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA=="], + + "object-copy/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="], + + "p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="], + + "rpc-websockets/@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + + "rpc-websockets/ws": ["ws@8.18.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w=="], + + "sane/anymatch": ["anymatch@2.0.0", "", { "dependencies": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" } }, "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw=="], + + "sane/execa": ["execa@1.0.0", "", { "dependencies": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" } }, "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA=="], + + "sane/micromatch": ["micromatch@3.1.10", "", { "dependencies": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "extglob": "^2.0.4", "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } }, "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg=="], + + "set-value/extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + + "set-value/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "snapdragon/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + + "snapdragon/define-property": ["define-property@0.2.5", "", { "dependencies": { "is-descriptor": "^0.1.0" } }, "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA=="], + + "snapdragon/extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + + "snapdragon/source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], + + "snapdragon-node/define-property": ["define-property@1.0.0", "", { "dependencies": { "is-descriptor": "^1.0.0" } }, "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA=="], + + "snapdragon-util/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="], + + "static-extend/define-property": ["define-property@0.2.5", "", { "dependencies": { "is-descriptor": "^0.1.0" } }, "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA=="], + + "to-object-path/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="], + + "union-value/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "unset-value/has-value": ["has-value@0.3.1", "", { "dependencies": { "get-value": "^2.0.3", "has-values": "^0.1.4", "isobject": "^2.0.0" } }, "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q=="], + + "wrap-ansi/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "@jest/core/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "@jest/reporters/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "@jest/reporters/istanbul-lib-instrument/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="], + + "@jest/transform/@jest/types/@types/yargs": ["@types/yargs@15.0.19", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA=="], + + "@jest/transform/jest-haste-map/jest-worker": ["jest-worker@26.6.2", "", { "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" } }, "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ=="], + + "@solana/web3.js/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], + + "@types/bs58/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], + + "babel-jest/@jest/types/@types/yargs": ["@types/yargs@15.0.19", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA=="], + + "borsh/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], + + "class-utils/define-property/is-descriptor": ["is-descriptor@0.1.7", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg=="], + + "expand-brackets/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + + "expand-brackets/define-property/is-descriptor": ["is-descriptor@0.1.7", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg=="], + + "expand-brackets/extend-shallow/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "extglob/extend-shallow/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "has-values/is-number/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="], + + "jest-config/babel-jest/@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "jest-config/babel-jest/babel-preset-jest": ["babel-preset-jest@29.6.3", "", { "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA=="], + + "jest-runner/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "jest-runtime/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "jest-snapshot/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "object-copy/define-property/is-descriptor": ["is-descriptor@0.1.7", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg=="], + + "sane/anymatch/normalize-path": ["normalize-path@2.1.1", "", { "dependencies": { "remove-trailing-separator": "^1.0.1" } }, "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w=="], + + "sane/execa/cross-spawn": ["cross-spawn@6.0.6", "", { "dependencies": { "nice-try": "^1.0.4", "path-key": "^2.0.1", "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" } }, "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw=="], + + "sane/execa/get-stream": ["get-stream@4.1.0", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w=="], + + "sane/execa/is-stream": ["is-stream@1.1.0", "", {}, "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="], + + "sane/execa/npm-run-path": ["npm-run-path@2.0.2", "", { "dependencies": { "path-key": "^2.0.0" } }, "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw=="], + + "sane/micromatch/braces": ["braces@2.3.2", "", { "dependencies": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", "fill-range": "^4.0.0", "isobject": "^3.0.1", "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", "snapdragon-node": "^2.0.1", "split-string": "^3.0.2", "to-regex": "^3.0.1" } }, "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w=="], + + "snapdragon/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + + "snapdragon/define-property/is-descriptor": ["is-descriptor@0.1.7", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg=="], + + "snapdragon/extend-shallow/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "static-extend/define-property/is-descriptor": ["is-descriptor@0.1.7", "", { "dependencies": { "is-accessor-descriptor": "^1.0.1", "is-data-descriptor": "^1.0.1" } }, "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg=="], + + "unset-value/has-value/has-values": ["has-values@0.1.4", "", {}, "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ=="], + + "unset-value/has-value/isobject": ["isobject@2.1.0", "", { "dependencies": { "isarray": "1.0.0" } }, "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA=="], + + "jest-config/babel-jest/@jest/transform/write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "jest-config/babel-jest/babel-preset-jest/babel-plugin-jest-hoist": ["babel-plugin-jest-hoist@29.6.3", "", { "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" } }, "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg=="], + + "sane/execa/cross-spawn/path-key": ["path-key@2.0.1", "", {}, "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="], + + "sane/execa/cross-spawn/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="], + + "sane/execa/cross-spawn/shebang-command": ["shebang-command@1.2.0", "", { "dependencies": { "shebang-regex": "^1.0.0" } }, "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg=="], + + "sane/execa/cross-spawn/which": ["which@1.3.1", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "./bin/which" } }, "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="], + + "sane/execa/npm-run-path/path-key": ["path-key@2.0.1", "", {}, "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="], + + "sane/micromatch/braces/extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + + "sane/micromatch/braces/fill-range": ["fill-range@4.0.0", "", { "dependencies": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", "repeat-string": "^1.6.1", "to-regex-range": "^2.1.0" } }, "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ=="], + + "sane/execa/cross-spawn/shebang-command/shebang-regex": ["shebang-regex@1.0.0", "", {}, "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="], + + "sane/micromatch/braces/extend-shallow/is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], + + "sane/micromatch/braces/fill-range/is-number": ["is-number@3.0.0", "", { "dependencies": { "kind-of": "^3.0.2" } }, "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg=="], + + "sane/micromatch/braces/fill-range/to-regex-range": ["to-regex-range@2.1.1", "", { "dependencies": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" } }, "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg=="], + + "sane/micromatch/braces/fill-range/is-number/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="], + } +} diff --git a/package.json b/package.json index 3ffb0d7..07a037f 100644 --- a/package.json +++ b/package.json @@ -1,80 +1,65 @@ { - "private": true, - "workspaces": { - "packages": [ - "packages/*" - ] + "name": "@realms-today/spl-governance", + "version": "1.0.0", + "description": "SPL Governance Client API", + "author": "Solana Maintainers ", + "homepage": "https://github.com/solana-labs/oyster/blob/main/packages/governance-sdk/README.md", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib" }, - "keywords": [], - "license": "Apache-2.0", - "engines": { - "node": ">=6.0.0" + "files": [ + "lib" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/solana-labs/oyster.git" }, + "sideEffects": false, "scripts": { - "bootstrap": "lerna link && lerna bootstrap", - "build": "lerna run build", - "start": "CI=true lerna run start --scope @oyster/common --stream --parallel --scope ", - "start-gov": "CI=true lerna run start --scope @solana/spl-governance --scope @oyster/common --stream --parallel --scope governance", - "build-gov": "yarn && yarn bootstrap && yarn build --scope @oyster/common --scope @solana/spl-governance --scope governance", - "lint": "eslint 'packages/*/{src,test}/**/*.ts' && prettier -c 'packages/*/{src,test}/**/*.ts'", - "lint:fix": "eslint --fix 'packages/*/{src,test}/**/*.ts' && prettier --write 'packages/*/{src,test}/**/*.ts'", - "deploy": "run-s deploy:docs build deploy:apps && gh-pages -d docs", - "deploy:docs": "lerna run docs", - "deploy:apps": "lerna run deploy:app", - "test": "lerna run test --concurrency 1 --stream" - }, - "lint-staged": { - "packages/*/{src,test}/**/*.ts": [ - "prettier --write" - ] - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } + "build": "tsc", + "test": "jest", + "test:bun": "bun test tests/governance/api.v3.vtxn.test.ts --timeout 20000" }, - "prettier": { - "arrowParens": "avoid", - "semi": true, - "singleQuote": true, - "trailingComma": "all" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] + "bugs": { + "url": "https://github.com/solana-labs/oyster/issues" }, "dependencies": { - "react": "16.13.1", - "react-dom": "16.13.1" + "@solana/web3.js": "=1.98.0", + "bignumber.js": "^9.0.1", + "bn.js": "^5.1.3", + "borsh": "^0.7.0", + "bs58": "^5.0.0", + "superstruct": "^0.15.2" }, "devDependencies": { - "@commitlint/cli": "^8.2.0", - "@commitlint/config-conventional": "^8.2.0", - "@types/animejs": "^3.1.3", - "@types/jest": "^24.0.0", - "@types/react": "^16.9.50", - "@types/react-dom": "^16.9.8", - "@typescript-eslint/eslint-plugin": "^4.6.0", - "@typescript-eslint/parser": "^4.6.0", - "eslint": "^6.6.0", - "eslint-config-prettier": "^6.15.0", - "gh-pages": "^3.1.0", - "husky": "^4.3.0", - "jest": "24.9.0", - "jest-config": "24.9.0", - "lerna": "3.22.1", - "lint-staged": "^10.5.0", - "npm-run-all": "^4.1.5", - "prettier": "^2.1.2", - "rimraf": "^3.0.2", - "ts-jest": "^24.0.0", - "ts-node": "^9.0.0", - "typescript": "^4.1.3", - "node-gyp": "^10.0.1" + "@biomejs/biome": "1.9.4", + "@solana/spl-token": "*", + "@types/bn.js": "^5.1.6", + "@types/bs58": "^5.0.0", + "@types/jest": "29.2.0", + "bun-types": "latest", + "esbuild": "^0.14.11", + "esbuild-jest": "^0.5.0", + "jest": "^29.2.0", + "ts-jest": "29.2.0", + "typescript": "^5.8.3" + }, + "jest": { + "testTimeout": 20000, + "transform": { + "^.+\\.tsx?$": "esbuild-jest" + }, + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ] }, - "resolutions": { - "react": "16.13.1", - "react-dom": "16.13.1" - } -} \ No newline at end of file + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/packages/arweave-push/.gcloudignore b/packages/arweave-push/.gcloudignore deleted file mode 100644 index 0f9ec0f..0000000 --- a/packages/arweave-push/.gcloudignore +++ /dev/null @@ -1,16 +0,0 @@ -# This file specifies files that are *not* uploaded to Google Cloud Platform -# using gcloud. It follows the same syntax as .gitignore, with the addition of -# "#!include" directives (which insert the entries of the given .gitignore-style -# file at that point). -# -# For more information, run: -# $ gcloud topic gcloudignore -# -.gcloudignore -# If you would like to upload your .git directory, .gitignore file or files -# from your .gitignore file, remove the corresponding line -# below: -.git -.gitignore - -node_modules \ No newline at end of file diff --git a/packages/arweave-push/README b/packages/arweave-push/README deleted file mode 100644 index 493040a..0000000 --- a/packages/arweave-push/README +++ /dev/null @@ -1,4 +0,0 @@ -gcloud functions deploy uploadFile --runtime nodejs12 --trigger-http --allow-unauthenticated - -To deploy to prod, change function name to uploadFileProd in index.js, and CLUSTER url to mainnet, then -run above with uploadFileProd \ No newline at end of file diff --git a/packages/arweave-push/index.js b/packages/arweave-push/index.js deleted file mode 100644 index d159d70..0000000 --- a/packages/arweave-push/index.js +++ /dev/null @@ -1,348 +0,0 @@ -// [START functions_http_form_data] -/** - * Parses a 'multipart/form-data' upload request - * - * @param {Object} req Cloud Function request context. - * @param {Object} res Cloud Function response context. - */ -const path = require('path'); -const Arweave = require('arweave'); -const { Storage } = require('@google-cloud/storage'); -const os = require('os'); -const fs = require('fs'); -const crypto = require('crypto'); -const { Account, Connection } = require('@solana/web3.js'); -const mimeType = require('mime-types'); -const fetch = require('node-fetch'); - -const storage = new Storage(); -const BUCKET_NAME = 'us.artifacts.principal-lane-200702.appspot.com'; -const FOLDER_NAME = 'arweave'; -const ARWEAVE_KEYNAME = 'arweave.json'; -const SOLANA_KEYNAME = 'arweave-sol-container.json'; -const CLUSTER = 'https://devnet.solana.com'; -//const CLUSTER = 'https://api.mainnet-beta.solana.com'; -const SYSTEM = '11111111111111111111111111111111'; -const MEMO = 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'; -const KEYHOLDER = {}; -const FAIL = 'fail'; -const SUCCESS = 'success'; -const LAMPORT_MULTIPLIER = 10 ** 9; -const WINSTON_MULTIPLIER = 10 ** 12; -const RESERVED_TXN_MANIFEST = 'manifest.json'; - -function generateManifest(pathMap, indexPath) { - const manifest = { - manifest: 'arweave/paths', - version: '0.1.0', - paths: pathMap, - }; - - if (indexPath) { - if (!Object.keys(pathMap).includes(indexPath)) { - throw new Error( - `--index path not found in directory paths: ${indexPath}`, - ); - } - manifest.index = { - path: indexPath, - }; - } - - return manifest; -} - -const getKey = async function (name) { - if (KEYHOLDER[name]) return KEYHOLDER[name]; - - const options = { - destination: os.tmpdir() + '/' + name, - }; - - // Downloads the file - await storage - .bucket(BUCKET_NAME) - .file(FOLDER_NAME + '/' + name) - .download(options); - - console.log(`Key downloaded to ${os.tmpdir()}/${name}`); - - let rawdata = fs.readFileSync(os.tmpdir() + '/' + name); - let key; - try { - key = JSON.parse(rawdata); - } catch (e) { - key = rawdata.toString(); - } - - KEYHOLDER[name] = key; - return KEYHOLDER[name]; -}; - -// Node.js doesn't have a built-in multipart/form-data parsing library. -// Instead, we can use the 'busboy' library from NPM to parse these requests. -const Busboy = require('busboy'); -const arweaveConnection = Arweave.init({ - host: 'arweave.net', // Hostname or IP address for a Arweave host - port: 443, // Port - protocol: 'https', // Network protocol http or https - timeout: 20000, // Network request timeouts in milliseconds - logging: true, // Enable network request logging -}); - -// FYI no streaming uploads as yet -// https://gist.github.com/CDDelta/e2af7e02314b2e0c3b5f9eb616c645a6 -// Need to read entire thing into memory - Limits us to 2GB files. TODO come back and implemnet. -exports.uploadFile = async (req, res) => { - res.set('Access-Control-Allow-Origin', '*'); - - if (req.method === 'OPTIONS') { - // Send response to OPTIONS requests - res.set('Access-Control-Allow-Methods', 'POST'); - res.set('Access-Control-Allow-Headers', 'Content-Type'); - res.set('Access-Control-Max-Age', '3600'); - res.status(204).send(''); - return; - } - - if (req.method !== 'POST') { - // Return a "method not allowed" error - return res.status(405).end(); - } - const solanaKey = await getKey(SOLANA_KEYNAME); - const solanaConnection = new Connection(CLUSTER, 'recent'); - const solanaWallet = new Account(solanaKey); - const arweaveWallet = await getKey(ARWEAVE_KEYNAME); - console.log('Connections established.'); - const busboy = new Busboy({ headers: req.headers }); - const tmpdir = os.tmpdir(); - - const fieldPromises = []; - - // This code will process each non-file field in the form. - busboy.on('field', (fieldname, val) => { - console.log('I see ' + fieldname); - fieldPromises.push( - new Promise(async (res, _) => { - if (fieldname === 'transaction') { - try { - console.log('Calling out for txn', val); - const transaction = await solanaConnection.getParsedConfirmedTransaction( - val, - ); - console.log('I got the transaction'); - // We expect the first command to be a SOL send from them to our holding account. - // Then after that it's memos of sha256 hashes of file contents. - const expectedSend = - transaction.transaction.message.instructions[0]; - - const isSystem = expectedSend.programId.toBase58() === SYSTEM; - const isToUs = - expectedSend.parsed.info.destination === - solanaWallet.publicKey.toBase58(); - console.log( - 'Expected to send is', - JSON.stringify(expectedSend.parsed), - ); - if (isSystem && isToUs) { - const amount = expectedSend.parsed.info.lamports; - const remainingMemos = transaction.transaction.message.instructions.filter( - i => i.programId.toBase58() === MEMO, - ); - const memoMessages = remainingMemos.map(m => m.parsed); - res({ - name: fieldname, - amount, - memoMessages, - }); - } else - throw new Error( - 'No payment found because either the program wasnt the system program or it wasnt to the holding account', - ); - } catch (e) { - console.log(fieldname, e); - console.log('Setting txn anyway'); - res({ - name: fieldname, - amount: 0, - memoMessages: [], - }); - } - } else if (fieldname === 'tags') { - try { - res({ - name: fieldname, - ...JSON.parse(val), - }); - } catch (e) { - console.log(fieldname, e); - res({ - name: fieldname, - }); - } - } - }), - ); - }); - - const fileWrites = []; - - // This code will process each file uploaded. - busboy.on('file', (fieldname, file, filename) => { - // Note: os.tmpdir() points to an in-memory file system on GCF - // Thus, any files in it must fit in the instance's memory. - console.log(`Processed file ${filename}`); - const filepath = path.join(tmpdir, filename); - - const writeStream = fs.createWriteStream(filepath); - file.pipe(writeStream); - - // File was processed by Busboy; wait for it to be written. - // Note: GCF may not persist saved files across invocations. - // Persistent files must be kept in other locations - // (such as Cloud Storage buckets). - const promise = new Promise((resolve, reject) => { - file.on('end', () => { - writeStream.end(); - }); - writeStream.on('finish', resolve({ status: SUCCESS, filepath })); - writeStream.on( - 'error', - reject({ status: FAIL, filepath, error: 'failed to save' }), - ); - }); - - fileWrites.push(promise); - }); - - // Triggered once all uploaded files are processed by Busboy. - // We still need to wait for the disk writes (saves) to complete. - const body = { messages: [] }; - - busboy.on('finish', async () => { - console.log('Finish'); - const filepaths = [ - ...(await Promise.all(fileWrites)), - { filepath: RESERVED_TXN_MANIFEST, status: SUCCESS }, - ]; - const fields = await Promise.all(fieldPromises); - const anchor = (await arweaveConnection.api.get('tx_anchor')).data; - - console.log('The one guy is ' + fields.map(f => f.name).join(',')); - const txn = fields.find(f => f.name === 'transaction'); - const fieldTags = fields.find(f => f.name === 'tags'); - - if (!txn || !txn.amount) { - body.error = 'No transaction found with payment'; - res.end(JSON.stringify(body)); - return; - } - - let runningTotal = txn.amount; - - const conversionRates = JSON.parse( - await ( - await fetch( - 'https://api.coingecko.com/api/v3/simple/price?ids=solana,arweave&vs_currencies=usd', - ) - ).text(), - ); - - // To figure out how much solana is required, multiply ar byte cost by this number - const arMultiplier = - conversionRates.arweave.usd / conversionRates.solana.usd; - - const paths = {}; - for (let i = 0; i < filepaths.length; i++) { - const f = filepaths[i]; - if (f.status == FAIL) { - body.messages.push(f); - } else { - const { filepath } = f; - const parts = filepath.split('/'); - const filename = parts[parts.length - 1]; - try { - let data, fileSizeInBytes, mime; - if (filepath == RESERVED_TXN_MANIFEST) { - const manifest = await generateManifest(paths, 'metadata.json'); - data = Buffer.from(JSON.stringify(manifest), 'utf8'); - fileSizeInBytes = data.byteLength; - mime = 'application/x.arweave-manifest+json'; - } else { - data = fs.readFileSync(filepath); - - // Have to get separate Buffer since buffers are stateful - const hashSum = crypto.createHash('sha256'); - hashSum.update(data.toString()); - const hex = hashSum.digest('hex'); - - if (!txn.memoMessages.find(m => m === hex)) { - body.messages.push({ - filename, - status: FAIL, - error: `Unable to find proof that you paid for this file, your hash is ${hex}, comparing to ${txn.memoMessages.join( - ',', - )}`, - }); - continue; - } - - const stats = fs.statSync(filepath); - fileSizeInBytes = stats.size; - mime = mimeType.lookup(filepath); - } - - const costSizeInWinstons = parseInt( - await ( - await fetch( - 'https://arweave.net/price/' + fileSizeInBytes.toString(), - ) - ).text(), - ); - - const costToStoreInSolana = - (costSizeInWinstons * arMultiplier) / WINSTON_MULTIPLIER; - - runningTotal -= costToStoreInSolana * LAMPORT_MULTIPLIER; - if (runningTotal > 0) { - const transaction = await arweaveConnection.createTransaction( - { data: data, last_tx: anchor }, - arweaveWallet, - ); - transaction.addTag('Content-Type', mime); - if (fieldTags) { - const tags = - fieldTags[filepath.split('/')[filepath.split('/').length - 1]]; - if (tags) tags.map(t => transaction.addTag(t.name, t.value)); - } - - await arweaveConnection.transactions.sign( - transaction, - arweaveWallet, - ); - await arweaveConnection.transactions.post(transaction); - body.messages.push({ - filename, - status: SUCCESS, - transactionId: transaction.id, - }); - paths[filename] = { id: transaction.id }; - } else { - body.messages.push({ - filename, - status: FAIL, - error: `Not enough funds provided to push this file, you need at least ${costToStoreInSolana} SOL or ${costSize} AR`, - }); - } - } catch (e) { - console.log(e); - body.messages.push({ filename, status: FAIL, error: e.toString() }); - } - } - } - - res.end(JSON.stringify(body)); - }); - busboy.end(req.rawBody); -}; -// [END functions_http_form_data] diff --git a/packages/arweave-push/package.json b/packages/arweave-push/package.json deleted file mode 100644 index 1278092..0000000 --- a/packages/arweave-push/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "arweave-push", - "version": "0.0.1", - "private": true, - "license": "Apache-2.0", - "author": "Solana Labs", - "repository": { - "type": "git", - "url": "https://github.com/solana-labs/oyster.git" - }, - "engines": { - "node": ">=12.0.0" - }, - "scripts": { - "test": "mocha test/*.test.js --timeout=60000" - }, - "devDependencies": { - "jest": "^27.4.7", - "mocha": "^8.0.0", - "proxyquire": "^2.1.0", - "sinon": "^10.0.0" - }, - "dependencies": { - "@google-cloud/storage": "^5.0.0", - "@solana/web3.js": "^1", - "arweave": "1.10.13", - "busboy": "^0.3.0", - "coingecko-api": "1.0.10", - "escape-html": "^1.0.3", - "mime-types": "2.1.30", - "node-fetch": "2.6.1" - } -} diff --git a/packages/bridge-sdk/contracts/Address.json b/packages/bridge-sdk/contracts/Address.json deleted file mode 100644 index dad0604..0000000 --- a/packages/bridge-sdk/contracts/Address.json +++ /dev/null @@ -1,8234 +0,0 @@ -{ - "contractName": "Address", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Address.sol\":\"Address\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]}},\"version\":1}", - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220aeba45e552a4fad8095b8658473f76fdd0093be5a657405e442c7075508b502364736f6c634300060c0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220aeba45e552a4fad8095b8658473f76fdd0093be5a657405e442c7075508b502364736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "134:7684:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "134:7684:8:-:0;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/utils/Address.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "exportedSymbols": { - "Address": [3595] - }, - "id": 3596, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3301, - "literals": ["solidity", ">=", "0.6", ".2", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:8" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 3302, - "nodeType": "StructuredDocumentation", - "src": "66:67:8", - "text": " @dev Collection of functions related to the address type" - }, - "fullyImplemented": true, - "id": 3595, - "linearizedBaseContracts": [3595], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 3318, - "nodeType": "Block", - "src": "792:347:8", - "statements": [ - { - "assignments": [3311], - "declarations": [ - { - "constant": false, - "id": 3311, - "mutability": "mutable", - "name": "size", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3318, - "src": "989:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3310, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "989:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3312, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "989:12:8" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "1076:32:8", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1078:28:8", - "value": { - "arguments": [ - { - "name": "account", - "nodeType": "YulIdentifier", - "src": "1098:7:8" - } - ], - "functionName": { - "name": "extcodesize", - "nodeType": "YulIdentifier", - "src": "1086:11:8" - }, - "nodeType": "YulFunctionCall", - "src": "1086:20:8" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "1078:4:8" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 3305, - "isOffset": false, - "isSlot": false, - "src": "1098:7:8", - "valueSize": 1 - }, - { - "declaration": 3311, - "isOffset": false, - "isSlot": false, - "src": "1078:4:8", - "valueSize": 1 - } - ], - "id": 3313, - "nodeType": "InlineAssembly", - "src": "1067:41:8" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3314, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3311, - "src": "1124:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1131:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1124:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3309, - "id": 3317, - "nodeType": "Return", - "src": "1117:15:8" - } - ] - }, - "documentation": { - "id": 3303, - "nodeType": "StructuredDocumentation", - "src": "156:565:8", - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 3319, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3305, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3319, - "src": "746:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "746:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "745:17:8" - }, - "returnParameters": { - "id": 3309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3308, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3319, - "src": "786:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3307, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "786:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "785:6:8" - }, - "scope": 3595, - "src": "726:413:8", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3352, - "nodeType": "Block", - "src": "2127:320:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3330, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2153:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - ], - "id": 3329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2145:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3328, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2145:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2145:13:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2145:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3333, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3324, - "src": "2170:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2145:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 3335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2178:31:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 3327, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2137:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2137:73:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3337, - "nodeType": "ExpressionStatement", - "src": "2137:73:8" - }, - { - "assignments": [3339, null], - "declarations": [ - { - "constant": false, - "id": 3339, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3352, - "src": "2299:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3338, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2299:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 3346, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 3344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 3340, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3322, - "src": "2317:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 3341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2317:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "id": 3342, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3324, - "src": "2340:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2317:31:8", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2317:35:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2298:54:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3348, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3339, - "src": "2370:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 3349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2379:60:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 3347, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2362:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2362:78:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3351, - "nodeType": "ExpressionStatement", - "src": "2362:78:8" - } - ] - }, - "documentation": { - "id": 3320, - "nodeType": "StructuredDocumentation", - "src": "1145:906:8", - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 3353, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3325, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3322, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3353, - "src": "2075:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3321, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2075:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3324, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3353, - "src": "2102:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2102:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2074:43:8" - }, - "returnParameters": { - "id": 3326, - "nodeType": "ParameterList", - "parameters": [], - "src": "2127:0:8" - }, - "scope": 3595, - "src": "2056:391:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3369, - "nodeType": "Block", - "src": "3277:82:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3364, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3356, - "src": "3305:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3365, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3358, - "src": "3313:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 3366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3319:32:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 3363, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [3370, 3390], - "referencedDeclaration": 3390, - "src": "3292:12:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 3367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3292:60:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3362, - "id": 3368, - "nodeType": "Return", - "src": "3285:67:8" - } - ] - }, - "documentation": { - "id": 3354, - "nodeType": "StructuredDocumentation", - "src": "2453:730:8", - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 3370, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3356, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3370, - "src": "3210:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3355, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3210:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3358, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3370, - "src": "3226:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3357, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3226:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3209:35:8" - }, - "returnParameters": { - "id": 3362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3361, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3370, - "src": "3263:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3360, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3263:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3262:14:8" - }, - "scope": 3595, - "src": "3188:171:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3389, - "nodeType": "Block", - "src": "3698:76:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3383, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3373, - "src": "3737:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3384, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3375, - "src": "3745:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 3385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3751:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 3386, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3377, - "src": "3754:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3382, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [3410, 3460], - "referencedDeclaration": 3460, - "src": "3715:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 3387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3715:52:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3381, - "id": 3388, - "nodeType": "Return", - "src": "3708:59:8" - } - ] - }, - "documentation": { - "id": 3371, - "nodeType": "StructuredDocumentation", - "src": "3365:211:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 3390, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3373, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3390, - "src": "3603:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3372, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3603:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3375, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3390, - "src": "3619:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3374, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3619:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3377, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3390, - "src": "3638:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3376, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3638:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3602:63:8" - }, - "returnParameters": { - "id": 3381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3380, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3390, - "src": "3684:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3379, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3684:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3683:14:8" - }, - "scope": 3595, - "src": "3581:193:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3409, - "nodeType": "Block", - "src": "4249:111:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3403, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3393, - "src": "4288:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3404, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3395, - "src": "4296:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 3405, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3397, - "src": "4302:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 3406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4309:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 3402, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [3410, 3460], - "referencedDeclaration": 3460, - "src": "4266:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 3407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4266:87:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3401, - "id": 3408, - "nodeType": "Return", - "src": "4259:94:8" - } - ] - }, - "documentation": { - "id": 3391, - "nodeType": "StructuredDocumentation", - "src": "3780:351:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 3410, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3393, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3410, - "src": "4167:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3392, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4167:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3395, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3410, - "src": "4183:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3394, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4183:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3397, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3410, - "src": "4202:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4202:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4166:50:8" - }, - "returnParameters": { - "id": 3401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3400, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3410, - "src": "4235:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3399, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4235:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4234:14:8" - }, - "scope": 3595, - "src": "4136:224:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3459, - "nodeType": "Block", - "src": "4749:382:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3427, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "4775:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - ], - "id": 3426, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4767:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3425, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4767:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4767:13:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4767:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3430, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3417, - "src": "4792:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4767:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 3432, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4799:40:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 3424, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4759:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4759:81:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3434, - "nodeType": "ExpressionStatement", - "src": "4759:81:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3437, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3413, - "src": "4869:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3436, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3319, - "src": "4858:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4858:18:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4878:31:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 3435, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4850:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4850:60:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3441, - "nodeType": "ExpressionStatement", - "src": "4850:60:8" - }, - { - "assignments": [3443, 3445], - "declarations": [ - { - "constant": false, - "id": 3443, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3459, - "src": "4981:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3442, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4981:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3445, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3459, - "src": "4995:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3444, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4995:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3452, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3450, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3415, - "src": "5050:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3446, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3413, - "src": "5022:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5022:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "id": 3448, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3417, - "src": "5042:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5022:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5022:33:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4980:75:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3454, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3443, - "src": "5090:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3455, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3445, - "src": "5099:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 3456, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3419, - "src": "5111:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3453, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3594, - "src": "5072:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 3457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5072:52:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3423, - "id": 3458, - "nodeType": "Return", - "src": "5065:59:8" - } - ] - }, - "documentation": { - "id": 3411, - "nodeType": "StructuredDocumentation", - "src": "4366:237:8", - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 3460, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3413, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3460, - "src": "4639:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3412, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4639:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3415, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3460, - "src": "4655:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3414, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4655:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3417, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3460, - "src": "4674:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3416, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4674:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3419, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3460, - "src": "4689:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3418, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4689:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4638:78:8" - }, - "returnParameters": { - "id": 3423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3422, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3460, - "src": "4735:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3421, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4735:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4734:14:8" - }, - "scope": 3595, - "src": "4608:523:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3476, - "nodeType": "Block", - "src": "5408:97:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3471, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3463, - "src": "5444:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3472, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3465, - "src": "5452:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5458:39:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - }, - "value": "Address: low-level static call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "id": 3470, - "name": "functionStaticCall", - "nodeType": "Identifier", - "overloadedDeclarations": [3477, 3512], - "referencedDeclaration": 3512, - "src": "5425:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) view returns (bytes memory)" - } - }, - "id": 3474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5425:73:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3469, - "id": 3475, - "nodeType": "Return", - "src": "5418:80:8" - } - ] - }, - "documentation": { - "id": 3461, - "nodeType": "StructuredDocumentation", - "src": "5137:166:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 3477, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3463, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3477, - "src": "5336:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5336:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3465, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3477, - "src": "5352:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3464, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5352:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5335:35:8" - }, - "returnParameters": { - "id": 3469, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3468, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3477, - "src": "5394:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3467, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5393:14:8" - }, - "scope": 3595, - "src": "5308:197:8", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3511, - "nodeType": "Block", - "src": "5817:288:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3491, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3480, - "src": "5846:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3490, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3319, - "src": "5835:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5835:18:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 3493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5855:38:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - }, - "value": "Address: static call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "id": 3489, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5827:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5827:67:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3495, - "nodeType": "ExpressionStatement", - "src": "5827:67:8" - }, - { - "assignments": [3497, 3499], - "declarations": [ - { - "constant": false, - "id": 3497, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3511, - "src": "5965:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3496, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5965:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3499, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3511, - "src": "5979:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3498, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5979:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3504, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3502, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "6024:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3500, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3480, - "src": "6006:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6006:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 3503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6006:23:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5964:65:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3506, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3497, - "src": "6064:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3507, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3499, - "src": "6073:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 3508, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "6085:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3505, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3594, - "src": "6046:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 3509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6046:52:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3488, - "id": 3510, - "nodeType": "Return", - "src": "6039:59:8" - } - ] - }, - "documentation": { - "id": 3478, - "nodeType": "StructuredDocumentation", - "src": "5511:173:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 3512, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3485, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3480, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3512, - "src": "5717:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3479, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5717:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3482, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3512, - "src": "5733:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3481, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5733:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3484, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3512, - "src": "5752:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3483, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5752:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5716:63:8" - }, - "returnParameters": { - "id": 3488, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3487, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3512, - "src": "5803:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3486, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5803:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5802:14:8" - }, - "scope": 3595, - "src": "5689:416:8", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3528, - "nodeType": "Block", - "src": "6381:101:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3523, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3515, - "src": "6419:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3524, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3517, - "src": "6427:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "id": 3525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6433:41:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - }, - "value": "Address: low-level delegate call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - } - ], - "id": 3522, - "name": "functionDelegateCall", - "nodeType": "Identifier", - "overloadedDeclarations": [3529, 3564], - "referencedDeclaration": 3564, - "src": "6398:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 3526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6398:77:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3521, - "id": 3527, - "nodeType": "Return", - "src": "6391:84:8" - } - ] - }, - "documentation": { - "id": 3513, - "nodeType": "StructuredDocumentation", - "src": "6111:168:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 3529, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3515, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3529, - "src": "6314:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3514, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6314:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3517, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3529, - "src": "6330:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3516, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6330:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6313:35:8" - }, - "returnParameters": { - "id": 3521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3520, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3529, - "src": "6367:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3519, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6367:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6366:14:8" - }, - "scope": 3595, - "src": "6284:198:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3563, - "nodeType": "Block", - "src": "6793:292:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3543, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "6822:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3542, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3319, - "src": "6811:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6811:18:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 3545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6831:40:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - }, - "value": "Address: delegate call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - } - ], - "id": 3541, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6803:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6803:69:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3547, - "nodeType": "ExpressionStatement", - "src": "6803:69:8" - }, - { - "assignments": [3549, 3551], - "declarations": [ - { - "constant": false, - "id": 3549, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3563, - "src": "6943:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3548, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6943:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3551, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3563, - "src": "6957:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3550, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6957:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3556, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3554, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3534, - "src": "7004:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3552, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3532, - "src": "6984:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6984:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6984:25:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6942:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3558, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3549, - "src": "7044:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3559, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3551, - "src": "7053:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 3560, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3536, - "src": "7065:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3557, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3594, - "src": "7026:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7026:52:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3540, - "id": 3562, - "nodeType": "Return", - "src": "7019:59:8" - } - ] - }, - "documentation": { - "id": 3530, - "nodeType": "StructuredDocumentation", - "src": "6488:175:8", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 3564, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3532, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3564, - "src": "6698:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3531, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6698:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3534, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3564, - "src": "6714:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3533, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6714:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3536, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3564, - "src": "6733:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3535, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6733:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6697:63:8" - }, - "returnParameters": { - "id": 3540, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3539, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3564, - "src": "6779:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3538, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6779:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6778:14:8" - }, - "scope": 3595, - "src": "6668:417:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3593, - "nodeType": "Block", - "src": "7220:596:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 3575, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3566, - "src": "7234:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3591, - "nodeType": "Block", - "src": "7291:519:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3579, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3568, - "src": "7375:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 3580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7375:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3581, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7395:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7375:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3589, - "nodeType": "Block", - "src": "7747:53:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3586, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3570, - "src": "7772:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3585, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "7765:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7765:20:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3588, - "nodeType": "ExpressionStatement", - "src": "7765:20:8" - } - ] - }, - "id": 3590, - "nodeType": "IfStatement", - "src": "7371:429:8", - "trueBody": { - "id": 3584, - "nodeType": "Block", - "src": "7398:343:8", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "7582:145:8", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "7604:40:8", - "value": { - "arguments": [ - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7633:10:8" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7627:5:8" - }, - "nodeType": "YulFunctionCall", - "src": "7627:17:8" - }, - "variables": [ - { - "name": "returndata_size", - "nodeType": "YulTypedName", - "src": "7608:15:8", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7676:2:8", - "type": "", - "value": "32" - }, - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7680:10:8" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7672:3:8" - }, - "nodeType": "YulFunctionCall", - "src": "7672:19:8" - }, - { - "name": "returndata_size", - "nodeType": "YulIdentifier", - "src": "7693:15:8" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7665:6:8" - }, - "nodeType": "YulFunctionCall", - "src": "7665:44:8" - }, - "nodeType": "YulExpressionStatement", - "src": "7665:44:8" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 3568, - "isOffset": false, - "isSlot": false, - "src": "7633:10:8", - "valueSize": 1 - }, - { - "declaration": 3568, - "isOffset": false, - "isSlot": false, - "src": "7680:10:8", - "valueSize": 1 - } - ], - "id": 3583, - "nodeType": "InlineAssembly", - "src": "7573:154:8" - } - ] - } - } - ] - }, - "id": 3592, - "nodeType": "IfStatement", - "src": "7230:580:8", - "trueBody": { - "id": 3578, - "nodeType": "Block", - "src": "7243:42:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3576, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3568, - "src": "7264:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 3574, - "id": 3577, - "nodeType": "Return", - "src": "7257:17:8" - } - ] - } - } - ] - }, - "documentation": null, - "id": 3594, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_verifyCallResult", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3571, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3566, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3594, - "src": "7118:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3565, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7118:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3568, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3594, - "src": "7132:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3567, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7132:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3570, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3594, - "src": "7157:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3569, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7157:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7117:67:8" - }, - "returnParameters": { - "id": 3574, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3573, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3594, - "src": "7206:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3572, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7206:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7205:14:8" - }, - "scope": 3595, - "src": "7091:725:8", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - } - ], - "scope": 3596, - "src": "134:7684:8" - } - ], - "src": "33:7786:8" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "exportedSymbols": { - "Address": [3595] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".2", "<", "0.8", ".0"] - }, - "id": 3301, - "name": "PragmaDirective", - "src": "33:31:8" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "library", - "fullyImplemented": true, - "linearizedBaseContracts": [3595], - "name": "Address", - "scope": 3596 - }, - "children": [ - { - "attributes": { - "text": " @dev Collection of functions related to the address type" - }, - "id": 3302, - "name": "StructuredDocumentation", - "src": "66:67:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "isContract", - "overrides": null, - "scope": 3595, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 3303, - "name": "StructuredDocumentation", - "src": "156:565:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 3319, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3304, - "name": "ElementaryTypeName", - "src": "746:7:8" - } - ], - "id": 3305, - "name": "VariableDeclaration", - "src": "746:15:8" - } - ], - "id": 3306, - "name": "ParameterList", - "src": "745:17:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3319, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3307, - "name": "ElementaryTypeName", - "src": "786:4:8" - } - ], - "id": 3308, - "name": "VariableDeclaration", - "src": "786:4:8" - } - ], - "id": 3309, - "name": "ParameterList", - "src": "785:6:8" - }, - { - "children": [ - { - "attributes": { - "assignments": [3311], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "size", - "overrides": null, - "scope": 3318, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3310, - "name": "ElementaryTypeName", - "src": "989:7:8" - } - ], - "id": 3311, - "name": "VariableDeclaration", - "src": "989:12:8" - } - ], - "id": 3312, - "name": "VariableDeclarationStatement", - "src": "989:12:8" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 3305, - "isOffset": false, - "isSlot": false, - "src": "1098:7:8", - "valueSize": 1 - }, - { - "declaration": 3311, - "isOffset": false, - "isSlot": false, - "src": "1078:4:8", - "valueSize": 1 - } - ], - "operations": "{ size := extcodesize(account) }" - }, - "children": [], - "id": 3313, - "name": "InlineAssembly", - "src": "1067:41:8" - }, - { - "attributes": { - "functionReturnParameters": 3309 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3311, - "type": "uint256", - "value": "size" - }, - "id": 3314, - "name": "Identifier", - "src": "1124:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3315, - "name": "Literal", - "src": "1131:1:8" - } - ], - "id": 3316, - "name": "BinaryOperation", - "src": "1124:8:8" - } - ], - "id": 3317, - "name": "Return", - "src": "1117:15:8" - } - ], - "id": 3318, - "name": "Block", - "src": "792:347:8" - } - ], - "id": 3319, - "name": "FunctionDefinition", - "src": "726:413:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "sendValue", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 3320, - "name": "StructuredDocumentation", - "src": "1145:906:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 3353, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 3321, - "name": "ElementaryTypeName", - "src": "2075:15:8" - } - ], - "id": 3322, - "name": "VariableDeclaration", - "src": "2075:25:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 3353, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3323, - "name": "ElementaryTypeName", - "src": "2102:7:8" - } - ], - "id": 3324, - "name": "VariableDeclaration", - "src": "2102:14:8" - } - ], - "id": 3325, - "name": "ParameterList", - "src": "2074:43:8" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3326, - "name": "ParameterList", - "src": "2127:0:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3327, - "name": "Identifier", - "src": "2137:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balance", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3328, - "name": "ElementaryTypeName", - "src": "2145:7:8" - } - ], - "id": 3329, - "name": "ElementaryTypeNameExpression", - "src": "2145:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "library Address", - "value": "this" - }, - "id": 3330, - "name": "Identifier", - "src": "2153:4:8" - } - ], - "id": 3331, - "name": "FunctionCall", - "src": "2145:13:8" - } - ], - "id": 3332, - "name": "MemberAccess", - "src": "2145:21:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3324, - "type": "uint256", - "value": "amount" - }, - "id": 3333, - "name": "Identifier", - "src": "2170:6:8" - } - ], - "id": 3334, - "name": "BinaryOperation", - "src": "2145:31:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: insufficient balance\"", - "value": "Address: insufficient balance" - }, - "id": 3335, - "name": "Literal", - "src": "2178:31:8" - } - ], - "id": 3336, - "name": "FunctionCall", - "src": "2137:73:8" - } - ], - "id": 3337, - "name": "ExpressionStatement", - "src": "2137:73:8" - }, - { - "attributes": { - "assignments": [3339, null] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 3352, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3338, - "name": "ElementaryTypeName", - "src": "2299:4:8" - } - ], - "id": 3339, - "name": "VariableDeclaration", - "src": "2299:12:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple(bool,bytes memory)", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "type": "function (bytes memory) payable returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "call", - "referencedDeclaration": null, - "type": "function (bytes memory) payable returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3322, - "type": "address payable", - "value": "recipient" - }, - "id": 3340, - "name": "Identifier", - "src": "2317:9:8" - } - ], - "id": 3341, - "name": "MemberAccess", - "src": "2317:14:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3324, - "type": "uint256", - "value": "amount" - }, - "id": 3342, - "name": "Identifier", - "src": "2340:6:8" - } - ], - "id": 3343, - "name": "FunctionCallOptions", - "src": "2317:31:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"\"", - "value": "" - }, - "id": 3344, - "name": "Literal", - "src": "2349:2:8" - } - ], - "id": 3345, - "name": "FunctionCall", - "src": "2317:35:8" - } - ], - "id": 3346, - "name": "VariableDeclarationStatement", - "src": "2298:54:8" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3347, - "name": "Identifier", - "src": "2362:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3339, - "type": "bool", - "value": "success" - }, - "id": 3348, - "name": "Identifier", - "src": "2370:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: unable to send value, recipient may have reverted\"", - "value": "Address: unable to send value, recipient may have reverted" - }, - "id": 3349, - "name": "Literal", - "src": "2379:60:8" - } - ], - "id": 3350, - "name": "FunctionCall", - "src": "2362:78:8" - } - ], - "id": 3351, - "name": "ExpressionStatement", - "src": "2362:78:8" - } - ], - "id": 3352, - "name": "Block", - "src": "2127:320:8" - } - ], - "id": 3353, - "name": "FunctionDefinition", - "src": "2056:391:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionCall", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 3354, - "name": "StructuredDocumentation", - "src": "2453:730:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3370, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3355, - "name": "ElementaryTypeName", - "src": "3210:7:8" - } - ], - "id": 3356, - "name": "VariableDeclaration", - "src": "3210:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3370, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3357, - "name": "ElementaryTypeName", - "src": "3226:5:8" - } - ], - "id": 3358, - "name": "VariableDeclaration", - "src": "3226:17:8" - } - ], - "id": 3359, - "name": "ParameterList", - "src": "3209:35:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3370, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3360, - "name": "ElementaryTypeName", - "src": "3263:5:8" - } - ], - "id": 3361, - "name": "VariableDeclaration", - "src": "3263:12:8" - } - ], - "id": 3362, - "name": "ParameterList", - "src": "3262:14:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3362 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "overloadedDeclarations": [3370, 3390], - "referencedDeclaration": 3390, - "type": "function (address,bytes memory,string memory) returns (bytes memory)", - "value": "functionCall" - }, - "id": 3363, - "name": "Identifier", - "src": "3292:12:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3356, - "type": "address", - "value": "target" - }, - "id": 3364, - "name": "Identifier", - "src": "3305:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3358, - "type": "bytes memory", - "value": "data" - }, - "id": 3365, - "name": "Identifier", - "src": "3313:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: low-level call failed\"", - "value": "Address: low-level call failed" - }, - "id": 3366, - "name": "Literal", - "src": "3319:32:8" - } - ], - "id": 3367, - "name": "FunctionCall", - "src": "3292:60:8" - } - ], - "id": 3368, - "name": "Return", - "src": "3285:67:8" - } - ], - "id": 3369, - "name": "Block", - "src": "3277:82:8" - } - ], - "id": 3370, - "name": "FunctionDefinition", - "src": "3188:171:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionCall", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 3371, - "name": "StructuredDocumentation", - "src": "3365:211:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3390, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3372, - "name": "ElementaryTypeName", - "src": "3603:7:8" - } - ], - "id": 3373, - "name": "VariableDeclaration", - "src": "3603:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3390, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3374, - "name": "ElementaryTypeName", - "src": "3619:5:8" - } - ], - "id": 3375, - "name": "VariableDeclaration", - "src": "3619:17:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 3390, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 3376, - "name": "ElementaryTypeName", - "src": "3638:6:8" - } - ], - "id": 3377, - "name": "VariableDeclaration", - "src": "3638:26:8" - } - ], - "id": 3378, - "name": "ParameterList", - "src": "3602:63:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3390, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3379, - "name": "ElementaryTypeName", - "src": "3684:5:8" - } - ], - "id": 3380, - "name": "VariableDeclaration", - "src": "3684:12:8" - } - ], - "id": 3381, - "name": "ParameterList", - "src": "3683:14:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3381 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [3410, 3460], - "referencedDeclaration": 3460, - "type": "function (address,bytes memory,uint256,string memory) returns (bytes memory)", - "value": "functionCallWithValue" - }, - "id": 3382, - "name": "Identifier", - "src": "3715:21:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3373, - "type": "address", - "value": "target" - }, - "id": 3383, - "name": "Identifier", - "src": "3737:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3375, - "type": "bytes memory", - "value": "data" - }, - "id": 3384, - "name": "Identifier", - "src": "3745:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3385, - "name": "Literal", - "src": "3751:1:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3377, - "type": "string memory", - "value": "errorMessage" - }, - "id": 3386, - "name": "Identifier", - "src": "3754:12:8" - } - ], - "id": 3387, - "name": "FunctionCall", - "src": "3715:52:8" - } - ], - "id": 3388, - "name": "Return", - "src": "3708:59:8" - } - ], - "id": 3389, - "name": "Block", - "src": "3698:76:8" - } - ], - "id": 3390, - "name": "FunctionDefinition", - "src": "3581:193:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionCallWithValue", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 3391, - "name": "StructuredDocumentation", - "src": "3780:351:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3410, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3392, - "name": "ElementaryTypeName", - "src": "4167:7:8" - } - ], - "id": 3393, - "name": "VariableDeclaration", - "src": "4167:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3410, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3394, - "name": "ElementaryTypeName", - "src": "4183:5:8" - } - ], - "id": 3395, - "name": "VariableDeclaration", - "src": "4183:17:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3410, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3396, - "name": "ElementaryTypeName", - "src": "4202:7:8" - } - ], - "id": 3397, - "name": "VariableDeclaration", - "src": "4202:13:8" - } - ], - "id": 3398, - "name": "ParameterList", - "src": "4166:50:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3410, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3399, - "name": "ElementaryTypeName", - "src": "4235:5:8" - } - ], - "id": 3400, - "name": "VariableDeclaration", - "src": "4235:12:8" - } - ], - "id": 3401, - "name": "ParameterList", - "src": "4234:14:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3401 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "overloadedDeclarations": [3410, 3460], - "referencedDeclaration": 3460, - "type": "function (address,bytes memory,uint256,string memory) returns (bytes memory)", - "value": "functionCallWithValue" - }, - "id": 3402, - "name": "Identifier", - "src": "4266:21:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3393, - "type": "address", - "value": "target" - }, - "id": 3403, - "name": "Identifier", - "src": "4288:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3395, - "type": "bytes memory", - "value": "data" - }, - "id": 3404, - "name": "Identifier", - "src": "4296:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3397, - "type": "uint256", - "value": "value" - }, - "id": 3405, - "name": "Identifier", - "src": "4302:5:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: low-level call with value failed\"", - "value": "Address: low-level call with value failed" - }, - "id": 3406, - "name": "Literal", - "src": "4309:43:8" - } - ], - "id": 3407, - "name": "FunctionCall", - "src": "4266:87:8" - } - ], - "id": 3408, - "name": "Return", - "src": "4259:94:8" - } - ], - "id": 3409, - "name": "Block", - "src": "4249:111:8" - } - ], - "id": 3410, - "name": "FunctionDefinition", - "src": "4136:224:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionCallWithValue", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 3411, - "name": "StructuredDocumentation", - "src": "4366:237:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3460, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3412, - "name": "ElementaryTypeName", - "src": "4639:7:8" - } - ], - "id": 3413, - "name": "VariableDeclaration", - "src": "4639:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3460, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3414, - "name": "ElementaryTypeName", - "src": "4655:5:8" - } - ], - "id": 3415, - "name": "VariableDeclaration", - "src": "4655:17:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3460, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3416, - "name": "ElementaryTypeName", - "src": "4674:7:8" - } - ], - "id": 3417, - "name": "VariableDeclaration", - "src": "4674:13:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 3460, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 3418, - "name": "ElementaryTypeName", - "src": "4689:6:8" - } - ], - "id": 3419, - "name": "VariableDeclaration", - "src": "4689:26:8" - } - ], - "id": 3420, - "name": "ParameterList", - "src": "4638:78:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3460, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3421, - "name": "ElementaryTypeName", - "src": "4735:5:8" - } - ], - "id": 3422, - "name": "VariableDeclaration", - "src": "4735:12:8" - } - ], - "id": 3423, - "name": "ParameterList", - "src": "4734:14:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3424, - "name": "Identifier", - "src": "4759:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balance", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3425, - "name": "ElementaryTypeName", - "src": "4767:7:8" - } - ], - "id": 3426, - "name": "ElementaryTypeNameExpression", - "src": "4767:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "library Address", - "value": "this" - }, - "id": 3427, - "name": "Identifier", - "src": "4775:4:8" - } - ], - "id": 3428, - "name": "FunctionCall", - "src": "4767:13:8" - } - ], - "id": 3429, - "name": "MemberAccess", - "src": "4767:21:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3417, - "type": "uint256", - "value": "value" - }, - "id": 3430, - "name": "Identifier", - "src": "4792:5:8" - } - ], - "id": 3431, - "name": "BinaryOperation", - "src": "4767:30:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: insufficient balance for call\"", - "value": "Address: insufficient balance for call" - }, - "id": 3432, - "name": "Literal", - "src": "4799:40:8" - } - ], - "id": 3433, - "name": "FunctionCall", - "src": "4759:81:8" - } - ], - "id": 3434, - "name": "ExpressionStatement", - "src": "4759:81:8" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3435, - "name": "Identifier", - "src": "4850:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3319, - "type": "function (address) view returns (bool)", - "value": "isContract" - }, - "id": 3436, - "name": "Identifier", - "src": "4858:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3413, - "type": "address", - "value": "target" - }, - "id": 3437, - "name": "Identifier", - "src": "4869:6:8" - } - ], - "id": 3438, - "name": "FunctionCall", - "src": "4858:18:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: call to non-contract\"", - "value": "Address: call to non-contract" - }, - "id": 3439, - "name": "Literal", - "src": "4878:31:8" - } - ], - "id": 3440, - "name": "FunctionCall", - "src": "4850:60:8" - } - ], - "id": 3441, - "name": "ExpressionStatement", - "src": "4850:60:8" - }, - { - "attributes": { - "assignments": [3443, 3445] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 3459, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3442, - "name": "ElementaryTypeName", - "src": "4981:4:8" - } - ], - "id": 3443, - "name": "VariableDeclaration", - "src": "4981:12:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "returndata", - "overrides": null, - "scope": 3459, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3444, - "name": "ElementaryTypeName", - "src": "4995:5:8" - } - ], - "id": 3445, - "name": "VariableDeclaration", - "src": "4995:23:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple(bool,bytes memory)", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "type": "function (bytes memory) payable returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "call", - "referencedDeclaration": null, - "type": "function (bytes memory) payable returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3413, - "type": "address", - "value": "target" - }, - "id": 3446, - "name": "Identifier", - "src": "5022:6:8" - } - ], - "id": 3447, - "name": "MemberAccess", - "src": "5022:11:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3417, - "type": "uint256", - "value": "value" - }, - "id": 3448, - "name": "Identifier", - "src": "5042:5:8" - } - ], - "id": 3449, - "name": "FunctionCallOptions", - "src": "5022:27:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3415, - "type": "bytes memory", - "value": "data" - }, - "id": 3450, - "name": "Identifier", - "src": "5050:4:8" - } - ], - "id": 3451, - "name": "FunctionCall", - "src": "5022:33:8" - } - ], - "id": 3452, - "name": "VariableDeclarationStatement", - "src": "4980:75:8" - }, - { - "attributes": { - "functionReturnParameters": 3423 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3594, - "type": "function (bool,bytes memory,string memory) pure returns (bytes memory)", - "value": "_verifyCallResult" - }, - "id": 3453, - "name": "Identifier", - "src": "5072:17:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3443, - "type": "bool", - "value": "success" - }, - "id": 3454, - "name": "Identifier", - "src": "5090:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3445, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3455, - "name": "Identifier", - "src": "5099:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3419, - "type": "string memory", - "value": "errorMessage" - }, - "id": 3456, - "name": "Identifier", - "src": "5111:12:8" - } - ], - "id": 3457, - "name": "FunctionCall", - "src": "5072:52:8" - } - ], - "id": 3458, - "name": "Return", - "src": "5065:59:8" - } - ], - "id": 3459, - "name": "Block", - "src": "4749:382:8" - } - ], - "id": 3460, - "name": "FunctionDefinition", - "src": "4608:523:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionStaticCall", - "overrides": null, - "scope": 3595, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 3461, - "name": "StructuredDocumentation", - "src": "5137:166:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3477, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3462, - "name": "ElementaryTypeName", - "src": "5336:7:8" - } - ], - "id": 3463, - "name": "VariableDeclaration", - "src": "5336:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3477, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3464, - "name": "ElementaryTypeName", - "src": "5352:5:8" - } - ], - "id": 3465, - "name": "VariableDeclaration", - "src": "5352:17:8" - } - ], - "id": 3466, - "name": "ParameterList", - "src": "5335:35:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3477, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3467, - "name": "ElementaryTypeName", - "src": "5394:5:8" - } - ], - "id": 3468, - "name": "VariableDeclaration", - "src": "5394:12:8" - } - ], - "id": 3469, - "name": "ParameterList", - "src": "5393:14:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3469 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "overloadedDeclarations": [3477, 3512], - "referencedDeclaration": 3512, - "type": "function (address,bytes memory,string memory) view returns (bytes memory)", - "value": "functionStaticCall" - }, - "id": 3470, - "name": "Identifier", - "src": "5425:18:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3463, - "type": "address", - "value": "target" - }, - "id": 3471, - "name": "Identifier", - "src": "5444:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3465, - "type": "bytes memory", - "value": "data" - }, - "id": 3472, - "name": "Identifier", - "src": "5452:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: low-level static call failed\"", - "value": "Address: low-level static call failed" - }, - "id": 3473, - "name": "Literal", - "src": "5458:39:8" - } - ], - "id": 3474, - "name": "FunctionCall", - "src": "5425:73:8" - } - ], - "id": 3475, - "name": "Return", - "src": "5418:80:8" - } - ], - "id": 3476, - "name": "Block", - "src": "5408:97:8" - } - ], - "id": 3477, - "name": "FunctionDefinition", - "src": "5308:197:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionStaticCall", - "overrides": null, - "scope": 3595, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 3478, - "name": "StructuredDocumentation", - "src": "5511:173:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3512, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3479, - "name": "ElementaryTypeName", - "src": "5717:7:8" - } - ], - "id": 3480, - "name": "VariableDeclaration", - "src": "5717:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3512, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3481, - "name": "ElementaryTypeName", - "src": "5733:5:8" - } - ], - "id": 3482, - "name": "VariableDeclaration", - "src": "5733:17:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 3512, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 3483, - "name": "ElementaryTypeName", - "src": "5752:6:8" - } - ], - "id": 3484, - "name": "VariableDeclaration", - "src": "5752:26:8" - } - ], - "id": 3485, - "name": "ParameterList", - "src": "5716:63:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3512, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3486, - "name": "ElementaryTypeName", - "src": "5803:5:8" - } - ], - "id": 3487, - "name": "VariableDeclaration", - "src": "5803:12:8" - } - ], - "id": 3488, - "name": "ParameterList", - "src": "5802:14:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3489, - "name": "Identifier", - "src": "5827:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3319, - "type": "function (address) view returns (bool)", - "value": "isContract" - }, - "id": 3490, - "name": "Identifier", - "src": "5835:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3480, - "type": "address", - "value": "target" - }, - "id": 3491, - "name": "Identifier", - "src": "5846:6:8" - } - ], - "id": 3492, - "name": "FunctionCall", - "src": "5835:18:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: static call to non-contract\"", - "value": "Address: static call to non-contract" - }, - "id": 3493, - "name": "Literal", - "src": "5855:38:8" - } - ], - "id": 3494, - "name": "FunctionCall", - "src": "5827:67:8" - } - ], - "id": 3495, - "name": "ExpressionStatement", - "src": "5827:67:8" - }, - { - "attributes": { - "assignments": [3497, 3499] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 3511, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3496, - "name": "ElementaryTypeName", - "src": "5965:4:8" - } - ], - "id": 3497, - "name": "VariableDeclaration", - "src": "5965:12:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "returndata", - "overrides": null, - "scope": 3511, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3498, - "name": "ElementaryTypeName", - "src": "5979:5:8" - } - ], - "id": 3499, - "name": "VariableDeclaration", - "src": "5979:23:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple(bool,bytes memory)", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "staticcall", - "referencedDeclaration": null, - "type": "function (bytes memory) view returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3480, - "type": "address", - "value": "target" - }, - "id": 3500, - "name": "Identifier", - "src": "6006:6:8" - } - ], - "id": 3501, - "name": "MemberAccess", - "src": "6006:17:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3482, - "type": "bytes memory", - "value": "data" - }, - "id": 3502, - "name": "Identifier", - "src": "6024:4:8" - } - ], - "id": 3503, - "name": "FunctionCall", - "src": "6006:23:8" - } - ], - "id": 3504, - "name": "VariableDeclarationStatement", - "src": "5964:65:8" - }, - { - "attributes": { - "functionReturnParameters": 3488 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3594, - "type": "function (bool,bytes memory,string memory) pure returns (bytes memory)", - "value": "_verifyCallResult" - }, - "id": 3505, - "name": "Identifier", - "src": "6046:17:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3497, - "type": "bool", - "value": "success" - }, - "id": 3506, - "name": "Identifier", - "src": "6064:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3499, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3507, - "name": "Identifier", - "src": "6073:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3484, - "type": "string memory", - "value": "errorMessage" - }, - "id": 3508, - "name": "Identifier", - "src": "6085:12:8" - } - ], - "id": 3509, - "name": "FunctionCall", - "src": "6046:52:8" - } - ], - "id": 3510, - "name": "Return", - "src": "6039:59:8" - } - ], - "id": 3511, - "name": "Block", - "src": "5817:288:8" - } - ], - "id": 3512, - "name": "FunctionDefinition", - "src": "5689:416:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionDelegateCall", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 3513, - "name": "StructuredDocumentation", - "src": "6111:168:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3529, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3514, - "name": "ElementaryTypeName", - "src": "6314:7:8" - } - ], - "id": 3515, - "name": "VariableDeclaration", - "src": "6314:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3529, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3516, - "name": "ElementaryTypeName", - "src": "6330:5:8" - } - ], - "id": 3517, - "name": "VariableDeclaration", - "src": "6330:17:8" - } - ], - "id": 3518, - "name": "ParameterList", - "src": "6313:35:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3529, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3519, - "name": "ElementaryTypeName", - "src": "6367:5:8" - } - ], - "id": 3520, - "name": "VariableDeclaration", - "src": "6367:12:8" - } - ], - "id": 3521, - "name": "ParameterList", - "src": "6366:14:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3521 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - } - ], - "overloadedDeclarations": [3529, 3564], - "referencedDeclaration": 3564, - "type": "function (address,bytes memory,string memory) returns (bytes memory)", - "value": "functionDelegateCall" - }, - "id": 3522, - "name": "Identifier", - "src": "6398:20:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3515, - "type": "address", - "value": "target" - }, - "id": 3523, - "name": "Identifier", - "src": "6419:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3517, - "type": "bytes memory", - "value": "data" - }, - "id": 3524, - "name": "Identifier", - "src": "6427:4:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: low-level delegate call failed\"", - "value": "Address: low-level delegate call failed" - }, - "id": 3525, - "name": "Literal", - "src": "6433:41:8" - } - ], - "id": 3526, - "name": "FunctionCall", - "src": "6398:77:8" - } - ], - "id": 3527, - "name": "Return", - "src": "6391:84:8" - } - ], - "id": 3528, - "name": "Block", - "src": "6381:101:8" - } - ], - "id": 3529, - "name": "FunctionDefinition", - "src": "6284:198:8" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "functionDelegateCall", - "overrides": null, - "scope": 3595, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 3530, - "name": "StructuredDocumentation", - "src": "6488:175:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target", - "overrides": null, - "scope": 3564, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3531, - "name": "ElementaryTypeName", - "src": "6698:7:8" - } - ], - "id": 3532, - "name": "VariableDeclaration", - "src": "6698:14:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3564, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3533, - "name": "ElementaryTypeName", - "src": "6714:5:8" - } - ], - "id": 3534, - "name": "VariableDeclaration", - "src": "6714:17:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 3564, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 3535, - "name": "ElementaryTypeName", - "src": "6733:6:8" - } - ], - "id": 3536, - "name": "VariableDeclaration", - "src": "6733:26:8" - } - ], - "id": 3537, - "name": "ParameterList", - "src": "6697:63:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3564, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3538, - "name": "ElementaryTypeName", - "src": "6779:5:8" - } - ], - "id": 3539, - "name": "VariableDeclaration", - "src": "6779:12:8" - } - ], - "id": 3540, - "name": "ParameterList", - "src": "6778:14:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3541, - "name": "Identifier", - "src": "6803:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3319, - "type": "function (address) view returns (bool)", - "value": "isContract" - }, - "id": 3542, - "name": "Identifier", - "src": "6811:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3532, - "type": "address", - "value": "target" - }, - "id": 3543, - "name": "Identifier", - "src": "6822:6:8" - } - ], - "id": 3544, - "name": "FunctionCall", - "src": "6811:18:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Address: delegate call to non-contract\"", - "value": "Address: delegate call to non-contract" - }, - "id": 3545, - "name": "Literal", - "src": "6831:40:8" - } - ], - "id": 3546, - "name": "FunctionCall", - "src": "6803:69:8" - } - ], - "id": 3547, - "name": "ExpressionStatement", - "src": "6803:69:8" - }, - { - "attributes": { - "assignments": [3549, 3551] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 3563, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3548, - "name": "ElementaryTypeName", - "src": "6943:4:8" - } - ], - "id": 3549, - "name": "VariableDeclaration", - "src": "6943:12:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "returndata", - "overrides": null, - "scope": 3563, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3550, - "name": "ElementaryTypeName", - "src": "6957:5:8" - } - ], - "id": 3551, - "name": "VariableDeclaration", - "src": "6957:23:8" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple(bool,bytes memory)", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "delegatecall", - "referencedDeclaration": null, - "type": "function (bytes memory) returns (bool,bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3532, - "type": "address", - "value": "target" - }, - "id": 3552, - "name": "Identifier", - "src": "6984:6:8" - } - ], - "id": 3553, - "name": "MemberAccess", - "src": "6984:19:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3534, - "type": "bytes memory", - "value": "data" - }, - "id": 3554, - "name": "Identifier", - "src": "7004:4:8" - } - ], - "id": 3555, - "name": "FunctionCall", - "src": "6984:25:8" - } - ], - "id": 3556, - "name": "VariableDeclarationStatement", - "src": "6942:67:8" - }, - { - "attributes": { - "functionReturnParameters": 3540 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3594, - "type": "function (bool,bytes memory,string memory) pure returns (bytes memory)", - "value": "_verifyCallResult" - }, - "id": 3557, - "name": "Identifier", - "src": "7026:17:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3549, - "type": "bool", - "value": "success" - }, - "id": 3558, - "name": "Identifier", - "src": "7044:7:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3551, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3559, - "name": "Identifier", - "src": "7053:10:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3536, - "type": "string memory", - "value": "errorMessage" - }, - "id": 3560, - "name": "Identifier", - "src": "7065:12:8" - } - ], - "id": 3561, - "name": "FunctionCall", - "src": "7026:52:8" - } - ], - "id": 3562, - "name": "Return", - "src": "7019:59:8" - } - ], - "id": 3563, - "name": "Block", - "src": "6793:292:8" - } - ], - "id": 3564, - "name": "FunctionDefinition", - "src": "6668:417:8" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_verifyCallResult", - "overrides": null, - "scope": 3595, - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 3594, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3565, - "name": "ElementaryTypeName", - "src": "7118:4:8" - } - ], - "id": 3566, - "name": "VariableDeclaration", - "src": "7118:12:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "returndata", - "overrides": null, - "scope": 3594, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3567, - "name": "ElementaryTypeName", - "src": "7132:5:8" - } - ], - "id": 3568, - "name": "VariableDeclaration", - "src": "7132:23:8" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 3594, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 3569, - "name": "ElementaryTypeName", - "src": "7157:6:8" - } - ], - "id": 3570, - "name": "VariableDeclaration", - "src": "7157:26:8" - } - ], - "id": 3571, - "name": "ParameterList", - "src": "7117:67:8" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3594, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3572, - "name": "ElementaryTypeName", - "src": "7206:5:8" - } - ], - "id": 3573, - "name": "VariableDeclaration", - "src": "7206:12:8" - } - ], - "id": 3574, - "name": "ParameterList", - "src": "7205:14:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3566, - "type": "bool", - "value": "success" - }, - "id": 3575, - "name": "Identifier", - "src": "7234:7:8" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3574 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3568, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3576, - "name": "Identifier", - "src": "7264:10:8" - } - ], - "id": 3577, - "name": "Return", - "src": "7257:17:8" - } - ], - "id": 3578, - "name": "Block", - "src": "7243:42:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3568, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3579, - "name": "Identifier", - "src": "7375:10:8" - } - ], - "id": 3580, - "name": "MemberAccess", - "src": "7375:17:8" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3581, - "name": "Literal", - "src": "7395:1:8" - } - ], - "id": 3582, - "name": "BinaryOperation", - "src": "7375:21:8" - }, - { - "children": [ - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 3568, - "isOffset": false, - "isSlot": false, - "src": "7633:10:8", - "valueSize": 1 - }, - { - "declaration": 3568, - "isOffset": false, - "isSlot": false, - "src": "7680:10:8", - "valueSize": 1 - } - ], - "operations": "{\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n}" - }, - "children": [], - "id": 3583, - "name": "InlineAssembly", - "src": "7573:154:8" - } - ], - "id": 3584, - "name": "Block", - "src": "7398:343:8" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 3585, - "name": "Identifier", - "src": "7765:6:8" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3570, - "type": "string memory", - "value": "errorMessage" - }, - "id": 3586, - "name": "Identifier", - "src": "7772:12:8" - } - ], - "id": 3587, - "name": "FunctionCall", - "src": "7765:20:8" - } - ], - "id": 3588, - "name": "ExpressionStatement", - "src": "7765:20:8" - } - ], - "id": 3589, - "name": "Block", - "src": "7747:53:8" - } - ], - "id": 3590, - "name": "IfStatement", - "src": "7371:429:8" - } - ], - "id": 3591, - "name": "Block", - "src": "7291:519:8" - } - ], - "id": 3592, - "name": "IfStatement", - "src": "7230:580:8" - } - ], - "id": 3593, - "name": "Block", - "src": "7220:596:8" - } - ], - "id": 3594, - "name": "FunctionDefinition", - "src": "7091:725:8" - } - ], - "id": 3595, - "name": "ContractDefinition", - "src": "134:7684:8" - } - ], - "id": 3596, - "name": "SourceUnit", - "src": "33:7786:8" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.926Z", - "devdoc": { - "details": "Collection of functions related to the address type", - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/BytesLib.json b/packages/bridge-sdk/contracts/BytesLib.json deleted file mode 100644 index 86195cf..0000000 --- a/packages/bridge-sdk/contracts/BytesLib.json +++ /dev/null @@ -1,15462 +0,0 @@ -{ - "contractName": "BytesLib", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol\":\"BytesLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol\":{\"keccak256\":\"0x4a28e69afc4c1c1aee48c7b497f9b8452b295ddcf4bbf453d594a1467016d5f2\",\"license\":\"Unlicense\",\"urls\":[\"bzz-raw://279e22c43f79567e9f7842cfca8ad2329bbbad2eac30413b620796d51f308719\",\"dweb:/ipfs/QmbdRLJYoKJxDbDLeverNMHsNFEcxnohAA713UFLjLm3Jy\"]}},\"version\":1}", - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202f26a001b561cb93cba0d1a744674075045e5c0fd05bfb9ab29ebd9824598c6c64736f6c634300060c0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202f26a001b561cb93cba0d1a744674075045e5c0fd05bfb9ab29ebd9824598c6c64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "370:17872:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "370:17872:0:-:0;;;;;;;;", - "source": "// SPDX-License-Identifier: Unlicense\n/*\n * @title Solidity Bytes Arrays Utils\n * @author Gonçalo Sá \n *\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\n */\npragma solidity >=0.5.0 <0.7.0;\n\n\nlibrary BytesLib {\n function concat(\n bytes memory _preBytes,\n bytes memory _postBytes\n )\n internal\n pure\n returns (bytes memory)\n {\n bytes memory tempBytes;\n\n assembly {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // Store the length of the first bytes array at the beginning of\n // the memory for tempBytes.\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n\n // Maintain a memory counter for the current write location in the\n // temp bytes array by adding the 32 bytes for the array length to\n // the starting location.\n let mc := add(tempBytes, 0x20)\n // Stop copying when the memory counter reaches the length of the\n // first bytes array.\n let end := add(mc, length)\n\n for {\n // Initialize a copy counter to the start of the _preBytes data,\n // 32 bytes into its memory.\n let cc := add(_preBytes, 0x20)\n } lt(mc, end) {\n // Increase both counters by 32 bytes each iteration.\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // Write the _preBytes data into the tempBytes memory 32 bytes\n // at a time.\n mstore(mc, mload(cc))\n }\n\n // Add the length of _postBytes to the current length of tempBytes\n // and store it as the new length in the first 32 bytes of the\n // tempBytes memory.\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n\n // Move the memory counter back from a multiple of 0x20 to the\n // actual end of the _preBytes data.\n mc := end\n // Stop copying when the memory counter reaches the new combined\n // length of the arrays.\n end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n // Update the free-memory pointer by padding our last write location\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n // next 32 byte block, then round down to the nearest multiple of\n // 32. If the sum of the length of the two arrays is zero then add\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\n mstore(0x40, and(\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n not(31) // Round down to the nearest 32 bytes.\n ))\n }\n\n return tempBytes;\n }\n\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n assembly {\n // Read the first 32 bytes of _preBytes storage, which is the length\n // of the array. (We don't need to use the offset into the slot\n // because arrays use the entire slot.)\n let fslot := sload(_preBytes_slot)\n // Arrays of 31 bytes or less have an even value in their slot,\n // while longer arrays have an odd value. The actual length is\n // the slot divided by two for odd values, and the lowest order\n // byte divided by two for even values.\n // If the slot is even, bitwise and the slot with 255 and divide by\n // two to get the length. If the slot is odd, bitwise and the slot\n // with -1 and divide by two.\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n // Since the new array still fits in the slot, we just need to\n // update the contents of the slot.\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n sstore(\n _preBytes_slot,\n // all the modifications to the slot are inside this\n // next block\n add(\n // we can just add to the slot contents because the\n // bytes we want to change are the LSBs\n fslot,\n add(\n mul(\n div(\n // load the bytes from memory\n mload(add(_postBytes, 0x20)),\n // zero all bytes to the right\n exp(0x100, sub(32, mlength))\n ),\n // and now shift left the number of bytes to\n // leave space for the length in the slot\n exp(0x100, sub(32, newlength))\n ),\n // increase length by the double of the memory\n // bytes length\n mul(mlength, 2)\n )\n )\n )\n }\n case 1 {\n // The stored value fits in the slot, but the combined value\n // will exceed it.\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes_slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes_slot, add(mul(newlength, 2), 1))\n\n // The contents of the _postBytes array start 32 bytes into\n // the structure. Our first read should obtain the `submod`\n // bytes that can fit into the unused space in the last word\n // of the stored array. To get this, we read 32 bytes starting\n // from `submod`, so the data we read overlaps with the array\n // contents by `submod` bytes. Masking the lowest-order\n // `submod` bytes allows us to add that value directly to the\n // stored value.\n\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(\n sc,\n add(\n and(\n fslot,\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\n ),\n and(mload(mc), mask)\n )\n )\n\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes_slot)\n // Start copying to the last used word of the stored array.\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes_slot, add(mul(newlength, 2), 1))\n\n // Copy over the first `submod` bytes of the new data as in\n // case 1 above.\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n }\n }\n\n function slice(\n bytes memory _bytes,\n uint256 _start,\n uint256 _length\n )\n internal\n pure\n returns (bytes memory)\n {\n require(_bytes.length >= (_start + _length), \"Read out of bounds\");\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\n require(_bytes.length >= (_start + 20), \"Read out of bounds\");\n address tempAddress;\n\n assembly {\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n }\n\n return tempAddress;\n }\n\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\n require(_bytes.length >= (_start + 1), \"Read out of bounds\");\n uint8 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x1), _start))\n }\n\n return tempUint;\n }\n\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\n require(_bytes.length >= (_start + 2), \"Read out of bounds\");\n uint16 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x2), _start))\n }\n\n return tempUint;\n }\n\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\n require(_bytes.length >= (_start + 4), \"Read out of bounds\");\n uint32 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x4), _start))\n }\n\n return tempUint;\n }\n\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\n require(_bytes.length >= (_start + 8), \"Read out of bounds\");\n uint64 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x8), _start))\n }\n\n return tempUint;\n }\n\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\n require(_bytes.length >= (_start + 12), \"Read out of bounds\");\n uint96 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0xc), _start))\n }\n\n return tempUint;\n }\n\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\n require(_bytes.length >= (_start + 16), \"Read out of bounds\");\n uint128 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x10), _start))\n }\n\n return tempUint;\n }\n\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\n require(_bytes.length >= (_start + 32), \"Read out of bounds\");\n uint256 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempUint;\n }\n\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\n require(_bytes.length >= (_start + 32), \"Read out of bounds\");\n bytes32 tempBytes32;\n\n assembly {\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempBytes32;\n }\n\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n bool success = true;\n\n assembly {\n let length := mload(_preBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(length, mload(_postBytes))\n case 1 {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n } eq(add(lt(mc, end), cb), 2) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // if any of these checks fails then arrays are not equal\n if iszero(eq(mload(mc), mload(cc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function equalStorage(\n bytes storage _preBytes,\n bytes memory _postBytes\n )\n internal\n view\n returns (bool)\n {\n bool success = true;\n\n assembly {\n // we know _preBytes_offset is 0\n let fslot := sload(_preBytes_slot)\n // Decode the length of the stored array like in concatStorage().\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(slength, mlength)\n case 1 {\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n if iszero(iszero(slength)) {\n switch lt(slength, 32)\n case 1 {\n // blank the last byte which is the length\n fslot := mul(div(fslot, 0x100), 0x100)\n\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n // unsuccess:\n success := 0\n }\n }\n default {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes_slot)\n let sc := keccak256(0x0, 0x20)\n\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n for {} eq(add(lt(mc, end), cb), 2) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n if iszero(eq(sload(sc), mload(mc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n}\n", - "sourcePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "ast": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "exportedSymbols": { - "BytesLib": [333] - }, - "id": 334, - "license": "Unlicense", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": ["solidity", ">=", "0.5", ".0", "<", "0.7", ".0"], - "nodeType": "PragmaDirective", - "src": "336:31:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 333, - "linearizedBaseContracts": [333], - "name": "BytesLib", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 16, - "nodeType": "Block", - "src": "533:2695:0", - "statements": [ - { - "assignments": [11], - "declarations": [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "tempBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 16, - "src": "543:22:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "543:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "543:22:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "585:2610:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "721:24:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "740:4:0", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "734:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "734:11:0" - }, - "variableNames": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "721:9:0" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "869:30:0", - "value": { - "arguments": [ - { - "name": "_preBytes", - "nodeType": "YulIdentifier", - "src": "889:9:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "883:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "883:16:0" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "873:6:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "919:9:0" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "930:6:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "912:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "912:25:0" - }, - "nodeType": "YulExpressionStatement", - "src": "912:25:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "1135:30:0", - "value": { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "1149:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1160:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1145:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "1145:20:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "1139:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "1282:26:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "1297:2:0" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1301:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1293:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "1293:15:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1286:3:0", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1673:154:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "1799:2:0" - }, - { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "1809:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "1803:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "1803:9:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "1792:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "1792:21:0" - }, - "nodeType": "YulExpressionStatement", - "src": "1792:21:0" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "1510:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "1514:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "1507:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "1507:11:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "1519:153:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1603:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "1613:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1617:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1609:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "1609:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "1603:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1639:19:0", - "value": { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "1649:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1653:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1645:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "1645:13:0" - }, - "variableNames": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "1639:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "1326:180:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1462:30:0", - "value": { - "arguments": [ - { - "name": "_preBytes", - "nodeType": "YulIdentifier", - "src": "1476:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1487:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1472:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "1472:20:0" - }, - "variables": [ - { - "name": "cc", - "nodeType": "YulTypedName", - "src": "1466:2:0", - "type": "" - } - ] - } - ] - }, - "src": "1322:505:0" - }, - { - "nodeType": "YulAssignment", - "src": "2016:27:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "2032:10:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2026:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "2026:17:0" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2016:6:0" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "2063:9:0" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2078:6:0" - }, - { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "2092:9:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2086:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "2086:16:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2074:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "2074:29:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2056:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "2056:48:0" - }, - "nodeType": "YulExpressionStatement", - "src": "2056:48:0" - }, - { - "nodeType": "YulAssignment", - "src": "2234:9:0", - "value": { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2240:3:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2234:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2362:22:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2373:2:0" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2377:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2369:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "2369:15:0" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2362:3:0" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2566:53:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2591:2:0" - }, - { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "2601:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2595:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "2595:9:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2584:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "2584:21:0" - }, - "nodeType": "YulExpressionStatement", - "src": "2584:21:0" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2469:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2473:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "2466:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "2466:11:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "2478:87:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2496:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2506:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2510:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2502:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "2502:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "2496:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2532:19:0", - "value": { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "2542:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2546:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2538:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "2538:13:0" - }, - "variableNames": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "2532:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "2402:63:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "2420:31:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "2434:10:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2446:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2430:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "2430:21:0" - }, - "variables": [ - { - "name": "cc", - "nodeType": "YulTypedName", - "src": "2424:2:0", - "type": "" - } - ] - } - ] - }, - "src": "2398:221:0" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3031:4:0", - "type": "", - "value": "0x40" - }, - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3062:3:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3078:6:0" - }, - { - "arguments": [ - { - "name": "_preBytes", - "nodeType": "YulIdentifier", - "src": "3092:9:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "3086:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "3086:16:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3074:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "3074:29:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "3067:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "3067:37:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3058:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "3058:47:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3107:2:0", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3054:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "3054:56:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3128:2:0", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3124:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "3124:7:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3037:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "3037:147:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3024:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "3024:161:0" - }, - "nodeType": "YulExpressionStatement", - "src": "3024:161:0" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 5, - "isOffset": false, - "isSlot": false, - "src": "2032:10:0", - "valueSize": 1 - }, - { - "declaration": 5, - "isOffset": false, - "isSlot": false, - "src": "2434:10:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "1476:9:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "3092:9:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "889:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "1149:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "2063:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "2092:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "721:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "919:9:0", - "valueSize": 1 - } - ], - "id": 13, - "nodeType": "InlineAssembly", - "src": "576:2619:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 14, - "name": "tempBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "3212:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 9, - "id": 15, - "nodeType": "Return", - "src": "3205:16:0" - } - ] - }, - "documentation": null, - "id": 17, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "concat", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 6, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "_preBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 17, - "src": "418:22:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "418:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "_postBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 17, - "src": "450:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "450:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "408:71:0" - }, - "returnParameters": { - "id": 9, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 17, - "src": "515:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "515:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "514:14:0" - }, - "scope": 333, - "src": "393:2835:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 25, - "nodeType": "Block", - "src": "3316:5543:0", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "3335:5518:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "3546:34:0", - "value": { - "arguments": [ - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "3565:14:0" - } - ], - "functionName": { - "name": "sload", - "nodeType": "YulIdentifier", - "src": "3559:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "3559:21:0" - }, - "variables": [ - { - "name": "fslot", - "nodeType": "YulTypedName", - "src": "3550:5:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4045:76:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "4068:5:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4083:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "4101:5:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4108:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4097:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4097:13:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "4090:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "4090:21:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "4079:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4079:33:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4114:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "4075:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4075:41:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4064:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4064:53:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4119:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "4060:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4060:61:0" - }, - "variables": [ - { - "name": "slength", - "nodeType": "YulTypedName", - "src": "4049:7:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4134:32:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "4155:10:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "4149:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "4149:17:0" - }, - "variables": [ - { - "name": "mlength", - "nodeType": "YulTypedName", - "src": "4138:7:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4179:38:0", - "value": { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "4200:7:0" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "4209:7:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4196:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4196:21:0" - }, - "variables": [ - { - "name": "newlength", - "nodeType": "YulTypedName", - "src": "4183:9:0", - "type": "" - } - ] - }, - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "4538:1193:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "4803:14:0" - }, - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "5079:5:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "5221:10:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5233:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5217:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5217:21:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "5211:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "5211:28:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5308:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5319:2:0", - "type": "", - "value": "32" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "5323:7:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "5315:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5315:16:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "5304:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5304:28:0" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "5144:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5144:206:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5491:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5502:2:0", - "type": "", - "value": "32" - }, - { - "name": "newlength", - "nodeType": "YulIdentifier", - "src": "5506:9:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "5498:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5498:18:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "5487:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5487:30:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "5123:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5123:412:0" - }, - { - "arguments": [ - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "5652:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5661:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "5648:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5648:15:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5102:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5102:579:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4934:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4934:765:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "4779:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "4779:938:0" - }, - "nodeType": "YulExpressionStatement", - "src": "4779:938:0" - } - ] - }, - "nodeType": "YulCase", - "src": "4531:1200:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4536:1:0", - "type": "", - "value": "2" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5751:1827:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5948:3:0", - "type": "", - "value": "0x0" - }, - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "5953:14:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5941:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "5941:27:0" - }, - "nodeType": "YulExpressionStatement", - "src": "5941:27:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "5985:53:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6009:3:0", - "type": "", - "value": "0x0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6014:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "keccak256", - "nodeType": "YulIdentifier", - "src": "5999:9:0" - }, - "nodeType": "YulFunctionCall", - "src": "5999:20:0" - }, - { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "6025:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6034:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "6021:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6021:16:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5995:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "5995:43:0" - }, - "variables": [ - { - "name": "sc", - "nodeType": "YulTypedName", - "src": "5989:2:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "6094:14:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "newlength", - "nodeType": "YulIdentifier", - "src": "6118:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6129:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "6114:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6114:17:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6133:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6110:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6110:25:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "6087:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "6087:49:0" - }, - "nodeType": "YulExpressionStatement", - "src": "6087:49:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "6692:30:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6710:2:0", - "type": "", - "value": "32" - }, - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "6714:7:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "6706:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6706:16:0" - }, - "variables": [ - { - "name": "submod", - "nodeType": "YulTypedName", - "src": "6696:6:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "6739:33:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "6753:10:0" - }, - { - "name": "submod", - "nodeType": "YulIdentifier", - "src": "6765:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6749:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6749:23:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "6743:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "6789:35:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "6804:10:0" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "6816:7:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6800:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6800:24:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "6793:3:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "6841:38:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6861:5:0", - "type": "", - "value": "0x100" - }, - { - "name": "submod", - "nodeType": "YulIdentifier", - "src": "6868:6:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "6857:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6857:18:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6877:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "6853:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6853:26:0" - }, - "variables": [ - { - "name": "mask", - "nodeType": "YulTypedName", - "src": "6845:4:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "6921:2:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "6983:5:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7006:66:0", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "6962:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6962:128:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7118:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7112:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "7112:9:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "7123:4:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "7108:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7108:20:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6941:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "6941:205:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "6897:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "6897:267:0" - }, - "nodeType": "YulExpressionStatement", - "src": "6897:267:0" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7392:61:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7421:2:0" - }, - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7431:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7425:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "7425:9:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "7414:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "7414:21:0" - }, - "nodeType": "YulExpressionStatement", - "src": "7414:21:0" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7286:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "7290:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "7283:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "7283:11:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "7295:96:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "7317:16:0", - "value": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7327:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7331:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7323:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7323:10:0" - }, - "variableNames": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7317:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "7354:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7364:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7368:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7360:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7360:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7354:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "7186:96:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "7208:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7218:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7222:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7214:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7214:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7208:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "7248:16:0", - "value": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7258:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7262:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7254:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7254:10:0" - }, - "variableNames": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7248:2:0" - } - ] - } - ] - }, - "src": "7182:271:0" - }, - { - "nodeType": "YulAssignment", - "src": "7471:32:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7483:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7494:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "7498:3:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "7490:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7490:12:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "7479:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7479:24:0" - }, - "variableNames": [ - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "7471:4:0" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "7528:2:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "7546:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7540:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "7540:9:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "7551:4:0" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "7536:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7536:20:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "7558:4:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "7532:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7532:31:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "7521:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "7521:43:0" - }, - "nodeType": "YulExpressionStatement", - "src": "7521:43:0" - } - ] - }, - "nodeType": "YulCase", - "src": "5744:1834:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5749:1:0", - "type": "", - "value": "1" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7599:1244:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7692:3:0", - "type": "", - "value": "0x0" - }, - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "7697:14:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7685:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "7685:27:0" - }, - "nodeType": "YulExpressionStatement", - "src": "7685:27:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "7801:53:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7825:3:0", - "type": "", - "value": "0x0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7830:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "keccak256", - "nodeType": "YulIdentifier", - "src": "7815:9:0" - }, - "nodeType": "YulFunctionCall", - "src": "7815:20:0" - }, - { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "7841:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7850:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "7837:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7837:16:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7811:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7811:43:0" - }, - "variables": [ - { - "name": "sc", - "nodeType": "YulTypedName", - "src": "7805:2:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "7910:14:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "newlength", - "nodeType": "YulIdentifier", - "src": "7934:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7945:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "7930:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7930:17:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7949:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7926:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7926:25:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "7903:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "7903:49:0" - }, - "nodeType": "YulExpressionStatement", - "src": "7903:49:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8071:34:0", - "value": { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "8093:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8102:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mod", - "nodeType": "YulIdentifier", - "src": "8089:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8089:16:0" - }, - "variables": [ - { - "name": "slengthmod", - "nodeType": "YulTypedName", - "src": "8075:10:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8122:34:0", - "value": { - "arguments": [ - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "8144:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8153:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "mod", - "nodeType": "YulIdentifier", - "src": "8140:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8140:16:0" - }, - "variables": [ - { - "name": "mlengthmod", - "nodeType": "YulTypedName", - "src": "8126:10:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8173:33:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8191:2:0", - "type": "", - "value": "32" - }, - { - "name": "slengthmod", - "nodeType": "YulIdentifier", - "src": "8195:10:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8187:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8187:19:0" - }, - "variables": [ - { - "name": "submod", - "nodeType": "YulTypedName", - "src": "8177:6:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8223:33:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "8237:10:0" - }, - { - "name": "submod", - "nodeType": "YulIdentifier", - "src": "8249:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8233:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8233:23:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "8227:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8273:35:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "8288:10:0" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "8300:7:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8284:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8284:24:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "8277:3:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "8325:38:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8345:5:0", - "type": "", - "value": "0x100" - }, - { - "name": "submod", - "nodeType": "YulIdentifier", - "src": "8352:6:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "8341:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8341:18:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8361:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8337:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8337:26:0" - }, - "variables": [ - { - "name": "mask", - "nodeType": "YulTypedName", - "src": "8329:4:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8388:2:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8402:2:0" - } - ], - "functionName": { - "name": "sload", - "nodeType": "YulIdentifier", - "src": "8396:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "8396:9:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8417:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "8411:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "8411:9:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "8422:4:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "8407:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8407:20:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8392:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8392:36:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "8381:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "8381:48:0" - }, - "nodeType": "YulExpressionStatement", - "src": "8381:48:0" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "8657:61:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8686:2:0" - }, - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8696:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "8690:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "8690:9:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "8679:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "8679:21:0" - }, - "nodeType": "YulExpressionStatement", - "src": "8679:21:0" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8551:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "8555:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "8548:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "8548:11:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "8560:96:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "8582:16:0", - "value": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8592:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8596:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8588:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8588:10:0" - }, - "variableNames": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8582:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "8619:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8629:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8633:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8625:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8625:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8619:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "8451:96:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "8473:16:0", - "value": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8483:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8487:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8479:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8479:10:0" - }, - "variableNames": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8473:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "8510:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8520:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8524:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8516:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8516:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8510:2:0" - } - ] - } - ] - }, - "src": "8447:271:0" - }, - { - "nodeType": "YulAssignment", - "src": "8736:32:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8748:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8759:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "8763:3:0" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8755:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8755:12:0" - } - ], - "functionName": { - "name": "exp", - "nodeType": "YulIdentifier", - "src": "8744:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8744:24:0" - }, - "variableNames": [ - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "8736:4:0" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "8793:2:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "8811:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "8805:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "8805:9:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "8816:4:0" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "8801:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8801:20:0" - }, - { - "name": "mask", - "nodeType": "YulIdentifier", - "src": "8823:4:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "8797:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "8797:31:0" - } - ], - "functionName": { - "name": "sstore", - "nodeType": "YulIdentifier", - "src": "8786:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "8786:43:0" - }, - "nodeType": "YulExpressionStatement", - "src": "8786:43:0" - } - ] - }, - "nodeType": "YulCase", - "src": "7591:1252:0", - "value": "default" - } - ], - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "4486:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4495:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4483:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "4483:15:0" - }, - { - "arguments": [ - { - "name": "newlength", - "nodeType": "YulIdentifier", - "src": "4503:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4514:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4500:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "4500:17:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4479:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "4479:39:0" - }, - "nodeType": "YulSwitch", - "src": "4472:4371:0" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "4155:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "5221:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "6753:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "6804:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "8237:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "8288:10:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "3565:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "4803:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "5953:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "6094:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "7697:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "7910:14:0", - "valueSize": 1 - } - ], - "id": 24, - "nodeType": "InlineAssembly", - "src": "3326:5527:0" - } - ] - }, - "documentation": null, - "id": 26, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "concatStorage", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "_preBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 26, - "src": "3257:23:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3257:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "_postBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 26, - "src": "3282:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 20, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3282:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3256:50:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [], - "src": "3316:0:0" - }, - "scope": 333, - "src": "3234:5625:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "9017:2328:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 44, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 38, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "9035:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 39, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9035:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 40, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "9053:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 41, - "name": "_length", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "9062:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9053:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 43, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "9052:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9035:35:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9072:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 37, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9027:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9027:66:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "9027:66:0" - }, - { - "assignments": [49], - "declarations": [ - { - "constant": false, - "id": 49, - "mutability": "mutable", - "name": "tempBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 54, - "src": "9104:22:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 48, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9104:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 50, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9104:22:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "9146:2166:0", - "statements": [ - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "9202:1888:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "9350:24:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9369:4:0", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "9363:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "9363:11:0" - }, - "variableNames": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "9350:9:0" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "9966:33:0", - "value": { - "arguments": [ - { - "name": "_length", - "nodeType": "YulIdentifier", - "src": "9987:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9996:2:0", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "9983:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "9983:16:0" - }, - "variables": [ - { - "name": "lengthmod", - "nodeType": "YulTypedName", - "src": "9970:9:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "10304:70:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "10322:9:0" - }, - { - "name": "lengthmod", - "nodeType": "YulIdentifier", - "src": "10333:9:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10318:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10318:25:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10349:4:0", - "type": "", - "value": "0x20" - }, - { - "arguments": [ - { - "name": "lengthmod", - "nodeType": "YulIdentifier", - "src": "10362:9:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "10355:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "10355:17:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "10345:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10345:28:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10314:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10314:60:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "10308:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "10391:27:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "10406:2:0" - }, - { - "name": "_length", - "nodeType": "YulIdentifier", - "src": "10410:7:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10402:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10402:16:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "10395:3:0", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10792:61:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "10821:2:0" - }, - { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "10831:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "10825:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "10825:9:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10814:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "10814:21:0" - }, - "nodeType": "YulExpressionStatement", - "src": "10814:21:0" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "10683:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "10687:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "10680:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "10680:11:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "10692:99:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "10714:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "10724:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10728:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10720:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10720:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "10714:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "10754:19:0", - "value": { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "10764:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10768:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10760:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10760:13:0" - }, - "variableNames": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "10754:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "10440:239:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "10581:80:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "10603:6:0" - }, - { - "name": "lengthmod", - "nodeType": "YulIdentifier", - "src": "10611:9:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10599:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10599:22:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10627:4:0", - "type": "", - "value": "0x20" - }, - { - "arguments": [ - { - "name": "lengthmod", - "nodeType": "YulIdentifier", - "src": "10640:9:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "10633:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "10633:17:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "10623:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10623:28:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10595:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10595:57:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "10654:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10591:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "10591:70:0" - }, - "variables": [ - { - "name": "cc", - "nodeType": "YulTypedName", - "src": "10585:2:0", - "type": "" - } - ] - } - ] - }, - "src": "10436:417:0" - }, - { - "expression": { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "10878:9:0" - }, - { - "name": "_length", - "nodeType": "YulIdentifier", - "src": "10889:7:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10871:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "10871:26:0" - }, - "nodeType": "YulExpressionStatement", - "src": "10871:26:0" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11044:4:0", - "type": "", - "value": "0x40" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "11058:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11062:2:0", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11054:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11054:11:0" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11071:2:0", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "11067:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11067:7:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "11050:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11050:25:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "11037:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "11037:39:0" - }, - "nodeType": "YulExpressionStatement", - "src": "11037:39:0" - } - ] - }, - "nodeType": "YulCase", - "src": "9195:1895:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9200:1:0", - "type": "", - "value": "0" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "11194:108:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "11212:24:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11231:4:0", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "11225:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "11225:11:0" - }, - "variableNames": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "11212:9:0" - } - ] - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11261:4:0", - "type": "", - "value": "0x40" - }, - { - "arguments": [ - { - "name": "tempBytes", - "nodeType": "YulIdentifier", - "src": "11271:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11282:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11267:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11267:20:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "11254:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "11254:34:0" - }, - "nodeType": "YulExpressionStatement", - "src": "11254:34:0" - } - ] - }, - "nodeType": "YulCase", - "src": "11186:116:0", - "value": "default" - } - ], - "expression": { - "arguments": [ - { - "name": "_length", - "nodeType": "YulIdentifier", - "src": "9174:7:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "9167:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "9167:15:0" - }, - "nodeType": "YulSwitch", - "src": "9160:2142:0" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 28, - "isOffset": false, - "isSlot": false, - "src": "10603:6:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "10410:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "10889:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "9174:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "9987:7:0", - "valueSize": 1 - }, - { - "declaration": 30, - "isOffset": false, - "isSlot": false, - "src": "10654:6:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "10322:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "10878:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "11212:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "11271:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "9350:9:0", - "valueSize": 1 - } - ], - "id": 51, - "nodeType": "InlineAssembly", - "src": "9137:2175:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 52, - "name": "tempBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49, - "src": "11329:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 36, - "id": 53, - "nodeType": "Return", - "src": "11322:16:0" - } - ] - }, - "documentation": null, - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "slice", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 28, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "8889:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 27, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8889:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "8918:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 29, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8918:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "_length", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "8942:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8942:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8879:84:0" - }, - "returnParameters": { - "id": 36, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 35, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "8999:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 34, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8999:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8998:14:0" - }, - "scope": 333, - "src": "8865:2480:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 81, - "nodeType": "Block", - "src": "11439:265:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 65, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "11457:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11457:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 67, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "11475:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3230", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11484:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_20_by_1", - "typeString": "int_const 20" - }, - "value": "20" - }, - "src": "11475:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 70, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11474:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11457:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11489:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 64, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "11449:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 73, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11449:61:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 74, - "nodeType": "ExpressionStatement", - "src": "11449:61:0" - }, - { - "assignments": [76], - "declarations": [ - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "tempAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 81, - "src": "11520:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 75, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11520:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 77, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "11520:19:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "11559:110:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "11573:86:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "11606:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11614:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11602:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11602:17:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "11621:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11598:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11598:30:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "11592:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "11592:37:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11631:27:0", - "type": "", - "value": "0x1000000000000000000000000" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "11588:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11588:71:0" - }, - "variableNames": [ - { - "name": "tempAddress", - "nodeType": "YulIdentifier", - "src": "11573:11:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 57, - "isOffset": false, - "isSlot": false, - "src": "11606:6:0", - "valueSize": 1 - }, - { - "declaration": 59, - "isOffset": false, - "isSlot": false, - "src": "11621:6:0", - "valueSize": 1 - }, - { - "declaration": 76, - "isOffset": false, - "isSlot": false, - "src": "11573:11:0", - "valueSize": 1 - } - ], - "id": 78, - "nodeType": "InlineAssembly", - "src": "11550:119:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 79, - "name": "tempAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "11686:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 63, - "id": 80, - "nodeType": "Return", - "src": "11679:18:0" - } - ] - }, - "documentation": null, - "id": 82, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toAddress", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 60, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 82, - "src": "11370:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 56, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11370:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 82, - "src": "11391:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 58, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11391:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11369:37:0" - }, - "returnParameters": { - "id": 63, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 82, - "src": "11430:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 61, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11430:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11429:9:0" - }, - "scope": 333, - "src": "11351:353:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 108, - "nodeType": "Block", - "src": "11794:218:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 92, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "11812:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11812:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 94, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "11830:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 95, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11839:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "11830:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 97, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11829:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11812:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11843:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 91, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "11804:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11804:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 101, - "nodeType": "ExpressionStatement", - "src": "11804:60:0" - }, - { - "assignments": [103], - "declarations": [ - { - "constant": false, - "id": 103, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "11874:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 102, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "11874:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 104, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "11874:14:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "11908:72:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "11922:48:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "11948:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11956:3:0", - "type": "", - "value": "0x1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11944:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11944:16:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "11962:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "11940:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "11940:29:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "11934:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "11934:36:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "11922:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 84, - "isOffset": false, - "isSlot": false, - "src": "11948:6:0", - "valueSize": 1 - }, - { - "declaration": 86, - "isOffset": false, - "isSlot": false, - "src": "11962:6:0", - "valueSize": 1 - }, - { - "declaration": 103, - "isOffset": false, - "isSlot": false, - "src": "11922:8:0", - "valueSize": 1 - } - ], - "id": 105, - "nodeType": "InlineAssembly", - "src": "11899:81:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 106, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "11997:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "functionReturnParameters": 90, - "id": 107, - "nodeType": "Return", - "src": "11990:15:0" - } - ] - }, - "documentation": null, - "id": 109, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint8", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 87, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 84, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 109, - "src": "11727:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 83, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11727:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 86, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 109, - "src": "11748:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 85, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11748:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11726:37:0" - }, - "returnParameters": { - "id": 90, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 89, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 109, - "src": "11787:5:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 88, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "11787:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11786:7:0" - }, - "scope": 333, - "src": "11710:302:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 135, - "nodeType": "Block", - "src": "12104:219:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 119, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 111, - "src": "12122:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12122:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 121, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "12140:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12149:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "12140:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 124, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12139:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12122:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12153:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "12114:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12114:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 128, - "nodeType": "ExpressionStatement", - "src": "12114:60:0" - }, - { - "assignments": [130], - "declarations": [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 135, - "src": "12184:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint16", - "typeString": "uint16" - }, - "typeName": { - "id": 129, - "name": "uint16", - "nodeType": "ElementaryTypeName", - "src": "12184:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint16", - "typeString": "uint16" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 131, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "12184:15:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "12219:72:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "12233:48:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "12259:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12267:3:0", - "type": "", - "value": "0x2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12255:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12255:16:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "12273:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12251:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12251:29:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "12245:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "12245:36:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "12233:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 111, - "isOffset": false, - "isSlot": false, - "src": "12259:6:0", - "valueSize": 1 - }, - { - "declaration": 113, - "isOffset": false, - "isSlot": false, - "src": "12273:6:0", - "valueSize": 1 - }, - { - "declaration": 130, - "isOffset": false, - "isSlot": false, - "src": "12233:8:0", - "valueSize": 1 - } - ], - "id": 132, - "nodeType": "InlineAssembly", - "src": "12210:81:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 133, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "12308:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint16", - "typeString": "uint16" - } - }, - "functionReturnParameters": 117, - "id": 134, - "nodeType": "Return", - "src": "12301:15:0" - } - ] - }, - "documentation": null, - "id": 136, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint16", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 111, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "12036:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 110, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12036:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "12057:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12057:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12035:37:0" - }, - "returnParameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "12096:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint16", - "typeString": "uint16" - }, - "typeName": { - "id": 115, - "name": "uint16", - "nodeType": "ElementaryTypeName", - "src": "12096:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint16", - "typeString": "uint16" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12095:8:0" - }, - "scope": 333, - "src": "12018:305:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 162, - "nodeType": "Block", - "src": "12415:219:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 146, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 138, - "src": "12433:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12433:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 148, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 140, - "src": "12451:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "34", - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12460:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "src": "12451:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 151, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12450:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12433:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12464:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 145, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "12425:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12425:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 155, - "nodeType": "ExpressionStatement", - "src": "12425:60:0" - }, - { - "assignments": [157], - "declarations": [ - { - "constant": false, - "id": 157, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 162, - "src": "12495:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 156, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "12495:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 158, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "12495:15:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "12530:72:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "12544:48:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "12570:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12578:3:0", - "type": "", - "value": "0x4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12566:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12566:16:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "12584:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12562:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12562:29:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "12556:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "12556:36:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "12544:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 138, - "isOffset": false, - "isSlot": false, - "src": "12570:6:0", - "valueSize": 1 - }, - { - "declaration": 140, - "isOffset": false, - "isSlot": false, - "src": "12584:6:0", - "valueSize": 1 - }, - { - "declaration": 157, - "isOffset": false, - "isSlot": false, - "src": "12544:8:0", - "valueSize": 1 - } - ], - "id": 159, - "nodeType": "InlineAssembly", - "src": "12521:81:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 160, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "12619:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 144, - "id": 161, - "nodeType": "Return", - "src": "12612:15:0" - } - ] - }, - "documentation": null, - "id": 163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint32", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 141, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 138, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 163, - "src": "12347:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 137, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12347:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 163, - "src": "12368:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 139, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12368:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:37:0" - }, - "returnParameters": { - "id": 144, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 143, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 163, - "src": "12407:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 142, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "12407:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12406:8:0" - }, - "scope": 333, - "src": "12329:305:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 189, - "nodeType": "Block", - "src": "12726:219:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 173, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "12744:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12744:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 175, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "12762:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "38", - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12771:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - }, - "src": "12762:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 178, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12761:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12744:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12775:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 172, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "12736:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12736:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "12736:60:0" - }, - { - "assignments": [184], - "declarations": [ - { - "constant": false, - "id": 184, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 189, - "src": "12806:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - }, - "typeName": { - "id": 183, - "name": "uint64", - "nodeType": "ElementaryTypeName", - "src": "12806:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 185, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "12806:15:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "12841:72:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "12855:48:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "12881:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12889:3:0", - "type": "", - "value": "0x8" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12877:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12877:16:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "12895:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12873:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "12873:29:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "12867:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "12867:36:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "12855:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 165, - "isOffset": false, - "isSlot": false, - "src": "12881:6:0", - "valueSize": 1 - }, - { - "declaration": 167, - "isOffset": false, - "isSlot": false, - "src": "12895:6:0", - "valueSize": 1 - }, - { - "declaration": 184, - "isOffset": false, - "isSlot": false, - "src": "12855:8:0", - "valueSize": 1 - } - ], - "id": 186, - "nodeType": "InlineAssembly", - "src": "12832:81:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 187, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "12930:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "functionReturnParameters": 171, - "id": 188, - "nodeType": "Return", - "src": "12923:15:0" - } - ] - }, - "documentation": null, - "id": 190, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint64", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 165, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 190, - "src": "12658:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 164, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12658:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 167, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 190, - "src": "12679:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 166, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12679:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12657:37:0" - }, - "returnParameters": { - "id": 171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 190, - "src": "12718:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - }, - "typeName": { - "id": 169, - "name": "uint64", - "nodeType": "ElementaryTypeName", - "src": "12718:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12717:8:0" - }, - "scope": 333, - "src": "12640:305:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 216, - "nodeType": "Block", - "src": "13037:220:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 200, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "13055:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13055:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 202, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 194, - "src": "13073:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13082:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "13073:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 205, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13072:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13055:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13087:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 199, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "13047:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13047:61:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 209, - "nodeType": "ExpressionStatement", - "src": "13047:61:0" - }, - { - "assignments": [211], - "declarations": [ - { - "constant": false, - "id": 211, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 216, - "src": "13118:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 210, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13118:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 212, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "13118:15:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "13153:72:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "13167:48:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "13193:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13201:3:0", - "type": "", - "value": "0xc" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13189:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13189:16:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "13207:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13185:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13185:29:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "13179:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "13179:36:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "13167:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 192, - "isOffset": false, - "isSlot": false, - "src": "13193:6:0", - "valueSize": 1 - }, - { - "declaration": 194, - "isOffset": false, - "isSlot": false, - "src": "13207:6:0", - "valueSize": 1 - }, - { - "declaration": 211, - "isOffset": false, - "isSlot": false, - "src": "13167:8:0", - "valueSize": 1 - } - ], - "id": 213, - "nodeType": "InlineAssembly", - "src": "13144:81:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 214, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 211, - "src": "13242:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 198, - "id": 215, - "nodeType": "Return", - "src": "13235:15:0" - } - ] - }, - "documentation": null, - "id": 217, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint96", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 192, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 217, - "src": "12969:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 191, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12969:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 194, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 217, - "src": "12990:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 193, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12990:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12968:37:0" - }, - "returnParameters": { - "id": 198, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 197, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 217, - "src": "13029:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 196, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13029:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13028:8:0" - }, - "scope": 333, - "src": "12951:306:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 243, - "nodeType": "Block", - "src": "13351:222:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 227, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "13369:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13369:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 229, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 221, - "src": "13387:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3136", - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13396:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "16" - }, - "src": "13387:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 232, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13386:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13369:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13401:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 226, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "13361:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13361:61:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 236, - "nodeType": "ExpressionStatement", - "src": "13361:61:0" - }, - { - "assignments": [238], - "declarations": [ - { - "constant": false, - "id": 238, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 243, - "src": "13432:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - }, - "typeName": { - "id": 237, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "13432:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 239, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "13432:16:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "13468:73:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "13482:49:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "13508:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13516:4:0", - "type": "", - "value": "0x10" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13504:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13504:17:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "13523:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13500:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13500:30:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "13494:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "13494:37:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "13482:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 219, - "isOffset": false, - "isSlot": false, - "src": "13508:6:0", - "valueSize": 1 - }, - { - "declaration": 221, - "isOffset": false, - "isSlot": false, - "src": "13523:6:0", - "valueSize": 1 - }, - { - "declaration": 238, - "isOffset": false, - "isSlot": false, - "src": "13482:8:0", - "valueSize": 1 - } - ], - "id": 240, - "nodeType": "InlineAssembly", - "src": "13459:82:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 241, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 238, - "src": "13558:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "functionReturnParameters": 225, - "id": 242, - "nodeType": "Return", - "src": "13551:15:0" - } - ] - }, - "documentation": null, - "id": 244, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint128", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 219, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 244, - "src": "13282:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13282:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 221, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 244, - "src": "13303:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13303:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13281:37:0" - }, - "returnParameters": { - "id": 225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 224, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 244, - "src": "13342:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - }, - "typeName": { - "id": 223, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "13342:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13341:9:0" - }, - "scope": 333, - "src": "13263:310:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 270, - "nodeType": "Block", - "src": "13667:222:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 254, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "13685:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13685:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 256, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 248, - "src": "13703:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13712:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "13703:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 259, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13702:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13685:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13717:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 253, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "13677:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13677:61:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 263, - "nodeType": "ExpressionStatement", - "src": "13677:61:0" - }, - { - "assignments": [265], - "declarations": [ - { - "constant": false, - "id": 265, - "mutability": "mutable", - "name": "tempUint", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 270, - "src": "13748:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 264, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13748:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 266, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "13748:16:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "13784:73:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "13798:49:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "13824:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13832:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13820:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13820:17:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "13839:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13816:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "13816:30:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "13810:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "13810:37:0" - }, - "variableNames": [ - { - "name": "tempUint", - "nodeType": "YulIdentifier", - "src": "13798:8:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 246, - "isOffset": false, - "isSlot": false, - "src": "13824:6:0", - "valueSize": 1 - }, - { - "declaration": 248, - "isOffset": false, - "isSlot": false, - "src": "13839:6:0", - "valueSize": 1 - }, - { - "declaration": 265, - "isOffset": false, - "isSlot": false, - "src": "13798:8:0", - "valueSize": 1 - } - ], - "id": 267, - "nodeType": "InlineAssembly", - "src": "13775:82:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 268, - "name": "tempUint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "13874:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 252, - "id": 269, - "nodeType": "Return", - "src": "13867:15:0" - } - ] - }, - "documentation": null, - "id": 271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toUint256", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 246, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 271, - "src": "13598:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 245, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13598:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 248, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 271, - "src": "13619:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 247, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13619:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13597:37:0" - }, - "returnParameters": { - "id": 252, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 251, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 271, - "src": "13658:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 250, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13658:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13657:9:0" - }, - "scope": 333, - "src": "13579:310:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 297, - "nodeType": "Block", - "src": "13983:231:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 281, - "name": "_bytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "14001:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14001:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 283, - "name": "_start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 275, - "src": "14019:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14028:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "14019:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 286, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14018:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14001:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "52656164206f7574206f6620626f756e6473", - "id": 288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14033:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - }, - "value": "Read out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "id": 280, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "13993:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13993:61:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 290, - "nodeType": "ExpressionStatement", - "src": "13993:61:0" - }, - { - "assignments": [292], - "declarations": [ - { - "constant": false, - "id": 292, - "mutability": "mutable", - "name": "tempBytes32", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 297, - "src": "14064:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 291, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14064:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 293, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "14064:19:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "14103:76:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "14117:52:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "_bytes", - "nodeType": "YulIdentifier", - "src": "14146:6:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "14154:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "14142:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "14142:17:0" - }, - { - "name": "_start", - "nodeType": "YulIdentifier", - "src": "14161:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "14138:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "14138:30:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "14132:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "14132:37:0" - }, - "variableNames": [ - { - "name": "tempBytes32", - "nodeType": "YulIdentifier", - "src": "14117:11:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 273, - "isOffset": false, - "isSlot": false, - "src": "14146:6:0", - "valueSize": 1 - }, - { - "declaration": 275, - "isOffset": false, - "isSlot": false, - "src": "14161:6:0", - "valueSize": 1 - }, - { - "declaration": 292, - "isOffset": false, - "isSlot": false, - "src": "14117:11:0", - "valueSize": 1 - } - ], - "id": 294, - "nodeType": "InlineAssembly", - "src": "14094:85:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 295, - "name": "tempBytes32", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 292, - "src": "14196:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 279, - "id": 296, - "nodeType": "Return", - "src": "14189:18:0" - } - ] - }, - "documentation": null, - "id": 298, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toBytes32", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 276, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 273, - "mutability": "mutable", - "name": "_bytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 298, - "src": "13914:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 272, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13914:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 275, - "mutability": "mutable", - "name": "_start", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 298, - "src": "13935:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 274, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13935:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13913:37:0" - }, - "returnParameters": { - "id": 279, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 278, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 298, - "src": "13974:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 277, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13974:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13973:9:0" - }, - "scope": 333, - "src": "13895:319:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 314, - "nodeType": "Block", - "src": "14313:1291:0", - "statements": [ - { - "assignments": [308], - "declarations": [ - { - "constant": false, - "id": 308, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 314, - "src": "14323:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 307, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14323:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 310, - "initialValue": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14338:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "nodeType": "VariableDeclarationStatement", - "src": "14323:19:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "14362:1211:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "14376:30:0", - "value": { - "arguments": [ - { - "name": "_preBytes", - "nodeType": "YulIdentifier", - "src": "14396:9:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "14390:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "14390:16:0" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "14380:6:0", - "type": "" - } - ] - }, - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "14535:937:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "14748:11:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "14758:1:0", - "type": "", - "value": "1" - }, - "variables": [ - { - "name": "cb", - "nodeType": "YulTypedName", - "src": "14752:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "14777:30:0", - "value": { - "arguments": [ - { - "name": "_preBytes", - "nodeType": "YulIdentifier", - "src": "14791:9:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "14802:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "14787:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "14787:20:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "14781:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "14824:26:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "14839:2:0" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "14843:6:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "14835:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "14835:15:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "14828:3:0", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "15182:276:0", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "15314:126:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "15374:12:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15385:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "success", - "nodeType": "YulIdentifier", - "src": "15374:7:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "15411:7:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15417:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "cb", - "nodeType": "YulIdentifier", - "src": "15411:2:0" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "15297:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "15291:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "15291:9:0" - }, - { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "15308:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "15302:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "15302:9:0" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "15288:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "15288:24:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "15281:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "15281:32:0" - }, - "nodeType": "YulIf", - "src": "15278:2:0" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "15064:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "15068:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "15061:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "15061:11:0" - }, - { - "name": "cb", - "nodeType": "YulIdentifier", - "src": "15074:2:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "15057:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "15057:20:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15079:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "15054:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "15054:27:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "15082:99:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "15104:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "15114:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15118:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "15110:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "15110:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "15104:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "15144:19:0", - "value": { - "arguments": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "15154:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15158:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "15150:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "15150:13:0" - }, - "variableNames": [ - { - "name": "cc", - "nodeType": "YulIdentifier", - "src": "15144:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "14872:181:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "14894:31:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "14908:10:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "14920:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "14904:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "14904:21:0" - }, - "variables": [ - { - "name": "cc", - "nodeType": "YulTypedName", - "src": "14898:2:0", - "type": "" - } - ] - } - ] - }, - "src": "14868:590:0" - } - ] - }, - "nodeType": "YulCase", - "src": "14528:944:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "14533:1:0", - "type": "", - "value": "1" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "15493:70:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "15537:12:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "15548:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "success", - "nodeType": "YulIdentifier", - "src": "15537:7:0" - } - ] - } - ] - }, - "nodeType": "YulCase", - "src": "15485:78:0", - "value": "default" - } - ], - "expression": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "14489:6:0" - }, - { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "14503:10:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "14497:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "14497:17:0" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "14486:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "14486:29:0" - }, - "nodeType": "YulSwitch", - "src": "14479:1084:0" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 302, - "isOffset": false, - "isSlot": false, - "src": "14503:10:0", - "valueSize": 1 - }, - { - "declaration": 302, - "isOffset": false, - "isSlot": false, - "src": "14908:10:0", - "valueSize": 1 - }, - { - "declaration": 300, - "isOffset": false, - "isSlot": false, - "src": "14396:9:0", - "valueSize": 1 - }, - { - "declaration": 300, - "isOffset": false, - "isSlot": false, - "src": "14791:9:0", - "valueSize": 1 - }, - { - "declaration": 308, - "isOffset": false, - "isSlot": false, - "src": "15374:7:0", - "valueSize": 1 - }, - { - "declaration": 308, - "isOffset": false, - "isSlot": false, - "src": "15537:7:0", - "valueSize": 1 - } - ], - "id": 311, - "nodeType": "InlineAssembly", - "src": "14353:1220:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 312, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 308, - "src": "15590:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 306, - "id": 313, - "nodeType": "Return", - "src": "15583:14:0" - } - ] - }, - "documentation": null, - "id": 315, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "equal", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 300, - "mutability": "mutable", - "name": "_preBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 315, - "src": "14235:22:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 299, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14235:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 302, - "mutability": "mutable", - "name": "_postBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 315, - "src": "14259:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 301, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14259:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14234:49:0" - }, - "returnParameters": { - "id": 306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 305, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 315, - "src": "14307:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 304, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14307:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14306:6:0" - }, - "scope": 333, - "src": "14220:1384:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 331, - "nodeType": "Block", - "src": "15749:2491:0", - "statements": [ - { - "assignments": [325], - "declarations": [ - { - "constant": false, - "id": 325, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 331, - "src": "15759:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 324, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15759:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 327, - "initialValue": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15774:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15759:19:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "15798:2411:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "15853:34:0", - "value": { - "arguments": [ - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "15872:14:0" - } - ], - "functionName": { - "name": "sload", - "nodeType": "YulIdentifier", - "src": "15866:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "15866:21:0" - }, - "variables": [ - { - "name": "fslot", - "nodeType": "YulTypedName", - "src": "15857:5:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "15974:76:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "15997:5:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16012:5:0", - "type": "", - "value": "0x100" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "16030:5:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16037:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "16026:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16026:13:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "16019:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "16019:21:0" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "16008:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16008:33:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16043:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "16004:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16004:41:0" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "15993:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "15993:53:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16048:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "15989:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "15989:61:0" - }, - "variables": [ - { - "name": "slength", - "nodeType": "YulTypedName", - "src": "15978:7:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "16063:32:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "16084:10:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "16078:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "16078:17:0" - }, - "variables": [ - { - "name": "mlength", - "nodeType": "YulTypedName", - "src": "16067:7:0", - "type": "" - } - ] - }, - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "16215:1893:0", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "16514:1580:0", - "statements": [ - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "16586:332:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "16675:38:0", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "16692:5:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16699:5:0", - "type": "", - "value": "0x100" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "16688:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16688:17:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16707:5:0", - "type": "", - "value": "0x100" - } - ], - "functionName": { - "name": "mul", - "nodeType": "YulIdentifier", - "src": "16684:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16684:29:0" - }, - "variableNames": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "16675:5:0" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "16790:106:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "16858:12:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16869:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "success", - "nodeType": "YulIdentifier", - "src": "16858:7:0" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "fslot", - "nodeType": "YulIdentifier", - "src": "16752:5:0" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "16769:10:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16781:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "16765:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "16765:21:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "16759:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "16759:28:0" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "16749:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "16749:39:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "16742:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "16742:47:0" - }, - "nodeType": "YulIf", - "src": "16739:2:0" - } - ] - }, - "nodeType": "YulCase", - "src": "16579:339:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16584:1:0", - "type": "", - "value": "1" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "16947:1129:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "17200:11:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17210:1:0", - "type": "", - "value": "1" - }, - "variables": [ - { - "name": "cb", - "nodeType": "YulTypedName", - "src": "17204:2:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17320:3:0", - "type": "", - "value": "0x0" - }, - { - "name": "_preBytes_slot", - "nodeType": "YulIdentifier", - "src": "17325:14:0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "17313:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "17313:27:0" - }, - "nodeType": "YulExpressionStatement", - "src": "17313:27:0" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "17365:30:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17385:3:0", - "type": "", - "value": "0x0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17390:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "keccak256", - "nodeType": "YulIdentifier", - "src": "17375:9:0" - }, - "nodeType": "YulFunctionCall", - "src": "17375:20:0" - }, - "variables": [ - { - "name": "sc", - "nodeType": "YulTypedName", - "src": "17369:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "17421:31:0", - "value": { - "arguments": [ - { - "name": "_postBytes", - "nodeType": "YulIdentifier", - "src": "17435:10:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17447:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "17431:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "17431:21:0" - }, - "variables": [ - { - "name": "mc", - "nodeType": "YulTypedName", - "src": "17425:2:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "17477:27:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "17492:2:0" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "17496:7:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "17488:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "17488:16:0" - }, - "variables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "17481:3:0", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "17804:250:0", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "17870:158:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "17946:12:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17957:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "success", - "nodeType": "YulIdentifier", - "src": "17946:7:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "17991:7:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17997:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "cb", - "nodeType": "YulIdentifier", - "src": "17991:2:0" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "17853:2:0" - } - ], - "functionName": { - "name": "sload", - "nodeType": "YulIdentifier", - "src": "17847:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "17847:9:0" - }, - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "17864:2:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "17858:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "17858:9:0" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "17844:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "17844:24:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "17837:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "17837:32:0" - }, - "nodeType": "YulIf", - "src": "17834:2:0" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "17665:2:0" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "17669:3:0" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "17662:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "17662:11:0" - }, - { - "name": "cb", - "nodeType": "YulIdentifier", - "src": "17675:2:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "17658:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "17658:20:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17680:1:0", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "17655:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "17655:27:0" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "17683:120:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "17713:16:0", - "value": { - "arguments": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "17723:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17727:1:0", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "17719:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "17719:10:0" - }, - "variableNames": [ - { - "name": "sc", - "nodeType": "YulIdentifier", - "src": "17713:2:0" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "17758:19:0", - "value": { - "arguments": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "17768:2:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "17772:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "17764:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "17764:13:0" - }, - "variableNames": [ - { - "name": "mc", - "nodeType": "YulIdentifier", - "src": "17758:2:0" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "17652:2:0", - "statements": [] - }, - "src": "17648:406:0" - } - ] - }, - "nodeType": "YulCase", - "src": "16939:1137:0", - "value": "default" - } - ], - "expression": { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "16546:7:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16555:2:0", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "16543:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "16543:15:0" - }, - "nodeType": "YulSwitch", - "src": "16536:1540:0" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "16504:7:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "16497:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "16497:15:0" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "16490:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "16490:23:0" - }, - "nodeType": "YulIf", - "src": "16487:2:0" - } - ] - }, - "nodeType": "YulCase", - "src": "16208:1900:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "16213:1:0", - "type": "", - "value": "1" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "18129:70:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "18173:12:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "18184:1:0", - "type": "", - "value": "0" - }, - "variableNames": [ - { - "name": "success", - "nodeType": "YulIdentifier", - "src": "18173:7:0" - } - ] - } - ] - }, - "nodeType": "YulCase", - "src": "18121:78:0", - "value": "default" - } - ], - "expression": { - "arguments": [ - { - "name": "slength", - "nodeType": "YulIdentifier", - "src": "16178:7:0" - }, - { - "name": "mlength", - "nodeType": "YulIdentifier", - "src": "16187:7:0" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "16175:2:0" - }, - "nodeType": "YulFunctionCall", - "src": "16175:20:0" - }, - "nodeType": "YulSwitch", - "src": "16168:2031:0" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "16084:10:0", - "valueSize": 1 - }, - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "16769:10:0", - "valueSize": 1 - }, - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "17435:10:0", - "valueSize": 1 - }, - { - "declaration": 317, - "isOffset": false, - "isSlot": true, - "src": "15872:14:0", - "valueSize": 1 - }, - { - "declaration": 317, - "isOffset": false, - "isSlot": true, - "src": "17325:14:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "16858:7:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "17946:7:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "18173:7:0", - "valueSize": 1 - } - ], - "id": 328, - "nodeType": "InlineAssembly", - "src": "15789:2420:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 329, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 325, - "src": "18226:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 323, - "id": 330, - "nodeType": "Return", - "src": "18219:14:0" - } - ] - }, - "documentation": null, - "id": 332, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "equalStorage", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 320, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 317, - "mutability": "mutable", - "name": "_preBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 332, - "src": "15641:23:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 316, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "15641:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 319, - "mutability": "mutable", - "name": "_postBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 332, - "src": "15674:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 318, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "15674:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15631:72:0" - }, - "returnParameters": { - "id": 323, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 322, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 332, - "src": "15739:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 321, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15739:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15738:6:0" - }, - "scope": 333, - "src": "15610:2630:0", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 334, - "src": "370:17872:0" - } - ], - "src": "336:17907:0" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "exportedSymbols": { - "BytesLib": [333] - }, - "license": "Unlicense" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.5", ".0", "<", "0.7", ".0"] - }, - "id": 1, - "name": "PragmaDirective", - "src": "336:31:0" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [333], - "name": "BytesLib", - "scope": 334 - }, - "children": [ - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "concat", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_preBytes", - "overrides": null, - "scope": 17, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 2, - "name": "ElementaryTypeName", - "src": "418:5:0" - } - ], - "id": 3, - "name": "VariableDeclaration", - "src": "418:22:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_postBytes", - "overrides": null, - "scope": 17, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 4, - "name": "ElementaryTypeName", - "src": "450:5:0" - } - ], - "id": 5, - "name": "VariableDeclaration", - "src": "450:23:0" - } - ], - "id": 6, - "name": "ParameterList", - "src": "408:71:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 17, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 7, - "name": "ElementaryTypeName", - "src": "515:5:0" - } - ], - "id": 8, - "name": "VariableDeclaration", - "src": "515:12:0" - } - ], - "id": 9, - "name": "ParameterList", - "src": "514:14:0" - }, - { - "children": [ - { - "attributes": { - "assignments": [11], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempBytes", - "overrides": null, - "scope": 16, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 10, - "name": "ElementaryTypeName", - "src": "543:5:0" - } - ], - "id": 11, - "name": "VariableDeclaration", - "src": "543:22:0" - } - ], - "id": 12, - "name": "VariableDeclarationStatement", - "src": "543:22:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 5, - "isOffset": false, - "isSlot": false, - "src": "2032:10:0", - "valueSize": 1 - }, - { - "declaration": 5, - "isOffset": false, - "isSlot": false, - "src": "2434:10:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "1476:9:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "3092:9:0", - "valueSize": 1 - }, - { - "declaration": 3, - "isOffset": false, - "isSlot": false, - "src": "889:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "1149:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "2063:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "2092:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "721:9:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "919:9:0", - "valueSize": 1 - } - ], - "operations": "{\n tempBytes := mload(0x40)\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n let mc := add(tempBytes, 0x20)\n let end := add(mc, length)\n for {\n let cc := add(_preBytes, 0x20)\n }\n lt(mc, end)\n {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n }\n { mstore(mc, mload(cc)) }\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n mc := end\n end := add(mc, length)\n for {\n let cc := add(_postBytes, 0x20)\n }\n lt(mc, end)\n {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n }\n { mstore(mc, mload(cc)) }\n mstore(0x40, and(add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31)))\n}" - }, - "children": [], - "id": 13, - "name": "InlineAssembly", - "src": "576:2619:0" - }, - { - "attributes": { - "functionReturnParameters": 9 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 11, - "type": "bytes memory", - "value": "tempBytes" - }, - "id": 14, - "name": "Identifier", - "src": "3212:9:0" - } - ], - "id": 15, - "name": "Return", - "src": "3205:16:0" - } - ], - "id": 16, - "name": "Block", - "src": "533:2695:0" - } - ], - "id": 17, - "name": "FunctionDefinition", - "src": "393:2835:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "concatStorage", - "overrides": null, - "scope": 333, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_preBytes", - "overrides": null, - "scope": 26, - "stateVariable": false, - "storageLocation": "storage", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 18, - "name": "ElementaryTypeName", - "src": "3257:5:0" - } - ], - "id": 19, - "name": "VariableDeclaration", - "src": "3257:23:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_postBytes", - "overrides": null, - "scope": 26, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 20, - "name": "ElementaryTypeName", - "src": "3282:5:0" - } - ], - "id": 21, - "name": "VariableDeclaration", - "src": "3282:23:0" - } - ], - "id": 22, - "name": "ParameterList", - "src": "3256:50:0" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 23, - "name": "ParameterList", - "src": "3316:0:0" - }, - { - "children": [ - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "4155:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "5221:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "6753:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "6804:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "8237:10:0", - "valueSize": 1 - }, - { - "declaration": 21, - "isOffset": false, - "isSlot": false, - "src": "8288:10:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "3565:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "4803:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "5953:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "6094:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "7697:14:0", - "valueSize": 1 - }, - { - "declaration": 19, - "isOffset": false, - "isSlot": true, - "src": "7910:14:0", - "valueSize": 1 - } - ], - "operations": "{\n let fslot := sload(_preBytes_slot)\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n sstore(_preBytes_slot, add(fslot, add(mul(div(mload(add(_postBytes, 0x20)), exp(0x100, sub(32, mlength))), exp(0x100, sub(32, newlength))), mul(mlength, 2))))\n }\n case 1 {\n mstore(0x0, _preBytes_slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n sstore(_preBytes_slot, add(mul(newlength, 2), 1))\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n }\n lt(mc, end)\n {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n }\n { sstore(sc, mload(mc)) }\n mask := exp(0x100, sub(mc, end))\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n mstore(0x0, _preBytes_slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n sstore(_preBytes_slot, add(mul(newlength, 2), 1))\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n }\n lt(mc, end)\n {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n }\n { sstore(sc, mload(mc)) }\n mask := exp(0x100, sub(mc, end))\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n}" - }, - "children": [], - "id": 24, - "name": "InlineAssembly", - "src": "3326:5527:0" - } - ], - "id": 25, - "name": "Block", - "src": "3316:5543:0" - } - ], - "id": 26, - "name": "FunctionDefinition", - "src": "3234:5625:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "slice", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 55, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 27, - "name": "ElementaryTypeName", - "src": "8889:5:0" - } - ], - "id": 28, - "name": "VariableDeclaration", - "src": "8889:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 55, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 29, - "name": "ElementaryTypeName", - "src": "8918:7:0" - } - ], - "id": 30, - "name": "VariableDeclaration", - "src": "8918:14:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_length", - "overrides": null, - "scope": 55, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 31, - "name": "ElementaryTypeName", - "src": "8942:7:0" - } - ], - "id": 32, - "name": "VariableDeclaration", - "src": "8942:15:0" - } - ], - "id": 33, - "name": "ParameterList", - "src": "8879:84:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 55, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 34, - "name": "ElementaryTypeName", - "src": "8999:5:0" - } - ], - "id": 35, - "name": "VariableDeclaration", - "src": "8999:12:0" - } - ], - "id": 36, - "name": "ParameterList", - "src": "8998:14:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 37, - "name": "Identifier", - "src": "9027:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 28, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 38, - "name": "Identifier", - "src": "9035:6:0" - } - ], - "id": 39, - "name": "MemberAccess", - "src": "9035:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 30, - "type": "uint256", - "value": "_start" - }, - "id": 40, - "name": "Identifier", - "src": "9053:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 32, - "type": "uint256", - "value": "_length" - }, - "id": 41, - "name": "Identifier", - "src": "9062:7:0" - } - ], - "id": 42, - "name": "BinaryOperation", - "src": "9053:16:0" - } - ], - "id": 43, - "name": "TupleExpression", - "src": "9052:18:0" - } - ], - "id": 44, - "name": "BinaryOperation", - "src": "9035:35:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 45, - "name": "Literal", - "src": "9072:20:0" - } - ], - "id": 46, - "name": "FunctionCall", - "src": "9027:66:0" - } - ], - "id": 47, - "name": "ExpressionStatement", - "src": "9027:66:0" - }, - { - "attributes": { - "assignments": [49], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempBytes", - "overrides": null, - "scope": 54, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 48, - "name": "ElementaryTypeName", - "src": "9104:5:0" - } - ], - "id": 49, - "name": "VariableDeclaration", - "src": "9104:22:0" - } - ], - "id": 50, - "name": "VariableDeclarationStatement", - "src": "9104:22:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 28, - "isOffset": false, - "isSlot": false, - "src": "10603:6:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "10410:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "10889:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "9174:7:0", - "valueSize": 1 - }, - { - "declaration": 32, - "isOffset": false, - "isSlot": false, - "src": "9987:7:0", - "valueSize": 1 - }, - { - "declaration": 30, - "isOffset": false, - "isSlot": false, - "src": "10654:6:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "10322:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "10878:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "11212:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "11271:9:0", - "valueSize": 1 - }, - { - "declaration": 49, - "isOffset": false, - "isSlot": false, - "src": "9350:9:0", - "valueSize": 1 - } - ], - "operations": "{\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n }\n lt(mc, end)\n {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n }\n { mstore(mc, mload(cc)) }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(0x40, add(tempBytes, 0x20))\n }\n}" - }, - "children": [], - "id": 51, - "name": "InlineAssembly", - "src": "9137:2175:0" - }, - { - "attributes": { - "functionReturnParameters": 36 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 49, - "type": "bytes memory", - "value": "tempBytes" - }, - "id": 52, - "name": "Identifier", - "src": "11329:9:0" - } - ], - "id": 53, - "name": "Return", - "src": "11322:16:0" - } - ], - "id": 54, - "name": "Block", - "src": "9017:2328:0" - } - ], - "id": 55, - "name": "FunctionDefinition", - "src": "8865:2480:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toAddress", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 82, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 56, - "name": "ElementaryTypeName", - "src": "11370:5:0" - } - ], - "id": 57, - "name": "VariableDeclaration", - "src": "11370:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 82, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 58, - "name": "ElementaryTypeName", - "src": "11391:7:0" - } - ], - "id": 59, - "name": "VariableDeclaration", - "src": "11391:14:0" - } - ], - "id": 60, - "name": "ParameterList", - "src": "11369:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 82, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 61, - "name": "ElementaryTypeName", - "src": "11430:7:0" - } - ], - "id": 62, - "name": "VariableDeclaration", - "src": "11430:7:0" - } - ], - "id": 63, - "name": "ParameterList", - "src": "11429:9:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 64, - "name": "Identifier", - "src": "11449:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 57, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 65, - "name": "Identifier", - "src": "11457:6:0" - } - ], - "id": 66, - "name": "MemberAccess", - "src": "11457:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 59, - "type": "uint256", - "value": "_start" - }, - "id": 67, - "name": "Identifier", - "src": "11475:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3230", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 20", - "value": "20" - }, - "id": 68, - "name": "Literal", - "src": "11484:2:0" - } - ], - "id": 69, - "name": "BinaryOperation", - "src": "11475:11:0" - } - ], - "id": 70, - "name": "TupleExpression", - "src": "11474:13:0" - } - ], - "id": 71, - "name": "BinaryOperation", - "src": "11457:30:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 72, - "name": "Literal", - "src": "11489:20:0" - } - ], - "id": 73, - "name": "FunctionCall", - "src": "11449:61:0" - } - ], - "id": 74, - "name": "ExpressionStatement", - "src": "11449:61:0" - }, - { - "attributes": { - "assignments": [76], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempAddress", - "overrides": null, - "scope": 81, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 75, - "name": "ElementaryTypeName", - "src": "11520:7:0" - } - ], - "id": 76, - "name": "VariableDeclaration", - "src": "11520:19:0" - } - ], - "id": 77, - "name": "VariableDeclarationStatement", - "src": "11520:19:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 57, - "isOffset": false, - "isSlot": false, - "src": "11606:6:0", - "valueSize": 1 - }, - { - "declaration": 59, - "isOffset": false, - "isSlot": false, - "src": "11621:6:0", - "valueSize": 1 - }, - { - "declaration": 76, - "isOffset": false, - "isSlot": false, - "src": "11573:11:0", - "valueSize": 1 - } - ], - "operations": "{\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n}" - }, - "children": [], - "id": 78, - "name": "InlineAssembly", - "src": "11550:119:0" - }, - { - "attributes": { - "functionReturnParameters": 63 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 76, - "type": "address", - "value": "tempAddress" - }, - "id": 79, - "name": "Identifier", - "src": "11686:11:0" - } - ], - "id": 80, - "name": "Return", - "src": "11679:18:0" - } - ], - "id": 81, - "name": "Block", - "src": "11439:265:0" - } - ], - "id": 82, - "name": "FunctionDefinition", - "src": "11351:353:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint8", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 109, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 83, - "name": "ElementaryTypeName", - "src": "11727:5:0" - } - ], - "id": 84, - "name": "VariableDeclaration", - "src": "11727:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 109, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 85, - "name": "ElementaryTypeName", - "src": "11748:7:0" - } - ], - "id": 86, - "name": "VariableDeclaration", - "src": "11748:14:0" - } - ], - "id": 87, - "name": "ParameterList", - "src": "11726:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 109, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 88, - "name": "ElementaryTypeName", - "src": "11787:5:0" - } - ], - "id": 89, - "name": "VariableDeclaration", - "src": "11787:5:0" - } - ], - "id": 90, - "name": "ParameterList", - "src": "11786:7:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 91, - "name": "Identifier", - "src": "11804:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 84, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 92, - "name": "Identifier", - "src": "11812:6:0" - } - ], - "id": 93, - "name": "MemberAccess", - "src": "11812:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 86, - "type": "uint256", - "value": "_start" - }, - "id": 94, - "name": "Identifier", - "src": "11830:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 95, - "name": "Literal", - "src": "11839:1:0" - } - ], - "id": 96, - "name": "BinaryOperation", - "src": "11830:10:0" - } - ], - "id": 97, - "name": "TupleExpression", - "src": "11829:12:0" - } - ], - "id": 98, - "name": "BinaryOperation", - "src": "11812:29:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 99, - "name": "Literal", - "src": "11843:20:0" - } - ], - "id": 100, - "name": "FunctionCall", - "src": "11804:60:0" - } - ], - "id": 101, - "name": "ExpressionStatement", - "src": "11804:60:0" - }, - { - "attributes": { - "assignments": [103], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 108, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 102, - "name": "ElementaryTypeName", - "src": "11874:5:0" - } - ], - "id": 103, - "name": "VariableDeclaration", - "src": "11874:14:0" - } - ], - "id": 104, - "name": "VariableDeclarationStatement", - "src": "11874:14:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 84, - "isOffset": false, - "isSlot": false, - "src": "11948:6:0", - "valueSize": 1 - }, - { - "declaration": 86, - "isOffset": false, - "isSlot": false, - "src": "11962:6:0", - "valueSize": 1 - }, - { - "declaration": 103, - "isOffset": false, - "isSlot": false, - "src": "11922:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x1), _start))\n}" - }, - "children": [], - "id": 105, - "name": "InlineAssembly", - "src": "11899:81:0" - }, - { - "attributes": { - "functionReturnParameters": 90 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 103, - "type": "uint8", - "value": "tempUint" - }, - "id": 106, - "name": "Identifier", - "src": "11997:8:0" - } - ], - "id": 107, - "name": "Return", - "src": "11990:15:0" - } - ], - "id": 108, - "name": "Block", - "src": "11794:218:0" - } - ], - "id": 109, - "name": "FunctionDefinition", - "src": "11710:302:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint16", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 136, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 110, - "name": "ElementaryTypeName", - "src": "12036:5:0" - } - ], - "id": 111, - "name": "VariableDeclaration", - "src": "12036:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 136, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 112, - "name": "ElementaryTypeName", - "src": "12057:7:0" - } - ], - "id": 113, - "name": "VariableDeclaration", - "src": "12057:14:0" - } - ], - "id": 114, - "name": "ParameterList", - "src": "12035:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 136, - "stateVariable": false, - "storageLocation": "default", - "type": "uint16", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint16", - "type": "uint16" - }, - "id": 115, - "name": "ElementaryTypeName", - "src": "12096:6:0" - } - ], - "id": 116, - "name": "VariableDeclaration", - "src": "12096:6:0" - } - ], - "id": 117, - "name": "ParameterList", - "src": "12095:8:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 118, - "name": "Identifier", - "src": "12114:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 111, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 119, - "name": "Identifier", - "src": "12122:6:0" - } - ], - "id": 120, - "name": "MemberAccess", - "src": "12122:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 113, - "type": "uint256", - "value": "_start" - }, - "id": 121, - "name": "Identifier", - "src": "12140:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 122, - "name": "Literal", - "src": "12149:1:0" - } - ], - "id": 123, - "name": "BinaryOperation", - "src": "12140:10:0" - } - ], - "id": 124, - "name": "TupleExpression", - "src": "12139:12:0" - } - ], - "id": 125, - "name": "BinaryOperation", - "src": "12122:29:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 126, - "name": "Literal", - "src": "12153:20:0" - } - ], - "id": 127, - "name": "FunctionCall", - "src": "12114:60:0" - } - ], - "id": 128, - "name": "ExpressionStatement", - "src": "12114:60:0" - }, - { - "attributes": { - "assignments": [130], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 135, - "stateVariable": false, - "storageLocation": "default", - "type": "uint16", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint16", - "type": "uint16" - }, - "id": 129, - "name": "ElementaryTypeName", - "src": "12184:6:0" - } - ], - "id": 130, - "name": "VariableDeclaration", - "src": "12184:15:0" - } - ], - "id": 131, - "name": "VariableDeclarationStatement", - "src": "12184:15:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 111, - "isOffset": false, - "isSlot": false, - "src": "12259:6:0", - "valueSize": 1 - }, - { - "declaration": 113, - "isOffset": false, - "isSlot": false, - "src": "12273:6:0", - "valueSize": 1 - }, - { - "declaration": 130, - "isOffset": false, - "isSlot": false, - "src": "12233:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x2), _start))\n}" - }, - "children": [], - "id": 132, - "name": "InlineAssembly", - "src": "12210:81:0" - }, - { - "attributes": { - "functionReturnParameters": 117 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 130, - "type": "uint16", - "value": "tempUint" - }, - "id": 133, - "name": "Identifier", - "src": "12308:8:0" - } - ], - "id": 134, - "name": "Return", - "src": "12301:15:0" - } - ], - "id": 135, - "name": "Block", - "src": "12104:219:0" - } - ], - "id": 136, - "name": "FunctionDefinition", - "src": "12018:305:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint32", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 163, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 137, - "name": "ElementaryTypeName", - "src": "12347:5:0" - } - ], - "id": 138, - "name": "VariableDeclaration", - "src": "12347:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 163, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 139, - "name": "ElementaryTypeName", - "src": "12368:7:0" - } - ], - "id": 140, - "name": "VariableDeclaration", - "src": "12368:14:0" - } - ], - "id": 141, - "name": "ParameterList", - "src": "12346:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 163, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 142, - "name": "ElementaryTypeName", - "src": "12407:6:0" - } - ], - "id": 143, - "name": "VariableDeclaration", - "src": "12407:6:0" - } - ], - "id": 144, - "name": "ParameterList", - "src": "12406:8:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 145, - "name": "Identifier", - "src": "12425:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 138, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 146, - "name": "Identifier", - "src": "12433:6:0" - } - ], - "id": 147, - "name": "MemberAccess", - "src": "12433:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 140, - "type": "uint256", - "value": "_start" - }, - "id": 148, - "name": "Identifier", - "src": "12451:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 149, - "name": "Literal", - "src": "12460:1:0" - } - ], - "id": 150, - "name": "BinaryOperation", - "src": "12451:10:0" - } - ], - "id": 151, - "name": "TupleExpression", - "src": "12450:12:0" - } - ], - "id": 152, - "name": "BinaryOperation", - "src": "12433:29:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 153, - "name": "Literal", - "src": "12464:20:0" - } - ], - "id": 154, - "name": "FunctionCall", - "src": "12425:60:0" - } - ], - "id": 155, - "name": "ExpressionStatement", - "src": "12425:60:0" - }, - { - "attributes": { - "assignments": [157], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 162, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 156, - "name": "ElementaryTypeName", - "src": "12495:6:0" - } - ], - "id": 157, - "name": "VariableDeclaration", - "src": "12495:15:0" - } - ], - "id": 158, - "name": "VariableDeclarationStatement", - "src": "12495:15:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 138, - "isOffset": false, - "isSlot": false, - "src": "12570:6:0", - "valueSize": 1 - }, - { - "declaration": 140, - "isOffset": false, - "isSlot": false, - "src": "12584:6:0", - "valueSize": 1 - }, - { - "declaration": 157, - "isOffset": false, - "isSlot": false, - "src": "12544:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x4), _start))\n}" - }, - "children": [], - "id": 159, - "name": "InlineAssembly", - "src": "12521:81:0" - }, - { - "attributes": { - "functionReturnParameters": 144 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 157, - "type": "uint32", - "value": "tempUint" - }, - "id": 160, - "name": "Identifier", - "src": "12619:8:0" - } - ], - "id": 161, - "name": "Return", - "src": "12612:15:0" - } - ], - "id": 162, - "name": "Block", - "src": "12415:219:0" - } - ], - "id": 163, - "name": "FunctionDefinition", - "src": "12329:305:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint64", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 190, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 164, - "name": "ElementaryTypeName", - "src": "12658:5:0" - } - ], - "id": 165, - "name": "VariableDeclaration", - "src": "12658:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 190, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 166, - "name": "ElementaryTypeName", - "src": "12679:7:0" - } - ], - "id": 167, - "name": "VariableDeclaration", - "src": "12679:14:0" - } - ], - "id": 168, - "name": "ParameterList", - "src": "12657:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 190, - "stateVariable": false, - "storageLocation": "default", - "type": "uint64", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint64", - "type": "uint64" - }, - "id": 169, - "name": "ElementaryTypeName", - "src": "12718:6:0" - } - ], - "id": 170, - "name": "VariableDeclaration", - "src": "12718:6:0" - } - ], - "id": 171, - "name": "ParameterList", - "src": "12717:8:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 172, - "name": "Identifier", - "src": "12736:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 165, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 173, - "name": "Identifier", - "src": "12744:6:0" - } - ], - "id": 174, - "name": "MemberAccess", - "src": "12744:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 167, - "type": "uint256", - "value": "_start" - }, - "id": 175, - "name": "Identifier", - "src": "12762:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "38", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 8", - "value": "8" - }, - "id": 176, - "name": "Literal", - "src": "12771:1:0" - } - ], - "id": 177, - "name": "BinaryOperation", - "src": "12762:10:0" - } - ], - "id": 178, - "name": "TupleExpression", - "src": "12761:12:0" - } - ], - "id": 179, - "name": "BinaryOperation", - "src": "12744:29:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 180, - "name": "Literal", - "src": "12775:20:0" - } - ], - "id": 181, - "name": "FunctionCall", - "src": "12736:60:0" - } - ], - "id": 182, - "name": "ExpressionStatement", - "src": "12736:60:0" - }, - { - "attributes": { - "assignments": [184], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 189, - "stateVariable": false, - "storageLocation": "default", - "type": "uint64", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint64", - "type": "uint64" - }, - "id": 183, - "name": "ElementaryTypeName", - "src": "12806:6:0" - } - ], - "id": 184, - "name": "VariableDeclaration", - "src": "12806:15:0" - } - ], - "id": 185, - "name": "VariableDeclarationStatement", - "src": "12806:15:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 165, - "isOffset": false, - "isSlot": false, - "src": "12881:6:0", - "valueSize": 1 - }, - { - "declaration": 167, - "isOffset": false, - "isSlot": false, - "src": "12895:6:0", - "valueSize": 1 - }, - { - "declaration": 184, - "isOffset": false, - "isSlot": false, - "src": "12855:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x8), _start))\n}" - }, - "children": [], - "id": 186, - "name": "InlineAssembly", - "src": "12832:81:0" - }, - { - "attributes": { - "functionReturnParameters": 171 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 184, - "type": "uint64", - "value": "tempUint" - }, - "id": 187, - "name": "Identifier", - "src": "12930:8:0" - } - ], - "id": 188, - "name": "Return", - "src": "12923:15:0" - } - ], - "id": 189, - "name": "Block", - "src": "12726:219:0" - } - ], - "id": 190, - "name": "FunctionDefinition", - "src": "12640:305:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint96", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 217, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 191, - "name": "ElementaryTypeName", - "src": "12969:5:0" - } - ], - "id": 192, - "name": "VariableDeclaration", - "src": "12969:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 217, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 193, - "name": "ElementaryTypeName", - "src": "12990:7:0" - } - ], - "id": 194, - "name": "VariableDeclaration", - "src": "12990:14:0" - } - ], - "id": 195, - "name": "ParameterList", - "src": "12968:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 217, - "stateVariable": false, - "storageLocation": "default", - "type": "uint96", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint96", - "type": "uint96" - }, - "id": 196, - "name": "ElementaryTypeName", - "src": "13029:6:0" - } - ], - "id": 197, - "name": "VariableDeclaration", - "src": "13029:6:0" - } - ], - "id": 198, - "name": "ParameterList", - "src": "13028:8:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 199, - "name": "Identifier", - "src": "13047:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 192, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 200, - "name": "Identifier", - "src": "13055:6:0" - } - ], - "id": 201, - "name": "MemberAccess", - "src": "13055:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 194, - "type": "uint256", - "value": "_start" - }, - "id": 202, - "name": "Identifier", - "src": "13073:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3132", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 12", - "value": "12" - }, - "id": 203, - "name": "Literal", - "src": "13082:2:0" - } - ], - "id": 204, - "name": "BinaryOperation", - "src": "13073:11:0" - } - ], - "id": 205, - "name": "TupleExpression", - "src": "13072:13:0" - } - ], - "id": 206, - "name": "BinaryOperation", - "src": "13055:30:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 207, - "name": "Literal", - "src": "13087:20:0" - } - ], - "id": 208, - "name": "FunctionCall", - "src": "13047:61:0" - } - ], - "id": 209, - "name": "ExpressionStatement", - "src": "13047:61:0" - }, - { - "attributes": { - "assignments": [211], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 216, - "stateVariable": false, - "storageLocation": "default", - "type": "uint96", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint96", - "type": "uint96" - }, - "id": 210, - "name": "ElementaryTypeName", - "src": "13118:6:0" - } - ], - "id": 211, - "name": "VariableDeclaration", - "src": "13118:15:0" - } - ], - "id": 212, - "name": "VariableDeclarationStatement", - "src": "13118:15:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 192, - "isOffset": false, - "isSlot": false, - "src": "13193:6:0", - "valueSize": 1 - }, - { - "declaration": 194, - "isOffset": false, - "isSlot": false, - "src": "13207:6:0", - "valueSize": 1 - }, - { - "declaration": 211, - "isOffset": false, - "isSlot": false, - "src": "13167:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0xc), _start))\n}" - }, - "children": [], - "id": 213, - "name": "InlineAssembly", - "src": "13144:81:0" - }, - { - "attributes": { - "functionReturnParameters": 198 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 211, - "type": "uint96", - "value": "tempUint" - }, - "id": 214, - "name": "Identifier", - "src": "13242:8:0" - } - ], - "id": 215, - "name": "Return", - "src": "13235:15:0" - } - ], - "id": 216, - "name": "Block", - "src": "13037:220:0" - } - ], - "id": 217, - "name": "FunctionDefinition", - "src": "12951:306:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint128", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 244, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 218, - "name": "ElementaryTypeName", - "src": "13282:5:0" - } - ], - "id": 219, - "name": "VariableDeclaration", - "src": "13282:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 244, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 220, - "name": "ElementaryTypeName", - "src": "13303:7:0" - } - ], - "id": 221, - "name": "VariableDeclaration", - "src": "13303:14:0" - } - ], - "id": 222, - "name": "ParameterList", - "src": "13281:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 244, - "stateVariable": false, - "storageLocation": "default", - "type": "uint128", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint128", - "type": "uint128" - }, - "id": 223, - "name": "ElementaryTypeName", - "src": "13342:7:0" - } - ], - "id": 224, - "name": "VariableDeclaration", - "src": "13342:7:0" - } - ], - "id": 225, - "name": "ParameterList", - "src": "13341:9:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 226, - "name": "Identifier", - "src": "13361:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 219, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 227, - "name": "Identifier", - "src": "13369:6:0" - } - ], - "id": 228, - "name": "MemberAccess", - "src": "13369:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 221, - "type": "uint256", - "value": "_start" - }, - "id": 229, - "name": "Identifier", - "src": "13387:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3136", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 16", - "value": "16" - }, - "id": 230, - "name": "Literal", - "src": "13396:2:0" - } - ], - "id": 231, - "name": "BinaryOperation", - "src": "13387:11:0" - } - ], - "id": 232, - "name": "TupleExpression", - "src": "13386:13:0" - } - ], - "id": 233, - "name": "BinaryOperation", - "src": "13369:30:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 234, - "name": "Literal", - "src": "13401:20:0" - } - ], - "id": 235, - "name": "FunctionCall", - "src": "13361:61:0" - } - ], - "id": 236, - "name": "ExpressionStatement", - "src": "13361:61:0" - }, - { - "attributes": { - "assignments": [238], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 243, - "stateVariable": false, - "storageLocation": "default", - "type": "uint128", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint128", - "type": "uint128" - }, - "id": 237, - "name": "ElementaryTypeName", - "src": "13432:7:0" - } - ], - "id": 238, - "name": "VariableDeclaration", - "src": "13432:16:0" - } - ], - "id": 239, - "name": "VariableDeclarationStatement", - "src": "13432:16:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 219, - "isOffset": false, - "isSlot": false, - "src": "13508:6:0", - "valueSize": 1 - }, - { - "declaration": 221, - "isOffset": false, - "isSlot": false, - "src": "13523:6:0", - "valueSize": 1 - }, - { - "declaration": 238, - "isOffset": false, - "isSlot": false, - "src": "13482:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x10), _start))\n}" - }, - "children": [], - "id": 240, - "name": "InlineAssembly", - "src": "13459:82:0" - }, - { - "attributes": { - "functionReturnParameters": 225 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 238, - "type": "uint128", - "value": "tempUint" - }, - "id": 241, - "name": "Identifier", - "src": "13558:8:0" - } - ], - "id": 242, - "name": "Return", - "src": "13551:15:0" - } - ], - "id": 243, - "name": "Block", - "src": "13351:222:0" - } - ], - "id": 244, - "name": "FunctionDefinition", - "src": "13263:310:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toUint256", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 271, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 245, - "name": "ElementaryTypeName", - "src": "13598:5:0" - } - ], - "id": 246, - "name": "VariableDeclaration", - "src": "13598:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 271, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 247, - "name": "ElementaryTypeName", - "src": "13619:7:0" - } - ], - "id": 248, - "name": "VariableDeclaration", - "src": "13619:14:0" - } - ], - "id": 249, - "name": "ParameterList", - "src": "13597:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 271, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 250, - "name": "ElementaryTypeName", - "src": "13658:7:0" - } - ], - "id": 251, - "name": "VariableDeclaration", - "src": "13658:7:0" - } - ], - "id": 252, - "name": "ParameterList", - "src": "13657:9:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 253, - "name": "Identifier", - "src": "13677:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 246, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 254, - "name": "Identifier", - "src": "13685:6:0" - } - ], - "id": 255, - "name": "MemberAccess", - "src": "13685:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 248, - "type": "uint256", - "value": "_start" - }, - "id": 256, - "name": "Identifier", - "src": "13703:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3332", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 32", - "value": "32" - }, - "id": 257, - "name": "Literal", - "src": "13712:2:0" - } - ], - "id": 258, - "name": "BinaryOperation", - "src": "13703:11:0" - } - ], - "id": 259, - "name": "TupleExpression", - "src": "13702:13:0" - } - ], - "id": 260, - "name": "BinaryOperation", - "src": "13685:30:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 261, - "name": "Literal", - "src": "13717:20:0" - } - ], - "id": 262, - "name": "FunctionCall", - "src": "13677:61:0" - } - ], - "id": 263, - "name": "ExpressionStatement", - "src": "13677:61:0" - }, - { - "attributes": { - "assignments": [265], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempUint", - "overrides": null, - "scope": 270, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 264, - "name": "ElementaryTypeName", - "src": "13748:7:0" - } - ], - "id": 265, - "name": "VariableDeclaration", - "src": "13748:16:0" - } - ], - "id": 266, - "name": "VariableDeclarationStatement", - "src": "13748:16:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 246, - "isOffset": false, - "isSlot": false, - "src": "13824:6:0", - "valueSize": 1 - }, - { - "declaration": 248, - "isOffset": false, - "isSlot": false, - "src": "13839:6:0", - "valueSize": 1 - }, - { - "declaration": 265, - "isOffset": false, - "isSlot": false, - "src": "13798:8:0", - "valueSize": 1 - } - ], - "operations": "{\n tempUint := mload(add(add(_bytes, 0x20), _start))\n}" - }, - "children": [], - "id": 267, - "name": "InlineAssembly", - "src": "13775:82:0" - }, - { - "attributes": { - "functionReturnParameters": 252 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 265, - "type": "uint256", - "value": "tempUint" - }, - "id": 268, - "name": "Identifier", - "src": "13874:8:0" - } - ], - "id": 269, - "name": "Return", - "src": "13867:15:0" - } - ], - "id": 270, - "name": "Block", - "src": "13667:222:0" - } - ], - "id": 271, - "name": "FunctionDefinition", - "src": "13579:310:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "toBytes32", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_bytes", - "overrides": null, - "scope": 298, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 272, - "name": "ElementaryTypeName", - "src": "13914:5:0" - } - ], - "id": 273, - "name": "VariableDeclaration", - "src": "13914:19:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_start", - "overrides": null, - "scope": 298, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 274, - "name": "ElementaryTypeName", - "src": "13935:7:0" - } - ], - "id": 275, - "name": "VariableDeclaration", - "src": "13935:14:0" - } - ], - "id": 276, - "name": "ParameterList", - "src": "13913:37:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 298, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 277, - "name": "ElementaryTypeName", - "src": "13974:7:0" - } - ], - "id": 278, - "name": "VariableDeclaration", - "src": "13974:7:0" - } - ], - "id": 279, - "name": "ParameterList", - "src": "13973:9:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5cbab548b65f825a63fb88e65bb91138d4018af1d080a2c8d18624b8080ae1c9", - "typeString": "literal_string \"Read out of bounds\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 280, - "name": "Identifier", - "src": "13993:7:0" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 273, - "type": "bytes memory", - "value": "_bytes" - }, - "id": 281, - "name": "Identifier", - "src": "14001:6:0" - } - ], - "id": 282, - "name": "MemberAccess", - "src": "14001:13:0" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 275, - "type": "uint256", - "value": "_start" - }, - "id": 283, - "name": "Identifier", - "src": "14019:6:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3332", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 32", - "value": "32" - }, - "id": 284, - "name": "Literal", - "src": "14028:2:0" - } - ], - "id": 285, - "name": "BinaryOperation", - "src": "14019:11:0" - } - ], - "id": 286, - "name": "TupleExpression", - "src": "14018:13:0" - } - ], - "id": 287, - "name": "BinaryOperation", - "src": "14001:30:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "52656164206f7574206f6620626f756e6473", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Read out of bounds\"", - "value": "Read out of bounds" - }, - "id": 288, - "name": "Literal", - "src": "14033:20:0" - } - ], - "id": 289, - "name": "FunctionCall", - "src": "13993:61:0" - } - ], - "id": 290, - "name": "ExpressionStatement", - "src": "13993:61:0" - }, - { - "attributes": { - "assignments": [292], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "tempBytes32", - "overrides": null, - "scope": 297, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 291, - "name": "ElementaryTypeName", - "src": "14064:7:0" - } - ], - "id": 292, - "name": "VariableDeclaration", - "src": "14064:19:0" - } - ], - "id": 293, - "name": "VariableDeclarationStatement", - "src": "14064:19:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 273, - "isOffset": false, - "isSlot": false, - "src": "14146:6:0", - "valueSize": 1 - }, - { - "declaration": 275, - "isOffset": false, - "isSlot": false, - "src": "14161:6:0", - "valueSize": 1 - }, - { - "declaration": 292, - "isOffset": false, - "isSlot": false, - "src": "14117:11:0", - "valueSize": 1 - } - ], - "operations": "{\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n}" - }, - "children": [], - "id": 294, - "name": "InlineAssembly", - "src": "14094:85:0" - }, - { - "attributes": { - "functionReturnParameters": 279 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 292, - "type": "bytes32", - "value": "tempBytes32" - }, - "id": 295, - "name": "Identifier", - "src": "14196:11:0" - } - ], - "id": 296, - "name": "Return", - "src": "14189:18:0" - } - ], - "id": 297, - "name": "Block", - "src": "13983:231:0" - } - ], - "id": 298, - "name": "FunctionDefinition", - "src": "13895:319:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "equal", - "overrides": null, - "scope": 333, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_preBytes", - "overrides": null, - "scope": 315, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 299, - "name": "ElementaryTypeName", - "src": "14235:5:0" - } - ], - "id": 300, - "name": "VariableDeclaration", - "src": "14235:22:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_postBytes", - "overrides": null, - "scope": 315, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 301, - "name": "ElementaryTypeName", - "src": "14259:5:0" - } - ], - "id": 302, - "name": "VariableDeclaration", - "src": "14259:23:0" - } - ], - "id": 303, - "name": "ParameterList", - "src": "14234:49:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 315, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 304, - "name": "ElementaryTypeName", - "src": "14307:4:0" - } - ], - "id": 305, - "name": "VariableDeclaration", - "src": "14307:4:0" - } - ], - "id": 306, - "name": "ParameterList", - "src": "14306:6:0" - }, - { - "children": [ - { - "attributes": { - "assignments": [308] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 314, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 307, - "name": "ElementaryTypeName", - "src": "14323:4:0" - } - ], - "id": 308, - "name": "VariableDeclaration", - "src": "14323:12:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 309, - "name": "Literal", - "src": "14338:4:0" - } - ], - "id": 310, - "name": "VariableDeclarationStatement", - "src": "14323:19:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 302, - "isOffset": false, - "isSlot": false, - "src": "14503:10:0", - "valueSize": 1 - }, - { - "declaration": 302, - "isOffset": false, - "isSlot": false, - "src": "14908:10:0", - "valueSize": 1 - }, - { - "declaration": 300, - "isOffset": false, - "isSlot": false, - "src": "14396:9:0", - "valueSize": 1 - }, - { - "declaration": 300, - "isOffset": false, - "isSlot": false, - "src": "14791:9:0", - "valueSize": 1 - }, - { - "declaration": 308, - "isOffset": false, - "isSlot": false, - "src": "15374:7:0", - "valueSize": 1 - }, - { - "declaration": 308, - "isOffset": false, - "isSlot": false, - "src": "15537:7:0", - "valueSize": 1 - } - ], - "operations": "{\n let length := mload(_preBytes)\n switch eq(length, mload(_postBytes))\n case 1 {\n let cb := 1\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n for {\n let cc := add(_postBytes, 0x20)\n }\n eq(add(lt(mc, end), cb), 2)\n {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n }\n {\n if iszero(eq(mload(mc), mload(cc)))\n {\n success := 0\n cb := 0\n }\n }\n }\n default { success := 0 }\n}" - }, - "children": [], - "id": 311, - "name": "InlineAssembly", - "src": "14353:1220:0" - }, - { - "attributes": { - "functionReturnParameters": 306 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 308, - "type": "bool", - "value": "success" - }, - "id": 312, - "name": "Identifier", - "src": "15590:7:0" - } - ], - "id": 313, - "name": "Return", - "src": "15583:14:0" - } - ], - "id": 314, - "name": "Block", - "src": "14313:1291:0" - } - ], - "id": 315, - "name": "FunctionDefinition", - "src": "14220:1384:0" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "equalStorage", - "overrides": null, - "scope": 333, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_preBytes", - "overrides": null, - "scope": 332, - "stateVariable": false, - "storageLocation": "storage", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 316, - "name": "ElementaryTypeName", - "src": "15641:5:0" - } - ], - "id": 317, - "name": "VariableDeclaration", - "src": "15641:23:0" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_postBytes", - "overrides": null, - "scope": 332, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 318, - "name": "ElementaryTypeName", - "src": "15674:5:0" - } - ], - "id": 319, - "name": "VariableDeclaration", - "src": "15674:23:0" - } - ], - "id": 320, - "name": "ParameterList", - "src": "15631:72:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 332, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 321, - "name": "ElementaryTypeName", - "src": "15739:4:0" - } - ], - "id": 322, - "name": "VariableDeclaration", - "src": "15739:4:0" - } - ], - "id": 323, - "name": "ParameterList", - "src": "15738:6:0" - }, - { - "children": [ - { - "attributes": { - "assignments": [325] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "success", - "overrides": null, - "scope": 331, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 324, - "name": "ElementaryTypeName", - "src": "15759:4:0" - } - ], - "id": 325, - "name": "VariableDeclaration", - "src": "15759:12:0" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 326, - "name": "Literal", - "src": "15774:4:0" - } - ], - "id": 327, - "name": "VariableDeclarationStatement", - "src": "15759:19:0" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "16084:10:0", - "valueSize": 1 - }, - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "16769:10:0", - "valueSize": 1 - }, - { - "declaration": 319, - "isOffset": false, - "isSlot": false, - "src": "17435:10:0", - "valueSize": 1 - }, - { - "declaration": 317, - "isOffset": false, - "isSlot": true, - "src": "15872:14:0", - "valueSize": 1 - }, - { - "declaration": 317, - "isOffset": false, - "isSlot": true, - "src": "17325:14:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "16858:7:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "17946:7:0", - "valueSize": 1 - }, - { - "declaration": 325, - "isOffset": false, - "isSlot": false, - "src": "18173:7:0", - "valueSize": 1 - } - ], - "operations": "{\n let fslot := sload(_preBytes_slot)\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n switch eq(slength, mlength)\n case 1 {\n if iszero(iszero(slength))\n {\n switch lt(slength, 32)\n case 1 {\n fslot := mul(div(fslot, 0x100), 0x100)\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { success := 0 }\n }\n default {\n let cb := 1\n mstore(0x0, _preBytes_slot)\n let sc := keccak256(0x0, 0x20)\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n for { }\n eq(add(lt(mc, end), cb), 2)\n {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n }\n {\n if iszero(eq(sload(sc), mload(mc)))\n {\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default { success := 0 }\n}" - }, - "children": [], - "id": 328, - "name": "InlineAssembly", - "src": "15789:2420:0" - }, - { - "attributes": { - "functionReturnParameters": 323 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 325, - "type": "bool", - "value": "success" - }, - "id": 329, - "name": "Identifier", - "src": "18226:7:0" - } - ], - "id": 330, - "name": "Return", - "src": "18219:14:0" - } - ], - "id": 331, - "name": "Block", - "src": "15749:2491:0" - } - ], - "id": 332, - "name": "FunctionDefinition", - "src": "15610:2630:0" - } - ], - "id": 333, - "name": "ContractDefinition", - "src": "370:17872:0" - } - ], - "id": 334, - "name": "SourceUnit", - "src": "336:17907:0" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.865Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/Context.json b/packages/bridge-sdk/contracts/Context.json deleted file mode 100644 index 40a9d55..0000000 --- a/packages/bridge-sdk/contracts/Context.json +++ /dev/null @@ -1,558 +0,0 @@ -{ - "contractName": "Context", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/utils/Context.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/utils/Context.sol", - "exportedSymbols": { - "Context": [3618] - }, - "id": 3619, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3597, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:9" - }, - { - "abstract": true, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3618, - "linearizedBaseContracts": [3618], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 3605, - "nodeType": "Block", - "src": "668:34:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3602, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "685:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "685:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 3601, - "id": 3604, - "nodeType": "Return", - "src": "678:17:9" - } - ] - }, - "documentation": null, - "id": 3606, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3598, - "nodeType": "ParameterList", - "parameters": [], - "src": "617:2:9" - }, - "returnParameters": { - "id": 3601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3600, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3606, - "src": "651:15:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3599, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "651:15:9", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "650:17:9" - }, - "scope": 3618, - "src": "598:104:9", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 3616, - "nodeType": "Block", - "src": "773:165:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3611, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "783:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$3618", - "typeString": "contract Context" - } - }, - "id": 3612, - "nodeType": "ExpressionStatement", - "src": "783:4:9" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3613, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "923:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "923:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 3610, - "id": 3615, - "nodeType": "Return", - "src": "916:15:9" - } - ] - }, - "documentation": null, - "id": 3617, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3607, - "nodeType": "ParameterList", - "parameters": [], - "src": "725:2:9" - }, - "returnParameters": { - "id": 3610, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3609, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3617, - "src": "759:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3608, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "759:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "758:14:9" - }, - "scope": 3618, - "src": "708:230:9", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3619, - "src": "566:374:9" - } - ], - "src": "33:908:9" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/utils/Context.sol", - "exportedSymbols": { - "Context": [3618] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 3597, - "name": "PragmaDirective", - "src": "33:31:9" - }, - { - "attributes": { - "abstract": true, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [3618], - "name": "Context", - "scope": 3619 - }, - "children": [ - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_msgSender", - "overrides": null, - "scope": 3618, - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3598, - "name": "ParameterList", - "src": "617:2:9" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3606, - "stateVariable": false, - "storageLocation": "default", - "type": "address payable", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "payable", - "type": "address payable" - }, - "id": 3599, - "name": "ElementaryTypeName", - "src": "651:15:9" - } - ], - "id": 3600, - "name": "VariableDeclaration", - "src": "651:15:9" - } - ], - "id": 3601, - "name": "ParameterList", - "src": "650:17:9" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 3601 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 3602, - "name": "Identifier", - "src": "685:3:9" - } - ], - "id": 3603, - "name": "MemberAccess", - "src": "685:10:9" - } - ], - "id": 3604, - "name": "Return", - "src": "678:17:9" - } - ], - "id": 3605, - "name": "Block", - "src": "668:34:9" - } - ], - "id": 3606, - "name": "FunctionDefinition", - "src": "598:104:9" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_msgData", - "overrides": null, - "scope": 3618, - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3607, - "name": "ParameterList", - "src": "725:2:9" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3617, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3608, - "name": "ElementaryTypeName", - "src": "759:5:9" - } - ], - "id": 3609, - "name": "VariableDeclaration", - "src": "759:12:9" - } - ], - "id": 3610, - "name": "ParameterList", - "src": "758:14:9" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Context", - "value": "this" - }, - "id": 3611, - "name": "Identifier", - "src": "783:4:9" - } - ], - "id": 3612, - "name": "ExpressionStatement", - "src": "783:4:9" - }, - { - "attributes": { - "functionReturnParameters": 3610 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "data", - "referencedDeclaration": null, - "type": "bytes calldata" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 3613, - "name": "Identifier", - "src": "923:3:9" - } - ], - "id": 3614, - "name": "MemberAccess", - "src": "923:8:9" - } - ], - "id": 3615, - "name": "Return", - "src": "916:15:9" - } - ], - "id": 3616, - "name": "Block", - "src": "773:165:9" - } - ], - "id": 3617, - "name": "FunctionDefinition", - "src": "708:230:9" - } - ], - "id": 3618, - "name": "ContractDefinition", - "src": "566:374:9" - } - ], - "id": 3619, - "name": "SourceUnit", - "src": "33:908:9" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.929Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/ERC20.json b/packages/bridge-sdk/contracts/ERC20.json deleted file mode 100644 index 28c8a8c..0000000 --- a/packages/bridge-sdk/contracts/ERC20.json +++ /dev/null @@ -1,13788 +0,0 @@ -{ - "contractName": "ERC20", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}, initializes {decimals} with a default value of 18. To select a different value for {decimals}, use {_setupDecimals}. All three of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://991b44ff44e0496e8554a90f4c0512c28faed45104d40430019f3c67ea67740e\",\"dweb:/ipfs/Qmc3nRapVbcctELoZS5qe17zLkFB3bETBfwzCTMF1CSuGE\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200139f3803806200139f833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040525050508160039080519060200190620001cd9291906200020b565b508060049080519060200190620001e69291906200020b565b506012600560006101000a81548160ff021916908360ff1602179055505050620002b1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b6110de80620002c16000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461025857806370a08231146102bc57806395d89b4114610314578063a457c2d714610397578063a9059cbb146103fb578063dd62ed3e1461045f576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b66104d7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610579565b60405180821515815260200191505060405180910390f35b61019d610597565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105a1565b60405180821515815260200191505060405180910390f35b61023f61067a565b604051808260ff16815260200191505060405180910390f35b6102a46004803603604081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610691565b60405180821515815260200191505060405180910390f35b6102fe600480360360208110156102d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610744565b6040518082815260200191505060405180910390f35b61031c61078c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035c578082015181840152602081019050610341565b50505050905090810190601f1680156103895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103e3600480360360408110156103ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061082e565b60405180821515815260200191505060405180910390f35b6104476004803603604081101561041157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108fb565b60405180821515815260200191505060405180910390f35b6104c16004803603604081101561047557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610919565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561056f5780601f106105445761010080835404028352916020019161056f565b820191906000526020600020905b81548152906001019060200180831161055257829003601f168201915b5050505050905090565b600061058d6105866109a0565b84846109a8565b6001905092915050565b6000600254905090565b60006105ae848484610b9f565b61066f846105ba6109a0565b61066a8560405180606001604052806028815260200161101360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106206109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b600190509392505050565b6000600560009054906101000a900460ff16905090565b600061073a61069e6109a0565b8461073585600160006106af6109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6109a8565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108245780601f106107f957610100808354040283529160200191610824565b820191906000526020600020905b81548152906001019060200180831161080757829003601f168201915b5050505050905090565b60006108f161083b6109a0565b846108ec8560405180606001604052806025815260200161108460259139600160006108656109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b6001905092915050565b600061090f6109086109a0565b8484610b9f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806110606024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ab4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610fcb6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061103b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610fa86023913960400191505060405180910390fd5b610cb6838383610fa2565b610d2181604051806060016040528060268152602001610fed602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610db4816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ed2578082015181840152602081019050610eb7565b50505050905090810190601f168015610eff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015610f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bd3f1ebbd37f184285799523b3026426208876513625827f88611ecf03a6e1e864736f6c634300060c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461025857806370a08231146102bc57806395d89b4114610314578063a457c2d714610397578063a9059cbb146103fb578063dd62ed3e1461045f576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b66104d7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610579565b60405180821515815260200191505060405180910390f35b61019d610597565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105a1565b60405180821515815260200191505060405180910390f35b61023f61067a565b604051808260ff16815260200191505060405180910390f35b6102a46004803603604081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610691565b60405180821515815260200191505060405180910390f35b6102fe600480360360208110156102d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610744565b6040518082815260200191505060405180910390f35b61031c61078c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035c578082015181840152602081019050610341565b50505050905090810190601f1680156103895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103e3600480360360408110156103ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061082e565b60405180821515815260200191505060405180910390f35b6104476004803603604081101561041157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108fb565b60405180821515815260200191505060405180910390f35b6104c16004803603604081101561047557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610919565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561056f5780601f106105445761010080835404028352916020019161056f565b820191906000526020600020905b81548152906001019060200180831161055257829003601f168201915b5050505050905090565b600061058d6105866109a0565b84846109a8565b6001905092915050565b6000600254905090565b60006105ae848484610b9f565b61066f846105ba6109a0565b61066a8560405180606001604052806028815260200161101360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106206109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b600190509392505050565b6000600560009054906101000a900460ff16905090565b600061073a61069e6109a0565b8461073585600160006106af6109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6109a8565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108245780601f106107f957610100808354040283529160200191610824565b820191906000526020600020905b81548152906001019060200180831161080757829003601f168201915b5050505050905090565b60006108f161083b6109a0565b846108ec8560405180606001604052806025815260200161108460259139600160006108656109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b6001905092915050565b600061090f6109086109a0565b8484610b9f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806110606024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ab4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610fcb6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061103b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610fa86023913960400191505060405180910390fd5b610cb6838383610fa2565b610d2181604051806060016040528060268152602001610fed602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610db4816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ed2578082015181840152602081019050610eb7565b50505050905090810190601f168015610eff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015610f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bd3f1ebbd37f184285799523b3026426208876513625827f88611ecf03a6e1e864736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1321:9474:5:-:0;;;1958:145;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2040:5;2032;:13;;;;;;;;;;;;:::i;:::-;;2065:7;2055;:17;;;;;;;;;;;;:::i;:::-;;2094:2;2082:9;;:14;;;;;;;;;;;;;;;;;;1958:145;;1321:9474;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "1321:9474:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2168:89;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4244:166;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3235:106;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4877:317;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3086:89;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;5589:215;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3399:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2370:93;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6291:266;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3727:172;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3957:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2168:89;2213:13;2245:5;2238:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2168:89;:::o;4244:166::-;4327:4;4343:39;4352:12;:10;:12::i;:::-;4366:7;4375:6;4343:8;:39::i;:::-;4399:4;4392:11;;4244:166;;;;:::o;3235:106::-;3296:7;3322:12;;3315:19;;3235:106;:::o;4877:317::-;4983:4;4999:36;5009:6;5017:9;5028:6;4999:9;:36::i;:::-;5045:121;5054:6;5062:12;:10;:12::i;:::-;5076:89;5114:6;5076:89;;;;;;;;;;;;;;;;;:11;:19;5088:6;5076:19;;;;;;;;;;;;;;;:33;5096:12;:10;:12::i;:::-;5076:33;;;;;;;;;;;;;;;;:37;;:89;;;;;:::i;:::-;5045:8;:121::i;:::-;5183:4;5176:11;;4877:317;;;;;:::o;3086:89::-;3135:5;3159:9;;;;;;;;;;;3152:16;;3086:89;:::o;5589:215::-;5677:4;5693:83;5702:12;:10;:12::i;:::-;5716:7;5725:50;5764:10;5725:11;:25;5737:12;:10;:12::i;:::-;5725:25;;;;;;;;;;;;;;;:34;5751:7;5725:34;;;;;;;;;;;;;;;;:38;;:50;;;;:::i;:::-;5693:8;:83::i;:::-;5793:4;5786:11;;5589:215;;;;:::o;3399:125::-;3473:7;3499:9;:18;3509:7;3499:18;;;;;;;;;;;;;;;;3492:25;;3399:125;;;:::o;2370:93::-;2417:13;2449:7;2442:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2370:93;:::o;6291:266::-;6384:4;6400:129;6409:12;:10;:12::i;:::-;6423:7;6432:96;6471:15;6432:96;;;;;;;;;;;;;;;;;:11;:25;6444:12;:10;:12::i;:::-;6432:25;;;;;;;;;;;;;;;:34;6458:7;6432:34;;;;;;;;;;;;;;;;:38;;:96;;;;;:::i;:::-;6400:8;:129::i;:::-;6546:4;6539:11;;6291:266;;;;:::o;3727:172::-;3813:4;3829:42;3839:12;:10;:12::i;:::-;3853:9;3864:6;3829:9;:42::i;:::-;3888:4;3881:11;;3727:172;;;;:::o;3957:149::-;4046:7;4072:11;:18;4084:5;4072:18;;;;;;;;;;;;;;;:27;4091:7;4072:27;;;;;;;;;;;;;;;;4065:34;;3957:149;;;;:::o;598:104:9:-;651:15;685:10;678:17;;598:104;:::o;9355:340:5:-;9473:1;9456:19;;:5;:19;;;;9448:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9553:1;9534:21;;:7;:21;;;;9526:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9635:6;9605:11;:18;9617:5;9605:18;;;;;;;;;;;;;;;:27;9624:7;9605:27;;;;;;;;;;;;;;;:36;;;;9672:7;9656:32;;9665:5;9656:32;;;9681:6;9656:32;;;;;;;;;;;;;;;;;;9355:340;;;:::o;7031:530::-;7154:1;7136:20;;:6;:20;;;;7128:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7237:1;7216:23;;:9;:23;;;;7208:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7290:47;7311:6;7319:9;7330:6;7290:20;:47::i;:::-;7368:71;7390:6;7368:71;;;;;;;;;;;;;;;;;:9;:17;7378:6;7368:17;;;;;;;;;;;;;;;;:21;;:71;;;;;:::i;:::-;7348:9;:17;7358:6;7348:17;;;;;;;;;;;;;;;:91;;;;7472:32;7497:6;7472:9;:20;7482:9;7472:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;7449:9;:20;7459:9;7449:20;;;;;;;;;;;;;;;:55;;;;7536:9;7519:35;;7528:6;7519:35;;;7547:6;7519:35;;;;;;;;;;;;;;;;;;7031:530;;;:::o;5432:163:4:-;5518:7;5550:1;5545;:6;;5553:12;5537:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5587:1;5583;:5;5576:12;;5432:163;;;;;:::o;2690:175::-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o;10701:92:5:-;;;;:::o", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name_, string memory symbol_) public {\n _name = name_;\n _symbol = symbol_;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n", - "sourcePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "exportedSymbols": { - "ERC20": [3008] - }, - "id": 3009, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2507, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:5" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/Context.sol", - "file": "../../utils/Context.sol", - "id": 2508, - "nodeType": "ImportDirective", - "scope": 3009, - "sourceUnit": 3619, - "src": "66:33:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "./IERC20.sol", - "id": 2509, - "nodeType": "ImportDirective", - "scope": 3009, - "sourceUnit": 3087, - "src": "100:22:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "id": 2510, - "nodeType": "ImportDirective", - "scope": 3009, - "sourceUnit": 2506, - "src": "123:33:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2512, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3618, - "src": "1339:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$3618", - "typeString": "contract Context" - } - }, - "id": 2513, - "nodeType": "InheritanceSpecifier", - "src": "1339:7:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2514, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "1348:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 2515, - "nodeType": "InheritanceSpecifier", - "src": "1348:6:5" - } - ], - "contractDependencies": [3086, 3618], - "contractKind": "contract", - "documentation": { - "id": 2511, - "nodeType": "StructuredDocumentation", - "src": "158:1162:5", - "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n For a generic mechanism see {ERC20PresetMinterPauser}.\n TIP: For a detailed writeup see our guide\n https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n We have followed general OpenZeppelin guidelines: functions revert instead\n of returning `false` on failure. This behavior is nonetheless conventional\n and does not conflict with the expectations of ERC20 applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification.\n Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n functions have been added to mitigate the well-known issues around setting\n allowances. See {IERC20-approve}." - }, - "fullyImplemented": true, - "id": 3008, - "linearizedBaseContracts": [3008, 3086, 3618], - "name": "ERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2518, - "libraryName": { - "contractScope": null, - "id": 2516, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2505, - "src": "1367:8:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2505", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1361:27:5", - "typeName": { - "id": 2517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1380:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 2522, - "mutability": "mutable", - "name": "_balances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1394:46:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2521, - "keyType": { - "id": 2519, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1403:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1394:28:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2520, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1414:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2528, - "mutability": "mutable", - "name": "_allowances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1447:69:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 2527, - "keyType": { - "id": 2523, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1456:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1447:49:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 2526, - "keyType": { - "id": 2524, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1476:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1467:28:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2525, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1487:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2530, - "mutability": "mutable", - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1523:28:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2529, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1523:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2532, - "mutability": "mutable", - "name": "_name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1558:20:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2531, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1558:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2534, - "mutability": "mutable", - "name": "_symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1584:22:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2533, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1584:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2536, - "mutability": "mutable", - "name": "_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3008, - "src": "1612:23:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2535, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1612:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 2556, - "nodeType": "Block", - "src": "2022:81:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2544, - "name": "_name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2532, - "src": "2032:5:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2545, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2539, - "src": "2040:5:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "2032:13:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 2547, - "nodeType": "ExpressionStatement", - "src": "2032:13:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2548, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2534, - "src": "2055:7:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2549, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2541, - "src": "2065:7:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "2055:17:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 2551, - "nodeType": "ExpressionStatement", - "src": "2055:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2552, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2536, - "src": "2082:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3138", - "id": 2553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2094:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "2082:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 2555, - "nodeType": "ExpressionStatement", - "src": "2082:14:5" - } - ] - }, - "documentation": { - "id": 2537, - "nodeType": "StructuredDocumentation", - "src": "1642:311:5", - "text": " @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n a default value of 18.\n To select a different value for {decimals}, use {_setupDecimals}.\n All three of these values are immutable: they can only be set once during\n construction." - }, - "id": 2557, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2539, - "mutability": "mutable", - "name": "name_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2557, - "src": "1971:19:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2538, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1971:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2541, - "mutability": "mutable", - "name": "symbol_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2557, - "src": "1992:21:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2540, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1992:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1970:44:5" - }, - "returnParameters": { - "id": 2543, - "nodeType": "ParameterList", - "parameters": [], - "src": "2022:0:5" - }, - "scope": 3008, - "src": "1958:145:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2565, - "nodeType": "Block", - "src": "2228:29:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2563, - "name": "_name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2532, - "src": "2245:5:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 2562, - "id": 2564, - "nodeType": "Return", - "src": "2238:12:5" - } - ] - }, - "documentation": { - "id": 2558, - "nodeType": "StructuredDocumentation", - "src": "2109:54:5", - "text": " @dev Returns the name of the token." - }, - "functionSelector": "06fdde03", - "id": 2566, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "name", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2559, - "nodeType": "ParameterList", - "parameters": [], - "src": "2181:2:5" - }, - "returnParameters": { - "id": 2562, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2561, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2566, - "src": "2213:13:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2560, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2213:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2212:15:5" - }, - "scope": 3008, - "src": "2168:89:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 2574, - "nodeType": "Block", - "src": "2432:31:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2572, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2534, - "src": "2449:7:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 2571, - "id": 2573, - "nodeType": "Return", - "src": "2442:14:5" - } - ] - }, - "documentation": { - "id": 2567, - "nodeType": "StructuredDocumentation", - "src": "2263:102:5", - "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." - }, - "functionSelector": "95d89b41", - "id": 2575, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "symbol", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2568, - "nodeType": "ParameterList", - "parameters": [], - "src": "2385:2:5" - }, - "returnParameters": { - "id": 2571, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2570, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2575, - "src": "2417:13:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2569, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2417:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2416:15:5" - }, - "scope": 3008, - "src": "2370:93:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 2583, - "nodeType": "Block", - "src": "3142:33:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2581, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2536, - "src": "3159:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "functionReturnParameters": 2580, - "id": 2582, - "nodeType": "Return", - "src": "3152:16:5" - } - ] - }, - "documentation": { - "id": 2576, - "nodeType": "StructuredDocumentation", - "src": "2469:612:5", - "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." - }, - "functionSelector": "313ce567", - "id": 2584, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decimals", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2577, - "nodeType": "ParameterList", - "parameters": [], - "src": "3103:2:5" - }, - "returnParameters": { - "id": 2580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2579, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2584, - "src": "3135:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2578, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "3135:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3134:7:5" - }, - "scope": 3008, - "src": "3086:89:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3017], - "body": { - "id": 2593, - "nodeType": "Block", - "src": "3305:36:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2591, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "3322:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2590, - "id": 2592, - "nodeType": "Return", - "src": "3315:19:5" - } - ] - }, - "documentation": { - "id": 2585, - "nodeType": "StructuredDocumentation", - "src": "3181:49:5", - "text": " @dev See {IERC20-totalSupply}." - }, - "functionSelector": "18160ddd", - "id": 2594, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2587, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3278:8:5" - }, - "parameters": { - "id": 2586, - "nodeType": "ParameterList", - "parameters": [], - "src": "3255:2:5" - }, - "returnParameters": { - "id": 2590, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2589, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2594, - "src": "3296:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2588, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3296:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3295:9:5" - }, - "scope": 3008, - "src": "3235:106:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3025], - "body": { - "id": 2607, - "nodeType": "Block", - "src": "3482:42:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2603, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "3499:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2605, - "indexExpression": { - "argumentTypes": null, - "id": 2604, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2597, - "src": "3509:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3499:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2602, - "id": 2606, - "nodeType": "Return", - "src": "3492:25:5" - } - ] - }, - "documentation": { - "id": 2595, - "nodeType": "StructuredDocumentation", - "src": "3347:47:5", - "text": " @dev See {IERC20-balanceOf}." - }, - "functionSelector": "70a08231", - "id": 2608, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2599, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3455:8:5" - }, - "parameters": { - "id": 2598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2597, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2608, - "src": "3418:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2596, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3418:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3417:17:5" - }, - "returnParameters": { - "id": 2602, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2601, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2608, - "src": "3473:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2600, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3473:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3472:9:5" - }, - "scope": 3008, - "src": "3399:125:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3035], - "body": { - "id": 2628, - "nodeType": "Block", - "src": "3819:80:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2620, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "3839:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3839:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2622, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2611, - "src": "3853:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2623, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "3864:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2619, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2829, - "src": "3829:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3829:42:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2625, - "nodeType": "ExpressionStatement", - "src": "3829:42:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3888:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2618, - "id": 2627, - "nodeType": "Return", - "src": "3881:11:5" - } - ] - }, - "documentation": { - "id": 2609, - "nodeType": "StructuredDocumentation", - "src": "3530:192:5", - "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`." - }, - "functionSelector": "a9059cbb", - "id": 2629, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2615, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3795:8:5" - }, - "parameters": { - "id": 2614, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2611, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2629, - "src": "3745:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3745:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2613, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2629, - "src": "3764:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2612, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3764:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3744:35:5" - }, - "returnParameters": { - "id": 2618, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2617, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2629, - "src": "3813:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2616, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3813:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3812:6:5" - }, - "scope": 3008, - "src": "3727:172:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3045], - "body": { - "id": 2646, - "nodeType": "Block", - "src": "4055:51:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2640, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2528, - "src": "4072:11:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2642, - "indexExpression": { - "argumentTypes": null, - "id": 2641, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2632, - "src": "4084:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4072:18:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2644, - "indexExpression": { - "argumentTypes": null, - "id": 2643, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2634, - "src": "4091:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4072:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2639, - "id": 2645, - "nodeType": "Return", - "src": "4065:34:5" - } - ] - }, - "documentation": { - "id": 2630, - "nodeType": "StructuredDocumentation", - "src": "3905:47:5", - "text": " @dev See {IERC20-allowance}." - }, - "functionSelector": "dd62ed3e", - "id": 2647, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2636, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4028:8:5" - }, - "parameters": { - "id": 2635, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2632, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2647, - "src": "3976:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3976:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2634, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2647, - "src": "3991:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2633, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3991:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3975:32:5" - }, - "returnParameters": { - "id": 2639, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2638, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2647, - "src": "4046:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2637, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4046:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4045:9:5" - }, - "scope": 3008, - "src": "3957:149:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3055], - "body": { - "id": 2667, - "nodeType": "Block", - "src": "4333:77:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2659, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "4352:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4352:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2661, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2650, - "src": "4366:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2662, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2652, - "src": "4375:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2658, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2985, - "src": "4343:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4343:39:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2664, - "nodeType": "ExpressionStatement", - "src": "4343:39:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4399:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2657, - "id": 2666, - "nodeType": "Return", - "src": "4392:11:5" - } - ] - }, - "documentation": { - "id": 2648, - "nodeType": "StructuredDocumentation", - "src": "4112:127:5", - "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address." - }, - "functionSelector": "095ea7b3", - "id": 2668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2654, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4309:8:5" - }, - "parameters": { - "id": 2653, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2650, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2668, - "src": "4261:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2649, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4261:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2652, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2668, - "src": "4278:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2651, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4278:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4260:33:5" - }, - "returnParameters": { - "id": 2657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2656, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2668, - "src": "4327:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2655, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4327:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4326:6:5" - }, - "scope": 3008, - "src": "4244:166:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [3067], - "body": { - "id": 2705, - "nodeType": "Block", - "src": "4989:205:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2682, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "5009:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2683, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "5017:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2684, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "5028:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2681, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2829, - "src": "4999:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4999:36:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2686, - "nodeType": "ExpressionStatement", - "src": "4999:36:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2688, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "5054:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2689, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5062:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5062:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2698, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "5114:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", - "id": 2699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5122:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - }, - "value": "ERC20: transfer amount exceeds allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2691, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2528, - "src": "5076:11:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2693, - "indexExpression": { - "argumentTypes": null, - "id": 2692, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "5088:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5076:19:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2696, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2694, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5096:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5096:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5076:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "5076:37:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5076:89:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2687, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2985, - "src": "5045:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5045:121:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2702, - "nodeType": "ExpressionStatement", - "src": "5045:121:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5183:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2680, - "id": 2704, - "nodeType": "Return", - "src": "5176:11:5" - } - ] - }, - "documentation": { - "id": 2669, - "nodeType": "StructuredDocumentation", - "src": "4416:456:5", - "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20}.\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`." - }, - "functionSelector": "23b872dd", - "id": 2706, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2677, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4965:8:5" - }, - "parameters": { - "id": 2676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2671, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2706, - "src": "4899:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2670, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4899:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2673, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2706, - "src": "4915:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4915:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2675, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2706, - "src": "4934:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4934:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4898:51:5" - }, - "returnParameters": { - "id": 2680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2679, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2706, - "src": "4983:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2678, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4983:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4982:6:5" - }, - "scope": 3008, - "src": "4877:317:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 2733, - "nodeType": "Block", - "src": "5683:121:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2717, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5702:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5702:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2719, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2709, - "src": "5716:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2727, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2711, - "src": "5764:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2720, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2528, - "src": "5725:11:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2723, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2721, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5737:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5737:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5725:25:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2725, - "indexExpression": { - "argumentTypes": null, - "id": 2724, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2709, - "src": "5751:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5725:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "5725:38:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5725:50:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2716, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2985, - "src": "5693:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5693:83:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2730, - "nodeType": "ExpressionStatement", - "src": "5693:83:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5793:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2715, - "id": 2732, - "nodeType": "Return", - "src": "5786:11:5" - } - ] - }, - "documentation": { - "id": 2707, - "nodeType": "StructuredDocumentation", - "src": "5200:384:5", - "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address." - }, - "functionSelector": "39509351", - "id": 2734, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2709, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2734, - "src": "5616:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2708, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5616:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2711, - "mutability": "mutable", - "name": "addedValue", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2734, - "src": "5633:18:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5633:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5615:37:5" - }, - "returnParameters": { - "id": 2715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2714, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2734, - "src": "5677:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2713, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5677:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5676:6:5" - }, - "scope": 3008, - "src": "5589:215:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 2762, - "nodeType": "Block", - "src": "6390:167:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2745, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6409:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6409:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2747, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2737, - "src": "6423:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2755, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2739, - "src": "6471:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 2756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6488:39:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - }, - "value": "ERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2748, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2528, - "src": "6432:11:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2751, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2749, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6444:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6444:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6432:25:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2753, - "indexExpression": { - "argumentTypes": null, - "id": 2752, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2737, - "src": "6458:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6432:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "6432:38:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6432:96:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2744, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2985, - "src": "6400:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6400:129:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2759, - "nodeType": "ExpressionStatement", - "src": "6400:129:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6546:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2743, - "id": 2761, - "nodeType": "Return", - "src": "6539:11:5" - } - ] - }, - "documentation": { - "id": 2735, - "nodeType": "StructuredDocumentation", - "src": "5810:476:5", - "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`." - }, - "functionSelector": "a457c2d7", - "id": 2763, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2740, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2737, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2763, - "src": "6318:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6318:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2739, - "mutability": "mutable", - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2763, - "src": "6335:23:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2738, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6335:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6317:42:5" - }, - "returnParameters": { - "id": 2743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2742, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2763, - "src": "6384:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2741, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6384:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6383:6:5" - }, - "scope": 3008, - "src": "6291:266:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 2828, - "nodeType": "Block", - "src": "7118:443:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2774, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "7136:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7154:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2776, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7146:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7146:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7146:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7136:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", - "id": 2780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7158:39:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - }, - "value": "ERC20: transfer from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - } - ], - "id": 2773, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7128:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:70:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2782, - "nodeType": "ExpressionStatement", - "src": "7128:70:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2784, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "7216:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2787, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7237:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2786, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7229:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7229:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2788, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7229:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7216:23:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", - "id": 2790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7241:37:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - }, - "value": "ERC20: transfer to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - } - ], - "id": 2783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7208:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7208:71:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2792, - "nodeType": "ExpressionStatement", - "src": "7208:71:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2794, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "7311:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2795, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "7319:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2796, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "7330:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2793, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "7290:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7290:47:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2798, - "nodeType": "ExpressionStatement", - "src": "7290:47:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2799, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "7348:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2801, - "indexExpression": { - "argumentTypes": null, - "id": 2800, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "7358:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7348:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2806, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "7390:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", - "id": 2807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7398:40:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - }, - "value": "ERC20: transfer amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2802, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "7368:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2804, - "indexExpression": { - "argumentTypes": null, - "id": 2803, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "7378:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7368:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "7368:21:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7368:71:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7348:91:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2810, - "nodeType": "ExpressionStatement", - "src": "7348:91:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2811, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "7449:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2813, - "indexExpression": { - "argumentTypes": null, - "id": 2812, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "7459:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7449:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2818, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "7497:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2814, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "7472:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2816, - "indexExpression": { - "argumentTypes": null, - "id": 2815, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "7482:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7472:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "7472:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7472:32:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7449:55:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2821, - "nodeType": "ExpressionStatement", - "src": "7449:55:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2823, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2766, - "src": "7528:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2824, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2768, - "src": "7536:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2825, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2770, - "src": "7547:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2822, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "7519:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7519:35:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2827, - "nodeType": "EmitStatement", - "src": "7514:40:5" - } - ] - }, - "documentation": { - "id": 2764, - "nodeType": "StructuredDocumentation", - "src": "6563:463:5", - "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`." - }, - "id": 2829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2766, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2829, - "src": "7050:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2765, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7050:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2768, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2829, - "src": "7066:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2767, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7066:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2770, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2829, - "src": "7085:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2769, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7085:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7049:51:5" - }, - "returnParameters": { - "id": 2772, - "nodeType": "ParameterList", - "parameters": [], - "src": "7118:0:5" - }, - "scope": 3008, - "src": "7031:530:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 2883, - "nodeType": "Block", - "src": "7897:305:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2838, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "7915:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7934:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2840, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7926:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7926:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7926:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7915:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", - "id": 2844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7938:33:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - }, - "value": "ERC20: mint to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - } - ], - "id": 2837, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7907:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7907:65:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2846, - "nodeType": "ExpressionStatement", - "src": "7907:65:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8012:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8004:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8004:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8004:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2852, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8016:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2853, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8025:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2847, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "7983:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7983:49:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2855, - "nodeType": "ExpressionStatement", - "src": "7983:49:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2856, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "8043:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2859, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8075:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2857, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "8058:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "8058:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8058:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8043:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2862, - "nodeType": "ExpressionStatement", - "src": "8043:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2863, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "8092:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2865, - "indexExpression": { - "argumentTypes": null, - "id": 2864, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8102:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8092:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2870, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8136:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2866, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "8113:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2868, - "indexExpression": { - "argumentTypes": null, - "id": 2867, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8123:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8113:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "8113:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8113:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8092:51:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2873, - "nodeType": "ExpressionStatement", - "src": "8092:51:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8175:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8167:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8167:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8167:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2879, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8179:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2880, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8188:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2874, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "8158:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8158:37:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2882, - "nodeType": "EmitStatement", - "src": "8153:42:5" - } - ] - }, - "documentation": { - "id": 2830, - "nodeType": "StructuredDocumentation", - "src": "7567:260:5", - "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements:\n - `to` cannot be the zero address." - }, - "id": 2884, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2835, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2832, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2884, - "src": "7847:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2831, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7847:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2834, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2884, - "src": "7864:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2833, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7864:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7846:33:5" - }, - "returnParameters": { - "id": 2836, - "nodeType": "ParameterList", - "parameters": [], - "src": "7897:0:5" - }, - "scope": 3008, - "src": "7832:370:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 2939, - "nodeType": "Block", - "src": "8587:345:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2893, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2887, - "src": "8605:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8624:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2895, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8616:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8616:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8616:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8605:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8628:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - }, - "value": "ERC20: burn from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - } - ], - "id": 2892, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "8597:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8597:67:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2901, - "nodeType": "ExpressionStatement", - "src": "8597:67:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2903, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2887, - "src": "8696:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8713:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8705:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2904, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8705:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8705:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2908, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2889, - "src": "8717:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2902, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "8675:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8675:49:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2910, - "nodeType": "ExpressionStatement", - "src": "8675:49:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2911, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "8735:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2913, - "indexExpression": { - "argumentTypes": null, - "id": 2912, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2887, - "src": "8745:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8735:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2918, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2889, - "src": "8779:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", - "id": 2919, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8787:36:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - }, - "value": "ERC20: burn amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2914, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2522, - "src": "8756:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2916, - "indexExpression": { - "argumentTypes": null, - "id": 2915, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2887, - "src": "8766:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8756:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "8756:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8756:68:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8735:89:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2922, - "nodeType": "ExpressionStatement", - "src": "8735:89:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2923, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "8834:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2926, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2889, - "src": "8866:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2924, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "8849:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2354, - "src": "8849:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8849:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8834:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2929, - "nodeType": "ExpressionStatement", - "src": "8834:39:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2931, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2887, - "src": "8897:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8914:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8906:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2932, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8906:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8906:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2936, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2889, - "src": "8918:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2930, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "8888:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8888:37:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2938, - "nodeType": "EmitStatement", - "src": "8883:42:5" - } - ] - }, - "documentation": { - "id": 2885, - "nodeType": "StructuredDocumentation", - "src": "8208:309:5", - "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements:\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens." - }, - "id": 2940, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2887, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2940, - "src": "8537:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2886, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8537:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2889, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2940, - "src": "8554:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2888, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8554:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8536:33:5" - }, - "returnParameters": { - "id": 2891, - "nodeType": "ParameterList", - "parameters": [], - "src": "8587:0:5" - }, - "scope": 3008, - "src": "8522:410:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 2984, - "nodeType": "Block", - "src": "9438:257:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2951, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "9456:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9473:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9465:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2952, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9465:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9465:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9456:19:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", - "id": 2957, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9477:38:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - }, - "value": "ERC20: approve from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - } - ], - "id": 2950, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9448:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9448:68:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2959, - "nodeType": "ExpressionStatement", - "src": "9448:68:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2961, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "9534:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9553:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9545:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2962, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9545:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9545:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9534:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", - "id": 2967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9557:36:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - }, - "value": "ERC20: approve to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - } - ], - "id": 2960, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9526:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9526:68:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2969, - "nodeType": "ExpressionStatement", - "src": "9526:68:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2970, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2528, - "src": "9605:11:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2973, - "indexExpression": { - "argumentTypes": null, - "id": 2971, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "9617:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9605:18:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2974, - "indexExpression": { - "argumentTypes": null, - "id": 2972, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "9624:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9605:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2975, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "9635:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9605:36:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2977, - "nodeType": "ExpressionStatement", - "src": "9605:36:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2979, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "9665:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2980, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "9672:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2981, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "9681:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2978, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3085, - "src": "9656:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9656:32:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2983, - "nodeType": "EmitStatement", - "src": "9651:37:5" - } - ] - }, - "documentation": { - "id": 2941, - "nodeType": "StructuredDocumentation", - "src": "8938:412:5", - "text": " @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n This internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address." - }, - "id": 2985, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_approve", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2943, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2985, - "src": "9373:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2942, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9373:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2945, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2985, - "src": "9388:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2944, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9388:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2947, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2985, - "src": "9405:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2946, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9405:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9372:48:5" - }, - "returnParameters": { - "id": 2949, - "nodeType": "ParameterList", - "parameters": [], - "src": "9438:0:5" - }, - "scope": 3008, - "src": "9355:340:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 2995, - "nodeType": "Block", - "src": "10076:38:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2991, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2536, - "src": "10086:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2992, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2988, - "src": "10098:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "10086:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 2994, - "nodeType": "ExpressionStatement", - "src": "10086:21:5" - } - ] - }, - "documentation": { - "id": 2986, - "nodeType": "StructuredDocumentation", - "src": "9701:312:5", - "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does." - }, - "id": 2996, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setupDecimals", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2988, - "mutability": "mutable", - "name": "decimals_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2996, - "src": "10042:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2987, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10042:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10041:17:5" - }, - "returnParameters": { - "id": 2990, - "nodeType": "ParameterList", - "parameters": [], - "src": "10076:0:5" - }, - "scope": 3008, - "src": "10018:96:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 3006, - "nodeType": "Block", - "src": "10790:3:5", - "statements": [] - }, - "documentation": { - "id": 2997, - "nodeType": "StructuredDocumentation", - "src": "10120:576:5", - "text": " @dev Hook that is called before any transfer of tokens. This includes\n minting and burning.\n Calling conditions:\n - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n will be to transferred to `to`.\n - when `from` is zero, `amount` tokens will be minted for `to`.\n - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n - `from` and `to` are never both zero.\n To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]." - }, - "id": 3007, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3004, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2999, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "10731:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10731:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3001, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "10745:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3000, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10745:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3003, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "10757:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3002, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10757:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10730:42:5" - }, - "returnParameters": { - "id": 3005, - "nodeType": "ParameterList", - "parameters": [], - "src": "10790:0:5" - }, - "scope": 3008, - "src": "10701:92:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3009, - "src": "1321:9474:5" - } - ], - "src": "33:10763:5" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "exportedSymbols": { - "ERC20": [3008] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 2507, - "name": "PragmaDirective", - "src": "33:31:5" - }, - { - "attributes": { - "SourceUnit": 3619, - "absolutePath": "@openzeppelin/contracts/utils/Context.sol", - "file": "../../utils/Context.sol", - "scope": 3009, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 2508, - "name": "ImportDirective", - "src": "66:33:5" - }, - { - "attributes": { - "SourceUnit": 3087, - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "./IERC20.sol", - "scope": 3009, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 2509, - "name": "ImportDirective", - "src": "100:22:5" - }, - { - "attributes": { - "SourceUnit": 2506, - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "scope": 3009, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 2510, - "name": "ImportDirective", - "src": "123:33:5" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3086, 3618], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [3008, 3086, 3618], - "name": "ERC20", - "scope": 3009 - }, - "children": [ - { - "attributes": { - "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n For a generic mechanism see {ERC20PresetMinterPauser}.\n TIP: For a detailed writeup see our guide\n https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n We have followed general OpenZeppelin guidelines: functions revert instead\n of returning `false` on failure. This behavior is nonetheless conventional\n and does not conflict with the expectations of ERC20 applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification.\n Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n functions have been added to mitigate the well-known issues around setting\n allowances. See {IERC20-approve}." - }, - "id": 2511, - "name": "StructuredDocumentation", - "src": "158:1162:5" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Context", - "referencedDeclaration": 3618, - "type": "contract Context" - }, - "id": 2512, - "name": "UserDefinedTypeName", - "src": "1339:7:5" - } - ], - "id": 2513, - "name": "InheritanceSpecifier", - "src": "1339:7:5" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 2514, - "name": "UserDefinedTypeName", - "src": "1348:6:5" - } - ], - "id": 2515, - "name": "InheritanceSpecifier", - "src": "1348:6:5" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeMath", - "referencedDeclaration": 2505, - "type": "library SafeMath" - }, - "id": 2516, - "name": "UserDefinedTypeName", - "src": "1367:8:5" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2517, - "name": "ElementaryTypeName", - "src": "1380:7:5" - } - ], - "id": 2518, - "name": "UsingForDirective", - "src": "1361:27:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_balances", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => uint256)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 2519, - "name": "ElementaryTypeName", - "src": "1403:7:5" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2520, - "name": "ElementaryTypeName", - "src": "1414:7:5" - } - ], - "id": 2521, - "name": "Mapping", - "src": "1394:28:5" - } - ], - "id": 2522, - "name": "VariableDeclaration", - "src": "1394:46:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_allowances", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => mapping(address => uint256))", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 2523, - "name": "ElementaryTypeName", - "src": "1456:7:5" - }, - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 2524, - "name": "ElementaryTypeName", - "src": "1476:7:5" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2525, - "name": "ElementaryTypeName", - "src": "1487:7:5" - } - ], - "id": 2526, - "name": "Mapping", - "src": "1467:28:5" - } - ], - "id": 2527, - "name": "Mapping", - "src": "1447:49:5" - } - ], - "id": 2528, - "name": "VariableDeclaration", - "src": "1447:69:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_totalSupply", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2529, - "name": "ElementaryTypeName", - "src": "1523:7:5" - } - ], - "id": 2530, - "name": "VariableDeclaration", - "src": "1523:28:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_name", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "string", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2531, - "name": "ElementaryTypeName", - "src": "1558:6:5" - } - ], - "id": 2532, - "name": "VariableDeclaration", - "src": "1558:20:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_symbol", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "string", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2533, - "name": "ElementaryTypeName", - "src": "1584:6:5" - } - ], - "id": 2534, - "name": "VariableDeclaration", - "src": "1584:22:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_decimals", - "overrides": null, - "scope": 3008, - "stateVariable": true, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 2535, - "name": "ElementaryTypeName", - "src": "1612:5:5" - } - ], - "id": 2536, - "name": "VariableDeclaration", - "src": "1612:23:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": true, - "kind": "constructor", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n a default value of 18.\n To select a different value for {decimals}, use {_setupDecimals}.\n All three of these values are immutable: they can only be set once during\n construction." - }, - "id": 2537, - "name": "StructuredDocumentation", - "src": "1642:311:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "name_", - "overrides": null, - "scope": 2557, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2538, - "name": "ElementaryTypeName", - "src": "1971:6:5" - } - ], - "id": 2539, - "name": "VariableDeclaration", - "src": "1971:19:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "symbol_", - "overrides": null, - "scope": 2557, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2540, - "name": "ElementaryTypeName", - "src": "1992:6:5" - } - ], - "id": 2541, - "name": "VariableDeclaration", - "src": "1992:21:5" - } - ], - "id": 2542, - "name": "ParameterList", - "src": "1970:44:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2543, - "name": "ParameterList", - "src": "2022:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "string storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2532, - "type": "string storage ref", - "value": "_name" - }, - "id": 2544, - "name": "Identifier", - "src": "2032:5:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2539, - "type": "string memory", - "value": "name_" - }, - "id": 2545, - "name": "Identifier", - "src": "2040:5:5" - } - ], - "id": 2546, - "name": "Assignment", - "src": "2032:13:5" - } - ], - "id": 2547, - "name": "ExpressionStatement", - "src": "2032:13:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "string storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2534, - "type": "string storage ref", - "value": "_symbol" - }, - "id": 2548, - "name": "Identifier", - "src": "2055:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2541, - "type": "string memory", - "value": "symbol_" - }, - "id": 2549, - "name": "Identifier", - "src": "2065:7:5" - } - ], - "id": 2550, - "name": "Assignment", - "src": "2055:17:5" - } - ], - "id": 2551, - "name": "ExpressionStatement", - "src": "2055:17:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2536, - "type": "uint8", - "value": "_decimals" - }, - "id": 2552, - "name": "Identifier", - "src": "2082:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3138", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 18", - "value": "18" - }, - "id": 2553, - "name": "Literal", - "src": "2094:2:5" - } - ], - "id": 2554, - "name": "Assignment", - "src": "2082:14:5" - } - ], - "id": 2555, - "name": "ExpressionStatement", - "src": "2082:14:5" - } - ], - "id": 2556, - "name": "Block", - "src": "2022:81:5" - } - ], - "id": 2557, - "name": "FunctionDefinition", - "src": "1958:145:5" - }, - { - "attributes": { - "functionSelector": "06fdde03", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "name", - "overrides": null, - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the name of the token." - }, - "id": 2558, - "name": "StructuredDocumentation", - "src": "2109:54:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2559, - "name": "ParameterList", - "src": "2181:2:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2566, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2560, - "name": "ElementaryTypeName", - "src": "2213:6:5" - } - ], - "id": 2561, - "name": "VariableDeclaration", - "src": "2213:13:5" - } - ], - "id": 2562, - "name": "ParameterList", - "src": "2212:15:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2562 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2532, - "type": "string storage ref", - "value": "_name" - }, - "id": 2563, - "name": "Identifier", - "src": "2245:5:5" - } - ], - "id": 2564, - "name": "Return", - "src": "2238:12:5" - } - ], - "id": 2565, - "name": "Block", - "src": "2228:29:5" - } - ], - "id": 2566, - "name": "FunctionDefinition", - "src": "2168:89:5" - }, - { - "attributes": { - "functionSelector": "95d89b41", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "symbol", - "overrides": null, - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." - }, - "id": 2567, - "name": "StructuredDocumentation", - "src": "2263:102:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2568, - "name": "ParameterList", - "src": "2385:2:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2575, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2569, - "name": "ElementaryTypeName", - "src": "2417:6:5" - } - ], - "id": 2570, - "name": "VariableDeclaration", - "src": "2417:13:5" - } - ], - "id": 2571, - "name": "ParameterList", - "src": "2416:15:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2571 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2534, - "type": "string storage ref", - "value": "_symbol" - }, - "id": 2572, - "name": "Identifier", - "src": "2449:7:5" - } - ], - "id": 2573, - "name": "Return", - "src": "2442:14:5" - } - ], - "id": 2574, - "name": "Block", - "src": "2432:31:5" - } - ], - "id": 2575, - "name": "FunctionDefinition", - "src": "2370:93:5" - }, - { - "attributes": { - "functionSelector": "313ce567", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "decimals", - "overrides": null, - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." - }, - "id": 2576, - "name": "StructuredDocumentation", - "src": "2469:612:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2577, - "name": "ParameterList", - "src": "3103:2:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2584, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 2578, - "name": "ElementaryTypeName", - "src": "3135:5:5" - } - ], - "id": 2579, - "name": "VariableDeclaration", - "src": "3135:5:5" - } - ], - "id": 2580, - "name": "ParameterList", - "src": "3134:7:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2580 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2536, - "type": "uint8", - "value": "_decimals" - }, - "id": 2581, - "name": "Identifier", - "src": "3159:9:5" - } - ], - "id": 2582, - "name": "Return", - "src": "3152:16:5" - } - ], - "id": 2583, - "name": "Block", - "src": "3142:33:5" - } - ], - "id": 2584, - "name": "FunctionDefinition", - "src": "3086:89:5" - }, - { - "attributes": { - "baseFunctions": [3017], - "functionSelector": "18160ddd", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "totalSupply", - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-totalSupply}." - }, - "id": 2585, - "name": "StructuredDocumentation", - "src": "3181:49:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2587, - "name": "OverrideSpecifier", - "src": "3278:8:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2586, - "name": "ParameterList", - "src": "3255:2:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2594, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2588, - "name": "ElementaryTypeName", - "src": "3296:7:5" - } - ], - "id": 2589, - "name": "VariableDeclaration", - "src": "3296:7:5" - } - ], - "id": 2590, - "name": "ParameterList", - "src": "3295:9:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2590 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2530, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2591, - "name": "Identifier", - "src": "3322:12:5" - } - ], - "id": 2592, - "name": "Return", - "src": "3315:19:5" - } - ], - "id": 2593, - "name": "Block", - "src": "3305:36:5" - } - ], - "id": 2594, - "name": "FunctionDefinition", - "src": "3235:106:5" - }, - { - "attributes": { - "baseFunctions": [3025], - "functionSelector": "70a08231", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "balanceOf", - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-balanceOf}." - }, - "id": 2595, - "name": "StructuredDocumentation", - "src": "3347:47:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2599, - "name": "OverrideSpecifier", - "src": "3455:8:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 2608, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2596, - "name": "ElementaryTypeName", - "src": "3418:7:5" - } - ], - "id": 2597, - "name": "VariableDeclaration", - "src": "3418:15:5" - } - ], - "id": 2598, - "name": "ParameterList", - "src": "3417:17:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2608, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2600, - "name": "ElementaryTypeName", - "src": "3473:7:5" - } - ], - "id": 2601, - "name": "VariableDeclaration", - "src": "3473:7:5" - } - ], - "id": 2602, - "name": "ParameterList", - "src": "3472:9:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2602 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2603, - "name": "Identifier", - "src": "3499:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2597, - "type": "address", - "value": "account" - }, - "id": 2604, - "name": "Identifier", - "src": "3509:7:5" - } - ], - "id": 2605, - "name": "IndexAccess", - "src": "3499:18:5" - } - ], - "id": 2606, - "name": "Return", - "src": "3492:25:5" - } - ], - "id": 2607, - "name": "Block", - "src": "3482:42:5" - } - ], - "id": 2608, - "name": "FunctionDefinition", - "src": "3399:125:5" - }, - { - "attributes": { - "baseFunctions": [3035], - "functionSelector": "a9059cbb", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transfer", - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`." - }, - "id": 2609, - "name": "StructuredDocumentation", - "src": "3530:192:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2615, - "name": "OverrideSpecifier", - "src": "3795:8:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 2629, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2610, - "name": "ElementaryTypeName", - "src": "3745:7:5" - } - ], - "id": 2611, - "name": "VariableDeclaration", - "src": "3745:17:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2629, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2612, - "name": "ElementaryTypeName", - "src": "3764:7:5" - } - ], - "id": 2613, - "name": "VariableDeclaration", - "src": "3764:14:5" - } - ], - "id": 2614, - "name": "ParameterList", - "src": "3744:35:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2629, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2616, - "name": "ElementaryTypeName", - "src": "3813:4:5" - } - ], - "id": 2617, - "name": "VariableDeclaration", - "src": "3813:4:5" - } - ], - "id": 2618, - "name": "ParameterList", - "src": "3812:6:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2829, - "type": "function (address,address,uint256)", - "value": "_transfer" - }, - "id": 2619, - "name": "Identifier", - "src": "3829:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2620, - "name": "Identifier", - "src": "3839:10:5" - } - ], - "id": 2621, - "name": "FunctionCall", - "src": "3839:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2611, - "type": "address", - "value": "recipient" - }, - "id": 2622, - "name": "Identifier", - "src": "3853:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2613, - "type": "uint256", - "value": "amount" - }, - "id": 2623, - "name": "Identifier", - "src": "3864:6:5" - } - ], - "id": 2624, - "name": "FunctionCall", - "src": "3829:42:5" - } - ], - "id": 2625, - "name": "ExpressionStatement", - "src": "3829:42:5" - }, - { - "attributes": { - "functionReturnParameters": 2618 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2626, - "name": "Literal", - "src": "3888:4:5" - } - ], - "id": 2627, - "name": "Return", - "src": "3881:11:5" - } - ], - "id": 2628, - "name": "Block", - "src": "3819:80:5" - } - ], - "id": 2629, - "name": "FunctionDefinition", - "src": "3727:172:5" - }, - { - "attributes": { - "baseFunctions": [3045], - "functionSelector": "dd62ed3e", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "allowance", - "scope": 3008, - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-allowance}." - }, - "id": 2630, - "name": "StructuredDocumentation", - "src": "3905:47:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2636, - "name": "OverrideSpecifier", - "src": "4028:8:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 2647, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2631, - "name": "ElementaryTypeName", - "src": "3976:7:5" - } - ], - "id": 2632, - "name": "VariableDeclaration", - "src": "3976:13:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2647, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2633, - "name": "ElementaryTypeName", - "src": "3991:7:5" - } - ], - "id": 2634, - "name": "VariableDeclaration", - "src": "3991:15:5" - } - ], - "id": 2635, - "name": "ParameterList", - "src": "3975:32:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2647, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2637, - "name": "ElementaryTypeName", - "src": "4046:7:5" - } - ], - "id": 2638, - "name": "VariableDeclaration", - "src": "4046:7:5" - } - ], - "id": 2639, - "name": "ParameterList", - "src": "4045:9:5" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 2639 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2528, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2640, - "name": "Identifier", - "src": "4072:11:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2632, - "type": "address", - "value": "owner" - }, - "id": 2641, - "name": "Identifier", - "src": "4084:5:5" - } - ], - "id": 2642, - "name": "IndexAccess", - "src": "4072:18:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2634, - "type": "address", - "value": "spender" - }, - "id": 2643, - "name": "Identifier", - "src": "4091:7:5" - } - ], - "id": 2644, - "name": "IndexAccess", - "src": "4072:27:5" - } - ], - "id": 2645, - "name": "Return", - "src": "4065:34:5" - } - ], - "id": 2646, - "name": "Block", - "src": "4055:51:5" - } - ], - "id": 2647, - "name": "FunctionDefinition", - "src": "3957:149:5" - }, - { - "attributes": { - "baseFunctions": [3055], - "functionSelector": "095ea7b3", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "approve", - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address." - }, - "id": 2648, - "name": "StructuredDocumentation", - "src": "4112:127:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2654, - "name": "OverrideSpecifier", - "src": "4309:8:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2668, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2649, - "name": "ElementaryTypeName", - "src": "4261:7:5" - } - ], - "id": 2650, - "name": "VariableDeclaration", - "src": "4261:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2668, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2651, - "name": "ElementaryTypeName", - "src": "4278:7:5" - } - ], - "id": 2652, - "name": "VariableDeclaration", - "src": "4278:14:5" - } - ], - "id": 2653, - "name": "ParameterList", - "src": "4260:33:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2668, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2655, - "name": "ElementaryTypeName", - "src": "4327:4:5" - } - ], - "id": 2656, - "name": "VariableDeclaration", - "src": "4327:4:5" - } - ], - "id": 2657, - "name": "ParameterList", - "src": "4326:6:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2985, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 2658, - "name": "Identifier", - "src": "4343:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2659, - "name": "Identifier", - "src": "4352:10:5" - } - ], - "id": 2660, - "name": "FunctionCall", - "src": "4352:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2650, - "type": "address", - "value": "spender" - }, - "id": 2661, - "name": "Identifier", - "src": "4366:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2652, - "type": "uint256", - "value": "amount" - }, - "id": 2662, - "name": "Identifier", - "src": "4375:6:5" - } - ], - "id": 2663, - "name": "FunctionCall", - "src": "4343:39:5" - } - ], - "id": 2664, - "name": "ExpressionStatement", - "src": "4343:39:5" - }, - { - "attributes": { - "functionReturnParameters": 2657 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2665, - "name": "Literal", - "src": "4399:4:5" - } - ], - "id": 2666, - "name": "Return", - "src": "4392:11:5" - } - ], - "id": 2667, - "name": "Block", - "src": "4333:77:5" - } - ], - "id": 2668, - "name": "FunctionDefinition", - "src": "4244:166:5" - }, - { - "attributes": { - "baseFunctions": [3067], - "functionSelector": "23b872dd", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transferFrom", - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20}.\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`." - }, - "id": 2669, - "name": "StructuredDocumentation", - "src": "4416:456:5" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 2677, - "name": "OverrideSpecifier", - "src": "4965:8:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 2706, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2670, - "name": "ElementaryTypeName", - "src": "4899:7:5" - } - ], - "id": 2671, - "name": "VariableDeclaration", - "src": "4899:14:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 2706, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2672, - "name": "ElementaryTypeName", - "src": "4915:7:5" - } - ], - "id": 2673, - "name": "VariableDeclaration", - "src": "4915:17:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2706, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2674, - "name": "ElementaryTypeName", - "src": "4934:7:5" - } - ], - "id": 2675, - "name": "VariableDeclaration", - "src": "4934:14:5" - } - ], - "id": 2676, - "name": "ParameterList", - "src": "4898:51:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2706, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2678, - "name": "ElementaryTypeName", - "src": "4983:4:5" - } - ], - "id": 2679, - "name": "VariableDeclaration", - "src": "4983:4:5" - } - ], - "id": 2680, - "name": "ParameterList", - "src": "4982:6:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2829, - "type": "function (address,address,uint256)", - "value": "_transfer" - }, - "id": 2681, - "name": "Identifier", - "src": "4999:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2671, - "type": "address", - "value": "sender" - }, - "id": 2682, - "name": "Identifier", - "src": "5009:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2673, - "type": "address", - "value": "recipient" - }, - "id": 2683, - "name": "Identifier", - "src": "5017:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2675, - "type": "uint256", - "value": "amount" - }, - "id": 2684, - "name": "Identifier", - "src": "5028:6:5" - } - ], - "id": 2685, - "name": "FunctionCall", - "src": "4999:36:5" - } - ], - "id": 2686, - "name": "ExpressionStatement", - "src": "4999:36:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2985, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 2687, - "name": "Identifier", - "src": "5045:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2671, - "type": "address", - "value": "sender" - }, - "id": 2688, - "name": "Identifier", - "src": "5054:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2689, - "name": "Identifier", - "src": "5062:10:5" - } - ], - "id": 2690, - "name": "FunctionCall", - "src": "5062:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2528, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2691, - "name": "Identifier", - "src": "5076:11:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2671, - "type": "address", - "value": "sender" - }, - "id": 2692, - "name": "Identifier", - "src": "5088:6:5" - } - ], - "id": 2693, - "name": "IndexAccess", - "src": "5076:19:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2694, - "name": "Identifier", - "src": "5096:10:5" - } - ], - "id": 2695, - "name": "FunctionCall", - "src": "5096:12:5" - } - ], - "id": 2696, - "name": "IndexAccess", - "src": "5076:33:5" - } - ], - "id": 2697, - "name": "MemberAccess", - "src": "5076:37:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2675, - "type": "uint256", - "value": "amount" - }, - "id": 2698, - "name": "Identifier", - "src": "5114:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer amount exceeds allowance\"", - "value": "ERC20: transfer amount exceeds allowance" - }, - "id": 2699, - "name": "Literal", - "src": "5122:42:5" - } - ], - "id": 2700, - "name": "FunctionCall", - "src": "5076:89:5" - } - ], - "id": 2701, - "name": "FunctionCall", - "src": "5045:121:5" - } - ], - "id": 2702, - "name": "ExpressionStatement", - "src": "5045:121:5" - }, - { - "attributes": { - "functionReturnParameters": 2680 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2703, - "name": "Literal", - "src": "5183:4:5" - } - ], - "id": 2704, - "name": "Return", - "src": "5176:11:5" - } - ], - "id": 2705, - "name": "Block", - "src": "4989:205:5" - } - ], - "id": 2706, - "name": "FunctionDefinition", - "src": "4877:317:5" - }, - { - "attributes": { - "functionSelector": "39509351", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "increaseAllowance", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address." - }, - "id": 2707, - "name": "StructuredDocumentation", - "src": "5200:384:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2734, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2708, - "name": "ElementaryTypeName", - "src": "5616:7:5" - } - ], - "id": 2709, - "name": "VariableDeclaration", - "src": "5616:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "addedValue", - "overrides": null, - "scope": 2734, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2710, - "name": "ElementaryTypeName", - "src": "5633:7:5" - } - ], - "id": 2711, - "name": "VariableDeclaration", - "src": "5633:18:5" - } - ], - "id": 2712, - "name": "ParameterList", - "src": "5615:37:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2734, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2713, - "name": "ElementaryTypeName", - "src": "5677:4:5" - } - ], - "id": 2714, - "name": "VariableDeclaration", - "src": "5677:4:5" - } - ], - "id": 2715, - "name": "ParameterList", - "src": "5676:6:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2985, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 2716, - "name": "Identifier", - "src": "5693:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2717, - "name": "Identifier", - "src": "5702:10:5" - } - ], - "id": 2718, - "name": "FunctionCall", - "src": "5702:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2709, - "type": "address", - "value": "spender" - }, - "id": 2719, - "name": "Identifier", - "src": "5716:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2528, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2720, - "name": "Identifier", - "src": "5725:11:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2721, - "name": "Identifier", - "src": "5737:10:5" - } - ], - "id": 2722, - "name": "FunctionCall", - "src": "5737:12:5" - } - ], - "id": 2723, - "name": "IndexAccess", - "src": "5725:25:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2709, - "type": "address", - "value": "spender" - }, - "id": 2724, - "name": "Identifier", - "src": "5751:7:5" - } - ], - "id": 2725, - "name": "IndexAccess", - "src": "5725:34:5" - } - ], - "id": 2726, - "name": "MemberAccess", - "src": "5725:38:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2711, - "type": "uint256", - "value": "addedValue" - }, - "id": 2727, - "name": "Identifier", - "src": "5764:10:5" - } - ], - "id": 2728, - "name": "FunctionCall", - "src": "5725:50:5" - } - ], - "id": 2729, - "name": "FunctionCall", - "src": "5693:83:5" - } - ], - "id": 2730, - "name": "ExpressionStatement", - "src": "5693:83:5" - }, - { - "attributes": { - "functionReturnParameters": 2715 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2731, - "name": "Literal", - "src": "5793:4:5" - } - ], - "id": 2732, - "name": "Return", - "src": "5786:11:5" - } - ], - "id": 2733, - "name": "Block", - "src": "5683:121:5" - } - ], - "id": 2734, - "name": "FunctionDefinition", - "src": "5589:215:5" - }, - { - "attributes": { - "functionSelector": "a457c2d7", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "decreaseAllowance", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`." - }, - "id": 2735, - "name": "StructuredDocumentation", - "src": "5810:476:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2763, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2736, - "name": "ElementaryTypeName", - "src": "6318:7:5" - } - ], - "id": 2737, - "name": "VariableDeclaration", - "src": "6318:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "subtractedValue", - "overrides": null, - "scope": 2763, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2738, - "name": "ElementaryTypeName", - "src": "6335:7:5" - } - ], - "id": 2739, - "name": "VariableDeclaration", - "src": "6335:23:5" - } - ], - "id": 2740, - "name": "ParameterList", - "src": "6317:42:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2763, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2741, - "name": "ElementaryTypeName", - "src": "6384:4:5" - } - ], - "id": 2742, - "name": "VariableDeclaration", - "src": "6384:4:5" - } - ], - "id": 2743, - "name": "ParameterList", - "src": "6383:6:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2985, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 2744, - "name": "Identifier", - "src": "6400:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2745, - "name": "Identifier", - "src": "6409:10:5" - } - ], - "id": 2746, - "name": "FunctionCall", - "src": "6409:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2737, - "type": "address", - "value": "spender" - }, - "id": 2747, - "name": "Identifier", - "src": "6423:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2528, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2748, - "name": "Identifier", - "src": "6432:11:5" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 2749, - "name": "Identifier", - "src": "6444:10:5" - } - ], - "id": 2750, - "name": "FunctionCall", - "src": "6444:12:5" - } - ], - "id": 2751, - "name": "IndexAccess", - "src": "6432:25:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2737, - "type": "address", - "value": "spender" - }, - "id": 2752, - "name": "Identifier", - "src": "6458:7:5" - } - ], - "id": 2753, - "name": "IndexAccess", - "src": "6432:34:5" - } - ], - "id": 2754, - "name": "MemberAccess", - "src": "6432:38:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2739, - "type": "uint256", - "value": "subtractedValue" - }, - "id": 2755, - "name": "Identifier", - "src": "6471:15:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: decreased allowance below zero\"", - "value": "ERC20: decreased allowance below zero" - }, - "id": 2756, - "name": "Literal", - "src": "6488:39:5" - } - ], - "id": 2757, - "name": "FunctionCall", - "src": "6432:96:5" - } - ], - "id": 2758, - "name": "FunctionCall", - "src": "6400:129:5" - } - ], - "id": 2759, - "name": "ExpressionStatement", - "src": "6400:129:5" - }, - { - "attributes": { - "functionReturnParameters": 2743 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2760, - "name": "Literal", - "src": "6546:4:5" - } - ], - "id": 2761, - "name": "Return", - "src": "6539:11:5" - } - ], - "id": 2762, - "name": "Block", - "src": "6390:167:5" - } - ], - "id": 2763, - "name": "FunctionDefinition", - "src": "6291:266:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_transfer", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`." - }, - "id": 2764, - "name": "StructuredDocumentation", - "src": "6563:463:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 2829, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2765, - "name": "ElementaryTypeName", - "src": "7050:7:5" - } - ], - "id": 2766, - "name": "VariableDeclaration", - "src": "7050:14:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 2829, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2767, - "name": "ElementaryTypeName", - "src": "7066:7:5" - } - ], - "id": 2768, - "name": "VariableDeclaration", - "src": "7066:17:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2829, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2769, - "name": "ElementaryTypeName", - "src": "7085:7:5" - } - ], - "id": 2770, - "name": "VariableDeclaration", - "src": "7085:14:5" - } - ], - "id": 2771, - "name": "ParameterList", - "src": "7049:51:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2772, - "name": "ParameterList", - "src": "7118:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2773, - "name": "Identifier", - "src": "7128:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2766, - "type": "address", - "value": "sender" - }, - "id": 2774, - "name": "Identifier", - "src": "7136:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2775, - "name": "ElementaryTypeName", - "src": "7146:7:5" - } - ], - "id": 2776, - "name": "ElementaryTypeNameExpression", - "src": "7146:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2777, - "name": "Literal", - "src": "7154:1:5" - } - ], - "id": 2778, - "name": "FunctionCall", - "src": "7146:10:5" - } - ], - "id": 2779, - "name": "BinaryOperation", - "src": "7136:20:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer from the zero address\"", - "value": "ERC20: transfer from the zero address" - }, - "id": 2780, - "name": "Literal", - "src": "7158:39:5" - } - ], - "id": 2781, - "name": "FunctionCall", - "src": "7128:70:5" - } - ], - "id": 2782, - "name": "ExpressionStatement", - "src": "7128:70:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2783, - "name": "Identifier", - "src": "7208:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2768, - "type": "address", - "value": "recipient" - }, - "id": 2784, - "name": "Identifier", - "src": "7216:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2785, - "name": "ElementaryTypeName", - "src": "7229:7:5" - } - ], - "id": 2786, - "name": "ElementaryTypeNameExpression", - "src": "7229:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2787, - "name": "Literal", - "src": "7237:1:5" - } - ], - "id": 2788, - "name": "FunctionCall", - "src": "7229:10:5" - } - ], - "id": 2789, - "name": "BinaryOperation", - "src": "7216:23:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer to the zero address\"", - "value": "ERC20: transfer to the zero address" - }, - "id": 2790, - "name": "Literal", - "src": "7241:37:5" - } - ], - "id": 2791, - "name": "FunctionCall", - "src": "7208:71:5" - } - ], - "id": 2792, - "name": "ExpressionStatement", - "src": "7208:71:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3007, - "type": "function (address,address,uint256)", - "value": "_beforeTokenTransfer" - }, - "id": 2793, - "name": "Identifier", - "src": "7290:20:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2766, - "type": "address", - "value": "sender" - }, - "id": 2794, - "name": "Identifier", - "src": "7311:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2768, - "type": "address", - "value": "recipient" - }, - "id": 2795, - "name": "Identifier", - "src": "7319:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2770, - "type": "uint256", - "value": "amount" - }, - "id": 2796, - "name": "Identifier", - "src": "7330:6:5" - } - ], - "id": 2797, - "name": "FunctionCall", - "src": "7290:47:5" - } - ], - "id": 2798, - "name": "ExpressionStatement", - "src": "7290:47:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2799, - "name": "Identifier", - "src": "7348:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2766, - "type": "address", - "value": "sender" - }, - "id": 2800, - "name": "Identifier", - "src": "7358:6:5" - } - ], - "id": 2801, - "name": "IndexAccess", - "src": "7348:17:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2802, - "name": "Identifier", - "src": "7368:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2766, - "type": "address", - "value": "sender" - }, - "id": 2803, - "name": "Identifier", - "src": "7378:6:5" - } - ], - "id": 2804, - "name": "IndexAccess", - "src": "7368:17:5" - } - ], - "id": 2805, - "name": "MemberAccess", - "src": "7368:21:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2770, - "type": "uint256", - "value": "amount" - }, - "id": 2806, - "name": "Identifier", - "src": "7390:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer amount exceeds balance\"", - "value": "ERC20: transfer amount exceeds balance" - }, - "id": 2807, - "name": "Literal", - "src": "7398:40:5" - } - ], - "id": 2808, - "name": "FunctionCall", - "src": "7368:71:5" - } - ], - "id": 2809, - "name": "Assignment", - "src": "7348:91:5" - } - ], - "id": 2810, - "name": "ExpressionStatement", - "src": "7348:91:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2811, - "name": "Identifier", - "src": "7449:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2768, - "type": "address", - "value": "recipient" - }, - "id": 2812, - "name": "Identifier", - "src": "7459:9:5" - } - ], - "id": 2813, - "name": "IndexAccess", - "src": "7449:20:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2814, - "name": "Identifier", - "src": "7472:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2768, - "type": "address", - "value": "recipient" - }, - "id": 2815, - "name": "Identifier", - "src": "7482:9:5" - } - ], - "id": 2816, - "name": "IndexAccess", - "src": "7472:20:5" - } - ], - "id": 2817, - "name": "MemberAccess", - "src": "7472:24:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2770, - "type": "uint256", - "value": "amount" - }, - "id": 2818, - "name": "Identifier", - "src": "7497:6:5" - } - ], - "id": 2819, - "name": "FunctionCall", - "src": "7472:32:5" - } - ], - "id": 2820, - "name": "Assignment", - "src": "7449:55:5" - } - ], - "id": 2821, - "name": "ExpressionStatement", - "src": "7449:55:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 2822, - "name": "Identifier", - "src": "7519:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2766, - "type": "address", - "value": "sender" - }, - "id": 2823, - "name": "Identifier", - "src": "7528:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2768, - "type": "address", - "value": "recipient" - }, - "id": 2824, - "name": "Identifier", - "src": "7536:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2770, - "type": "uint256", - "value": "amount" - }, - "id": 2825, - "name": "Identifier", - "src": "7547:6:5" - } - ], - "id": 2826, - "name": "FunctionCall", - "src": "7519:35:5" - } - ], - "id": 2827, - "name": "EmitStatement", - "src": "7514:40:5" - } - ], - "id": 2828, - "name": "Block", - "src": "7118:443:5" - } - ], - "id": 2829, - "name": "FunctionDefinition", - "src": "7031:530:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_mint", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements:\n - `to` cannot be the zero address." - }, - "id": 2830, - "name": "StructuredDocumentation", - "src": "7567:260:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 2884, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2831, - "name": "ElementaryTypeName", - "src": "7847:7:5" - } - ], - "id": 2832, - "name": "VariableDeclaration", - "src": "7847:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2884, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2833, - "name": "ElementaryTypeName", - "src": "7864:7:5" - } - ], - "id": 2834, - "name": "VariableDeclaration", - "src": "7864:14:5" - } - ], - "id": 2835, - "name": "ParameterList", - "src": "7846:33:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2836, - "name": "ParameterList", - "src": "7897:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2837, - "name": "Identifier", - "src": "7907:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2832, - "type": "address", - "value": "account" - }, - "id": 2838, - "name": "Identifier", - "src": "7915:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2839, - "name": "ElementaryTypeName", - "src": "7926:7:5" - } - ], - "id": 2840, - "name": "ElementaryTypeNameExpression", - "src": "7926:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2841, - "name": "Literal", - "src": "7934:1:5" - } - ], - "id": 2842, - "name": "FunctionCall", - "src": "7926:10:5" - } - ], - "id": 2843, - "name": "BinaryOperation", - "src": "7915:21:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: mint to the zero address\"", - "value": "ERC20: mint to the zero address" - }, - "id": 2844, - "name": "Literal", - "src": "7938:33:5" - } - ], - "id": 2845, - "name": "FunctionCall", - "src": "7907:65:5" - } - ], - "id": 2846, - "name": "ExpressionStatement", - "src": "7907:65:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3007, - "type": "function (address,address,uint256)", - "value": "_beforeTokenTransfer" - }, - "id": 2847, - "name": "Identifier", - "src": "7983:20:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2848, - "name": "ElementaryTypeName", - "src": "8004:7:5" - } - ], - "id": 2849, - "name": "ElementaryTypeNameExpression", - "src": "8004:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2850, - "name": "Literal", - "src": "8012:1:5" - } - ], - "id": 2851, - "name": "FunctionCall", - "src": "8004:10:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2832, - "type": "address", - "value": "account" - }, - "id": 2852, - "name": "Identifier", - "src": "8016:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2834, - "type": "uint256", - "value": "amount" - }, - "id": 2853, - "name": "Identifier", - "src": "8025:6:5" - } - ], - "id": 2854, - "name": "FunctionCall", - "src": "7983:49:5" - } - ], - "id": 2855, - "name": "ExpressionStatement", - "src": "7983:49:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2530, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2856, - "name": "Identifier", - "src": "8043:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2530, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2857, - "name": "Identifier", - "src": "8058:12:5" - } - ], - "id": 2858, - "name": "MemberAccess", - "src": "8058:16:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2834, - "type": "uint256", - "value": "amount" - }, - "id": 2859, - "name": "Identifier", - "src": "8075:6:5" - } - ], - "id": 2860, - "name": "FunctionCall", - "src": "8058:24:5" - } - ], - "id": 2861, - "name": "Assignment", - "src": "8043:39:5" - } - ], - "id": 2862, - "name": "ExpressionStatement", - "src": "8043:39:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2863, - "name": "Identifier", - "src": "8092:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2832, - "type": "address", - "value": "account" - }, - "id": 2864, - "name": "Identifier", - "src": "8102:7:5" - } - ], - "id": 2865, - "name": "IndexAccess", - "src": "8092:18:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2866, - "name": "Identifier", - "src": "8113:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2832, - "type": "address", - "value": "account" - }, - "id": 2867, - "name": "Identifier", - "src": "8123:7:5" - } - ], - "id": 2868, - "name": "IndexAccess", - "src": "8113:18:5" - } - ], - "id": 2869, - "name": "MemberAccess", - "src": "8113:22:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2834, - "type": "uint256", - "value": "amount" - }, - "id": 2870, - "name": "Identifier", - "src": "8136:6:5" - } - ], - "id": 2871, - "name": "FunctionCall", - "src": "8113:30:5" - } - ], - "id": 2872, - "name": "Assignment", - "src": "8092:51:5" - } - ], - "id": 2873, - "name": "ExpressionStatement", - "src": "8092:51:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 2874, - "name": "Identifier", - "src": "8158:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2875, - "name": "ElementaryTypeName", - "src": "8167:7:5" - } - ], - "id": 2876, - "name": "ElementaryTypeNameExpression", - "src": "8167:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2877, - "name": "Literal", - "src": "8175:1:5" - } - ], - "id": 2878, - "name": "FunctionCall", - "src": "8167:10:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2832, - "type": "address", - "value": "account" - }, - "id": 2879, - "name": "Identifier", - "src": "8179:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2834, - "type": "uint256", - "value": "amount" - }, - "id": 2880, - "name": "Identifier", - "src": "8188:6:5" - } - ], - "id": 2881, - "name": "FunctionCall", - "src": "8158:37:5" - } - ], - "id": 2882, - "name": "EmitStatement", - "src": "8153:42:5" - } - ], - "id": 2883, - "name": "Block", - "src": "7897:305:5" - } - ], - "id": 2884, - "name": "FunctionDefinition", - "src": "7832:370:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_burn", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements:\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens." - }, - "id": 2885, - "name": "StructuredDocumentation", - "src": "8208:309:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 2940, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2886, - "name": "ElementaryTypeName", - "src": "8537:7:5" - } - ], - "id": 2887, - "name": "VariableDeclaration", - "src": "8537:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2940, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2888, - "name": "ElementaryTypeName", - "src": "8554:7:5" - } - ], - "id": 2889, - "name": "VariableDeclaration", - "src": "8554:14:5" - } - ], - "id": 2890, - "name": "ParameterList", - "src": "8536:33:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2891, - "name": "ParameterList", - "src": "8587:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2892, - "name": "Identifier", - "src": "8597:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2887, - "type": "address", - "value": "account" - }, - "id": 2893, - "name": "Identifier", - "src": "8605:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2894, - "name": "ElementaryTypeName", - "src": "8616:7:5" - } - ], - "id": 2895, - "name": "ElementaryTypeNameExpression", - "src": "8616:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2896, - "name": "Literal", - "src": "8624:1:5" - } - ], - "id": 2897, - "name": "FunctionCall", - "src": "8616:10:5" - } - ], - "id": 2898, - "name": "BinaryOperation", - "src": "8605:21:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: burn from the zero address\"", - "value": "ERC20: burn from the zero address" - }, - "id": 2899, - "name": "Literal", - "src": "8628:35:5" - } - ], - "id": 2900, - "name": "FunctionCall", - "src": "8597:67:5" - } - ], - "id": 2901, - "name": "ExpressionStatement", - "src": "8597:67:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3007, - "type": "function (address,address,uint256)", - "value": "_beforeTokenTransfer" - }, - "id": 2902, - "name": "Identifier", - "src": "8675:20:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2887, - "type": "address", - "value": "account" - }, - "id": 2903, - "name": "Identifier", - "src": "8696:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2904, - "name": "ElementaryTypeName", - "src": "8705:7:5" - } - ], - "id": 2905, - "name": "ElementaryTypeNameExpression", - "src": "8705:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2906, - "name": "Literal", - "src": "8713:1:5" - } - ], - "id": 2907, - "name": "FunctionCall", - "src": "8705:10:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2889, - "type": "uint256", - "value": "amount" - }, - "id": 2908, - "name": "Identifier", - "src": "8717:6:5" - } - ], - "id": 2909, - "name": "FunctionCall", - "src": "8675:49:5" - } - ], - "id": 2910, - "name": "ExpressionStatement", - "src": "8675:49:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2911, - "name": "Identifier", - "src": "8735:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2887, - "type": "address", - "value": "account" - }, - "id": 2912, - "name": "Identifier", - "src": "8745:7:5" - } - ], - "id": 2913, - "name": "IndexAccess", - "src": "8735:18:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2522, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2914, - "name": "Identifier", - "src": "8756:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2887, - "type": "address", - "value": "account" - }, - "id": 2915, - "name": "Identifier", - "src": "8766:7:5" - } - ], - "id": 2916, - "name": "IndexAccess", - "src": "8756:18:5" - } - ], - "id": 2917, - "name": "MemberAccess", - "src": "8756:22:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2889, - "type": "uint256", - "value": "amount" - }, - "id": 2918, - "name": "Identifier", - "src": "8779:6:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: burn amount exceeds balance\"", - "value": "ERC20: burn amount exceeds balance" - }, - "id": 2919, - "name": "Literal", - "src": "8787:36:5" - } - ], - "id": 2920, - "name": "FunctionCall", - "src": "8756:68:5" - } - ], - "id": 2921, - "name": "Assignment", - "src": "8735:89:5" - } - ], - "id": 2922, - "name": "ExpressionStatement", - "src": "8735:89:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2530, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2923, - "name": "Identifier", - "src": "8834:12:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2354, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2530, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2924, - "name": "Identifier", - "src": "8849:12:5" - } - ], - "id": 2925, - "name": "MemberAccess", - "src": "8849:16:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2889, - "type": "uint256", - "value": "amount" - }, - "id": 2926, - "name": "Identifier", - "src": "8866:6:5" - } - ], - "id": 2927, - "name": "FunctionCall", - "src": "8849:24:5" - } - ], - "id": 2928, - "name": "Assignment", - "src": "8834:39:5" - } - ], - "id": 2929, - "name": "ExpressionStatement", - "src": "8834:39:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 2930, - "name": "Identifier", - "src": "8888:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2887, - "type": "address", - "value": "account" - }, - "id": 2931, - "name": "Identifier", - "src": "8897:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2932, - "name": "ElementaryTypeName", - "src": "8906:7:5" - } - ], - "id": 2933, - "name": "ElementaryTypeNameExpression", - "src": "8906:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2934, - "name": "Literal", - "src": "8914:1:5" - } - ], - "id": 2935, - "name": "FunctionCall", - "src": "8906:10:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2889, - "type": "uint256", - "value": "amount" - }, - "id": 2936, - "name": "Identifier", - "src": "8918:6:5" - } - ], - "id": 2937, - "name": "FunctionCall", - "src": "8888:37:5" - } - ], - "id": 2938, - "name": "EmitStatement", - "src": "8883:42:5" - } - ], - "id": 2939, - "name": "Block", - "src": "8587:345:5" - } - ], - "id": 2940, - "name": "FunctionDefinition", - "src": "8522:410:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_approve", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n This internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address." - }, - "id": 2941, - "name": "StructuredDocumentation", - "src": "8938:412:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 2985, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2942, - "name": "ElementaryTypeName", - "src": "9373:7:5" - } - ], - "id": 2943, - "name": "VariableDeclaration", - "src": "9373:13:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2985, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2944, - "name": "ElementaryTypeName", - "src": "9388:7:5" - } - ], - "id": 2945, - "name": "VariableDeclaration", - "src": "9388:15:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2985, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2946, - "name": "ElementaryTypeName", - "src": "9405:7:5" - } - ], - "id": 2947, - "name": "VariableDeclaration", - "src": "9405:14:5" - } - ], - "id": 2948, - "name": "ParameterList", - "src": "9372:48:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2949, - "name": "ParameterList", - "src": "9438:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2950, - "name": "Identifier", - "src": "9448:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2943, - "type": "address", - "value": "owner" - }, - "id": 2951, - "name": "Identifier", - "src": "9456:5:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2952, - "name": "ElementaryTypeName", - "src": "9465:7:5" - } - ], - "id": 2953, - "name": "ElementaryTypeNameExpression", - "src": "9465:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2954, - "name": "Literal", - "src": "9473:1:5" - } - ], - "id": 2955, - "name": "FunctionCall", - "src": "9465:10:5" - } - ], - "id": 2956, - "name": "BinaryOperation", - "src": "9456:19:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: approve from the zero address\"", - "value": "ERC20: approve from the zero address" - }, - "id": 2957, - "name": "Literal", - "src": "9477:38:5" - } - ], - "id": 2958, - "name": "FunctionCall", - "src": "9448:68:5" - } - ], - "id": 2959, - "name": "ExpressionStatement", - "src": "9448:68:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2960, - "name": "Identifier", - "src": "9526:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2945, - "type": "address", - "value": "spender" - }, - "id": 2961, - "name": "Identifier", - "src": "9534:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2962, - "name": "ElementaryTypeName", - "src": "9545:7:5" - } - ], - "id": 2963, - "name": "ElementaryTypeNameExpression", - "src": "9545:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2964, - "name": "Literal", - "src": "9553:1:5" - } - ], - "id": 2965, - "name": "FunctionCall", - "src": "9545:10:5" - } - ], - "id": 2966, - "name": "BinaryOperation", - "src": "9534:21:5" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: approve to the zero address\"", - "value": "ERC20: approve to the zero address" - }, - "id": 2967, - "name": "Literal", - "src": "9557:36:5" - } - ], - "id": 2968, - "name": "FunctionCall", - "src": "9526:68:5" - } - ], - "id": 2969, - "name": "ExpressionStatement", - "src": "9526:68:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2528, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2970, - "name": "Identifier", - "src": "9605:11:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2943, - "type": "address", - "value": "owner" - }, - "id": 2971, - "name": "Identifier", - "src": "9617:5:5" - } - ], - "id": 2973, - "name": "IndexAccess", - "src": "9605:18:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2945, - "type": "address", - "value": "spender" - }, - "id": 2972, - "name": "Identifier", - "src": "9624:7:5" - } - ], - "id": 2974, - "name": "IndexAccess", - "src": "9605:27:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2947, - "type": "uint256", - "value": "amount" - }, - "id": 2975, - "name": "Identifier", - "src": "9635:6:5" - } - ], - "id": 2976, - "name": "Assignment", - "src": "9605:36:5" - } - ], - "id": 2977, - "name": "ExpressionStatement", - "src": "9605:36:5" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3085, - "type": "function (address,address,uint256)", - "value": "Approval" - }, - "id": 2978, - "name": "Identifier", - "src": "9656:8:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2943, - "type": "address", - "value": "owner" - }, - "id": 2979, - "name": "Identifier", - "src": "9665:5:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2945, - "type": "address", - "value": "spender" - }, - "id": 2980, - "name": "Identifier", - "src": "9672:7:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2947, - "type": "uint256", - "value": "amount" - }, - "id": 2981, - "name": "Identifier", - "src": "9681:6:5" - } - ], - "id": 2982, - "name": "FunctionCall", - "src": "9656:32:5" - } - ], - "id": 2983, - "name": "EmitStatement", - "src": "9651:37:5" - } - ], - "id": 2984, - "name": "Block", - "src": "9438:257:5" - } - ], - "id": 2985, - "name": "FunctionDefinition", - "src": "9355:340:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_setupDecimals", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does." - }, - "id": 2986, - "name": "StructuredDocumentation", - "src": "9701:312:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals_", - "overrides": null, - "scope": 2996, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 2987, - "name": "ElementaryTypeName", - "src": "10042:5:5" - } - ], - "id": 2988, - "name": "VariableDeclaration", - "src": "10042:15:5" - } - ], - "id": 2989, - "name": "ParameterList", - "src": "10041:17:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2990, - "name": "ParameterList", - "src": "10076:0:5" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2536, - "type": "uint8", - "value": "_decimals" - }, - "id": 2991, - "name": "Identifier", - "src": "10086:9:5" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2988, - "type": "uint8", - "value": "decimals_" - }, - "id": 2992, - "name": "Identifier", - "src": "10098:9:5" - } - ], - "id": 2993, - "name": "Assignment", - "src": "10086:21:5" - } - ], - "id": 2994, - "name": "ExpressionStatement", - "src": "10086:21:5" - } - ], - "id": 2995, - "name": "Block", - "src": "10076:38:5" - } - ], - "id": 2996, - "name": "FunctionDefinition", - "src": "10018:96:5" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_beforeTokenTransfer", - "overrides": null, - "scope": 3008, - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Hook that is called before any transfer of tokens. This includes\n minting and burning.\n Calling conditions:\n - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n will be to transferred to `to`.\n - when `from` is zero, `amount` tokens will be minted for `to`.\n - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n - `from` and `to` are never both zero.\n To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]." - }, - "id": 2997, - "name": "StructuredDocumentation", - "src": "10120:576:5" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "from", - "overrides": null, - "scope": 3007, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2998, - "name": "ElementaryTypeName", - "src": "10731:7:5" - } - ], - "id": 2999, - "name": "VariableDeclaration", - "src": "10731:12:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "to", - "overrides": null, - "scope": 3007, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3000, - "name": "ElementaryTypeName", - "src": "10745:7:5" - } - ], - "id": 3001, - "name": "VariableDeclaration", - "src": "10745:10:5" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 3007, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3002, - "name": "ElementaryTypeName", - "src": "10757:7:5" - } - ], - "id": 3003, - "name": "VariableDeclaration", - "src": "10757:14:5" - } - ], - "id": 3004, - "name": "ParameterList", - "src": "10730:42:5" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3005, - "name": "ParameterList", - "src": "10790:0:5" - }, - { - "attributes": { - "statements": [null] - }, - "children": [], - "id": 3006, - "name": "Block", - "src": "10790:3:5" - } - ], - "id": 3007, - "name": "FunctionDefinition", - "src": "10701:92:5" - } - ], - "id": 3008, - "name": "ContractDefinition", - "src": "1321:9474:5" - } - ], - "id": 3009, - "name": "SourceUnit", - "src": "33:10763:5" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.919Z", - "devdoc": { - "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.", - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "constructor": { - "details": "Sets the values for {name} and {symbol}, initializes {decimals} with a default value of 18. To select a different value for {decimals}, use {_setupDecimals}. All three of these values are immutable: they can only be set once during construction." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/IERC20.json b/packages/bridge-sdk/contracts/IERC20.json deleted file mode 100644 index 34af045..0000000 --- a/packages/bridge-sdk/contracts/IERC20.json +++ /dev/null @@ -1,2160 +0,0 @@ -{ - "contractName": "IERC20", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n", - "sourcePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "exportedSymbols": { - "IERC20": [3086] - }, - "id": 3087, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3010, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:6" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": { - "id": 3011, - "nodeType": "StructuredDocumentation", - "src": "66:70:6", - "text": " @dev Interface of the ERC20 standard as defined in the EIP." - }, - "fullyImplemented": false, - "id": 3086, - "linearizedBaseContracts": [3086], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": { - "id": 3012, - "nodeType": "StructuredDocumentation", - "src": "160:66:6", - "text": " @dev Returns the amount of tokens in existence." - }, - "functionSelector": "18160ddd", - "id": 3017, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3013, - "nodeType": "ParameterList", - "parameters": [], - "src": "251:2:6" - }, - "returnParameters": { - "id": 3016, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3015, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3017, - "src": "277:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3014, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "277:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "276:9:6" - }, - "scope": 3086, - "src": "231:55:6", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 3018, - "nodeType": "StructuredDocumentation", - "src": "292:72:6", - "text": " @dev Returns the amount of tokens owned by `account`." - }, - "functionSelector": "70a08231", - "id": 3025, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3021, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3020, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3025, - "src": "388:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3019, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "387:17:6" - }, - "returnParameters": { - "id": 3024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3023, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3025, - "src": "428:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "428:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "427:9:6" - }, - "scope": 3086, - "src": "369:68:6", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 3026, - "nodeType": "StructuredDocumentation", - "src": "443:209:6", - "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "a9059cbb", - "id": 3035, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3031, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3028, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3035, - "src": "675:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "675:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3030, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3035, - "src": "694:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3029, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "694:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "674:35:6" - }, - "returnParameters": { - "id": 3034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3033, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3035, - "src": "728:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3032, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "728:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "727:6:6" - }, - "scope": 3086, - "src": "657:77:6", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 3036, - "nodeType": "StructuredDocumentation", - "src": "740:264:6", - "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." - }, - "functionSelector": "dd62ed3e", - "id": 3045, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3041, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3038, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "1028:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3037, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1028:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3040, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "1043:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1043:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1027:32:6" - }, - "returnParameters": { - "id": 3044, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3043, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "1083:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3042, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1083:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1082:9:6" - }, - "scope": 3086, - "src": "1009:83:6", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 3046, - "nodeType": "StructuredDocumentation", - "src": "1098:642:6", - "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." - }, - "functionSelector": "095ea7b3", - "id": 3055, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3051, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3048, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3055, - "src": "1762:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3047, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1762:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3050, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3055, - "src": "1779:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3049, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1779:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1761:33:6" - }, - "returnParameters": { - "id": 3054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3053, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3055, - "src": "1813:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3052, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1813:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1812:6:6" - }, - "scope": 3086, - "src": "1745:74:6", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 3056, - "nodeType": "StructuredDocumentation", - "src": "1825:296:6", - "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "23b872dd", - "id": 3067, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3063, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3058, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3067, - "src": "2148:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2148:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3060, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3067, - "src": "2164:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3059, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2164:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3062, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3067, - "src": "2183:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3061, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2183:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2147:51:6" - }, - "returnParameters": { - "id": 3066, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3065, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3067, - "src": "2217:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3064, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2217:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2216:6:6" - }, - "scope": 3086, - "src": "2126:97:6", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": { - "id": 3068, - "nodeType": "StructuredDocumentation", - "src": "2229:158:6", - "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." - }, - "id": 3076, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 3075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3070, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3076, - "src": "2407:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3069, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2407:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3072, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3076, - "src": "2429:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2429:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3074, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3076, - "src": "2449:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2449:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2406:57:6" - }, - "src": "2392:72:6" - }, - { - "anonymous": false, - "documentation": { - "id": 3077, - "nodeType": "StructuredDocumentation", - "src": "2470:148:6", - "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." - }, - "id": 3085, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 3084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3079, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "2638:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3078, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2638:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3081, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "2661:23:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3080, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2661:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3083, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "2686:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3082, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2686:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2637:63:6" - }, - "src": "2623:78:6" - } - ], - "scope": 3087, - "src": "137:2566:6" - } - ], - "src": "33:2671:6" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "exportedSymbols": { - "IERC20": [3086] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 3010, - "name": "PragmaDirective", - "src": "33:31:6" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "interface", - "fullyImplemented": false, - "linearizedBaseContracts": [3086], - "name": "IERC20", - "scope": 3087 - }, - "children": [ - { - "attributes": { - "text": " @dev Interface of the ERC20 standard as defined in the EIP." - }, - "id": 3011, - "name": "StructuredDocumentation", - "src": "66:70:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "18160ddd", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "totalSupply", - "overrides": null, - "scope": 3086, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the amount of tokens in existence." - }, - "id": 3012, - "name": "StructuredDocumentation", - "src": "160:66:6" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3013, - "name": "ParameterList", - "src": "251:2:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3017, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3014, - "name": "ElementaryTypeName", - "src": "277:7:6" - } - ], - "id": 3015, - "name": "VariableDeclaration", - "src": "277:7:6" - } - ], - "id": 3016, - "name": "ParameterList", - "src": "276:9:6" - } - ], - "id": 3017, - "name": "FunctionDefinition", - "src": "231:55:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "70a08231", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "balanceOf", - "overrides": null, - "scope": 3086, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the amount of tokens owned by `account`." - }, - "id": 3018, - "name": "StructuredDocumentation", - "src": "292:72:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 3025, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3019, - "name": "ElementaryTypeName", - "src": "388:7:6" - } - ], - "id": 3020, - "name": "VariableDeclaration", - "src": "388:15:6" - } - ], - "id": 3021, - "name": "ParameterList", - "src": "387:17:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3025, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3022, - "name": "ElementaryTypeName", - "src": "428:7:6" - } - ], - "id": 3023, - "name": "VariableDeclaration", - "src": "428:7:6" - } - ], - "id": 3024, - "name": "ParameterList", - "src": "427:9:6" - } - ], - "id": 3025, - "name": "FunctionDefinition", - "src": "369:68:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "a9059cbb", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transfer", - "overrides": null, - "scope": 3086, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "id": 3026, - "name": "StructuredDocumentation", - "src": "443:209:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 3035, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3027, - "name": "ElementaryTypeName", - "src": "675:7:6" - } - ], - "id": 3028, - "name": "VariableDeclaration", - "src": "675:17:6" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 3035, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3029, - "name": "ElementaryTypeName", - "src": "694:7:6" - } - ], - "id": 3030, - "name": "VariableDeclaration", - "src": "694:14:6" - } - ], - "id": 3031, - "name": "ParameterList", - "src": "674:35:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3035, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3032, - "name": "ElementaryTypeName", - "src": "728:4:6" - } - ], - "id": 3033, - "name": "VariableDeclaration", - "src": "728:4:6" - } - ], - "id": 3034, - "name": "ParameterList", - "src": "727:6:6" - } - ], - "id": 3035, - "name": "FunctionDefinition", - "src": "657:77:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "dd62ed3e", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "allowance", - "overrides": null, - "scope": 3086, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." - }, - "id": 3036, - "name": "StructuredDocumentation", - "src": "740:264:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 3045, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3037, - "name": "ElementaryTypeName", - "src": "1028:7:6" - } - ], - "id": 3038, - "name": "VariableDeclaration", - "src": "1028:13:6" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3045, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3039, - "name": "ElementaryTypeName", - "src": "1043:7:6" - } - ], - "id": 3040, - "name": "VariableDeclaration", - "src": "1043:15:6" - } - ], - "id": 3041, - "name": "ParameterList", - "src": "1027:32:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3045, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3042, - "name": "ElementaryTypeName", - "src": "1083:7:6" - } - ], - "id": 3043, - "name": "VariableDeclaration", - "src": "1083:7:6" - } - ], - "id": 3044, - "name": "ParameterList", - "src": "1082:9:6" - } - ], - "id": 3045, - "name": "FunctionDefinition", - "src": "1009:83:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "095ea7b3", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "approve", - "overrides": null, - "scope": 3086, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." - }, - "id": 3046, - "name": "StructuredDocumentation", - "src": "1098:642:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3055, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3047, - "name": "ElementaryTypeName", - "src": "1762:7:6" - } - ], - "id": 3048, - "name": "VariableDeclaration", - "src": "1762:15:6" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 3055, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3049, - "name": "ElementaryTypeName", - "src": "1779:7:6" - } - ], - "id": 3050, - "name": "VariableDeclaration", - "src": "1779:14:6" - } - ], - "id": 3051, - "name": "ParameterList", - "src": "1761:33:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3055, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3052, - "name": "ElementaryTypeName", - "src": "1813:4:6" - } - ], - "id": 3053, - "name": "VariableDeclaration", - "src": "1813:4:6" - } - ], - "id": 3054, - "name": "ParameterList", - "src": "1812:6:6" - } - ], - "id": 3055, - "name": "FunctionDefinition", - "src": "1745:74:6" - }, - { - "attributes": { - "body": null, - "functionSelector": "23b872dd", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transferFrom", - "overrides": null, - "scope": 3086, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "id": 3056, - "name": "StructuredDocumentation", - "src": "1825:296:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 3067, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3057, - "name": "ElementaryTypeName", - "src": "2148:7:6" - } - ], - "id": 3058, - "name": "VariableDeclaration", - "src": "2148:14:6" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 3067, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3059, - "name": "ElementaryTypeName", - "src": "2164:7:6" - } - ], - "id": 3060, - "name": "VariableDeclaration", - "src": "2164:17:6" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 3067, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3061, - "name": "ElementaryTypeName", - "src": "2183:7:6" - } - ], - "id": 3062, - "name": "VariableDeclaration", - "src": "2183:14:6" - } - ], - "id": 3063, - "name": "ParameterList", - "src": "2147:51:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 3067, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 3064, - "name": "ElementaryTypeName", - "src": "2217:4:6" - } - ], - "id": 3065, - "name": "VariableDeclaration", - "src": "2217:4:6" - } - ], - "id": 3066, - "name": "ParameterList", - "src": "2216:6:6" - } - ], - "id": 3067, - "name": "FunctionDefinition", - "src": "2126:97:6" - }, - { - "attributes": { - "anonymous": false, - "name": "Transfer" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." - }, - "id": 3068, - "name": "StructuredDocumentation", - "src": "2229:158:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "from", - "overrides": null, - "scope": 3076, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3069, - "name": "ElementaryTypeName", - "src": "2407:7:6" - } - ], - "id": 3070, - "name": "VariableDeclaration", - "src": "2407:20:6" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "to", - "overrides": null, - "scope": 3076, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3071, - "name": "ElementaryTypeName", - "src": "2429:7:6" - } - ], - "id": 3072, - "name": "VariableDeclaration", - "src": "2429:18:6" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3076, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3073, - "name": "ElementaryTypeName", - "src": "2449:7:6" - } - ], - "id": 3074, - "name": "VariableDeclaration", - "src": "2449:13:6" - } - ], - "id": 3075, - "name": "ParameterList", - "src": "2406:57:6" - } - ], - "id": 3076, - "name": "EventDefinition", - "src": "2392:72:6" - }, - { - "attributes": { - "anonymous": false, - "name": "Approval" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." - }, - "id": 3077, - "name": "StructuredDocumentation", - "src": "2470:148:6" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 3085, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3078, - "name": "ElementaryTypeName", - "src": "2638:7:6" - } - ], - "id": 3079, - "name": "VariableDeclaration", - "src": "2638:21:6" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3085, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3080, - "name": "ElementaryTypeName", - "src": "2661:7:6" - } - ], - "id": 3081, - "name": "VariableDeclaration", - "src": "2661:23:6" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3085, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3082, - "name": "ElementaryTypeName", - "src": "2686:7:6" - } - ], - "id": 3083, - "name": "VariableDeclaration", - "src": "2686:13:6" - } - ], - "id": 3084, - "name": "ParameterList", - "src": "2637:63:6" - } - ], - "id": 3085, - "name": "EventDefinition", - "src": "2623:78:6" - } - ], - "id": 3086, - "name": "ContractDefinition", - "src": "137:2566:6" - } - ], - "id": 3087, - "name": "SourceUnit", - "src": "33:2671:6" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.923Z", - "devdoc": { - "details": "Interface of the ERC20 standard as defined in the EIP.", - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." - }, - "approve(address,uint256)": { - "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." - }, - "balanceOf(address)": { - "details": "Returns the amount of tokens owned by `account`." - }, - "totalSupply()": { - "details": "Returns the amount of tokens in existence." - }, - "transfer(address,uint256)": { - "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - }, - "transferFrom(address,address,uint256)": { - "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/ReentrancyGuard.json b/packages/bridge-sdk/contracts/ReentrancyGuard.json deleted file mode 100644 index 6d868b3..0000000 --- a/packages/bridge-sdk/contracts/ReentrancyGuard.json +++ /dev/null @@ -1,1000 +0,0 @@ -{ - "contractName": "ReentrancyGuard", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b95e56c1640d0ef789fc5c16269e141e992f6c8ac97cc6d377bd3825e9cab182\",\"dweb:/ipfs/QmVzaxJZY51EhagrcNnkxoU6Uq17RhATe7aHvtkC6wUkgK\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor () internal {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "exportedSymbols": { - "ReentrancyGuard": [3658] - }, - "id": 3659, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3620, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:10" - }, - { - "abstract": true, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": { - "id": 3621, - "nodeType": "StructuredDocumentation", - "src": "66:750:10", - "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]." - }, - "fullyImplemented": true, - "id": 3658, - "linearizedBaseContracts": [3658], - "name": "ReentrancyGuard", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 3624, - "mutability": "constant", - "name": "_NOT_ENTERED", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3658, - "src": "1605:41:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3622, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1605:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31", - "id": 3623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1645:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 3627, - "mutability": "constant", - "name": "_ENTERED", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3658, - "src": "1652:37:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3625, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1652:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 3626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1688:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 3629, - "mutability": "mutable", - "name": "_status", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3658, - "src": "1696:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 3636, - "nodeType": "Block", - "src": "1750:39:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3632, - "name": "_status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "1760:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3633, - "name": "_NOT_ENTERED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3624, - "src": "1770:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1760:22:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3635, - "nodeType": "ExpressionStatement", - "src": "1760:22:10" - } - ] - }, - "documentation": null, - "id": 3637, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3630, - "nodeType": "ParameterList", - "parameters": [], - "src": "1738:2:10" - }, - "returnParameters": { - "id": 3631, - "nodeType": "ParameterList", - "parameters": [], - "src": "1750:0:10" - }, - "scope": 3658, - "src": "1726:63:10", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3656, - "nodeType": "Block", - "src": "2188:421:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3641, - "name": "_status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "2277:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 3642, - "name": "_ENTERED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "2288:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2277:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", - "id": 3644, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2298:33:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", - "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" - }, - "value": "ReentrancyGuard: reentrant call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", - "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" - } - ], - "id": 3640, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2269:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2269:63:10", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3646, - "nodeType": "ExpressionStatement", - "src": "2269:63:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 3649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3647, - "name": "_status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "2407:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3648, - "name": "_ENTERED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3627, - "src": "2417:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2407:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3650, - "nodeType": "ExpressionStatement", - "src": "2407:18:10" - }, - { - "id": 3651, - "nodeType": "PlaceholderStatement", - "src": "2436:1:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 3654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3652, - "name": "_status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "2580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3653, - "name": "_NOT_ENTERED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3624, - "src": "2590:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2580:22:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3655, - "nodeType": "ExpressionStatement", - "src": "2580:22:10" - } - ] - }, - "documentation": { - "id": 3638, - "nodeType": "StructuredDocumentation", - "src": "1795:364:10", - "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and make it call a\n `private` function that does the actual work." - }, - "id": 3657, - "name": "nonReentrant", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 3639, - "nodeType": "ParameterList", - "parameters": [], - "src": "2185:2:10" - }, - "src": "2164:445:10", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 3659, - "src": "817:1794:10" - } - ], - "src": "33:2579:10" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "exportedSymbols": { - "ReentrancyGuard": [3658] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 3620, - "name": "PragmaDirective", - "src": "33:31:10" - }, - { - "attributes": { - "abstract": true, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [3658], - "name": "ReentrancyGuard", - "scope": 3659 - }, - "children": [ - { - "attributes": { - "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]." - }, - "id": 3621, - "name": "StructuredDocumentation", - "src": "66:750:10" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "_NOT_ENTERED", - "overrides": null, - "scope": 3658, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3622, - "name": "ElementaryTypeName", - "src": "1605:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 3623, - "name": "Literal", - "src": "1645:1:10" - } - ], - "id": 3624, - "name": "VariableDeclaration", - "src": "1605:41:10" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "_ENTERED", - "overrides": null, - "scope": 3658, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3625, - "name": "ElementaryTypeName", - "src": "1652:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 3626, - "name": "Literal", - "src": "1688:1:10" - } - ], - "id": 3627, - "name": "VariableDeclaration", - "src": "1652:37:10" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_status", - "overrides": null, - "scope": 3658, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3628, - "name": "ElementaryTypeName", - "src": "1696:7:10" - } - ], - "id": 3629, - "name": "VariableDeclaration", - "src": "1696:23:10" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": true, - "kind": "constructor", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 3658, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3630, - "name": "ParameterList", - "src": "1738:2:10" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3631, - "name": "ParameterList", - "src": "1750:0:10" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3629, - "type": "uint256", - "value": "_status" - }, - "id": 3632, - "name": "Identifier", - "src": "1760:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3624, - "type": "uint256", - "value": "_NOT_ENTERED" - }, - "id": 3633, - "name": "Identifier", - "src": "1770:12:10" - } - ], - "id": 3634, - "name": "Assignment", - "src": "1760:22:10" - } - ], - "id": 3635, - "name": "ExpressionStatement", - "src": "1760:22:10" - } - ], - "id": 3636, - "name": "Block", - "src": "1750:39:10" - } - ], - "id": 3637, - "name": "FunctionDefinition", - "src": "1726:63:10" - }, - { - "attributes": { - "name": "nonReentrant", - "overrides": null, - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and make it call a\n `private` function that does the actual work." - }, - "id": 3638, - "name": "StructuredDocumentation", - "src": "1795:364:10" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3639, - "name": "ParameterList", - "src": "2185:2:10" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", - "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3640, - "name": "Identifier", - "src": "2269:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3629, - "type": "uint256", - "value": "_status" - }, - "id": 3641, - "name": "Identifier", - "src": "2277:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3627, - "type": "uint256", - "value": "_ENTERED" - }, - "id": 3642, - "name": "Identifier", - "src": "2288:8:10" - } - ], - "id": 3643, - "name": "BinaryOperation", - "src": "2277:19:10" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ReentrancyGuard: reentrant call\"", - "value": "ReentrancyGuard: reentrant call" - }, - "id": 3644, - "name": "Literal", - "src": "2298:33:10" - } - ], - "id": 3645, - "name": "FunctionCall", - "src": "2269:63:10" - } - ], - "id": 3646, - "name": "ExpressionStatement", - "src": "2269:63:10" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3629, - "type": "uint256", - "value": "_status" - }, - "id": 3647, - "name": "Identifier", - "src": "2407:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3627, - "type": "uint256", - "value": "_ENTERED" - }, - "id": 3648, - "name": "Identifier", - "src": "2417:8:10" - } - ], - "id": 3649, - "name": "Assignment", - "src": "2407:18:10" - } - ], - "id": 3650, - "name": "ExpressionStatement", - "src": "2407:18:10" - }, - { - "id": 3651, - "name": "PlaceholderStatement", - "src": "2436:1:10" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3629, - "type": "uint256", - "value": "_status" - }, - "id": 3652, - "name": "Identifier", - "src": "2580:7:10" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3624, - "type": "uint256", - "value": "_NOT_ENTERED" - }, - "id": 3653, - "name": "Identifier", - "src": "2590:12:10" - } - ], - "id": 3654, - "name": "Assignment", - "src": "2580:22:10" - } - ], - "id": 3655, - "name": "ExpressionStatement", - "src": "2580:22:10" - } - ], - "id": 3656, - "name": "Block", - "src": "2188:421:10" - } - ], - "id": 3657, - "name": "ModifierDefinition", - "src": "2164:445:10" - } - ], - "id": 3658, - "name": "ContractDefinition", - "src": "817:1794:10" - } - ], - "id": 3659, - "name": "SourceUnit", - "src": "33:2579:10" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.930Z", - "devdoc": { - "details": "Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].", - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/SafeERC20.json b/packages/bridge-sdk/contracts/SafeERC20.json deleted file mode 100644 index e984cbc..0000000 --- a/packages/bridge-sdk/contracts/SafeERC20.json +++ /dev/null @@ -1,6220 +0,0 @@ -{ - "contractName": "SafeERC20", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a849c2d95e85463909e5b5c920b13e7a11216ca14127085e16d22b9379d52a\",\"dweb:/ipfs/QmUg3CZDbCCcQdroEpexBy5ZFd5vD1UWijWQq9qHZjtJNQ\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]}},\"version\":1}", - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203547b9b3fa28635bb2f7e9937a35aaddcc8be9819cfe05f6d4ebbf41896ee60164736f6c634300060c0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203547b9b3fa28635bb2f7e9937a35aaddcc8be9819cfe05f6d4ebbf41896ee60164736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "616:3104:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "616:3104:7:-:0;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "exportedSymbols": { - "SafeERC20": [3299] - }, - "id": 3300, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3088, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:7" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "./IERC20.sol", - "id": 3089, - "nodeType": "ImportDirective", - "scope": 3300, - "sourceUnit": 3087, - "src": "66:22:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "id": 3090, - "nodeType": "ImportDirective", - "scope": 3300, - "sourceUnit": 2506, - "src": "89:33:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "file": "../../utils/Address.sol", - "id": 3091, - "nodeType": "ImportDirective", - "scope": 3300, - "sourceUnit": 3596, - "src": "123:33:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 3092, - "nodeType": "StructuredDocumentation", - "src": "158:457:7", - "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." - }, - "fullyImplemented": true, - "id": 3299, - "linearizedBaseContracts": [3299], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3095, - "libraryName": { - "contractScope": null, - "id": 3093, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2505, - "src": "646:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2505", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "640:27:7", - "typeName": { - "id": 3094, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "659:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 3098, - "libraryName": { - "contractScope": null, - "id": 3096, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3595, - "src": "678:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "672:26:7", - "typeName": { - "id": 3097, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "690:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 3119, - "nodeType": "Block", - "src": "776:103:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3108, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3100, - "src": "806:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3111, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3100, - "src": "836:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3035, - "src": "836:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "836:23:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3114, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3102, - "src": "861:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3115, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3104, - "src": "865:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3109, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "813:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "813:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "813:58:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3107, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3298, - "src": "786:19:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "786:86:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3118, - "nodeType": "ExpressionStatement", - "src": "786:86:7" - } - ] - }, - "documentation": null, - "id": 3120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3100, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3120, - "src": "726:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3099, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "726:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3102, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3120, - "src": "740:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "740:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3104, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3120, - "src": "752:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "752:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "725:41:7" - }, - "returnParameters": { - "id": 3106, - "nodeType": "ParameterList", - "parameters": [], - "src": "776:0:7" - }, - "scope": 3299, - "src": "704:175:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3144, - "nodeType": "Block", - "src": "975:113:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3132, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3122, - "src": "1005:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3135, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3122, - "src": "1035:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3067, - "src": "1035:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 3137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1035:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3138, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3124, - "src": "1064:4:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3139, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3126, - "src": "1070:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3140, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3128, - "src": "1074:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3133, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "1012:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1012:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1012:68:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3131, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3298, - "src": "985:19:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "985:96:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3143, - "nodeType": "ExpressionStatement", - "src": "985:96:7" - } - ] - }, - "documentation": null, - "id": 3145, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3129, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3122, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3145, - "src": "911:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3121, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "911:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3124, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3145, - "src": "925:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "925:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3126, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3145, - "src": "939:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "939:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3128, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3145, - "src": "951:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3127, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "951:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "910:55:7" - }, - "returnParameters": { - "id": 3130, - "nodeType": "ParameterList", - "parameters": [], - "src": "975:0:7" - }, - "scope": 3299, - "src": "885:203:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3187, - "nodeType": "Block", - "src": "1424:537:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3156, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3152, - "src": "1713:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1722:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1713:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3159, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1712:12:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3164, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "1753:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "id": 3163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1745:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1745:7:7", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1745:13:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3166, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "1760:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3160, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "1729:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3045, - "src": "1729:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1729:39:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1772:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1729:44:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3170, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1728:46:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1712:62:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 3172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1788:56:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 3155, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "1704:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1704:150:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3174, - "nodeType": "ExpressionStatement", - "src": "1704:150:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3176, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "1884:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3179, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "1914:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3055, - "src": "1914:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1914:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3182, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3150, - "src": "1938:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3183, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3152, - "src": "1947:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3177, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "1891:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1891:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1891:62:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3175, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3298, - "src": "1864:19:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1864:90:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3186, - "nodeType": "ExpressionStatement", - "src": "1864:90:7" - } - ] - }, - "documentation": { - "id": 3146, - "nodeType": "StructuredDocumentation", - "src": "1094:249:7", - "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." - }, - "id": 3188, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3148, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3188, - "src": "1369:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3147, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "1369:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3150, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3188, - "src": "1383:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3149, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1383:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3152, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3188, - "src": "1400:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1400:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1368:46:7" - }, - "returnParameters": { - "id": 3154, - "nodeType": "ParameterList", - "parameters": [], - "src": "1424:0:7" - }, - "scope": 3299, - "src": "1348:613:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3223, - "nodeType": "Block", - "src": "2053:197:7", - "statements": [ - { - "assignments": [3198], - "declarations": [ - { - "constant": false, - "id": 3198, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3223, - "src": "2063:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2063:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3210, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3208, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3194, - "src": "2130:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3203, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2110:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2102:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3201, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2102:7:7", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2102:13:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3205, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3192, - "src": "2117:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3199, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3190, - "src": "2086:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3045, - "src": "2086:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2086:39:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "2086:43:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2086:50:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2063:73:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3212, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3190, - "src": "2166:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3215, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3190, - "src": "2196:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3055, - "src": "2196:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2196:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3218, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3192, - "src": "2220:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3219, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3198, - "src": "2229:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3213, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "2173:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2173:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2173:69:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3211, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3298, - "src": "2146:19:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2146:97:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3222, - "nodeType": "ExpressionStatement", - "src": "2146:97:7" - } - ] - }, - "documentation": null, - "id": 3224, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3190, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3224, - "src": "1998:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3189, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "1998:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3192, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3224, - "src": "2012:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2012:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3194, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3224, - "src": "2029:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3193, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2029:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:46:7" - }, - "returnParameters": { - "id": 3196, - "nodeType": "ParameterList", - "parameters": [], - "src": "2053:0:7" - }, - "scope": 3299, - "src": "1967:283:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3260, - "nodeType": "Block", - "src": "2342:242:7", - "statements": [ - { - "assignments": [3234], - "declarations": [ - { - "constant": false, - "id": 3234, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3260, - "src": "2352:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3233, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2352:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3247, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3244, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3230, - "src": "2419:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 3245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2426:43:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3239, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2399:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "id": 3238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2391:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3237, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2391:7:7", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2391:13:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3241, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3228, - "src": "2406:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3235, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3226, - "src": "2375:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3045, - "src": "2375:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2375:39:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "2375:43:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 3246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2375:95:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2352:118:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3249, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3226, - "src": "2500:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3252, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3226, - "src": "2530:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 3253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3055, - "src": "2530:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2530:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3255, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3228, - "src": "2554:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3256, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3234, - "src": "2563:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3250, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "2507:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2507:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2507:69:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3248, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3298, - "src": "2480:19:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2480:97:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3259, - "nodeType": "ExpressionStatement", - "src": "2480:97:7" - } - ] - }, - "documentation": null, - "id": 3261, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3231, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3226, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3261, - "src": "2287:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3225, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "2287:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3228, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3261, - "src": "2301:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3227, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2301:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3230, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3261, - "src": "2318:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3229, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2318:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2286:46:7" - }, - "returnParameters": { - "id": 3232, - "nodeType": "ParameterList", - "parameters": [], - "src": "2342:0:7" - }, - "scope": 3299, - "src": "2256:328:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3297, - "nodeType": "Block", - "src": "3037:681:7", - "statements": [ - { - "assignments": [3270], - "declarations": [ - { - "constant": false, - "id": 3270, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3297, - "src": "3386:23:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3269, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3386:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3279, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3276, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3266, - "src": "3440:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 3277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3446:34:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3273, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3264, - "src": "3420:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - ], - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3412:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3412:7:7", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:14:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 3390, - "src": "3412:27:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 3278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:69:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3386:95:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3280, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "3495:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 3281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3495:17:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3282, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3515:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3495:21:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3296, - "nodeType": "IfStatement", - "src": "3491:221:7", - "trueBody": { - "id": 3295, - "nodeType": "Block", - "src": "3518:194:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3287, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3270, - "src": "3635:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 3289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3648:4:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": { - "id": 3288, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3648:4:7", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - } - ], - "id": 3290, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3647:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 3285, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "3624:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3624:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 3291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3624:30:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 3292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3656:44:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 3284, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "3616:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3616:85:7", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3294, - "nodeType": "ExpressionStatement", - "src": "3616:85:7" - } - ] - } - } - ] - }, - "documentation": { - "id": 3262, - "nodeType": "StructuredDocumentation", - "src": "2590:372:7", - "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." - }, - "id": 3298, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3267, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3264, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3298, - "src": "2996:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3263, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "2996:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3266, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3298, - "src": "3010:17:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3265, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3010:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2995:33:7" - }, - "returnParameters": { - "id": 3268, - "nodeType": "ParameterList", - "parameters": [], - "src": "3037:0:7" - }, - "scope": 3299, - "src": "2967:751:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - } - ], - "scope": 3300, - "src": "616:3104:7" - } - ], - "src": "33:3688:7" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "exportedSymbols": { - "SafeERC20": [3299] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 3088, - "name": "PragmaDirective", - "src": "33:31:7" - }, - { - "attributes": { - "SourceUnit": 3087, - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "./IERC20.sol", - "scope": 3300, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 3089, - "name": "ImportDirective", - "src": "66:22:7" - }, - { - "attributes": { - "SourceUnit": 2506, - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "scope": 3300, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 3090, - "name": "ImportDirective", - "src": "89:33:7" - }, - { - "attributes": { - "SourceUnit": 3596, - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "file": "../../utils/Address.sol", - "scope": 3300, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 3091, - "name": "ImportDirective", - "src": "123:33:7" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "library", - "fullyImplemented": true, - "linearizedBaseContracts": [3299], - "name": "SafeERC20", - "scope": 3300 - }, - "children": [ - { - "attributes": { - "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." - }, - "id": 3092, - "name": "StructuredDocumentation", - "src": "158:457:7" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeMath", - "referencedDeclaration": 2505, - "type": "library SafeMath" - }, - "id": 3093, - "name": "UserDefinedTypeName", - "src": "646:8:7" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3094, - "name": "ElementaryTypeName", - "src": "659:7:7" - } - ], - "id": 3095, - "name": "UsingForDirective", - "src": "640:27:7" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Address", - "referencedDeclaration": 3595, - "type": "library Address" - }, - "id": 3096, - "name": "UserDefinedTypeName", - "src": "678:7:7" - }, - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3097, - "name": "ElementaryTypeName", - "src": "690:7:7" - } - ], - "id": 3098, - "name": "UsingForDirective", - "src": "672:26:7" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "safeTransfer", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3120, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3099, - "name": "UserDefinedTypeName", - "src": "726:6:7" - } - ], - "id": 3100, - "name": "VariableDeclaration", - "src": "726:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "to", - "overrides": null, - "scope": 3120, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3101, - "name": "ElementaryTypeName", - "src": "740:7:7" - } - ], - "id": 3102, - "name": "VariableDeclaration", - "src": "740:10:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3120, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3103, - "name": "ElementaryTypeName", - "src": "752:7:7" - } - ], - "id": 3104, - "name": "VariableDeclaration", - "src": "752:13:7" - } - ], - "id": 3105, - "name": "ParameterList", - "src": "725:41:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3106, - "name": "ParameterList", - "src": "776:0:7" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3298, - "type": "function (contract IERC20,bytes memory)", - "value": "_callOptionalReturn" - }, - "id": 3107, - "name": "Identifier", - "src": "786:19:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3100, - "type": "contract IERC20", - "value": "token" - }, - "id": 3108, - "name": "Identifier", - "src": "806:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodeWithSelector", - "referencedDeclaration": null, - "type": "function (bytes4) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3109, - "name": "Identifier", - "src": "813:3:7" - } - ], - "id": 3110, - "name": "MemberAccess", - "src": "813:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "selector", - "referencedDeclaration": null, - "type": "bytes4" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transfer", - "referencedDeclaration": 3035, - "type": "function (address,uint256) external returns (bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3100, - "type": "contract IERC20", - "value": "token" - }, - "id": 3111, - "name": "Identifier", - "src": "836:5:7" - } - ], - "id": 3112, - "name": "MemberAccess", - "src": "836:14:7" - } - ], - "id": 3113, - "name": "MemberAccess", - "src": "836:23:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3102, - "type": "address", - "value": "to" - }, - "id": 3114, - "name": "Identifier", - "src": "861:2:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3104, - "type": "uint256", - "value": "value" - }, - "id": 3115, - "name": "Identifier", - "src": "865:5:7" - } - ], - "id": 3116, - "name": "FunctionCall", - "src": "813:58:7" - } - ], - "id": 3117, - "name": "FunctionCall", - "src": "786:86:7" - } - ], - "id": 3118, - "name": "ExpressionStatement", - "src": "786:86:7" - } - ], - "id": 3119, - "name": "Block", - "src": "776:103:7" - } - ], - "id": 3120, - "name": "FunctionDefinition", - "src": "704:175:7" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "safeTransferFrom", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3145, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3121, - "name": "UserDefinedTypeName", - "src": "911:6:7" - } - ], - "id": 3122, - "name": "VariableDeclaration", - "src": "911:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "from", - "overrides": null, - "scope": 3145, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3123, - "name": "ElementaryTypeName", - "src": "925:7:7" - } - ], - "id": 3124, - "name": "VariableDeclaration", - "src": "925:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "to", - "overrides": null, - "scope": 3145, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3125, - "name": "ElementaryTypeName", - "src": "939:7:7" - } - ], - "id": 3126, - "name": "VariableDeclaration", - "src": "939:10:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3145, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3127, - "name": "ElementaryTypeName", - "src": "951:7:7" - } - ], - "id": 3128, - "name": "VariableDeclaration", - "src": "951:13:7" - } - ], - "id": 3129, - "name": "ParameterList", - "src": "910:55:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3130, - "name": "ParameterList", - "src": "975:0:7" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3298, - "type": "function (contract IERC20,bytes memory)", - "value": "_callOptionalReturn" - }, - "id": 3131, - "name": "Identifier", - "src": "985:19:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3122, - "type": "contract IERC20", - "value": "token" - }, - "id": 3132, - "name": "Identifier", - "src": "1005:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodeWithSelector", - "referencedDeclaration": null, - "type": "function (bytes4) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3133, - "name": "Identifier", - "src": "1012:3:7" - } - ], - "id": 3134, - "name": "MemberAccess", - "src": "1012:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "selector", - "referencedDeclaration": null, - "type": "bytes4" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transferFrom", - "referencedDeclaration": 3067, - "type": "function (address,address,uint256) external returns (bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3122, - "type": "contract IERC20", - "value": "token" - }, - "id": 3135, - "name": "Identifier", - "src": "1035:5:7" - } - ], - "id": 3136, - "name": "MemberAccess", - "src": "1035:18:7" - } - ], - "id": 3137, - "name": "MemberAccess", - "src": "1035:27:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3124, - "type": "address", - "value": "from" - }, - "id": 3138, - "name": "Identifier", - "src": "1064:4:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3126, - "type": "address", - "value": "to" - }, - "id": 3139, - "name": "Identifier", - "src": "1070:2:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3128, - "type": "uint256", - "value": "value" - }, - "id": 3140, - "name": "Identifier", - "src": "1074:5:7" - } - ], - "id": 3141, - "name": "FunctionCall", - "src": "1012:68:7" - } - ], - "id": 3142, - "name": "FunctionCall", - "src": "985:96:7" - } - ], - "id": 3143, - "name": "ExpressionStatement", - "src": "985:96:7" - } - ], - "id": 3144, - "name": "Block", - "src": "975:113:7" - } - ], - "id": 3145, - "name": "FunctionDefinition", - "src": "885:203:7" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "safeApprove", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." - }, - "id": 3146, - "name": "StructuredDocumentation", - "src": "1094:249:7" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3188, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3147, - "name": "UserDefinedTypeName", - "src": "1369:6:7" - } - ], - "id": 3148, - "name": "VariableDeclaration", - "src": "1369:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3188, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3149, - "name": "ElementaryTypeName", - "src": "1383:7:7" - } - ], - "id": 3150, - "name": "VariableDeclaration", - "src": "1383:15:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3188, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3151, - "name": "ElementaryTypeName", - "src": "1400:7:7" - } - ], - "id": 3152, - "name": "VariableDeclaration", - "src": "1400:13:7" - } - ], - "id": 3153, - "name": "ParameterList", - "src": "1368:46:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3154, - "name": "ParameterList", - "src": "1424:0:7" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3155, - "name": "Identifier", - "src": "1704:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "||", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3152, - "type": "uint256", - "value": "value" - }, - "id": 3156, - "name": "Identifier", - "src": "1713:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3157, - "name": "Literal", - "src": "1722:1:7" - } - ], - "id": 3158, - "name": "BinaryOperation", - "src": "1713:10:7" - } - ], - "id": 3159, - "name": "TupleExpression", - "src": "1712:12:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "allowance", - "referencedDeclaration": 3045, - "type": "function (address,address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3148, - "type": "contract IERC20", - "value": "token" - }, - "id": 3160, - "name": "Identifier", - "src": "1729:5:7" - } - ], - "id": 3161, - "name": "MemberAccess", - "src": "1729:15:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3162, - "name": "ElementaryTypeName", - "src": "1745:7:7" - } - ], - "id": 3163, - "name": "ElementaryTypeNameExpression", - "src": "1745:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -28, - "type": "library SafeERC20", - "value": "this" - }, - "id": 3164, - "name": "Identifier", - "src": "1753:4:7" - } - ], - "id": 3165, - "name": "FunctionCall", - "src": "1745:13:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3150, - "type": "address", - "value": "spender" - }, - "id": 3166, - "name": "Identifier", - "src": "1760:7:7" - } - ], - "id": 3167, - "name": "FunctionCall", - "src": "1729:39:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3168, - "name": "Literal", - "src": "1772:1:7" - } - ], - "id": 3169, - "name": "BinaryOperation", - "src": "1729:44:7" - } - ], - "id": 3170, - "name": "TupleExpression", - "src": "1728:46:7" - } - ], - "id": 3171, - "name": "BinaryOperation", - "src": "1712:62:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"", - "value": "SafeERC20: approve from non-zero to non-zero allowance" - }, - "id": 3172, - "name": "Literal", - "src": "1788:56:7" - } - ], - "id": 3173, - "name": "FunctionCall", - "src": "1704:150:7" - } - ], - "id": 3174, - "name": "ExpressionStatement", - "src": "1704:150:7" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3298, - "type": "function (contract IERC20,bytes memory)", - "value": "_callOptionalReturn" - }, - "id": 3175, - "name": "Identifier", - "src": "1864:19:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3148, - "type": "contract IERC20", - "value": "token" - }, - "id": 3176, - "name": "Identifier", - "src": "1884:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodeWithSelector", - "referencedDeclaration": null, - "type": "function (bytes4) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3177, - "name": "Identifier", - "src": "1891:3:7" - } - ], - "id": 3178, - "name": "MemberAccess", - "src": "1891:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "selector", - "referencedDeclaration": null, - "type": "bytes4" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "approve", - "referencedDeclaration": 3055, - "type": "function (address,uint256) external returns (bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3148, - "type": "contract IERC20", - "value": "token" - }, - "id": 3179, - "name": "Identifier", - "src": "1914:5:7" - } - ], - "id": 3180, - "name": "MemberAccess", - "src": "1914:13:7" - } - ], - "id": 3181, - "name": "MemberAccess", - "src": "1914:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3150, - "type": "address", - "value": "spender" - }, - "id": 3182, - "name": "Identifier", - "src": "1938:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3152, - "type": "uint256", - "value": "value" - }, - "id": 3183, - "name": "Identifier", - "src": "1947:5:7" - } - ], - "id": 3184, - "name": "FunctionCall", - "src": "1891:62:7" - } - ], - "id": 3185, - "name": "FunctionCall", - "src": "1864:90:7" - } - ], - "id": 3186, - "name": "ExpressionStatement", - "src": "1864:90:7" - } - ], - "id": 3187, - "name": "Block", - "src": "1424:537:7" - } - ], - "id": 3188, - "name": "FunctionDefinition", - "src": "1348:613:7" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "safeIncreaseAllowance", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3224, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3189, - "name": "UserDefinedTypeName", - "src": "1998:6:7" - } - ], - "id": 3190, - "name": "VariableDeclaration", - "src": "1998:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3224, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3191, - "name": "ElementaryTypeName", - "src": "2012:7:7" - } - ], - "id": 3192, - "name": "VariableDeclaration", - "src": "2012:15:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3224, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3193, - "name": "ElementaryTypeName", - "src": "2029:7:7" - } - ], - "id": 3194, - "name": "VariableDeclaration", - "src": "2029:13:7" - } - ], - "id": 3195, - "name": "ParameterList", - "src": "1997:46:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3196, - "name": "ParameterList", - "src": "2053:0:7" - }, - { - "children": [ - { - "attributes": { - "assignments": [3198] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "newAllowance", - "overrides": null, - "scope": 3223, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3197, - "name": "ElementaryTypeName", - "src": "2063:7:7" - } - ], - "id": 3198, - "name": "VariableDeclaration", - "src": "2063:20:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "allowance", - "referencedDeclaration": 3045, - "type": "function (address,address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3190, - "type": "contract IERC20", - "value": "token" - }, - "id": 3199, - "name": "Identifier", - "src": "2086:5:7" - } - ], - "id": 3200, - "name": "MemberAccess", - "src": "2086:15:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3201, - "name": "ElementaryTypeName", - "src": "2102:7:7" - } - ], - "id": 3202, - "name": "ElementaryTypeNameExpression", - "src": "2102:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "library SafeERC20", - "value": "this" - }, - "id": 3203, - "name": "Identifier", - "src": "2110:4:7" - } - ], - "id": 3204, - "name": "FunctionCall", - "src": "2102:13:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3192, - "type": "address", - "value": "spender" - }, - "id": 3205, - "name": "Identifier", - "src": "2117:7:7" - } - ], - "id": 3206, - "name": "FunctionCall", - "src": "2086:39:7" - } - ], - "id": 3207, - "name": "MemberAccess", - "src": "2086:43:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3194, - "type": "uint256", - "value": "value" - }, - "id": 3208, - "name": "Identifier", - "src": "2130:5:7" - } - ], - "id": 3209, - "name": "FunctionCall", - "src": "2086:50:7" - } - ], - "id": 3210, - "name": "VariableDeclarationStatement", - "src": "2063:73:7" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3298, - "type": "function (contract IERC20,bytes memory)", - "value": "_callOptionalReturn" - }, - "id": 3211, - "name": "Identifier", - "src": "2146:19:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3190, - "type": "contract IERC20", - "value": "token" - }, - "id": 3212, - "name": "Identifier", - "src": "2166:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodeWithSelector", - "referencedDeclaration": null, - "type": "function (bytes4) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3213, - "name": "Identifier", - "src": "2173:3:7" - } - ], - "id": 3214, - "name": "MemberAccess", - "src": "2173:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "selector", - "referencedDeclaration": null, - "type": "bytes4" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "approve", - "referencedDeclaration": 3055, - "type": "function (address,uint256) external returns (bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3190, - "type": "contract IERC20", - "value": "token" - }, - "id": 3215, - "name": "Identifier", - "src": "2196:5:7" - } - ], - "id": 3216, - "name": "MemberAccess", - "src": "2196:13:7" - } - ], - "id": 3217, - "name": "MemberAccess", - "src": "2196:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3192, - "type": "address", - "value": "spender" - }, - "id": 3218, - "name": "Identifier", - "src": "2220:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3198, - "type": "uint256", - "value": "newAllowance" - }, - "id": 3219, - "name": "Identifier", - "src": "2229:12:7" - } - ], - "id": 3220, - "name": "FunctionCall", - "src": "2173:69:7" - } - ], - "id": 3221, - "name": "FunctionCall", - "src": "2146:97:7" - } - ], - "id": 3222, - "name": "ExpressionStatement", - "src": "2146:97:7" - } - ], - "id": 3223, - "name": "Block", - "src": "2053:197:7" - } - ], - "id": 3224, - "name": "FunctionDefinition", - "src": "1967:283:7" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "safeDecreaseAllowance", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3261, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3225, - "name": "UserDefinedTypeName", - "src": "2287:6:7" - } - ], - "id": 3226, - "name": "VariableDeclaration", - "src": "2287:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 3261, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 3227, - "name": "ElementaryTypeName", - "src": "2301:7:7" - } - ], - "id": 3228, - "name": "VariableDeclaration", - "src": "2301:15:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "value", - "overrides": null, - "scope": 3261, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3229, - "name": "ElementaryTypeName", - "src": "2318:7:7" - } - ], - "id": 3230, - "name": "VariableDeclaration", - "src": "2318:13:7" - } - ], - "id": 3231, - "name": "ParameterList", - "src": "2286:46:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3232, - "name": "ParameterList", - "src": "2342:0:7" - }, - { - "children": [ - { - "attributes": { - "assignments": [3234] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "newAllowance", - "overrides": null, - "scope": 3260, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 3233, - "name": "ElementaryTypeName", - "src": "2352:7:7" - } - ], - "id": 3234, - "name": "VariableDeclaration", - "src": "2352:20:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "allowance", - "referencedDeclaration": 3045, - "type": "function (address,address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3226, - "type": "contract IERC20", - "value": "token" - }, - "id": 3235, - "name": "Identifier", - "src": "2375:5:7" - } - ], - "id": 3236, - "name": "MemberAccess", - "src": "2375:15:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3237, - "name": "ElementaryTypeName", - "src": "2391:7:7" - } - ], - "id": 3238, - "name": "ElementaryTypeNameExpression", - "src": "2391:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "library SafeERC20", - "value": "this" - }, - "id": 3239, - "name": "Identifier", - "src": "2399:4:7" - } - ], - "id": 3240, - "name": "FunctionCall", - "src": "2391:13:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3228, - "type": "address", - "value": "spender" - }, - "id": 3241, - "name": "Identifier", - "src": "2406:7:7" - } - ], - "id": 3242, - "name": "FunctionCall", - "src": "2375:39:7" - } - ], - "id": 3243, - "name": "MemberAccess", - "src": "2375:43:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3230, - "type": "uint256", - "value": "value" - }, - "id": 3244, - "name": "Identifier", - "src": "2419:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeERC20: decreased allowance below zero\"", - "value": "SafeERC20: decreased allowance below zero" - }, - "id": 3245, - "name": "Literal", - "src": "2426:43:7" - } - ], - "id": 3246, - "name": "FunctionCall", - "src": "2375:95:7" - } - ], - "id": 3247, - "name": "VariableDeclarationStatement", - "src": "2352:118:7" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3298, - "type": "function (contract IERC20,bytes memory)", - "value": "_callOptionalReturn" - }, - "id": 3248, - "name": "Identifier", - "src": "2480:19:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3226, - "type": "contract IERC20", - "value": "token" - }, - "id": 3249, - "name": "Identifier", - "src": "2500:5:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodeWithSelector", - "referencedDeclaration": null, - "type": "function (bytes4) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3250, - "name": "Identifier", - "src": "2507:3:7" - } - ], - "id": 3251, - "name": "MemberAccess", - "src": "2507:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "selector", - "referencedDeclaration": null, - "type": "bytes4" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "approve", - "referencedDeclaration": 3055, - "type": "function (address,uint256) external returns (bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3226, - "type": "contract IERC20", - "value": "token" - }, - "id": 3252, - "name": "Identifier", - "src": "2530:5:7" - } - ], - "id": 3253, - "name": "MemberAccess", - "src": "2530:13:7" - } - ], - "id": 3254, - "name": "MemberAccess", - "src": "2530:22:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3228, - "type": "address", - "value": "spender" - }, - "id": 3255, - "name": "Identifier", - "src": "2554:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3234, - "type": "uint256", - "value": "newAllowance" - }, - "id": 3256, - "name": "Identifier", - "src": "2563:12:7" - } - ], - "id": 3257, - "name": "FunctionCall", - "src": "2507:69:7" - } - ], - "id": 3258, - "name": "FunctionCall", - "src": "2480:97:7" - } - ], - "id": 3259, - "name": "ExpressionStatement", - "src": "2480:97:7" - } - ], - "id": 3260, - "name": "Block", - "src": "2342:242:7" - } - ], - "id": 3261, - "name": "FunctionDefinition", - "src": "2256:328:7" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_callOptionalReturn", - "overrides": null, - "scope": 3299, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." - }, - "id": 3262, - "name": "StructuredDocumentation", - "src": "2590:372:7" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 3298, - "stateVariable": false, - "storageLocation": "default", - "type": "contract IERC20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 3263, - "name": "UserDefinedTypeName", - "src": "2996:6:7" - } - ], - "id": 3264, - "name": "VariableDeclaration", - "src": "2996:12:7" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 3298, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3265, - "name": "ElementaryTypeName", - "src": "3010:5:7" - } - ], - "id": 3266, - "name": "VariableDeclaration", - "src": "3010:17:7" - } - ], - "id": 3267, - "name": "ParameterList", - "src": "2995:33:7" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 3268, - "name": "ParameterList", - "src": "3037:0:7" - }, - { - "children": [ - { - "attributes": { - "assignments": [3270] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "returndata", - "overrides": null, - "scope": 3297, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 3269, - "name": "ElementaryTypeName", - "src": "3386:5:7" - } - ], - "id": 3270, - "name": "VariableDeclaration", - "src": "3386:23:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "functionCall", - "referencedDeclaration": 3390, - "type": "function (address,bytes memory,string memory) returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 3271, - "name": "ElementaryTypeName", - "src": "3412:7:7" - } - ], - "id": 3272, - "name": "ElementaryTypeNameExpression", - "src": "3412:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3264, - "type": "contract IERC20", - "value": "token" - }, - "id": 3273, - "name": "Identifier", - "src": "3420:5:7" - } - ], - "id": 3274, - "name": "FunctionCall", - "src": "3412:14:7" - } - ], - "id": 3275, - "name": "MemberAccess", - "src": "3412:27:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3266, - "type": "bytes memory", - "value": "data" - }, - "id": 3276, - "name": "Identifier", - "src": "3440:4:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeERC20: low-level call failed\"", - "value": "SafeERC20: low-level call failed" - }, - "id": 3277, - "name": "Literal", - "src": "3446:34:7" - } - ], - "id": 3278, - "name": "FunctionCall", - "src": "3412:69:7" - } - ], - "id": 3279, - "name": "VariableDeclarationStatement", - "src": "3386:95:7" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3270, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3280, - "name": "Identifier", - "src": "3495:10:7" - } - ], - "id": 3281, - "name": "MemberAccess", - "src": "3495:17:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 3282, - "name": "Literal", - "src": "3515:1:7" - } - ], - "id": 3283, - "name": "BinaryOperation", - "src": "3495:21:7" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 3284, - "name": "Identifier", - "src": "3616:7:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "decode", - "referencedDeclaration": null, - "type": "function () pure" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 3285, - "name": "Identifier", - "src": "3624:3:7" - } - ], - "id": 3286, - "name": "MemberAccess", - "src": "3624:10:7" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3270, - "type": "bytes memory", - "value": "returndata" - }, - "id": 3287, - "name": "Identifier", - "src": "3635:10:7" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bool)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bool)" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": null - }, - "id": 3288, - "name": "ElementaryTypeName", - "src": "3648:4:7" - } - ], - "id": 3289, - "name": "ElementaryTypeNameExpression", - "src": "3648:4:7" - } - ], - "id": 3290, - "name": "TupleExpression", - "src": "3647:6:7" - } - ], - "id": 3291, - "name": "FunctionCall", - "src": "3624:30:7" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeERC20: ERC20 operation did not succeed\"", - "value": "SafeERC20: ERC20 operation did not succeed" - }, - "id": 3292, - "name": "Literal", - "src": "3656:44:7" - } - ], - "id": 3293, - "name": "FunctionCall", - "src": "3616:85:7" - } - ], - "id": 3294, - "name": "ExpressionStatement", - "src": "3616:85:7" - } - ], - "id": 3295, - "name": "Block", - "src": "3518:194:7" - } - ], - "id": 3296, - "name": "IfStatement", - "src": "3491:221:7" - } - ], - "id": 3297, - "name": "Block", - "src": "3037:681:7" - } - ], - "id": 3298, - "name": "FunctionDefinition", - "src": "2967:751:7" - } - ], - "id": 3299, - "name": "ContractDefinition", - "src": "616:3104:7" - } - ], - "id": 3300, - "name": "SourceUnit", - "src": "33:3688:7" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.924Z", - "devdoc": { - "details": "Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "kind": "dev", - "methods": {}, - "title": "SafeERC20", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/SafeMath.json b/packages/bridge-sdk/contracts/SafeMath.json deleted file mode 100644 index 8a23589..0000000 --- a/packages/bridge-sdk/contracts/SafeMath.json +++ /dev/null @@ -1,9420 +0,0 @@ -{ - "contractName": "SafeMath", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]}},\"version\":1}", - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122055f9260f387617f8a3c61d823235142789395d0039759e4f776f3b7674fd13ce64736f6c634300060c0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122055f9260f387617f8a3c61d823235142789395d0039759e4f776f3b7674fd13ce64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "630:6594:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "630:6594:4:-:0;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n", - "sourcePath": "@openzeppelin/contracts/math/SafeMath.sol", - "ast": { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [2505] - }, - "id": 2506, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2152, - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"], - "nodeType": "PragmaDirective", - "src": "33:31:4" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2153, - "nodeType": "StructuredDocumentation", - "src": "66:563:4", - "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." - }, - "fullyImplemented": true, - "id": 2505, - "linearizedBaseContracts": [2505], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2183, - "nodeType": "Block", - "src": "865:98:4", - "statements": [ - { - "assignments": [2166], - "declarations": [ - { - "constant": false, - "id": 2166, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2183, - "src": "875:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "875:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2170, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2167, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2156, - "src": "887:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 2168, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2158, - "src": "891:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "887:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "875:17:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2171, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2166, - "src": "906:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2172, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2156, - "src": "910:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "906:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2178, - "nodeType": "IfStatement", - "src": "902:28:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2174, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "921:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2175, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "928:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2176, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "920:10:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2164, - "id": 2177, - "nodeType": "Return", - "src": "913:17:4" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "948:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 2180, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2166, - "src": "954:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2181, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "947:9:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 2164, - "id": 2182, - "nodeType": "Return", - "src": "940:16:4" - } - ] - }, - "documentation": { - "id": 2154, - "nodeType": "StructuredDocumentation", - "src": "653:131:4", - "text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2184, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryAdd", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2156, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2184, - "src": "805:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "805:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2158, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2184, - "src": "816:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2157, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "816:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "804:22:4" - }, - "returnParameters": { - "id": 2164, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2161, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2184, - "src": "850:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "850:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2163, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2184, - "src": "856:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "856:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "849:15:4" - }, - "scope": 2505, - "src": "789:174:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2210, - "nodeType": "Block", - "src": "1185:75:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2196, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "1199:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2197, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "1203:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1199:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2203, - "nodeType": "IfStatement", - "src": "1195:28:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1214:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2200, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1221:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2201, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1213:10:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2195, - "id": 2202, - "nodeType": "Return", - "src": "1206:17:4" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2204, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1241:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2205, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "1247:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2206, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "1251:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1247:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2208, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1240:13:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 2195, - "id": 2209, - "nodeType": "Return", - "src": "1233:20:4" - } - ] - }, - "documentation": { - "id": 2185, - "nodeType": "StructuredDocumentation", - "src": "969:135:4", - "text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2211, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "trySub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2187, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2211, - "src": "1125:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2186, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1125:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2189, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2211, - "src": "1136:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1136:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1124:22:4" - }, - "returnParameters": { - "id": 2195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2192, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2211, - "src": "1170:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2191, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1170:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2194, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2211, - "src": "1176:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2193, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1176:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1169:15:4" - }, - "scope": 2505, - "src": "1109:151:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2251, - "nodeType": "Block", - "src": "1484:359:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2223, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2214, - "src": "1716:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2224, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1721:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1716:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2230, - "nodeType": "IfStatement", - "src": "1712:28:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1732:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2227, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1738:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2228, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1731:9:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2222, - "id": 2229, - "nodeType": "Return", - "src": "1724:16:4" - } - }, - { - "assignments": [2232], - "declarations": [ - { - "constant": false, - "id": 2232, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2251, - "src": "1750:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1750:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2236, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2233, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2214, - "src": "1762:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2234, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2216, - "src": "1766:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1762:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1750:17:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2237, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "1781:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2238, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2214, - "src": "1785:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1781:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2240, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2216, - "src": "1790:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1781:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2246, - "nodeType": "IfStatement", - "src": "1777:33:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1801:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1808:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2244, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1800:10:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2222, - "id": 2245, - "nodeType": "Return", - "src": "1793:17:4" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1828:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 2248, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "1834:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2249, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1827:9:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 2222, - "id": 2250, - "nodeType": "Return", - "src": "1820:16:4" - } - ] - }, - "documentation": { - "id": 2212, - "nodeType": "StructuredDocumentation", - "src": "1266:137:4", - "text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2252, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryMul", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2214, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2252, - "src": "1424:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2213, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1424:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2216, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2252, - "src": "1435:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2215, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1435:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1423:22:4" - }, - "returnParameters": { - "id": 2222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2219, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2252, - "src": "1469:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2218, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1469:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2221, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2252, - "src": "1475:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1475:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1468:15:4" - }, - "scope": 2505, - "src": "1408:435:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2278, - "nodeType": "Block", - "src": "2068:76:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2264, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2257, - "src": "2082:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2087:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2082:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2271, - "nodeType": "IfStatement", - "src": "2078:29:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2098:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2105:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2269, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2097:10:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2263, - "id": 2270, - "nodeType": "Return", - "src": "2090:17:4" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2272, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2125:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2273, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2255, - "src": "2131:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2274, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2257, - "src": "2135:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2131:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2276, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2124:13:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 2263, - "id": 2277, - "nodeType": "Return", - "src": "2117:20:4" - } - ] - }, - "documentation": { - "id": 2253, - "nodeType": "StructuredDocumentation", - "src": "1849:138:4", - "text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 2279, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryDiv", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2258, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2255, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2279, - "src": "2008:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2254, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2008:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2257, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2279, - "src": "2019:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2256, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2019:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2007:22:4" - }, - "returnParameters": { - "id": 2263, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2260, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2279, - "src": "2053:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2259, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2053:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2262, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2279, - "src": "2059:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2059:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2052:15:4" - }, - "scope": 2505, - "src": "1992:152:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2305, - "nodeType": "Block", - "src": "2379:76:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2291, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "2393:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2398:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2393:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2298, - "nodeType": "IfStatement", - "src": "2389:29:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2294, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2409:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2416:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 2296, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2408:10:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 2290, - "id": 2297, - "nodeType": "Return", - "src": "2401:17:4" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2299, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2436:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2300, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "2442:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 2301, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "2446:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2442:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2303, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2435:13:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 2290, - "id": 2304, - "nodeType": "Return", - "src": "2428:20:4" - } - ] - }, - "documentation": { - "id": 2280, - "nodeType": "StructuredDocumentation", - "src": "2150:148:4", - "text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 2306, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryMod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2285, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2282, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2306, - "src": "2319:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2319:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2284, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2306, - "src": "2330:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2330:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2318:22:4" - }, - "returnParameters": { - "id": 2290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2287, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2306, - "src": "2364:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2286, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2364:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2289, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2306, - "src": "2370:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2370:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2363:15:4" - }, - "scope": 2505, - "src": "2303:152:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2331, - "nodeType": "Block", - "src": "2757:108:4", - "statements": [ - { - "assignments": [2317], - "declarations": [ - { - "constant": false, - "id": 2317, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2331, - "src": "2767:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2316, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2767:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2321, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2318, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2309, - "src": "2779:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 2319, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "2783:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2779:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2767:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2323, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2317, - "src": "2802:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2324, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2309, - "src": "2807:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2802:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 2326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2810:29:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 2322, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2794:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2794:46:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2328, - "nodeType": "ExpressionStatement", - "src": "2794:46:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 2329, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2317, - "src": "2857:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2315, - "id": 2330, - "nodeType": "Return", - "src": "2850:8:4" - } - ] - }, - "documentation": { - "id": 2307, - "nodeType": "StructuredDocumentation", - "src": "2461:224:4", - "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow." - }, - "id": 2332, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2309, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2332, - "src": "2703:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2703:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2311, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2332, - "src": "2714:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2310, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2714:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2702:22:4" - }, - "returnParameters": { - "id": 2315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2314, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2332, - "src": "2748:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2748:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2747:9:4" - }, - "scope": 2505, - "src": "2690:175:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2353, - "nodeType": "Block", - "src": "3203:88:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2343, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2337, - "src": "3221:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2344, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2335, - "src": "3226:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3221:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 2346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3229:32:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 2342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "3213:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3213:49:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2348, - "nodeType": "ExpressionStatement", - "src": "3213:49:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2349, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2335, - "src": "3279:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2350, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2337, - "src": "3283:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3279:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2341, - "id": 2352, - "nodeType": "Return", - "src": "3272:12:4" - } - ] - }, - "documentation": { - "id": 2333, - "nodeType": "StructuredDocumentation", - "src": "2871:260:4", - "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 2354, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2335, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2354, - "src": "3149:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2334, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3149:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2337, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2354, - "src": "3160:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2336, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3160:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3148:22:4" - }, - "returnParameters": { - "id": 2341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2340, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2354, - "src": "3194:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2339, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3194:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3193:9:4" - }, - "scope": 2505, - "src": "3136:155:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2387, - "nodeType": "Block", - "src": "3605:148:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2364, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2357, - "src": "3619:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2365, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3624:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3619:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2369, - "nodeType": "IfStatement", - "src": "3615:20:4", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2367, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3634:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 2363, - "id": 2368, - "nodeType": "Return", - "src": "3627:8:4" - } - }, - { - "assignments": [2371], - "declarations": [ - { - "constant": false, - "id": 2371, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2387, - "src": "3645:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2370, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3645:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2375, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2372, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2357, - "src": "3657:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2373, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2359, - "src": "3661:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3657:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3645:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2377, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2371, - "src": "3680:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2378, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2357, - "src": "3684:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3680:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2380, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2359, - "src": "3689:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3680:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 2382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3692:35:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 2376, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "3672:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3672:56:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2384, - "nodeType": "ExpressionStatement", - "src": "3672:56:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 2385, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2371, - "src": "3745:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2363, - "id": 2386, - "nodeType": "Return", - "src": "3738:8:4" - } - ] - }, - "documentation": { - "id": 2355, - "nodeType": "StructuredDocumentation", - "src": "3297:236:4", - "text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow." - }, - "id": 2388, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2357, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2388, - "src": "3551:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2356, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3551:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2359, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2388, - "src": "3562:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2358, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3562:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3550:22:4" - }, - "returnParameters": { - "id": 2363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2362, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2388, - "src": "3596:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2361, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3596:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3595:9:4" - }, - "scope": 2505, - "src": "3538:215:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2409, - "nodeType": "Block", - "src": "4284:83:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2399, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2393, - "src": "4302:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4306:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4302:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 2402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4309:28:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 2398, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4294:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4294:44:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2404, - "nodeType": "ExpressionStatement", - "src": "4294:44:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2405, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2391, - "src": "4355:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2393, - "src": "4359:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4355:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2397, - "id": 2408, - "nodeType": "Return", - "src": "4348:12:4" - } - ] - }, - "documentation": { - "id": 2389, - "nodeType": "StructuredDocumentation", - "src": "3759:453:4", - "text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2410, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2391, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2410, - "src": "4230:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2390, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4230:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2393, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2410, - "src": "4241:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2392, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4241:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4229:22:4" - }, - "returnParameters": { - "id": 2397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2396, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2410, - "src": "4275:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4275:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4274:9:4" - }, - "scope": 2505, - "src": "4217:150:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2431, - "nodeType": "Block", - "src": "4887:81:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2421, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2415, - "src": "4905:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2422, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4909:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4905:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 2424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4912:26:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 2420, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4897:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4897:42:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2426, - "nodeType": "ExpressionStatement", - "src": "4897:42:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2427, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2413, - "src": "4956:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 2428, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2415, - "src": "4960:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4956:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2419, - "id": 2430, - "nodeType": "Return", - "src": "4949:12:4" - } - ] - }, - "documentation": { - "id": 2411, - "nodeType": "StructuredDocumentation", - "src": "4373:442:4", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2432, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2413, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2432, - "src": "4833:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2412, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4833:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2415, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2432, - "src": "4844:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2414, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4844:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4832:22:4" - }, - "returnParameters": { - "id": 2419, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2418, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2432, - "src": "4878:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2417, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4878:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4877:9:4" - }, - "scope": 2505, - "src": "4820:148:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2455, - "nodeType": "Block", - "src": "5527:68:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2445, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2437, - "src": "5545:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2446, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2435, - "src": "5550:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5545:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2448, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2439, - "src": "5553:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2444, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5537:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5537:29:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2450, - "nodeType": "ExpressionStatement", - "src": "5537:29:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2451, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2435, - "src": "5583:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2452, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2437, - "src": "5587:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5583:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2443, - "id": 2454, - "nodeType": "Return", - "src": "5576:12:4" - } - ] - }, - "documentation": { - "id": 2433, - "nodeType": "StructuredDocumentation", - "src": "4974:453:4", - "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 2456, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2440, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2435, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2456, - "src": "5445:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2434, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5445:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2437, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2456, - "src": "5456:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2436, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5456:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2439, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2456, - "src": "5467:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2438, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5467:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5444:50:4" - }, - "returnParameters": { - "id": 2443, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2442, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2456, - "src": "5518:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2441, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5518:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5517:9:4" - }, - "scope": 2505, - "src": "5432:163:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2479, - "nodeType": "Block", - "src": "6347:67:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2469, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2461, - "src": "6365:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6369:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6365:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2472, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "6372:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2468, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6357:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6357:28:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2474, - "nodeType": "ExpressionStatement", - "src": "6357:28:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2475, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2459, - "src": "6402:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2476, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2461, - "src": "6406:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6402:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2467, - "id": 2478, - "nodeType": "Return", - "src": "6395:12:4" - } - ] - }, - "documentation": { - "id": 2457, - "nodeType": "StructuredDocumentation", - "src": "5601:646:4", - "text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2480, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2459, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2480, - "src": "6265:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6265:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2461, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2480, - "src": "6276:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2460, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6276:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2463, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2480, - "src": "6287:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2462, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6287:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6264:50:4" - }, - "returnParameters": { - "id": 2467, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2466, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2480, - "src": "6338:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2465, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6338:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6337:9:4" - }, - "scope": 2505, - "src": "6252:162:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2503, - "nodeType": "Block", - "src": "7155:67:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2493, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "7173:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7177:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7173:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2496, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2487, - "src": "7180:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7165:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7165:28:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2498, - "nodeType": "ExpressionStatement", - "src": "7165:28:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2499, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2483, - "src": "7210:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 2500, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "7214:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7210:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2491, - "id": 2502, - "nodeType": "Return", - "src": "7203:12:4" - } - ] - }, - "documentation": { - "id": 2481, - "nodeType": "StructuredDocumentation", - "src": "6420:635:4", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting with custom message when dividing by zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryMod}.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2488, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2483, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2504, - "src": "7073:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2482, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7073:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2485, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2504, - "src": "7084:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2484, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7084:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2487, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2504, - "src": "7095:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2486, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7095:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7072:50:4" - }, - "returnParameters": { - "id": 2491, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2490, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2504, - "src": "7146:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2489, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7146:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7145:9:4" - }, - "scope": 2505, - "src": "7060:162:4", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 2506, - "src": "630:6594:4" - } - ], - "src": "33:7192:4" - }, - "legacyAST": { - "attributes": { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [2505] - }, - "license": "MIT" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", ">=", "0.6", ".0", "<", "0.8", ".0"] - }, - "id": 2152, - "name": "PragmaDirective", - "src": "33:31:4" - }, - { - "attributes": { - "abstract": false, - "baseContracts": [null], - "contractDependencies": [null], - "contractKind": "library", - "fullyImplemented": true, - "linearizedBaseContracts": [2505], - "name": "SafeMath", - "scope": 2506 - }, - "children": [ - { - "attributes": { - "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." - }, - "id": 2153, - "name": "StructuredDocumentation", - "src": "66:563:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "tryAdd", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2154, - "name": "StructuredDocumentation", - "src": "653:131:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2184, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2155, - "name": "ElementaryTypeName", - "src": "805:7:4" - } - ], - "id": 2156, - "name": "VariableDeclaration", - "src": "805:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2184, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2157, - "name": "ElementaryTypeName", - "src": "816:7:4" - } - ], - "id": 2158, - "name": "VariableDeclaration", - "src": "816:9:4" - } - ], - "id": 2159, - "name": "ParameterList", - "src": "804:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2184, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2160, - "name": "ElementaryTypeName", - "src": "850:4:4" - } - ], - "id": 2161, - "name": "VariableDeclaration", - "src": "850:4:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2184, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2162, - "name": "ElementaryTypeName", - "src": "856:7:4" - } - ], - "id": 2163, - "name": "VariableDeclaration", - "src": "856:7:4" - } - ], - "id": 2164, - "name": "ParameterList", - "src": "849:15:4" - }, - { - "children": [ - { - "attributes": { - "assignments": [2166] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "overrides": null, - "scope": 2183, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2165, - "name": "ElementaryTypeName", - "src": "875:7:4" - } - ], - "id": 2166, - "name": "VariableDeclaration", - "src": "875:9:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2156, - "type": "uint256", - "value": "a" - }, - "id": 2167, - "name": "Identifier", - "src": "887:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2158, - "type": "uint256", - "value": "b" - }, - "id": 2168, - "name": "Identifier", - "src": "891:1:4" - } - ], - "id": 2169, - "name": "BinaryOperation", - "src": "887:5:4" - } - ], - "id": 2170, - "name": "VariableDeclarationStatement", - "src": "875:17:4" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2166, - "type": "uint256", - "value": "c" - }, - "id": 2171, - "name": "Identifier", - "src": "906:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2156, - "type": "uint256", - "value": "a" - }, - "id": 2172, - "name": "Identifier", - "src": "910:1:4" - } - ], - "id": 2173, - "name": "BinaryOperation", - "src": "906:5:4" - }, - { - "attributes": { - "functionReturnParameters": 2164 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 2174, - "name": "Literal", - "src": "921:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2175, - "name": "Literal", - "src": "928:1:4" - } - ], - "id": 2176, - "name": "TupleExpression", - "src": "920:10:4" - } - ], - "id": 2177, - "name": "Return", - "src": "913:17:4" - } - ], - "id": 2178, - "name": "IfStatement", - "src": "902:28:4" - }, - { - "attributes": { - "functionReturnParameters": 2164 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "tuple(bool,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2179, - "name": "Literal", - "src": "948:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2166, - "type": "uint256", - "value": "c" - }, - "id": 2180, - "name": "Identifier", - "src": "954:1:4" - } - ], - "id": 2181, - "name": "TupleExpression", - "src": "947:9:4" - } - ], - "id": 2182, - "name": "Return", - "src": "940:16:4" - } - ], - "id": 2183, - "name": "Block", - "src": "865:98:4" - } - ], - "id": 2184, - "name": "FunctionDefinition", - "src": "789:174:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "trySub", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2185, - "name": "StructuredDocumentation", - "src": "969:135:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2211, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2186, - "name": "ElementaryTypeName", - "src": "1125:7:4" - } - ], - "id": 2187, - "name": "VariableDeclaration", - "src": "1125:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2211, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2188, - "name": "ElementaryTypeName", - "src": "1136:7:4" - } - ], - "id": 2189, - "name": "VariableDeclaration", - "src": "1136:9:4" - } - ], - "id": 2190, - "name": "ParameterList", - "src": "1124:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2211, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2191, - "name": "ElementaryTypeName", - "src": "1170:4:4" - } - ], - "id": 2192, - "name": "VariableDeclaration", - "src": "1170:4:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2211, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2193, - "name": "ElementaryTypeName", - "src": "1176:7:4" - } - ], - "id": 2194, - "name": "VariableDeclaration", - "src": "1176:7:4" - } - ], - "id": 2195, - "name": "ParameterList", - "src": "1169:15:4" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2189, - "type": "uint256", - "value": "b" - }, - "id": 2196, - "name": "Identifier", - "src": "1199:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2187, - "type": "uint256", - "value": "a" - }, - "id": 2197, - "name": "Identifier", - "src": "1203:1:4" - } - ], - "id": 2198, - "name": "BinaryOperation", - "src": "1199:5:4" - }, - { - "attributes": { - "functionReturnParameters": 2195 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 2199, - "name": "Literal", - "src": "1214:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2200, - "name": "Literal", - "src": "1221:1:4" - } - ], - "id": 2201, - "name": "TupleExpression", - "src": "1213:10:4" - } - ], - "id": 2202, - "name": "Return", - "src": "1206:17:4" - } - ], - "id": 2203, - "name": "IfStatement", - "src": "1195:28:4" - }, - { - "attributes": { - "functionReturnParameters": 2195 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "tuple(bool,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2204, - "name": "Literal", - "src": "1241:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2187, - "type": "uint256", - "value": "a" - }, - "id": 2205, - "name": "Identifier", - "src": "1247:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2189, - "type": "uint256", - "value": "b" - }, - "id": 2206, - "name": "Identifier", - "src": "1251:1:4" - } - ], - "id": 2207, - "name": "BinaryOperation", - "src": "1247:5:4" - } - ], - "id": 2208, - "name": "TupleExpression", - "src": "1240:13:4" - } - ], - "id": 2209, - "name": "Return", - "src": "1233:20:4" - } - ], - "id": 2210, - "name": "Block", - "src": "1185:75:4" - } - ], - "id": 2211, - "name": "FunctionDefinition", - "src": "1109:151:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "tryMul", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 2212, - "name": "StructuredDocumentation", - "src": "1266:137:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2252, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2213, - "name": "ElementaryTypeName", - "src": "1424:7:4" - } - ], - "id": 2214, - "name": "VariableDeclaration", - "src": "1424:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2252, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2215, - "name": "ElementaryTypeName", - "src": "1435:7:4" - } - ], - "id": 2216, - "name": "VariableDeclaration", - "src": "1435:9:4" - } - ], - "id": 2217, - "name": "ParameterList", - "src": "1423:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2252, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2218, - "name": "ElementaryTypeName", - "src": "1469:4:4" - } - ], - "id": 2219, - "name": "VariableDeclaration", - "src": "1469:4:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2252, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2220, - "name": "ElementaryTypeName", - "src": "1475:7:4" - } - ], - "id": 2221, - "name": "VariableDeclaration", - "src": "1475:7:4" - } - ], - "id": 2222, - "name": "ParameterList", - "src": "1468:15:4" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2214, - "type": "uint256", - "value": "a" - }, - "id": 2223, - "name": "Identifier", - "src": "1716:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2224, - "name": "Literal", - "src": "1721:1:4" - } - ], - "id": 2225, - "name": "BinaryOperation", - "src": "1716:6:4" - }, - { - "attributes": { - "functionReturnParameters": 2222 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2226, - "name": "Literal", - "src": "1732:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2227, - "name": "Literal", - "src": "1738:1:4" - } - ], - "id": 2228, - "name": "TupleExpression", - "src": "1731:9:4" - } - ], - "id": 2229, - "name": "Return", - "src": "1724:16:4" - } - ], - "id": 2230, - "name": "IfStatement", - "src": "1712:28:4" - }, - { - "attributes": { - "assignments": [2232] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "overrides": null, - "scope": 2251, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2231, - "name": "ElementaryTypeName", - "src": "1750:7:4" - } - ], - "id": 2232, - "name": "VariableDeclaration", - "src": "1750:9:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2214, - "type": "uint256", - "value": "a" - }, - "id": 2233, - "name": "Identifier", - "src": "1762:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2216, - "type": "uint256", - "value": "b" - }, - "id": 2234, - "name": "Identifier", - "src": "1766:1:4" - } - ], - "id": 2235, - "name": "BinaryOperation", - "src": "1762:5:4" - } - ], - "id": 2236, - "name": "VariableDeclarationStatement", - "src": "1750:17:4" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2232, - "type": "uint256", - "value": "c" - }, - "id": 2237, - "name": "Identifier", - "src": "1781:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2214, - "type": "uint256", - "value": "a" - }, - "id": 2238, - "name": "Identifier", - "src": "1785:1:4" - } - ], - "id": 2239, - "name": "BinaryOperation", - "src": "1781:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2216, - "type": "uint256", - "value": "b" - }, - "id": 2240, - "name": "Identifier", - "src": "1790:1:4" - } - ], - "id": 2241, - "name": "BinaryOperation", - "src": "1781:10:4" - }, - { - "attributes": { - "functionReturnParameters": 2222 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 2242, - "name": "Literal", - "src": "1801:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2243, - "name": "Literal", - "src": "1808:1:4" - } - ], - "id": 2244, - "name": "TupleExpression", - "src": "1800:10:4" - } - ], - "id": 2245, - "name": "Return", - "src": "1793:17:4" - } - ], - "id": 2246, - "name": "IfStatement", - "src": "1777:33:4" - }, - { - "attributes": { - "functionReturnParameters": 2222 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "tuple(bool,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2247, - "name": "Literal", - "src": "1828:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2232, - "type": "uint256", - "value": "c" - }, - "id": 2248, - "name": "Identifier", - "src": "1834:1:4" - } - ], - "id": 2249, - "name": "TupleExpression", - "src": "1827:9:4" - } - ], - "id": 2250, - "name": "Return", - "src": "1820:16:4" - } - ], - "id": 2251, - "name": "Block", - "src": "1484:359:4" - } - ], - "id": 2252, - "name": "FunctionDefinition", - "src": "1408:435:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "tryDiv", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 2253, - "name": "StructuredDocumentation", - "src": "1849:138:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2279, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2254, - "name": "ElementaryTypeName", - "src": "2008:7:4" - } - ], - "id": 2255, - "name": "VariableDeclaration", - "src": "2008:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2279, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2256, - "name": "ElementaryTypeName", - "src": "2019:7:4" - } - ], - "id": 2257, - "name": "VariableDeclaration", - "src": "2019:9:4" - } - ], - "id": 2258, - "name": "ParameterList", - "src": "2007:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2279, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2259, - "name": "ElementaryTypeName", - "src": "2053:4:4" - } - ], - "id": 2260, - "name": "VariableDeclaration", - "src": "2053:4:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2279, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2261, - "name": "ElementaryTypeName", - "src": "2059:7:4" - } - ], - "id": 2262, - "name": "VariableDeclaration", - "src": "2059:7:4" - } - ], - "id": 2263, - "name": "ParameterList", - "src": "2052:15:4" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2257, - "type": "uint256", - "value": "b" - }, - "id": 2264, - "name": "Identifier", - "src": "2082:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2265, - "name": "Literal", - "src": "2087:1:4" - } - ], - "id": 2266, - "name": "BinaryOperation", - "src": "2082:6:4" - }, - { - "attributes": { - "functionReturnParameters": 2263 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 2267, - "name": "Literal", - "src": "2098:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2268, - "name": "Literal", - "src": "2105:1:4" - } - ], - "id": 2269, - "name": "TupleExpression", - "src": "2097:10:4" - } - ], - "id": 2270, - "name": "Return", - "src": "2090:17:4" - } - ], - "id": 2271, - "name": "IfStatement", - "src": "2078:29:4" - }, - { - "attributes": { - "functionReturnParameters": 2263 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "tuple(bool,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2272, - "name": "Literal", - "src": "2125:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2255, - "type": "uint256", - "value": "a" - }, - "id": 2273, - "name": "Identifier", - "src": "2131:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2257, - "type": "uint256", - "value": "b" - }, - "id": 2274, - "name": "Identifier", - "src": "2135:1:4" - } - ], - "id": 2275, - "name": "BinaryOperation", - "src": "2131:5:4" - } - ], - "id": 2276, - "name": "TupleExpression", - "src": "2124:13:4" - } - ], - "id": 2277, - "name": "Return", - "src": "2117:20:4" - } - ], - "id": 2278, - "name": "Block", - "src": "2068:76:4" - } - ], - "id": 2279, - "name": "FunctionDefinition", - "src": "1992:152:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "tryMod", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 2280, - "name": "StructuredDocumentation", - "src": "2150:148:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2306, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2281, - "name": "ElementaryTypeName", - "src": "2319:7:4" - } - ], - "id": 2282, - "name": "VariableDeclaration", - "src": "2319:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2306, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2283, - "name": "ElementaryTypeName", - "src": "2330:7:4" - } - ], - "id": 2284, - "name": "VariableDeclaration", - "src": "2330:9:4" - } - ], - "id": 2285, - "name": "ParameterList", - "src": "2318:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2306, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 2286, - "name": "ElementaryTypeName", - "src": "2364:4:4" - } - ], - "id": 2287, - "name": "VariableDeclaration", - "src": "2364:4:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2306, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2288, - "name": "ElementaryTypeName", - "src": "2370:7:4" - } - ], - "id": 2289, - "name": "VariableDeclaration", - "src": "2370:7:4" - } - ], - "id": 2290, - "name": "ParameterList", - "src": "2363:15:4" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2284, - "type": "uint256", - "value": "b" - }, - "id": 2291, - "name": "Identifier", - "src": "2393:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2292, - "name": "Literal", - "src": "2398:1:4" - } - ], - "id": 2293, - "name": "BinaryOperation", - "src": "2393:6:4" - }, - { - "attributes": { - "functionReturnParameters": 2290 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "tuple(bool,int_const 0)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 2294, - "name": "Literal", - "src": "2409:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2295, - "name": "Literal", - "src": "2416:1:4" - } - ], - "id": 2296, - "name": "TupleExpression", - "src": "2408:10:4" - } - ], - "id": 2297, - "name": "Return", - "src": "2401:17:4" - } - ], - "id": 2298, - "name": "IfStatement", - "src": "2389:29:4" - }, - { - "attributes": { - "functionReturnParameters": 2290 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "tuple(bool,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 2299, - "name": "Literal", - "src": "2436:4:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "%", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2282, - "type": "uint256", - "value": "a" - }, - "id": 2300, - "name": "Identifier", - "src": "2442:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2284, - "type": "uint256", - "value": "b" - }, - "id": 2301, - "name": "Identifier", - "src": "2446:1:4" - } - ], - "id": 2302, - "name": "BinaryOperation", - "src": "2442:5:4" - } - ], - "id": 2303, - "name": "TupleExpression", - "src": "2435:13:4" - } - ], - "id": 2304, - "name": "Return", - "src": "2428:20:4" - } - ], - "id": 2305, - "name": "Block", - "src": "2379:76:4" - } - ], - "id": 2306, - "name": "FunctionDefinition", - "src": "2303:152:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "add", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow." - }, - "id": 2307, - "name": "StructuredDocumentation", - "src": "2461:224:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2332, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2308, - "name": "ElementaryTypeName", - "src": "2703:7:4" - } - ], - "id": 2309, - "name": "VariableDeclaration", - "src": "2703:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2332, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2310, - "name": "ElementaryTypeName", - "src": "2714:7:4" - } - ], - "id": 2311, - "name": "VariableDeclaration", - "src": "2714:9:4" - } - ], - "id": 2312, - "name": "ParameterList", - "src": "2702:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2332, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2313, - "name": "ElementaryTypeName", - "src": "2748:7:4" - } - ], - "id": 2314, - "name": "VariableDeclaration", - "src": "2748:7:4" - } - ], - "id": 2315, - "name": "ParameterList", - "src": "2747:9:4" - }, - { - "children": [ - { - "attributes": { - "assignments": [2317] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "overrides": null, - "scope": 2331, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2316, - "name": "ElementaryTypeName", - "src": "2767:7:4" - } - ], - "id": 2317, - "name": "VariableDeclaration", - "src": "2767:9:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2309, - "type": "uint256", - "value": "a" - }, - "id": 2318, - "name": "Identifier", - "src": "2779:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2311, - "type": "uint256", - "value": "b" - }, - "id": 2319, - "name": "Identifier", - "src": "2783:1:4" - } - ], - "id": 2320, - "name": "BinaryOperation", - "src": "2779:5:4" - } - ], - "id": 2321, - "name": "VariableDeclarationStatement", - "src": "2767:17:4" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2322, - "name": "Identifier", - "src": "2794:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2317, - "type": "uint256", - "value": "c" - }, - "id": 2323, - "name": "Identifier", - "src": "2802:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2309, - "type": "uint256", - "value": "a" - }, - "id": 2324, - "name": "Identifier", - "src": "2807:1:4" - } - ], - "id": 2325, - "name": "BinaryOperation", - "src": "2802:6:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeMath: addition overflow\"", - "value": "SafeMath: addition overflow" - }, - "id": 2326, - "name": "Literal", - "src": "2810:29:4" - } - ], - "id": 2327, - "name": "FunctionCall", - "src": "2794:46:4" - } - ], - "id": 2328, - "name": "ExpressionStatement", - "src": "2794:46:4" - }, - { - "attributes": { - "functionReturnParameters": 2315 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2317, - "type": "uint256", - "value": "c" - }, - "id": 2329, - "name": "Identifier", - "src": "2857:1:4" - } - ], - "id": 2330, - "name": "Return", - "src": "2850:8:4" - } - ], - "id": 2331, - "name": "Block", - "src": "2757:108:4" - } - ], - "id": 2332, - "name": "FunctionDefinition", - "src": "2690:175:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "sub", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 2333, - "name": "StructuredDocumentation", - "src": "2871:260:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2354, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2334, - "name": "ElementaryTypeName", - "src": "3149:7:4" - } - ], - "id": 2335, - "name": "VariableDeclaration", - "src": "3149:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2354, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2336, - "name": "ElementaryTypeName", - "src": "3160:7:4" - } - ], - "id": 2337, - "name": "VariableDeclaration", - "src": "3160:9:4" - } - ], - "id": 2338, - "name": "ParameterList", - "src": "3148:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2354, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2339, - "name": "ElementaryTypeName", - "src": "3194:7:4" - } - ], - "id": 2340, - "name": "VariableDeclaration", - "src": "3194:7:4" - } - ], - "id": 2341, - "name": "ParameterList", - "src": "3193:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2342, - "name": "Identifier", - "src": "3213:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2337, - "type": "uint256", - "value": "b" - }, - "id": 2343, - "name": "Identifier", - "src": "3221:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2335, - "type": "uint256", - "value": "a" - }, - "id": 2344, - "name": "Identifier", - "src": "3226:1:4" - } - ], - "id": 2345, - "name": "BinaryOperation", - "src": "3221:6:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeMath: subtraction overflow\"", - "value": "SafeMath: subtraction overflow" - }, - "id": 2346, - "name": "Literal", - "src": "3229:32:4" - } - ], - "id": 2347, - "name": "FunctionCall", - "src": "3213:49:4" - } - ], - "id": 2348, - "name": "ExpressionStatement", - "src": "3213:49:4" - }, - { - "attributes": { - "functionReturnParameters": 2341 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2335, - "type": "uint256", - "value": "a" - }, - "id": 2349, - "name": "Identifier", - "src": "3279:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2337, - "type": "uint256", - "value": "b" - }, - "id": 2350, - "name": "Identifier", - "src": "3283:1:4" - } - ], - "id": 2351, - "name": "BinaryOperation", - "src": "3279:5:4" - } - ], - "id": 2352, - "name": "Return", - "src": "3272:12:4" - } - ], - "id": 2353, - "name": "Block", - "src": "3203:88:4" - } - ], - "id": 2354, - "name": "FunctionDefinition", - "src": "3136:155:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "mul", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow." - }, - "id": 2355, - "name": "StructuredDocumentation", - "src": "3297:236:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2388, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2356, - "name": "ElementaryTypeName", - "src": "3551:7:4" - } - ], - "id": 2357, - "name": "VariableDeclaration", - "src": "3551:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2388, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2358, - "name": "ElementaryTypeName", - "src": "3562:7:4" - } - ], - "id": 2359, - "name": "VariableDeclaration", - "src": "3562:9:4" - } - ], - "id": 2360, - "name": "ParameterList", - "src": "3550:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2388, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2361, - "name": "ElementaryTypeName", - "src": "3596:7:4" - } - ], - "id": 2362, - "name": "VariableDeclaration", - "src": "3596:7:4" - } - ], - "id": 2363, - "name": "ParameterList", - "src": "3595:9:4" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2357, - "type": "uint256", - "value": "a" - }, - "id": 2364, - "name": "Identifier", - "src": "3619:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2365, - "name": "Literal", - "src": "3624:1:4" - } - ], - "id": 2366, - "name": "BinaryOperation", - "src": "3619:6:4" - }, - { - "attributes": { - "functionReturnParameters": 2363 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2367, - "name": "Literal", - "src": "3634:1:4" - } - ], - "id": 2368, - "name": "Return", - "src": "3627:8:4" - } - ], - "id": 2369, - "name": "IfStatement", - "src": "3615:20:4" - }, - { - "attributes": { - "assignments": [2371] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "c", - "overrides": null, - "scope": 2387, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2370, - "name": "ElementaryTypeName", - "src": "3645:7:4" - } - ], - "id": 2371, - "name": "VariableDeclaration", - "src": "3645:9:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2357, - "type": "uint256", - "value": "a" - }, - "id": 2372, - "name": "Identifier", - "src": "3657:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2359, - "type": "uint256", - "value": "b" - }, - "id": 2373, - "name": "Identifier", - "src": "3661:1:4" - } - ], - "id": 2374, - "name": "BinaryOperation", - "src": "3657:5:4" - } - ], - "id": 2375, - "name": "VariableDeclarationStatement", - "src": "3645:17:4" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2376, - "name": "Identifier", - "src": "3672:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2371, - "type": "uint256", - "value": "c" - }, - "id": 2377, - "name": "Identifier", - "src": "3680:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2357, - "type": "uint256", - "value": "a" - }, - "id": 2378, - "name": "Identifier", - "src": "3684:1:4" - } - ], - "id": 2379, - "name": "BinaryOperation", - "src": "3680:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2359, - "type": "uint256", - "value": "b" - }, - "id": 2380, - "name": "Identifier", - "src": "3689:1:4" - } - ], - "id": 2381, - "name": "BinaryOperation", - "src": "3680:10:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeMath: multiplication overflow\"", - "value": "SafeMath: multiplication overflow" - }, - "id": 2382, - "name": "Literal", - "src": "3692:35:4" - } - ], - "id": 2383, - "name": "FunctionCall", - "src": "3672:56:4" - } - ], - "id": 2384, - "name": "ExpressionStatement", - "src": "3672:56:4" - }, - { - "attributes": { - "functionReturnParameters": 2363 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2371, - "type": "uint256", - "value": "c" - }, - "id": 2385, - "name": "Identifier", - "src": "3745:1:4" - } - ], - "id": 2386, - "name": "Return", - "src": "3738:8:4" - } - ], - "id": 2387, - "name": "Block", - "src": "3605:148:4" - } - ], - "id": 2388, - "name": "FunctionDefinition", - "src": "3538:215:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "div", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2389, - "name": "StructuredDocumentation", - "src": "3759:453:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2410, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2390, - "name": "ElementaryTypeName", - "src": "4230:7:4" - } - ], - "id": 2391, - "name": "VariableDeclaration", - "src": "4230:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2410, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2392, - "name": "ElementaryTypeName", - "src": "4241:7:4" - } - ], - "id": 2393, - "name": "VariableDeclaration", - "src": "4241:9:4" - } - ], - "id": 2394, - "name": "ParameterList", - "src": "4229:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2410, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2395, - "name": "ElementaryTypeName", - "src": "4275:7:4" - } - ], - "id": 2396, - "name": "VariableDeclaration", - "src": "4275:7:4" - } - ], - "id": 2397, - "name": "ParameterList", - "src": "4274:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2398, - "name": "Identifier", - "src": "4294:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2393, - "type": "uint256", - "value": "b" - }, - "id": 2399, - "name": "Identifier", - "src": "4302:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2400, - "name": "Literal", - "src": "4306:1:4" - } - ], - "id": 2401, - "name": "BinaryOperation", - "src": "4302:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "536166654d6174683a206469766973696f6e206279207a65726f", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeMath: division by zero\"", - "value": "SafeMath: division by zero" - }, - "id": 2402, - "name": "Literal", - "src": "4309:28:4" - } - ], - "id": 2403, - "name": "FunctionCall", - "src": "4294:44:4" - } - ], - "id": 2404, - "name": "ExpressionStatement", - "src": "4294:44:4" - }, - { - "attributes": { - "functionReturnParameters": 2397 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2391, - "type": "uint256", - "value": "a" - }, - "id": 2405, - "name": "Identifier", - "src": "4355:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2393, - "type": "uint256", - "value": "b" - }, - "id": 2406, - "name": "Identifier", - "src": "4359:1:4" - } - ], - "id": 2407, - "name": "BinaryOperation", - "src": "4355:5:4" - } - ], - "id": 2408, - "name": "Return", - "src": "4348:12:4" - } - ], - "id": 2409, - "name": "Block", - "src": "4284:83:4" - } - ], - "id": 2410, - "name": "FunctionDefinition", - "src": "4217:150:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "mod", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2411, - "name": "StructuredDocumentation", - "src": "4373:442:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2432, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2412, - "name": "ElementaryTypeName", - "src": "4833:7:4" - } - ], - "id": 2413, - "name": "VariableDeclaration", - "src": "4833:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2432, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2414, - "name": "ElementaryTypeName", - "src": "4844:7:4" - } - ], - "id": 2415, - "name": "VariableDeclaration", - "src": "4844:9:4" - } - ], - "id": 2416, - "name": "ParameterList", - "src": "4832:22:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2432, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2417, - "name": "ElementaryTypeName", - "src": "4878:7:4" - } - ], - "id": 2418, - "name": "VariableDeclaration", - "src": "4878:7:4" - } - ], - "id": 2419, - "name": "ParameterList", - "src": "4877:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2420, - "name": "Identifier", - "src": "4897:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2415, - "type": "uint256", - "value": "b" - }, - "id": 2421, - "name": "Identifier", - "src": "4905:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2422, - "name": "Literal", - "src": "4909:1:4" - } - ], - "id": 2423, - "name": "BinaryOperation", - "src": "4905:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SafeMath: modulo by zero\"", - "value": "SafeMath: modulo by zero" - }, - "id": 2424, - "name": "Literal", - "src": "4912:26:4" - } - ], - "id": 2425, - "name": "FunctionCall", - "src": "4897:42:4" - } - ], - "id": 2426, - "name": "ExpressionStatement", - "src": "4897:42:4" - }, - { - "attributes": { - "functionReturnParameters": 2419 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "%", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2413, - "type": "uint256", - "value": "a" - }, - "id": 2427, - "name": "Identifier", - "src": "4956:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2415, - "type": "uint256", - "value": "b" - }, - "id": 2428, - "name": "Identifier", - "src": "4960:1:4" - } - ], - "id": 2429, - "name": "BinaryOperation", - "src": "4956:5:4" - } - ], - "id": 2430, - "name": "Return", - "src": "4949:12:4" - } - ], - "id": 2431, - "name": "Block", - "src": "4887:81:4" - } - ], - "id": 2432, - "name": "FunctionDefinition", - "src": "4820:148:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "sub", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 2433, - "name": "StructuredDocumentation", - "src": "4974:453:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2456, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2434, - "name": "ElementaryTypeName", - "src": "5445:7:4" - } - ], - "id": 2435, - "name": "VariableDeclaration", - "src": "5445:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2456, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2436, - "name": "ElementaryTypeName", - "src": "5456:7:4" - } - ], - "id": 2437, - "name": "VariableDeclaration", - "src": "5456:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 2456, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2438, - "name": "ElementaryTypeName", - "src": "5467:6:4" - } - ], - "id": 2439, - "name": "VariableDeclaration", - "src": "5467:26:4" - } - ], - "id": 2440, - "name": "ParameterList", - "src": "5444:50:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2456, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2441, - "name": "ElementaryTypeName", - "src": "5518:7:4" - } - ], - "id": 2442, - "name": "VariableDeclaration", - "src": "5518:7:4" - } - ], - "id": 2443, - "name": "ParameterList", - "src": "5517:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2444, - "name": "Identifier", - "src": "5537:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2437, - "type": "uint256", - "value": "b" - }, - "id": 2445, - "name": "Identifier", - "src": "5545:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2435, - "type": "uint256", - "value": "a" - }, - "id": 2446, - "name": "Identifier", - "src": "5550:1:4" - } - ], - "id": 2447, - "name": "BinaryOperation", - "src": "5545:6:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2439, - "type": "string memory", - "value": "errorMessage" - }, - "id": 2448, - "name": "Identifier", - "src": "5553:12:4" - } - ], - "id": 2449, - "name": "FunctionCall", - "src": "5537:29:4" - } - ], - "id": 2450, - "name": "ExpressionStatement", - "src": "5537:29:4" - }, - { - "attributes": { - "functionReturnParameters": 2443 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2435, - "type": "uint256", - "value": "a" - }, - "id": 2451, - "name": "Identifier", - "src": "5583:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2437, - "type": "uint256", - "value": "b" - }, - "id": 2452, - "name": "Identifier", - "src": "5587:1:4" - } - ], - "id": 2453, - "name": "BinaryOperation", - "src": "5583:5:4" - } - ], - "id": 2454, - "name": "Return", - "src": "5576:12:4" - } - ], - "id": 2455, - "name": "Block", - "src": "5527:68:4" - } - ], - "id": 2456, - "name": "FunctionDefinition", - "src": "5432:163:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "div", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2457, - "name": "StructuredDocumentation", - "src": "5601:646:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2480, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2458, - "name": "ElementaryTypeName", - "src": "6265:7:4" - } - ], - "id": 2459, - "name": "VariableDeclaration", - "src": "6265:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2480, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2460, - "name": "ElementaryTypeName", - "src": "6276:7:4" - } - ], - "id": 2461, - "name": "VariableDeclaration", - "src": "6276:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 2480, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2462, - "name": "ElementaryTypeName", - "src": "6287:6:4" - } - ], - "id": 2463, - "name": "VariableDeclaration", - "src": "6287:26:4" - } - ], - "id": 2464, - "name": "ParameterList", - "src": "6264:50:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2480, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2465, - "name": "ElementaryTypeName", - "src": "6338:7:4" - } - ], - "id": 2466, - "name": "VariableDeclaration", - "src": "6338:7:4" - } - ], - "id": 2467, - "name": "ParameterList", - "src": "6337:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2468, - "name": "Identifier", - "src": "6357:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2461, - "type": "uint256", - "value": "b" - }, - "id": 2469, - "name": "Identifier", - "src": "6365:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2470, - "name": "Literal", - "src": "6369:1:4" - } - ], - "id": 2471, - "name": "BinaryOperation", - "src": "6365:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2463, - "type": "string memory", - "value": "errorMessage" - }, - "id": 2472, - "name": "Identifier", - "src": "6372:12:4" - } - ], - "id": 2473, - "name": "FunctionCall", - "src": "6357:28:4" - } - ], - "id": 2474, - "name": "ExpressionStatement", - "src": "6357:28:4" - }, - { - "attributes": { - "functionReturnParameters": 2467 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2459, - "type": "uint256", - "value": "a" - }, - "id": 2475, - "name": "Identifier", - "src": "6402:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2461, - "type": "uint256", - "value": "b" - }, - "id": 2476, - "name": "Identifier", - "src": "6406:1:4" - } - ], - "id": 2477, - "name": "BinaryOperation", - "src": "6402:5:4" - } - ], - "id": 2478, - "name": "Return", - "src": "6395:12:4" - } - ], - "id": 2479, - "name": "Block", - "src": "6347:67:4" - } - ], - "id": 2480, - "name": "FunctionDefinition", - "src": "6252:162:4" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "mod", - "overrides": null, - "scope": 2505, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting with custom message when dividing by zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryMod}.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 2481, - "name": "StructuredDocumentation", - "src": "6420:635:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "a", - "overrides": null, - "scope": 2504, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2482, - "name": "ElementaryTypeName", - "src": "7073:7:4" - } - ], - "id": 2483, - "name": "VariableDeclaration", - "src": "7073:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "b", - "overrides": null, - "scope": 2504, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2484, - "name": "ElementaryTypeName", - "src": "7084:7:4" - } - ], - "id": 2485, - "name": "VariableDeclaration", - "src": "7084:9:4" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "errorMessage", - "overrides": null, - "scope": 2504, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 2486, - "name": "ElementaryTypeName", - "src": "7095:6:4" - } - ], - "id": 2487, - "name": "VariableDeclaration", - "src": "7095:26:4" - } - ], - "id": 2488, - "name": "ParameterList", - "src": "7072:50:4" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 2504, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2489, - "name": "ElementaryTypeName", - "src": "7146:7:4" - } - ], - "id": 2490, - "name": "VariableDeclaration", - "src": "7146:7:4" - } - ], - "id": 2491, - "name": "ParameterList", - "src": "7145:9:4" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2492, - "name": "Identifier", - "src": "7165:7:4" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2485, - "type": "uint256", - "value": "b" - }, - "id": 2493, - "name": "Identifier", - "src": "7173:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2494, - "name": "Literal", - "src": "7177:1:4" - } - ], - "id": 2495, - "name": "BinaryOperation", - "src": "7173:5:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2487, - "type": "string memory", - "value": "errorMessage" - }, - "id": 2496, - "name": "Identifier", - "src": "7180:12:4" - } - ], - "id": 2497, - "name": "FunctionCall", - "src": "7165:28:4" - } - ], - "id": 2498, - "name": "ExpressionStatement", - "src": "7165:28:4" - }, - { - "attributes": { - "functionReturnParameters": 2491 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "%", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2483, - "type": "uint256", - "value": "a" - }, - "id": 2499, - "name": "Identifier", - "src": "7210:1:4" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2485, - "type": "uint256", - "value": "b" - }, - "id": 2500, - "name": "Identifier", - "src": "7214:1:4" - } - ], - "id": 2501, - "name": "BinaryOperation", - "src": "7210:5:4" - } - ], - "id": 2502, - "name": "Return", - "src": "7203:12:4" - } - ], - "id": 2503, - "name": "Block", - "src": "7155:67:4" - } - ], - "id": 2504, - "name": "FunctionDefinition", - "src": "7060:162:4" - } - ], - "id": 2505, - "name": "ContractDefinition", - "src": "630:6594:4" - } - ], - "id": 2506, - "name": "SourceUnit", - "src": "33:7192:4" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.915Z", - "devdoc": { - "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.", - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/WETH.json b/packages/bridge-sdk/contracts/WETH.json deleted file mode 100644 index 47241fa..0000000 --- a/packages/bridge-sdk/contracts/WETH.json +++ /dev/null @@ -1,32099 +0,0 @@ -{ - "contractName": "WETH", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":\"WETH\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol\":{\"keccak256\":\"0x4a28e69afc4c1c1aee48c7b497f9b8452b295ddcf4bbf453d594a1467016d5f2\",\"license\":\"Unlicense\",\"urls\":[\"bzz-raw://279e22c43f79567e9f7842cfca8ad2329bbbad2eac30413b620796d51f308719\",\"dweb:/ipfs/QmbdRLJYoKJxDbDLeverNMHsNFEcxnohAA713UFLjLm3Jy\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":{\"keccak256\":\"0xdbd8e88a0a6cb69b6edc83c34d3c51a67560cb0a88d52e908c6d391435242999\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://630e2d852c4e534cff7d1beb00c3fc165a73d6e3a7ee394c5850cbf4047b0a32\",\"dweb:/ipfs/QmUe3mc6HwXCoL1Q6NACA4kMb6mavMKdZxDqVYG2jycoTh\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol\":{\"keccak256\":\"0x1aca747b823c4d8492ae379cfd9495e8ff19726302d943da56b2bb71aebecc73\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://716c755b41c76deb60297664878f07e0972867918fde13c20c196263d3daa554\",\"dweb:/ipfs/QmbrxvDYfcgSjBBnDdXyZJcwd8pYyyrQhYqY5h6DaxWKcy\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://991b44ff44e0496e8554a90f4c0512c28faed45104d40430019f3c67ea67740e\",\"dweb:/ipfs/Qmc3nRapVbcctELoZS5qe17zLkFB3bETBfwzCTMF1CSuGE\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a849c2d95e85463909e5b5c920b13e7a11216ca14127085e16d22b9379d52a\",\"dweb:/ipfs/QmUg3CZDbCCcQdroEpexBy5ZFd5vD1UWijWQq9qHZjtJNQ\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b95e56c1640d0ef789fc5c16269e141e992f6c8ac97cc6d377bd3825e9cab182\",\"dweb:/ipfs/QmVzaxJZY51EhagrcNnkxoU6Uq17RhATe7aHvtkC6wUkgK\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// contracts/Wormhole.sol\n// SPDX-License-Identifier: Apache 2\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport \"./BytesLib.sol\";\nimport \"./WrappedAsset.sol\";\n\ncontract Wormhole is ReentrancyGuard {\n using SafeERC20 for IERC20;\n using BytesLib for bytes;\n using SafeMath for uint256;\n\n uint64 constant MAX_UINT64 = 18_446_744_073_709_551_615;\n\n // Address of the Wrapped asset template\n address public wrappedAssetMaster;\n\n // Chain ID of Ethereum\n uint8 CHAIN_ID = 2;\n\n // Address of the official WETH contract\n address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n struct GuardianSet {\n address[] keys;\n uint32 expiration_time;\n }\n\n event LogGuardianSetChanged(\n uint32 oldGuardianIndex,\n uint32 newGuardianIndex\n );\n\n event LogTokensLocked(\n uint8 target_chain,\n uint8 token_chain,\n uint8 token_decimals,\n bytes32 indexed token,\n bytes32 indexed sender,\n bytes32 recipient,\n uint256 amount,\n uint32 nonce\n );\n\n struct ParsedVAA {\n uint8 version;\n bytes32 hash;\n uint32 guardian_set_index;\n uint32 timestamp;\n uint8 action;\n bytes payload;\n }\n\n // Mapping of guardian_set_index => guardian set\n mapping(uint32 => GuardianSet) public guardian_sets;\n // Current active guardian set\n uint32 public guardian_set_index;\n\n // Period for which a guardian set stays active after it has been replaced\n uint32 public guardian_set_expirity;\n\n // Mapping of already consumedVAAs\n mapping(bytes32 => bool) public consumedVAAs;\n\n // Mapping of wrapped asset ERC20 contracts\n mapping(bytes32 => address) public wrappedAssets;\n mapping(address => bool) public isWrappedAsset;\n\n constructor(GuardianSet memory initial_guardian_set, address wrapped_asset_master, uint32 _guardian_set_expirity) public {\n guardian_sets[0] = initial_guardian_set;\n // Explicitly set for doc purposes\n guardian_set_index = 0;\n guardian_set_expirity = _guardian_set_expirity;\n\n wrappedAssetMaster = wrapped_asset_master;\n }\n\n function getGuardianSet(uint32 idx) view public returns (GuardianSet memory gs) {\n return guardian_sets[idx];\n }\n\n function submitVAA(\n bytes calldata vaa\n ) public nonReentrant {\n ParsedVAA memory parsed_vaa = parseAndVerifyVAA(vaa);\n // Process VAA\n if (parsed_vaa.action == 0x01) {\n require(parsed_vaa.guardian_set_index == guardian_set_index, \"only the current guardian set can change the guardian set\");\n vaaUpdateGuardianSet(parsed_vaa.payload);\n } else if (parsed_vaa.action == 0x10) {\n vaaTransfer(parsed_vaa.payload);\n } else {\n revert(\"invalid VAA action\");\n }\n\n // Set the VAA as consumed\n consumedVAAs[parsed_vaa.hash] = true;\n }\n\n // parseAndVerifyVAA parses raw VAA data into a struct and verifies whether it contains sufficient signatures of an\n // active guardian set i.e. is valid according to Wormhole consensus rules.\n function parseAndVerifyVAA(bytes calldata vaa) public view returns (ParsedVAA memory parsed_vaa) {\n parsed_vaa.version = vaa.toUint8(0);\n require(parsed_vaa.version == 1, \"VAA version incompatible\");\n\n // Load 4 bytes starting from index 1\n parsed_vaa.guardian_set_index = vaa.toUint32(1);\n\n uint256 len_signers = vaa.toUint8(5);\n uint offset = 6 + 66 * len_signers;\n\n // Load 4 bytes timestamp\n parsed_vaa.timestamp = vaa.toUint32(offset);\n\n // Hash the body\n parsed_vaa.hash = keccak256(vaa.slice(offset, vaa.length - offset));\n require(!consumedVAAs[parsed_vaa.hash], \"VAA was already executed\");\n\n GuardianSet memory guardian_set = guardian_sets[parsed_vaa.guardian_set_index];\n require(guardian_set.keys.length > 0, \"invalid guardian set\");\n require(guardian_set.expiration_time == 0 || guardian_set.expiration_time > block.timestamp, \"guardian set has expired\");\n // We're using a fixed point number transformation with 1 decimal to deal with rounding.\n require(((guardian_set.keys.length * 10 / 3) * 2) / 10 + 1 <= len_signers, \"no quorum\");\n\n int16 last_index = - 1;\n for (uint i = 0; i < len_signers; i++) {\n uint8 index = vaa.toUint8(6 + i * 66);\n require(index > last_index, \"signature indices must be ascending\");\n last_index = int16(index);\n\n bytes32 r = vaa.toBytes32(7 + i * 66);\n bytes32 s = vaa.toBytes32(39 + i * 66);\n uint8 v = vaa.toUint8(71 + i * 66);\n v += 27;\n require(ecrecover(parsed_vaa.hash, v, r, s) == guardian_set.keys[index], \"VAA signature invalid\");\n }\n\n parsed_vaa.action = vaa.toUint8(offset + 4);\n parsed_vaa.payload = vaa.slice(offset + 5, vaa.length - (offset + 5));\n }\n\n function vaaUpdateGuardianSet(bytes memory data) private {\n uint32 new_guardian_set_index = data.toUint32(0);\n require(new_guardian_set_index == guardian_set_index + 1, \"index must increase in steps of 1\");\n uint8 len = data.toUint8(4);\n\n address[] memory new_guardians = new address[](len);\n for (uint i = 0; i < len; i++) {\n address addr = data.toAddress(5 + i * 20);\n new_guardians[i] = addr;\n }\n\n uint32 old_guardian_set_index = guardian_set_index;\n guardian_set_index = new_guardian_set_index;\n\n GuardianSet memory new_guardian_set = GuardianSet(new_guardians, 0);\n guardian_sets[guardian_set_index] = new_guardian_set;\n guardian_sets[old_guardian_set_index].expiration_time = uint32(block.timestamp) + guardian_set_expirity;\n\n emit LogGuardianSetChanged(old_guardian_set_index, guardian_set_index);\n }\n\n function vaaTransfer(bytes memory data) private {\n //uint32 nonce = data.toUint64(0);\n uint8 source_chain = data.toUint8(4);\n\n uint8 target_chain = data.toUint8(5);\n //bytes32 source_address = data.toBytes32(6);\n //bytes32 target_address = data.toBytes32(38);\n address target_address = data.toAddress(38 + 12);\n\n uint8 token_chain = data.toUint8(70);\n //bytes32 token_address = data.toBytes32(71);\n uint256 amount = data.toUint256(104);\n\n require(source_chain != target_chain, \"same chain transfers are not supported\");\n require(target_chain == CHAIN_ID, \"transfer must be incoming\");\n\n if (token_chain != CHAIN_ID) {\n bytes32 token_address = data.toBytes32(71);\n bytes32 asset_id = keccak256(abi.encodePacked(token_chain, token_address));\n\n // if yes: mint to address\n // if no: create and mint\n address wrapped_asset = wrappedAssets[asset_id];\n if (wrapped_asset == address(0)) {\n uint8 asset_decimals = data.toUint8(103);\n wrapped_asset = deployWrappedAsset(asset_id, token_chain, token_address, asset_decimals);\n }\n\n WrappedAsset(wrapped_asset).mint(target_address, amount);\n } else {\n address token_address = data.toAddress(71 + 12);\n\n uint8 decimals = ERC20(token_address).decimals();\n\n // Readjust decimals if they've previously been truncated\n if (decimals > 9) {\n amount = amount.mul(10 ** uint256(decimals - 9));\n }\n IERC20(token_address).safeTransfer(target_address, amount);\n }\n }\n\n function deployWrappedAsset(bytes32 seed, uint8 token_chain, bytes32 token_address, uint8 decimals) private returns (address asset){\n // Taken from https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/packages/lib/contracts/upgradeability/ProxyFactory.sol\n // Licensed under MIT\n bytes20 targetBytes = bytes20(wrappedAssetMaster);\n assembly {\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n }\n\n // Call initializer\n WrappedAsset(asset).initialize(token_chain, token_address, decimals);\n\n // Store address\n wrappedAssets[seed] = asset;\n isWrappedAsset[asset] = true;\n }\n\n function lockAssets(\n address asset,\n uint256 amount,\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce,\n bool refund_dust\n ) public nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint8 asset_chain = CHAIN_ID;\n bytes32 asset_address;\n uint8 decimals = ERC20(asset).decimals();\n\n if (isWrappedAsset[asset]) {\n WrappedAsset(asset).burn(msg.sender, amount);\n asset_chain = WrappedAsset(asset).assetChain();\n asset_address = WrappedAsset(asset).assetAddress();\n } else {\n uint256 balanceBefore = IERC20(asset).balanceOf(address(this));\n IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n\n // The amount that was transferred in is the delta between balance before and after the transfer.\n // This is to properly handle tokens that charge a fee on transfer.\n amount = balanceAfter.sub(balanceBefore);\n\n // Decimal adjust amount - we keep the dust\n if (decimals > 9) {\n uint256 original_amount = amount;\n amount = amount.div(10 ** uint256(decimals - 9));\n\n if (refund_dust) {\n IERC20(asset).safeTransfer(msg.sender, original_amount.mod(10 ** uint256(decimals - 9)));\n }\n\n decimals = 9;\n }\n\n require(balanceAfter.div(10 ** uint256(ERC20(asset).decimals() - 9)) <= MAX_UINT64, \"bridge balance would exceed maximum\");\n\n asset_address = bytes32(uint256(asset));\n }\n\n // Check here after truncation\n require(amount != 0, \"truncated amount must not be 0\");\n\n emit LogTokensLocked(target_chain, asset_chain, decimals, asset_address, bytes32(uint256(msg.sender)), recipient, amount, nonce);\n }\n\n function lockETH(\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce\n ) public payable nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint256 remainder = msg.value.mod(10 ** 9);\n uint256 transfer_amount = msg.value.div(10 ** 9);\n require(transfer_amount != 0, \"truncated amount must not be 0\");\n\n // Transfer back remainder\n msg.sender.transfer(remainder);\n\n // Wrap tx value in WETH\n WETH(WETHAddress).deposit{value : msg.value - remainder}();\n\n // Log deposit of WETH\n emit LogTokensLocked(target_chain, CHAIN_ID, 9, bytes32(uint256(WETHAddress)), bytes32(uint256(msg.sender)), recipient, transfer_amount, nonce);\n }\n\n fallback() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n\n receive() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n}\n\n\ninterface WETH is IERC20 {\n function deposit() external payable;\n\n function withdraw(uint256 amount) external;\n}\n", - "sourcePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "ast": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "exportedSymbols": { - "WETH": [1431], - "Wormhole": [1420] - }, - "id": 1432, - "license": "Apache 2", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 335, - "literals": ["solidity", "^", "0.6", ".0"], - "nodeType": "PragmaDirective", - "src": "64:23:1" - }, - { - "id": 336, - "literals": ["experimental", "ABIEncoderV2"], - "nodeType": "PragmaDirective", - "src": "88:33:1" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 337, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3009, - "src": "123:55:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "id": 338, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3087, - "src": "179:56:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "id": 339, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3300, - "src": "236:59:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "id": 340, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 2506, - "src": "296:51:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 341, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3659, - "src": "348:59:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "file": "./BytesLib.sol", - "id": 342, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 334, - "src": "408:24:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "file": "./WrappedAsset.sol", - "id": 343, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 2148, - "src": "433:28:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 344, - "name": "ReentrancyGuard", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3658, - "src": "484:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$3658", - "typeString": "contract ReentrancyGuard" - } - }, - "id": 345, - "nodeType": "InheritanceSpecifier", - "src": "484:15:1" - } - ], - "contractDependencies": [3658], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1420, - "linearizedBaseContracts": [1420, 3658], - "name": "Wormhole", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 348, - "libraryName": { - "contractScope": null, - "id": 346, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3299, - "src": "512:9:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "506:27:1", - "typeName": { - "contractScope": null, - "id": 347, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "526:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - } - }, - { - "id": 351, - "libraryName": { - "contractScope": null, - "id": 349, - "name": "BytesLib", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 333, - "src": "544:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_BytesLib_$333", - "typeString": "library BytesLib" - } - }, - "nodeType": "UsingForDirective", - "src": "538:25:1", - "typeName": { - "id": 350, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "557:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - } - }, - { - "id": 354, - "libraryName": { - "contractScope": null, - "id": 352, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2505, - "src": "574:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2505", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "568:27:1", - "typeName": { - "id": 353, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "587:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": true, - "id": 357, - "mutability": "constant", - "name": "MAX_UINT64", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "601:55:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - }, - "typeName": { - "id": 355, - "name": "uint64", - "nodeType": "ElementaryTypeName", - "src": "601:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31385f3434365f3734345f3037335f3730395f3535315f363135", - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "630:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18446744073709551615_by_1", - "typeString": "int_const 18446744073709551615" - }, - "value": "18_446_744_073_709_551_615" - }, - "visibility": "internal" - }, - { - "constant": false, - "functionSelector": "99da1d3c", - "id": 359, - "mutability": "mutable", - "name": "wrappedAssetMaster", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "708:33:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 358, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "708:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 362, - "mutability": "mutable", - "name": "CHAIN_ID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "776:18:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 360, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "776:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "793:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 365, - "mutability": "constant", - "name": "WETHAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "846:73:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 363, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "846:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "877:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - }, - "visibility": "internal" - }, - { - "canonicalName": "Wormhole.GuardianSet", - "id": 371, - "members": [ - { - "constant": false, - "id": 368, - "mutability": "mutable", - "name": "keys", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 371, - "src": "955:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 366, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "955:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 367, - "length": null, - "nodeType": "ArrayTypeName", - "src": "955:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 370, - "mutability": "mutable", - "name": "expiration_time", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 371, - "src": "979:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 369, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "979:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "GuardianSet", - "nodeType": "StructDefinition", - "scope": 1420, - "src": "926:82:1", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 377, - "name": "LogGuardianSetChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 373, - "indexed": false, - "mutability": "mutable", - "name": "oldGuardianIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 377, - "src": "1051:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 372, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1051:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 375, - "indexed": false, - "mutability": "mutable", - "name": "newGuardianIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 377, - "src": "1084:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 374, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1084:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1041:72:1" - }, - "src": "1014:100:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 395, - "name": "LogTokensLocked", - "nodeType": "EventDefinition", - "parameters": { - "id": 394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 379, - "indexed": false, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1151:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 378, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1151:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 381, - "indexed": false, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1179:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 380, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1179:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 383, - "indexed": false, - "mutability": "mutable", - "name": "token_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1206:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 382, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1206:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 385, - "indexed": true, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1236:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 384, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1236:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 387, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1267:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 386, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1267:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 389, - "indexed": false, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1299:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 388, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 391, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1326:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 390, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1326:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 393, - "indexed": false, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1350:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 392, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1350:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1141:227:1" - }, - "src": "1120:249:1" - }, - { - "canonicalName": "Wormhole.ParsedVAA", - "id": 408, - "members": [ - { - "constant": false, - "id": 397, - "mutability": "mutable", - "name": "version", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1402:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 396, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1402:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 399, - "mutability": "mutable", - "name": "hash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1425:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 398, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1425:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 401, - "mutability": "mutable", - "name": "guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1447:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 400, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1447:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 403, - "mutability": "mutable", - "name": "timestamp", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1482:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 402, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1482:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 405, - "mutability": "mutable", - "name": "action", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1508:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 404, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1508:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 407, - "mutability": "mutable", - "name": "payload", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1530:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 406, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1530:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "ParsedVAA", - "nodeType": "StructDefinition", - "scope": 1420, - "src": "1375:175:1", - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "42b0aefa", - "id": 412, - "mutability": "mutable", - "name": "guardian_sets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1609:51:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "typeName": { - "id": 411, - "keyType": { - "id": 409, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1617:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Mapping", - "src": "1609:30:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "valueType": { - "contractScope": null, - "id": 410, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "1627:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "822d82b3", - "id": 414, - "mutability": "mutable", - "name": "guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1701:32:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 413, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1701:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4db47840", - "id": 416, - "mutability": "mutable", - "name": "guardian_set_expirity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1819:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 415, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1819:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a31fe409", - "id": 420, - "mutability": "mutable", - "name": "consumedVAAs", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1900:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 419, - "keyType": { - "id": 417, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1908:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1900:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 418, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1919:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "b6694c2a", - "id": 424, - "mutability": "mutable", - "name": "wrappedAssets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1999:48:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "typeName": { - "id": 423, - "keyType": { - "id": 421, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2007:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1999:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "valueType": { - "id": 422, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2018:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "1a2be4da", - "id": 428, - "mutability": "mutable", - "name": "isWrappedAsset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "2053:46:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "typeName": { - "id": 427, - "keyType": { - "id": 425, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2061:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2053:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 426, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2072:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 455, - "nodeType": "Block", - "src": "2227:239:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 437, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "2237:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 439, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2251:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2237:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 440, - "name": "initial_guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2256:20:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "src": "2237:39:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 442, - "nodeType": "ExpressionStatement", - "src": "2237:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 443, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "2329:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2350:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2329:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 446, - "nodeType": "ExpressionStatement", - "src": "2329:22:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 447, - "name": "guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "2361:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 448, - "name": "_guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "2385:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "2361:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 450, - "nodeType": "ExpressionStatement", - "src": "2361:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 451, - "name": "wrappedAssetMaster", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "2418:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 452, - "name": "wrapped_asset_master", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 432, - "src": "2439:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2418:41:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 454, - "nodeType": "ExpressionStatement", - "src": "2418:41:1" - } - ] - }, - "documentation": null, - "id": 456, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 430, - "mutability": "mutable", - "name": "initial_guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2118:39:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 429, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "2118:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 432, - "mutability": "mutable", - "name": "wrapped_asset_master", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2159:28:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2159:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 434, - "mutability": "mutable", - "name": "_guardian_set_expirity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2189:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 433, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2117:102:1" - }, - "returnParameters": { - "id": 436, - "nodeType": "ParameterList", - "parameters": [], - "src": "2227:0:1" - }, - "scope": 1420, - "src": "2106:360:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 467, - "nodeType": "Block", - "src": "2552:42:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 463, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "2569:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 465, - "indexExpression": { - "argumentTypes": null, - "id": 464, - "name": "idx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 458, - "src": "2583:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2569:18:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "functionReturnParameters": 462, - "id": 466, - "nodeType": "Return", - "src": "2562:25:1" - } - ] - }, - "documentation": null, - "functionSelector": "f951975a", - "id": 468, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getGuardianSet", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 459, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 458, - "mutability": "mutable", - "name": "idx", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 468, - "src": "2496:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 457, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2496:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2495:12:1" - }, - "returnParameters": { - "id": 462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "gs", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 468, - "src": "2529:21:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 460, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "2529:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2528:23:1" - }, - "scope": 1420, - "src": "2472:122:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 523, - "nodeType": "Block", - "src": "2673:566:1", - "statements": [ - { - "assignments": [476], - "declarations": [ - { - "constant": false, - "id": 476, - "mutability": "mutable", - "name": "parsed_vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2683:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA" - }, - "typeName": { - "contractScope": null, - "id": 475, - "name": "ParsedVAA", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 408, - "src": "2683:9:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr", - "typeString": "struct Wormhole.ParsedVAA" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 480, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 478, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 470, - "src": "2731:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 477, - "name": "parseAndVerifyVAA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "2713:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes_calldata_ptr_$returns$_t_struct$_ParsedVAA_$408_memory_ptr_$", - "typeString": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)" - } - }, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2713:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2683:52:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 481, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2772:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 482, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "2772:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30783031", - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2793:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "0x01" - }, - "src": "2772:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 499, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3009:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "3009:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30783130", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3030:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "0x10" - }, - "src": "3009:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 513, - "nodeType": "Block", - "src": "3098:53:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "696e76616c69642056414120616374696f6e", - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3119:20:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - }, - "value": "invalid VAA action" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - } - ], - "id": 509, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "3112:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3112:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 512, - "nodeType": "ExpressionStatement", - "src": "3112:28:1" - } - ] - }, - "id": 514, - "nodeType": "IfStatement", - "src": "3005:146:1", - "trueBody": { - "id": 508, - "nodeType": "Block", - "src": "3036:56:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 504, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3062:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "3062:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 503, - "name": "vaaTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "3050:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes memory)" - } - }, - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3050:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 507, - "nodeType": "ExpressionStatement", - "src": "3050:31:1" - } - ] - } - }, - "id": 515, - "nodeType": "IfStatement", - "src": "2768:383:1", - "trueBody": { - "id": 498, - "nodeType": "Block", - "src": "2799:200:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 486, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2821:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 487, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "2821:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 488, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "2854:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "2821:51:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574", - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2874:59:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - }, - "value": "only the current guardian set can change the guardian set" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - } - ], - "id": 485, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2813:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2813:121:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 492, - "nodeType": "ExpressionStatement", - "src": "2813:121:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 494, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2969:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "2969:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 493, - "name": "vaaUpdateGuardianSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 889, - "src": "2948:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes memory)" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2948:40:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 497, - "nodeType": "ExpressionStatement", - "src": "2948:40:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 516, - "name": "consumedVAAs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 420, - "src": "3196:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 519, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 517, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3209:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 518, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "3209:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3196:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3228:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3196:36:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 522, - "nodeType": "ExpressionStatement", - "src": "3196:36:1" - } - ] - }, - "documentation": null, - "functionSelector": "3bc0aee6", - "id": 524, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 473, - "modifierName": { - "argumentTypes": null, - "id": 472, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "2660:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2660:12:1" - } - ], - "name": "submitVAA", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 471, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 470, - "mutability": "mutable", - "name": "vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 524, - "src": "2628:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 469, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2628:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2618:34:1" - }, - "returnParameters": { - "id": 474, - "nodeType": "ParameterList", - "parameters": [], - "src": "2673:0:1" - }, - "scope": 1420, - "src": "2600:639:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 780, - "nodeType": "Block", - "src": "3542:1748:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 531, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3552:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 533, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "version", - "nodeType": "MemberAccess", - "referencedDeclaration": 397, - "src": "3552:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3585:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "expression": { - "argumentTypes": null, - "id": 534, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3573:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "3573:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3573:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "3552:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 539, - "nodeType": "ExpressionStatement", - "src": "3552:35:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 541, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3605:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "version", - "nodeType": "MemberAccess", - "referencedDeclaration": 397, - "src": "3605:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3627:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3605:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5641412076657273696f6e20696e636f6d70617469626c65", - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - }, - "value": "VAA version incompatible" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - } - ], - "id": 540, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "3597:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3597:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 547, - "nodeType": "ExpressionStatement", - "src": "3597:60:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 548, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3714:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 550, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "3714:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3759:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 551, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3746:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "3746:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3746:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "3714:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 556, - "nodeType": "ExpressionStatement", - "src": "3714:47:1" - }, - { - "assignments": [558], - "declarations": [ - { - "constant": false, - "id": 558, - "mutability": "mutable", - "name": "len_signers", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "3772:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 557, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3772:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "35", - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3806:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "expression": { - "argumentTypes": null, - "id": 559, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3794:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "3794:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3794:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3772:36:1" - }, - { - "assignments": [565], - "declarations": [ - { - "constant": false, - "id": 565, - "mutability": "mutable", - "name": "offset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "3818:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 564, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3818:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 571, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3832:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3836:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 568, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "3841:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3832:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3818:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 572, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3897:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 574, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": 403, - "src": "3897:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 577, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "3933:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 575, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3920:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "3920:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3920:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "3897:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 580, - "nodeType": "ExpressionStatement", - "src": "3897:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 581, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3976:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 583, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "3976:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 587, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "4014:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 588, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4022:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4022:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 590, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "4035:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4022:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 585, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4004:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "slice", - "nodeType": "MemberAccess", - "referencedDeclaration": 55, - "src": "4004:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - } - }, - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4004:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 584, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "3994:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3994:49:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "3976:67:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 595, - "nodeType": "ExpressionStatement", - "src": "3976:67:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "4061:30:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 597, - "name": "consumedVAAs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 420, - "src": "4062:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 600, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 598, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "4075:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "4075:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4062:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5641412077617320616c7265616479206578656375746564", - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4093:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - }, - "value": "VAA was already executed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - } - ], - "id": 596, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4053:67:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 604, - "nodeType": "ExpressionStatement", - "src": "4053:67:1" - }, - { - "assignments": [606], - "declarations": [ - { - "constant": false, - "id": 606, - "mutability": "mutable", - "name": "guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "4131:31:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 605, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "4131:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 611, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 607, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "4165:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 610, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 608, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "4179:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "4179:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4165:44:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4131:78:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 613, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4227:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "4227:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4227:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4254:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4227:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e76616c696420677561726469616e20736574", - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4257:22:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - }, - "value": "invalid guardian set" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - } - ], - "id": 612, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4219:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4219:61:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 620, - "nodeType": "ExpressionStatement", - "src": "4219:61:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 622, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4298:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 623, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "4298:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4330:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4298:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 626, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4335:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 627, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "4335:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "4366:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4366:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4335:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4298:83:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "677561726469616e20736574206861732065787069726564", - "id": 632, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4383:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - }, - "value": "guardian set has expired" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - } - ], - "id": 621, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4290:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4290:120:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 634, - "nodeType": "ExpressionStatement", - "src": "4290:120:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 636, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4527:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 637, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "4527:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4527:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4554:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4527:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4559:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "4527:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 643, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4526:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4564:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "4526:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 646, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4525:41:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4569:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4525:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 649, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4574:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4525:50:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 651, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "4579:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4525:65:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f2071756f72756d", - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4592:11:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - }, - "value": "no quorum" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - } - ], - "id": 635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4517:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4517:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 655, - "nodeType": "ExpressionStatement", - "src": "4517:87:1" - }, - { - "assignments": [657], - "declarations": [ - { - "constant": false, - "id": 657, - "mutability": "mutable", - "name": "last_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "4615:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "typeName": { - "id": 656, - "name": "int16", - "nodeType": "ElementaryTypeName", - "src": "4615:5:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 660, - "initialValue": { - "argumentTypes": null, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "4634:3:1", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4636:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4615:22:1" - }, - { - "body": { - "id": 749, - "nodeType": "Block", - "src": "4686:465:1", - "statements": [ - { - "assignments": [672], - "declarations": [ - { - "constant": false, - "id": 672, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4700:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 671, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "4700:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 681, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4726:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 676, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4730:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4734:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4730:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4726:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 673, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4714:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "4714:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4714:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4700:37:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 683, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "4759:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 684, - "name": "last_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4767:10:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "src": "4759:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67", - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4779:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - }, - "value": "signature indices must be ascending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - } - ], - "id": 682, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4751:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4751:66:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "4751:66:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 689, - "name": "last_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4831:10:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 692, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "4850:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4844:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int16_$", - "typeString": "type(int16)" - }, - "typeName": { - "id": 690, - "name": "int16", - "nodeType": "ElementaryTypeName", - "src": "4844:5:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4844:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "src": "4831:25:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "4831:25:1" - }, - { - "assignments": [697], - "declarations": [ - { - "constant": false, - "id": 697, - "mutability": "mutable", - "name": "r", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4871:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 696, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 706, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4897:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4901:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4905:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4901:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4897:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 698, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4883:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "4883:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4883:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4871:37:1" - }, - { - "assignments": [708], - "declarations": [ - { - "constant": false, - "id": 708, - "mutability": "mutable", - "name": "s", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4922:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 707, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4922:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 717, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3339", - "id": 711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4948:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_39_by_1", - "typeString": "int_const 39" - }, - "value": "39" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4953:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4957:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4953:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4948:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 709, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4934:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "4934:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4934:26:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4922:38:1" - }, - { - "assignments": [719], - "declarations": [ - { - "constant": false, - "id": 719, - "mutability": "mutable", - "name": "v", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4974:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 718, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "4974:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 728, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3731", - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4996:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 723, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "5001:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5005:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "5001:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4996:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 720, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4984:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "4984:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:24:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4974:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 729, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "5022:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3237", - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5027:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "5022:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 732, - "nodeType": "ExpressionStatement", - "src": "5022:7:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 735, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5061:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 736, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "5061:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 737, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "5078:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 738, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "5081:1:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 739, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "5084:1:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 734, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -6, - "src": "5051:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5051:35:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 741, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "5090:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 742, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "5090:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 744, - "indexExpression": { - "argumentTypes": null, - "id": 743, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "5108:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5090:24:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5051:63:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "564141207369676e617475726520696e76616c6964", - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5116:23:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - }, - "value": "VAA signature invalid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - } - ], - "id": 733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5043:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5043:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 748, - "nodeType": "ExpressionStatement", - "src": "5043:97:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 665, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4664:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 666, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "4668:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4664:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 750, - "initializationExpression": { - "assignments": [662], - "declarations": [ - { - "constant": false, - "id": 662, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 750, - "src": "4652:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 661, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4652:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 664, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4661:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4652:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "4681:3:1", - "subExpression": { - "argumentTypes": null, - "id": 668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4681:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 670, - "nodeType": "ExpressionStatement", - "src": "4681:3:1" - }, - "nodeType": "ForStatement", - "src": "4647:504:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 751, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5161:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "5161:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 756, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5193:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "34", - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5202:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "src": "5193:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 754, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5181:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "5181:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5181:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5161:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 761, - "nodeType": "ExpressionStatement", - "src": "5161:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 762, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5214:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 764, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "5214:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 767, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5245:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5254:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "5245:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 770, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5257:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5257:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5271:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5280:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "5271:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 775, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5270:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5257:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 765, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5235:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "slice", - "nodeType": "MemberAccess", - "referencedDeclaration": 55, - "src": "5235:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - } - }, - "id": 777, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5235:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5214:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 779, - "nodeType": "ExpressionStatement", - "src": "5214:69:1" - } - ] - }, - "documentation": null, - "functionSelector": "600b9aa6", - "id": 781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "parseAndVerifyVAA", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 526, - "mutability": "mutable", - "name": "vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 781, - "src": "3472:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 525, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3472:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3471:20:1" - }, - "returnParameters": { - "id": 530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 529, - "mutability": "mutable", - "name": "parsed_vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 781, - "src": "3513:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA" - }, - "typeName": { - "contractScope": null, - "id": 528, - "name": "ParsedVAA", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 408, - "src": "3513:9:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr", - "typeString": "struct Wormhole.ParsedVAA" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3512:29:1" - }, - "scope": 1420, - "src": "3445:1845:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 888, - "nodeType": "Block", - "src": "5353:859:1", - "statements": [ - { - "assignments": [787], - "declarations": [ - { - "constant": false, - "id": 787, - "mutability": "mutable", - "name": "new_guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5363:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 786, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5363:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 792, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5409:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "expression": { - "argumentTypes": null, - "id": 788, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5395:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "5395:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5395:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5363:48:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 794, - "name": "new_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 787, - "src": "5429:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 795, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5455:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5476:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5455:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "5429:48:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420696e63726561736520696e207374657073206f662031", - "id": 799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5479:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - }, - "value": "index must increase in steps of 1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - } - ], - "id": 793, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5421:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5421:94:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 801, - "nodeType": "ExpressionStatement", - "src": "5421:94:1" - }, - { - "assignments": [803], - "declarations": [ - { - "constant": false, - "id": 803, - "mutability": "mutable", - "name": "len", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5525:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 802, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "5525:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "34", - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5550:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 804, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5537:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "5537:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5537:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5525:27:1" - }, - { - "assignments": [813], - "declarations": [ - { - "constant": false, - "id": 813, - "mutability": "mutable", - "name": "new_guardians", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5563:30:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 811, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5563:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 812, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5563:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 819, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 817, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "5610:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5596:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 814, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5600:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 815, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5600:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5596:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5563:51:1" - }, - { - "body": { - "id": 847, - "nodeType": "Block", - "src": "5655:103:1", - "statements": [ - { - "assignments": [831], - "declarations": [ - { - "constant": false, - "id": 831, - "mutability": "mutable", - "name": "addr", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 847, - "src": "5669:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5669:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5699:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 835, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5703:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3230", - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5707:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_20_by_1", - "typeString": "int_const 20" - }, - "value": "20" - }, - "src": "5703:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5699:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 832, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5684:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "5684:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5684:26:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5669:41:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 841, - "name": "new_guardians", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 813, - "src": "5724:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 843, - "indexExpression": { - "argumentTypes": null, - "id": 842, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5738:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5724:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 844, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 831, - "src": "5743:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5724:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 846, - "nodeType": "ExpressionStatement", - "src": "5724:23:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 824, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5641:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 825, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "5645:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5641:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 848, - "initializationExpression": { - "assignments": [821], - "declarations": [ - { - "constant": false, - "id": 821, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 848, - "src": "5629:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 820, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5629:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 823, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5638:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5629:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "5650:3:1", - "subExpression": { - "argumentTypes": null, - "id": 827, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5650:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "5650:3:1" - }, - "nodeType": "ForStatement", - "src": "5624:134:1" - }, - { - "assignments": [850], - "declarations": [ - { - "constant": false, - "id": 850, - "mutability": "mutable", - "name": "old_guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5768:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 849, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5768:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 852, - "initialValue": { - "argumentTypes": null, - "id": 851, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5800:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5768:50:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 853, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5828:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 854, - "name": "new_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 787, - "src": "5849:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "5828:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 856, - "nodeType": "ExpressionStatement", - "src": "5828:43:1" - }, - { - "assignments": [858], - "declarations": [ - { - "constant": false, - "id": 858, - "mutability": "mutable", - "name": "new_guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5882:35:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 857, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "5882:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 863, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 860, - "name": "new_guardians", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 813, - "src": "5932:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5947:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 859, - "name": "GuardianSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "5920:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_GuardianSet_$371_storage_ptr_$", - "typeString": "type(struct Wormhole.GuardianSet storage pointer)" - } - }, - "id": 862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5920:29:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5882:67:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 864, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "5959:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 866, - "indexExpression": { - "argumentTypes": null, - "id": 865, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5973:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5959:33:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 867, - "name": "new_guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 858, - "src": "5995:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "src": "5959:52:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 869, - "nodeType": "ExpressionStatement", - "src": "5959:52:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 870, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "6021:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 872, - "indexExpression": { - "argumentTypes": null, - "id": 871, - "name": "old_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 850, - "src": "6035:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6021:37:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 873, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "6021:53:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 876, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "6084:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6084:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6077:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": { - "id": 874, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6077:6:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6077:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 879, - "name": "guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "6103:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6077:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6021:103:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 882, - "nodeType": "ExpressionStatement", - "src": "6021:103:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 884, - "name": "old_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 850, - "src": "6162:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 885, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "6186:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 883, - "name": "LogGuardianSetChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 377, - "src": "6140:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", - "typeString": "function (uint32,uint32)" - } - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6140:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 887, - "nodeType": "EmitStatement", - "src": "6135:70:1" - } - ] - }, - "documentation": null, - "id": 889, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "vaaUpdateGuardianSet", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 784, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 783, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "5326:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 782, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5326:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5325:19:1" - }, - "returnParameters": { - "id": 785, - "nodeType": "ParameterList", - "parameters": [], - "src": "5353:0:1" - }, - "scope": 1420, - "src": "5296:916:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1050, - "nodeType": "Block", - "src": "6266:1644:1", - "statements": [ - { - "assignments": [895], - "declarations": [ - { - "constant": false, - "id": 895, - "mutability": "mutable", - "name": "source_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6319:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 894, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6319:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 900, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "34", - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6353:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 896, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6340:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6340:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6340:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6319:36:1" - }, - { - "assignments": [902], - "declarations": [ - { - "constant": false, - "id": 902, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6366:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 901, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6366:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 907, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "35", - "id": 905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6400:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "expression": { - "argumentTypes": null, - "id": 903, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6387:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6387:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6387:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6366:36:1" - }, - { - "assignments": [909], - "declarations": [ - { - "constant": false, - "id": 909, - "mutability": "mutable", - "name": "target_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6521:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6521:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 916, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3338", - "id": 912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6561:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_38_by_1", - "typeString": "int_const 38" - }, - "value": "38" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6566:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "6561:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 910, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6546:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "6546:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6546:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6521:48:1" - }, - { - "assignments": [918], - "declarations": [ - { - "constant": false, - "id": 918, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6580:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 917, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6580:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 923, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3730", - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6613:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - }, - "value": "70" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - } - ], - "expression": { - "argumentTypes": null, - "id": 919, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6600:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6600:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6600:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6580:36:1" - }, - { - "assignments": [925], - "declarations": [ - { - "constant": false, - "id": 925, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6680:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 924, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6680:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 930, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313034", - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6712:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - }, - "value": "104" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - } - ], - "expression": { - "argumentTypes": null, - "id": 926, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6697:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint256", - "nodeType": "MemberAccess", - "referencedDeclaration": 271, - "src": "6697:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint256)" - } - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6697:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6680:36:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 932, - "name": "source_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 895, - "src": "6735:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 933, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "6751:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6735:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564", - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6765:40:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - }, - "value": "same chain transfers are not supported" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - } - ], - "id": 931, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6727:79:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 937, - "nodeType": "ExpressionStatement", - "src": "6727:79:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 939, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "6824:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 940, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "6840:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6824:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472616e73666572206d75737420626520696e636f6d696e67", - "id": 942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6850:27:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - }, - "value": "transfer must be incoming" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - } - ], - "id": 938, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6816:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6816:62:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 944, - "nodeType": "ExpressionStatement", - "src": "6816:62:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 945, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "6893:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 946, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "6908:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6893:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1048, - "nodeType": "Block", - "src": "7514:390:1", - "statements": [ - { - "assignments": [1005], - "declarations": [ - { - "constant": false, - "id": 1005, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "7528:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1004, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7528:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1012, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - }, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3731", - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7567:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 1009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7572:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "7567:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - ], - "expression": { - "argumentTypes": null, - "id": 1006, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "7552:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "7552:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7552:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7528:47:1" - }, - { - "assignments": [1014], - "declarations": [ - { - "constant": false, - "id": 1014, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "7590:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1013, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7590:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1020, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1016, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "7613:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1015, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "7607:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7607:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "7607:29:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7607:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7590:48:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1021, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1014, - "src": "7727:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7738:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "7727:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1039, - "nodeType": "IfStatement", - "src": "7723:99:1", - "trueBody": { - "id": 1038, - "nodeType": "Block", - "src": "7741:81:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1024, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7759:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7779:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1030, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1014, - "src": "7793:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7804:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "7793:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7785:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1028, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7785:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7785:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7779:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1025, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7768:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2388, - "src": "7768:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7759:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1037, - "nodeType": "ExpressionStatement", - "src": "7759:48:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1044, - "name": "target_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "7870:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1045, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7886:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1041, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "7842:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1040, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "7835:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7835:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3120, - "src": "7835:34:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7835:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1047, - "nodeType": "ExpressionStatement", - "src": "7835:58:1" - } - ] - }, - "id": 1049, - "nodeType": "IfStatement", - "src": "6889:1015:1", - "trueBody": { - "id": 1003, - "nodeType": "Block", - "src": "6918:590:1", - "statements": [ - { - "assignments": [949], - "declarations": [ - { - "constant": false, - "id": 949, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "6932:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6932:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 954, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3731", - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6971:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - } - ], - "expression": { - "argumentTypes": null, - "id": 950, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6956:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "6956:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6956:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6932:42:1" - }, - { - "assignments": [956], - "declarations": [ - { - "constant": false, - "id": 956, - "mutability": "mutable", - "name": "asset_id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "6988:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 955, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6988:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 964, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 960, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "7034:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 961, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 949, - "src": "7047:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "7017:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7017:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7017:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 957, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "7007:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7007:55:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6988:74:1" - }, - { - "assignments": [966], - "declarations": [ - { - "constant": false, - "id": 966, - "mutability": "mutable", - "name": "wrapped_asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "7154:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 965, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7154:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 970, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 967, - "name": "wrappedAssets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 424, - "src": "7178:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 969, - "indexExpression": { - "argumentTypes": null, - "id": 968, - "name": "asset_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "7192:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7178:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7154:47:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 971, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7219:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7244:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7236:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7236:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7236:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7219:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 994, - "nodeType": "IfStatement", - "src": "7215:212:1", - "trueBody": { - "id": 993, - "nodeType": "Block", - "src": "7248:179:1", - "statements": [ - { - "assignments": [978], - "declarations": [ - { - "constant": false, - "id": 978, - "mutability": "mutable", - "name": "asset_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 993, - "src": "7266:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 977, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7266:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 983, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313033", - "id": 981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7302:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - }, - "value": "103" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - } - ], - "expression": { - "argumentTypes": null, - "id": 979, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "7289:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "7289:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7289:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7266:40:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 984, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7324:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 986, - "name": "asset_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "7359:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 987, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "7369:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 988, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 949, - "src": "7382:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 989, - "name": "asset_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 978, - "src": "7397:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 985, - "name": "deployWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1094, - "src": "7340:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_uint8_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,uint8) returns (address)" - } - }, - "id": 990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7340:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7324:88:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 992, - "nodeType": "ExpressionStatement", - "src": "7324:88:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 999, - "name": "target_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "7474:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1000, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7490:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 996, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7454:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 995, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "7441:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7441:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1511, - "src": "7441:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7441:56:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "7441:56:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1051, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "vaaTransfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 891, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1051, - "src": "6239:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 890, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6239:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6238:19:1" - }, - "returnParameters": { - "id": 893, - "nodeType": "ParameterList", - "parameters": [], - "src": "6266:0:1" - }, - "scope": 1420, - "src": "6218:1692:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1093, - "nodeType": "Block", - "src": "8047:808:1", - "statements": [ - { - "assignments": [1065], - "declarations": [ - { - "constant": false, - "id": 1065, - "mutability": "mutable", - "name": "targetBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1093, - "src": "8225:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - }, - "typeName": { - "id": 1064, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "8225:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1070, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1068, - "name": "wrappedAssetMaster", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "8255:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8247:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes20_$", - "typeString": "type(bytes20)" - }, - "typeName": { - "id": 1066, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "8247:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8247:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8225:49:1" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "8293:348:1", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "8307:24:1", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8326:4:1", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "8320:5:1" - }, - "nodeType": "YulFunctionCall", - "src": "8320:11:1" - }, - "variables": [ - { - "name": "clone", - "nodeType": "YulTypedName", - "src": "8311:5:1", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8351:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8358:66:1", - "type": "", - "value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8344:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8344:81:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8344:81:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8449:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8456:4:1", - "type": "", - "value": "0x14" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8445:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "8445:16:1" - }, - { - "name": "targetBytes", - "nodeType": "YulIdentifier", - "src": "8463:11:1" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8438:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8438:37:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8438:37:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8499:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8506:4:1", - "type": "", - "value": "0x28" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8495:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "8495:16:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8513:66:1", - "type": "", - "value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8488:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8488:92:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8488:92:1" - }, - { - "nodeType": "YulAssignment", - "src": "8593:38:1", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8610:1:1", - "type": "", - "value": "0" - }, - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8613:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8620:4:1", - "type": "", - "value": "0x37" - }, - { - "name": "seed", - "nodeType": "YulIdentifier", - "src": "8626:4:1" - } - ], - "functionName": { - "name": "create2", - "nodeType": "YulIdentifier", - "src": "8602:7:1" - }, - "nodeType": "YulFunctionCall", - "src": "8602:29:1" - }, - "variableNames": [ - { - "name": "asset", - "nodeType": "YulIdentifier", - "src": "8593:5:1" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1062, - "isOffset": false, - "isSlot": false, - "src": "8593:5:1", - "valueSize": 1 - }, - { - "declaration": 1053, - "isOffset": false, - "isSlot": false, - "src": "8626:4:1", - "valueSize": 1 - }, - { - "declaration": 1065, - "isOffset": false, - "isSlot": false, - "src": "8463:11:1", - "valueSize": 1 - } - ], - "id": 1071, - "nodeType": "InlineAssembly", - "src": "8284:357:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1076, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "8710:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1077, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "8723:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1078, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1059, - "src": "8738:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1073, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8692:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1072, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "8679:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8679:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 1490, - "src": "8679:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_bytes32_$_t_uint8_$returns$__$", - "typeString": "function (uint8,bytes32,uint8) external" - } - }, - "id": 1079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8679:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1080, - "nodeType": "ExpressionStatement", - "src": "8679:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1081, - "name": "wrappedAssets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 424, - "src": "8783:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 1083, - "indexExpression": { - "argumentTypes": null, - "id": 1082, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "8797:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8783:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1084, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8805:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8783:27:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1086, - "nodeType": "ExpressionStatement", - "src": "8783:27:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1087, - "name": "isWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "8820:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1089, - "indexExpression": { - "argumentTypes": null, - "id": 1088, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8835:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8820:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8844:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8820:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1092, - "nodeType": "ExpressionStatement", - "src": "8820:28:1" - } - ] - }, - "documentation": null, - "id": 1094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deployWrappedAsset", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1053, - "mutability": "mutable", - "name": "seed", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7944:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1052, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7944:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1055, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7958:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1054, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7958:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1057, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7977:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1056, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7977:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "8000:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1058, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8000:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7943:72:1" - }, - "returnParameters": { - "id": 1063, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1062, - "mutability": "mutable", - "name": "asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "8033:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1061, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8033:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8032:15:1" - }, - "scope": 1420, - "src": "7916:939:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1313, - "nodeType": "Block", - "src": "9057:1779:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1112, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "9075:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1113, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "9091:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "9075:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "id": 1115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9101:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - }, - "value": "must not transfer to the same chain" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "id": 1111, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9067:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9067:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1117, - "nodeType": "ExpressionStatement", - "src": "9067:72:1" - }, - { - "assignments": [1119], - "declarations": [ - { - "constant": false, - "id": 1119, - "mutability": "mutable", - "name": "asset_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9150:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1118, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9150:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1121, - "initialValue": { - "argumentTypes": null, - "id": 1120, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "9170:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9150:28:1" - }, - { - "assignments": [1123], - "declarations": [ - { - "constant": false, - "id": 1123, - "mutability": "mutable", - "name": "asset_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9188:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1122, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9188:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1124, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9188:21:1" - }, - { - "assignments": [1126], - "declarations": [ - { - "constant": false, - "id": 1126, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9219:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1125, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9219:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1132, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1128, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9242:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1127, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "9236:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9236:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "9236:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9236:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9219:40:1" - }, - { - "condition": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "isWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "9274:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9289:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9274:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1286, - "nodeType": "Block", - "src": "9496:1091:1", - "statements": [ - { - "assignments": [1163], - "declarations": [ - { - "constant": false, - "id": 1163, - "mutability": "mutable", - "name": "balanceBefore", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1286, - "src": "9510:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9510:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1173, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1170, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9566:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1165, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9541:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1164, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9534:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9534:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 3025, - "src": "9534:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 1172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9534:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9510:62:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9617:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9617:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1182, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9629:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9629:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9629:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9644:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1175, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1174, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9586:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9586:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3145, - "src": "9586:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 1185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9586:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1186, - "nodeType": "ExpressionStatement", - "src": "9586:65:1" - }, - { - "assignments": [1188], - "declarations": [ - { - "constant": false, - "id": 1188, - "mutability": "mutable", - "name": "balanceAfter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1286, - "src": "9665:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9665:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1198, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1195, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9720:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1194, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9712:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1193, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9712:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9712:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1190, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9695:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1189, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9688:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9688:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 3025, - "src": "9688:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9688:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9665:61:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9931:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1202, - "name": "balanceBefore", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1163, - "src": "9957:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1200, - "name": "balanceAfter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "9940:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2354, - "src": "9940:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9940:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9931:40:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1205, - "nodeType": "ExpressionStatement", - "src": "9931:40:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1206, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10046:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10057:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10046:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1254, - "nodeType": "IfStatement", - "src": "10042:344:1", - "trueBody": { - "id": 1253, - "nodeType": "Block", - "src": "10060:326:1", - "statements": [ - { - "assignments": [1210], - "declarations": [ - { - "constant": false, - "id": 1210, - "mutability": "mutable", - "name": "original_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1253, - "src": "10078:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10078:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1212, - "initialValue": { - "argumentTypes": null, - "id": 1211, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10104:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10078:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1213, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10128:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10148:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1219, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10162:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10173:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10162:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1218, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10154:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10154:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10154:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10148:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1214, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10137:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "10137:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1224, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10137:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10128:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1226, - "nodeType": "ExpressionStatement", - "src": "10128:48:1" - }, - { - "condition": { - "argumentTypes": null, - "id": 1227, - "name": "refund_dust", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "10199:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1248, - "nodeType": "IfStatement", - "src": "10195:146:1", - "trueBody": { - "id": 1247, - "nodeType": "Block", - "src": "10212:129:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1232, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10261:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10261:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10293:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1239, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10307:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1240, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10318:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10307:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10299:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10299:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10293:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1234, - "name": "original_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1210, - "src": "10273:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 2432, - "src": "10273:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10273:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1229, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10241:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1228, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "10234:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10234:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3120, - "src": "10234:26:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10234:88:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1246, - "nodeType": "ExpressionStatement", - "src": "10234:88:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1249, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10359:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "39", - "id": 1250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10370:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10359:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1252, - "nodeType": "ExpressionStatement", - "src": "10359:12:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10425:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1262, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10445:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1261, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "10439:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10439:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "10439:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10439:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10465:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10439:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1260, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10431:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1259, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10431:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10431:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10425:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1256, - "name": "balanceAfter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "10408:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "10408:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10408:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1271, - "name": "MAX_UINT64", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 357, - "src": "10472:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "src": "10408:74:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d", - "id": 1273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10484:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - }, - "value": "bridge balance would exceed maximum" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - } - ], - "id": 1255, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10400:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10400:122:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1275, - "nodeType": "ExpressionStatement", - "src": "10400:122:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "10537:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1281, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10569:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10561:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10561:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10561:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10553:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1277, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10553:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10553:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10537:39:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "10537:39:1" - } - ] - }, - "id": 1287, - "nodeType": "IfStatement", - "src": "9270:1317:1", - "trueBody": { - "id": 1161, - "nodeType": "Block", - "src": "9297:193:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1140, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9336:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9336:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1142, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9348:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1137, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9324:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1136, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9311:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1532, - "src": "9311:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 1143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1144, - "nodeType": "ExpressionStatement", - "src": "9311:44:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1145, - "name": "asset_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "9369:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1147, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9396:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1146, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9383:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9383:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "assetChain", - "nodeType": "MemberAccess", - "referencedDeclaration": 1443, - "src": "9383:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9383:32:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "9369:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1152, - "nodeType": "ExpressionStatement", - "src": "9369:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1153, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "9429:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1155, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9458:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1154, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9445:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9445:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "assetAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 1445, - "src": "9445:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$", - "typeString": "function () view external returns (bytes32)" - } - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9445:34:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9429:50:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1160, - "nodeType": "ExpressionStatement", - "src": "9429:50:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1289, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10644:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10654:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10644:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10657:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - }, - "value": "truncated amount must not be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "id": 1288, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10636:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10636:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1294, - "nodeType": "ExpressionStatement", - "src": "10636:54:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1296, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "10722:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1297, - "name": "asset_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "10736:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1298, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10749:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1299, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "10759:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1304, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10790:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10790:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10782:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1302, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10782:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10782:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1301, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10774:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1300, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10774:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10774:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1308, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1100, - "src": "10804:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1309, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10815:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1310, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1104, - "src": "10823:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 1295, - "name": "LogTokensLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 395, - "src": "10706:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$", - "typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)" - } - }, - "id": 1311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10706:123:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1312, - "nodeType": "EmitStatement", - "src": "10701:128:1" - } - ] - }, - "documentation": null, - "functionSelector": "70713960", - "id": 1314, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1109, - "modifierName": { - "argumentTypes": null, - "id": 1108, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "9044:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9044:12:1" - } - ], - "name": "lockAssets", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1096, - "mutability": "mutable", - "name": "asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8890:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1095, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8890:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1098, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8913:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1097, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8913:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1100, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8937:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1099, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8937:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1102, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8964:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1101, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8964:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1104, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8992:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 1103, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "8992:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1106, - "mutability": "mutable", - "name": "refund_dust", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "9014:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1105, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9014:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8880:156:1" - }, - "returnParameters": { - "id": 1110, - "nodeType": "ParameterList", - "parameters": [], - "src": "9057:0:1" - }, - "scope": 1420, - "src": "8861:1975:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1402, - "nodeType": "Block", - "src": "10970:636:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1326, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1318, - "src": "10988:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1327, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "11004:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "10988:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "id": 1329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11014:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - }, - "value": "must not transfer to the same chain" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "id": 1325, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10980:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10980:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1331, - "nodeType": "ExpressionStatement", - "src": "10980:72:1" - }, - { - "assignments": [1333], - "declarations": [ - { - "constant": false, - "id": 1333, - "mutability": "mutable", - "name": "remainder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1402, - "src": "11063:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1332, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11063:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1341, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "id": 1339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11097:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11103:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "11097:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1334, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11083:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11083:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 2432, - "src": "11083:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11083:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11063:42:1" - }, - { - "assignments": [1343], - "declarations": [ - { - "constant": false, - "id": 1343, - "mutability": "mutable", - "name": "transfer_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1402, - "src": "11115:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1342, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11115:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1351, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "id": 1349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11155:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11161:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "11155:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1344, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11141:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11141:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "11141:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11115:48:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1353, - "name": "transfer_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1343, - "src": "11181:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11200:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11181:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "id": 1356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11203:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - }, - "value": "truncated amount must not be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "id": 1352, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "11173:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11173:63:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1358, - "nodeType": "ExpressionStatement", - "src": "11173:63:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1364, - "name": "remainder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1333, - "src": "11302:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1359, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11282:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11282:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 1363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11282:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11282:30:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1366, - "nodeType": "ExpressionStatement", - "src": "11282:30:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1368, - "name": "WETHAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 365, - "src": "11361:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1367, - "name": "WETH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1431, - "src": "11356:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WETH_$1431_$", - "typeString": "type(contract WETH)" - } - }, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11356:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WETH_$1431", - "typeString": "contract WETH" - } - }, - "id": 1370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 1425, - "src": "11356:25:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$__$returns$__$", - "typeString": "function () payable external" - } - }, - "id": 1375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1371, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11390:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11390:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1373, - "name": "remainder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1333, - "src": "11402:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11390:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "11356:56:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$__$returns$__$value", - "typeString": "function () payable external" - } - }, - "id": 1376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11356:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1377, - "nodeType": "ExpressionStatement", - "src": "11356:58:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1379, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1318, - "src": "11477:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1380, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "11491:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "hexValue": "39", - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11501:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1386, - "name": "WETHAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 365, - "src": "11520:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11512:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11512:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11512:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11504:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1382, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11504:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11504:29:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1393, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11551:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11551:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11543:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11543:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11543:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1389, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11535:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11535:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1397, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1316, - "src": "11565:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1398, - "name": "transfer_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1343, - "src": "11576:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1399, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1320, - "src": "11593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 1378, - "name": "LogTokensLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 395, - "src": "11461:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$", - "typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)" - } - }, - "id": 1400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11461:138:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1401, - "nodeType": "EmitStatement", - "src": "11456:143:1" - } - ] - }, - "documentation": null, - "functionSelector": "58d62e46", - "id": 1403, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1323, - "modifierName": { - "argumentTypes": null, - "id": 1322, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "10957:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10957:12:1" - } - ], - "name": "lockETH", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1321, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1316, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10868:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1315, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10868:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1318, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10895:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1317, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10895:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1320, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10923:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 1319, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10923:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10858:83:1" - }, - "returnParameters": { - "id": 1324, - "nodeType": "ParameterList", - "parameters": [], - "src": "10970:0:1" - }, - "scope": 1420, - "src": "10842:764:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1410, - "nodeType": "Block", - "src": "11640:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11648:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - }, - "value": "please use lockETH to transfer ETH to Solana" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "id": 1406, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "11641:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11641:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1409, - "nodeType": "ExpressionStatement", - "src": "11641:54:1" - } - ] - }, - "documentation": null, - "id": 1411, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1404, - "nodeType": "ParameterList", - "parameters": [], - "src": "11620:2:1" - }, - "returnParameters": { - "id": 1405, - "nodeType": "ParameterList", - "parameters": [], - "src": "11640:0:1" - }, - "scope": 1420, - "src": "11612:85:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 1418, - "nodeType": "Block", - "src": "11730:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "id": 1415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11738:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - }, - "value": "please use lockETH to transfer ETH to Solana" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "id": 1414, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "11731:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11731:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1417, - "nodeType": "ExpressionStatement", - "src": "11731:54:1" - } - ] - }, - "documentation": null, - "id": 1419, - "implemented": true, - "kind": "receive", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1412, - "nodeType": "ParameterList", - "parameters": [], - "src": "11710:2:1" - }, - "returnParameters": { - "id": 1413, - "nodeType": "ParameterList", - "parameters": [], - "src": "11730:0:1" - }, - "scope": 1420, - "src": "11703:84:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1432, - "src": "463:11326:1" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1421, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "11810:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1422, - "nodeType": "InheritanceSpecifier", - "src": "11810:6:1" - } - ], - "contractDependencies": [3086], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1431, - "linearizedBaseContracts": [1431, 3086], - "name": "WETH", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "d0e30db0", - "id": 1425, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1423, - "nodeType": "ParameterList", - "parameters": [], - "src": "11839:2:1" - }, - "returnParameters": { - "id": 1424, - "nodeType": "ParameterList", - "parameters": [], - "src": "11858:0:1" - }, - "scope": 1431, - "src": "11823:36:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 1430, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1427, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1430, - "src": "11883:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11883:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11882:16:1" - }, - "returnParameters": { - "id": 1429, - "nodeType": "ParameterList", - "parameters": [], - "src": "11907:0:1" - }, - "scope": 1431, - "src": "11865:43:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1432, - "src": "11792:118:1" - } - ], - "src": "64:11847:1" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "exportedSymbols": { - "WETH": [1431], - "Wormhole": [1420] - }, - "license": "Apache 2" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", "^", "0.6", ".0"] - }, - "id": 335, - "name": "PragmaDirective", - "src": "64:23:1" - }, - { - "attributes": { - "literals": ["experimental", "ABIEncoderV2"] - }, - "id": 336, - "name": "PragmaDirective", - "src": "88:33:1" - }, - { - "attributes": { - "SourceUnit": 3009, - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 337, - "name": "ImportDirective", - "src": "123:55:1" - }, - { - "attributes": { - "SourceUnit": 3087, - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 338, - "name": "ImportDirective", - "src": "179:56:1" - }, - { - "attributes": { - "SourceUnit": 3300, - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 339, - "name": "ImportDirective", - "src": "236:59:1" - }, - { - "attributes": { - "SourceUnit": 2506, - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 340, - "name": "ImportDirective", - "src": "296:51:1" - }, - { - "attributes": { - "SourceUnit": 3659, - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 341, - "name": "ImportDirective", - "src": "348:59:1" - }, - { - "attributes": { - "SourceUnit": 334, - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "file": "./BytesLib.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 342, - "name": "ImportDirective", - "src": "408:24:1" - }, - { - "attributes": { - "SourceUnit": 2148, - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "file": "./WrappedAsset.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 343, - "name": "ImportDirective", - "src": "433:28:1" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3658], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [1420, 3658], - "name": "Wormhole", - "scope": 1432 - }, - "children": [ - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ReentrancyGuard", - "referencedDeclaration": 3658, - "type": "contract ReentrancyGuard" - }, - "id": 344, - "name": "UserDefinedTypeName", - "src": "484:15:1" - } - ], - "id": 345, - "name": "InheritanceSpecifier", - "src": "484:15:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeERC20", - "referencedDeclaration": 3299, - "type": "library SafeERC20" - }, - "id": 346, - "name": "UserDefinedTypeName", - "src": "512:9:1" - }, - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 347, - "name": "UserDefinedTypeName", - "src": "526:6:1" - } - ], - "id": 348, - "name": "UsingForDirective", - "src": "506:27:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "BytesLib", - "referencedDeclaration": 333, - "type": "library BytesLib" - }, - "id": 349, - "name": "UserDefinedTypeName", - "src": "544:8:1" - }, - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 350, - "name": "ElementaryTypeName", - "src": "557:5:1" - } - ], - "id": 351, - "name": "UsingForDirective", - "src": "538:25:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeMath", - "referencedDeclaration": 2505, - "type": "library SafeMath" - }, - "id": 352, - "name": "UserDefinedTypeName", - "src": "574:8:1" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 353, - "name": "ElementaryTypeName", - "src": "587:7:1" - } - ], - "id": 354, - "name": "UsingForDirective", - "src": "568:27:1" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "MAX_UINT64", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint64", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint64", - "type": "uint64" - }, - "id": 355, - "name": "ElementaryTypeName", - "src": "601:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31385f3434365f3734345f3037335f3730395f3535315f363135", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 18446744073709551615", - "value": "18_446_744_073_709_551_615" - }, - "id": 356, - "name": "Literal", - "src": "630:26:1" - } - ], - "id": 357, - "name": "VariableDeclaration", - "src": "601:55:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "99da1d3c", - "mutability": "mutable", - "name": "wrappedAssetMaster", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 358, - "name": "ElementaryTypeName", - "src": "708:7:1" - } - ], - "id": 359, - "name": "VariableDeclaration", - "src": "708:33:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "CHAIN_ID", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint8", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 360, - "name": "ElementaryTypeName", - "src": "776:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 361, - "name": "Literal", - "src": "793:1:1" - } - ], - "id": 362, - "name": "VariableDeclaration", - "src": "776:18:1" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "WETHAddress", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 363, - "name": "ElementaryTypeName", - "src": "846:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "address payable", - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - }, - "id": 364, - "name": "Literal", - "src": "877:42:1" - } - ], - "id": 365, - "name": "VariableDeclaration", - "src": "846:73:1" - }, - { - "attributes": { - "canonicalName": "Wormhole.GuardianSet", - "name": "GuardianSet", - "scope": 1420, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "keys", - "overrides": null, - "scope": 371, - "stateVariable": false, - "storageLocation": "default", - "type": "address[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 366, - "name": "ElementaryTypeName", - "src": "955:7:1" - } - ], - "id": 367, - "name": "ArrayTypeName", - "src": "955:9:1" - } - ], - "id": 368, - "name": "VariableDeclaration", - "src": "955:14:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "expiration_time", - "overrides": null, - "scope": 371, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 369, - "name": "ElementaryTypeName", - "src": "979:6:1" - } - ], - "id": 370, - "name": "VariableDeclaration", - "src": "979:22:1" - } - ], - "id": 371, - "name": "StructDefinition", - "src": "926:82:1" - }, - { - "attributes": { - "anonymous": false, - "documentation": null, - "name": "LogGuardianSetChanged" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "oldGuardianIndex", - "overrides": null, - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 372, - "name": "ElementaryTypeName", - "src": "1051:6:1" - } - ], - "id": 373, - "name": "VariableDeclaration", - "src": "1051:23:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "newGuardianIndex", - "overrides": null, - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 374, - "name": "ElementaryTypeName", - "src": "1084:6:1" - } - ], - "id": 375, - "name": "VariableDeclaration", - "src": "1084:23:1" - } - ], - "id": 376, - "name": "ParameterList", - "src": "1041:72:1" - } - ], - "id": 377, - "name": "EventDefinition", - "src": "1014:100:1" - }, - { - "attributes": { - "anonymous": false, - "documentation": null, - "name": "LogTokensLocked" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 378, - "name": "ElementaryTypeName", - "src": "1151:5:1" - } - ], - "id": 379, - "name": "VariableDeclaration", - "src": "1151:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 380, - "name": "ElementaryTypeName", - "src": "1179:5:1" - } - ], - "id": 381, - "name": "VariableDeclaration", - "src": "1179:17:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "token_decimals", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 382, - "name": "ElementaryTypeName", - "src": "1206:5:1" - } - ], - "id": 383, - "name": "VariableDeclaration", - "src": "1206:20:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 384, - "name": "ElementaryTypeName", - "src": "1236:7:1" - } - ], - "id": 385, - "name": "VariableDeclaration", - "src": "1236:21:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 386, - "name": "ElementaryTypeName", - "src": "1267:7:1" - } - ], - "id": 387, - "name": "VariableDeclaration", - "src": "1267:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 388, - "name": "ElementaryTypeName", - "src": "1299:7:1" - } - ], - "id": 389, - "name": "VariableDeclaration", - "src": "1299:17:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 390, - "name": "ElementaryTypeName", - "src": "1326:7:1" - } - ], - "id": 391, - "name": "VariableDeclaration", - "src": "1326:14:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 392, - "name": "ElementaryTypeName", - "src": "1350:6:1" - } - ], - "id": 393, - "name": "VariableDeclaration", - "src": "1350:12:1" - } - ], - "id": 394, - "name": "ParameterList", - "src": "1141:227:1" - } - ], - "id": 395, - "name": "EventDefinition", - "src": "1120:249:1" - }, - { - "attributes": { - "canonicalName": "Wormhole.ParsedVAA", - "name": "ParsedVAA", - "scope": 1420, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "version", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 396, - "name": "ElementaryTypeName", - "src": "1402:5:1" - } - ], - "id": 397, - "name": "VariableDeclaration", - "src": "1402:13:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "hash", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 398, - "name": "ElementaryTypeName", - "src": "1425:7:1" - } - ], - "id": 399, - "name": "VariableDeclaration", - "src": "1425:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "guardian_set_index", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 400, - "name": "ElementaryTypeName", - "src": "1447:6:1" - } - ], - "id": 401, - "name": "VariableDeclaration", - "src": "1447:25:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "timestamp", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 402, - "name": "ElementaryTypeName", - "src": "1482:6:1" - } - ], - "id": 403, - "name": "VariableDeclaration", - "src": "1482:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "action", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 404, - "name": "ElementaryTypeName", - "src": "1508:5:1" - } - ], - "id": 405, - "name": "VariableDeclaration", - "src": "1508:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "payload", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 406, - "name": "ElementaryTypeName", - "src": "1530:5:1" - } - ], - "id": 407, - "name": "VariableDeclaration", - "src": "1530:13:1" - } - ], - "id": 408, - "name": "StructDefinition", - "src": "1375:175:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "42b0aefa", - "mutability": "mutable", - "name": "guardian_sets", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(uint32 => struct Wormhole.GuardianSet)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 409, - "name": "ElementaryTypeName", - "src": "1617:6:1" - }, - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 410, - "name": "UserDefinedTypeName", - "src": "1627:11:1" - } - ], - "id": 411, - "name": "Mapping", - "src": "1609:30:1" - } - ], - "id": 412, - "name": "VariableDeclaration", - "src": "1609:51:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "822d82b3", - "mutability": "mutable", - "name": "guardian_set_index", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 413, - "name": "ElementaryTypeName", - "src": "1701:6:1" - } - ], - "id": 414, - "name": "VariableDeclaration", - "src": "1701:32:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "4db47840", - "mutability": "mutable", - "name": "guardian_set_expirity", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 415, - "name": "ElementaryTypeName", - "src": "1819:6:1" - } - ], - "id": 416, - "name": "VariableDeclaration", - "src": "1819:35:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "a31fe409", - "mutability": "mutable", - "name": "consumedVAAs", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bool)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bool)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 417, - "name": "ElementaryTypeName", - "src": "1908:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 418, - "name": "ElementaryTypeName", - "src": "1919:4:1" - } - ], - "id": 419, - "name": "Mapping", - "src": "1900:24:1" - } - ], - "id": 420, - "name": "VariableDeclaration", - "src": "1900:44:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "b6694c2a", - "mutability": "mutable", - "name": "wrappedAssets", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => address)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => address)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 421, - "name": "ElementaryTypeName", - "src": "2007:7:1" - }, - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 422, - "name": "ElementaryTypeName", - "src": "2018:7:1" - } - ], - "id": 423, - "name": "Mapping", - "src": "1999:27:1" - } - ], - "id": 424, - "name": "VariableDeclaration", - "src": "1999:48:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "1a2be4da", - "mutability": "mutable", - "name": "isWrappedAsset", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => bool)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => bool)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 425, - "name": "ElementaryTypeName", - "src": "2061:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 426, - "name": "ElementaryTypeName", - "src": "2072:4:1" - } - ], - "id": 427, - "name": "Mapping", - "src": "2053:24:1" - } - ], - "id": 428, - "name": "VariableDeclaration", - "src": "2053:46:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": true, - "kind": "constructor", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "initial_guardian_set", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 429, - "name": "UserDefinedTypeName", - "src": "2118:11:1" - } - ], - "id": 430, - "name": "VariableDeclaration", - "src": "2118:39:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "wrapped_asset_master", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 431, - "name": "ElementaryTypeName", - "src": "2159:7:1" - } - ], - "id": 432, - "name": "VariableDeclaration", - "src": "2159:28:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_guardian_set_expirity", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 433, - "name": "ElementaryTypeName", - "src": "2189:6:1" - } - ], - "id": 434, - "name": "VariableDeclaration", - "src": "2189:29:1" - } - ], - "id": 435, - "name": "ParameterList", - "src": "2117:102:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 436, - "name": "ParameterList", - "src": "2227:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 437, - "name": "Identifier", - "src": "2237:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 438, - "name": "Literal", - "src": "2251:1:1" - } - ], - "id": 439, - "name": "IndexAccess", - "src": "2237:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 430, - "type": "struct Wormhole.GuardianSet memory", - "value": "initial_guardian_set" - }, - "id": 440, - "name": "Identifier", - "src": "2256:20:1" - } - ], - "id": 441, - "name": "Assignment", - "src": "2237:39:1" - } - ], - "id": 442, - "name": "ExpressionStatement", - "src": "2237:39:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 443, - "name": "Identifier", - "src": "2329:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 444, - "name": "Literal", - "src": "2350:1:1" - } - ], - "id": 445, - "name": "Assignment", - "src": "2329:22:1" - } - ], - "id": 446, - "name": "ExpressionStatement", - "src": "2329:22:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 416, - "type": "uint32", - "value": "guardian_set_expirity" - }, - "id": 447, - "name": "Identifier", - "src": "2361:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 434, - "type": "uint32", - "value": "_guardian_set_expirity" - }, - "id": 448, - "name": "Identifier", - "src": "2385:22:1" - } - ], - "id": 449, - "name": "Assignment", - "src": "2361:46:1" - } - ], - "id": 450, - "name": "ExpressionStatement", - "src": "2361:46:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 359, - "type": "address", - "value": "wrappedAssetMaster" - }, - "id": 451, - "name": "Identifier", - "src": "2418:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 432, - "type": "address", - "value": "wrapped_asset_master" - }, - "id": 452, - "name": "Identifier", - "src": "2439:20:1" - } - ], - "id": 453, - "name": "Assignment", - "src": "2418:41:1" - } - ], - "id": 454, - "name": "ExpressionStatement", - "src": "2418:41:1" - } - ], - "id": 455, - "name": "Block", - "src": "2227:239:1" - } - ], - "id": 456, - "name": "FunctionDefinition", - "src": "2106:360:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "f951975a", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "getGuardianSet", - "overrides": null, - "scope": 1420, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "idx", - "overrides": null, - "scope": 468, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 457, - "name": "ElementaryTypeName", - "src": "2496:6:1" - } - ], - "id": 458, - "name": "VariableDeclaration", - "src": "2496:10:1" - } - ], - "id": 459, - "name": "ParameterList", - "src": "2495:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "gs", - "overrides": null, - "scope": 468, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 460, - "name": "UserDefinedTypeName", - "src": "2529:11:1" - } - ], - "id": 461, - "name": "VariableDeclaration", - "src": "2529:21:1" - } - ], - "id": 462, - "name": "ParameterList", - "src": "2528:23:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 462 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 463, - "name": "Identifier", - "src": "2569:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 458, - "type": "uint32", - "value": "idx" - }, - "id": 464, - "name": "Identifier", - "src": "2583:3:1" - } - ], - "id": 465, - "name": "IndexAccess", - "src": "2569:18:1" - } - ], - "id": 466, - "name": "Return", - "src": "2562:25:1" - } - ], - "id": 467, - "name": "Block", - "src": "2552:42:1" - } - ], - "id": 468, - "name": "FunctionDefinition", - "src": "2472:122:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "3bc0aee6", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "submitVAA", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "vaa", - "overrides": null, - "scope": 524, - "stateVariable": false, - "storageLocation": "calldata", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 469, - "name": "ElementaryTypeName", - "src": "2628:5:1" - } - ], - "id": 470, - "name": "VariableDeclaration", - "src": "2628:18:1" - } - ], - "id": 471, - "name": "ParameterList", - "src": "2618:34:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 474, - "name": "ParameterList", - "src": "2673:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 472, - "name": "Identifier", - "src": "2660:12:1" - } - ], - "id": 473, - "name": "ModifierInvocation", - "src": "2660:12:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [476] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parsed_vaa", - "overrides": null, - "scope": 523, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.ParsedVAA", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ParsedVAA", - "referencedDeclaration": 408, - "type": "struct Wormhole.ParsedVAA" - }, - "id": 475, - "name": "UserDefinedTypeName", - "src": "2683:9:1" - } - ], - "id": 476, - "name": "VariableDeclaration", - "src": "2683:27:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "struct Wormhole.ParsedVAA memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 781, - "type": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)", - "value": "parseAndVerifyVAA" - }, - "id": 477, - "name": "Identifier", - "src": "2713:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 470, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 478, - "name": "Identifier", - "src": "2731:3:1" - } - ], - "id": 479, - "name": "FunctionCall", - "src": "2713:22:1" - } - ], - "id": 480, - "name": "VariableDeclarationStatement", - "src": "2683:52:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 481, - "name": "Identifier", - "src": "2772:10:1" - } - ], - "id": 482, - "name": "MemberAccess", - "src": "2772:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30783031", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "0x01" - }, - "id": 483, - "name": "Literal", - "src": "2793:4:1" - } - ], - "id": 484, - "name": "BinaryOperation", - "src": "2772:25:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 485, - "name": "Identifier", - "src": "2813:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 486, - "name": "Identifier", - "src": "2821:10:1" - } - ], - "id": 487, - "name": "MemberAccess", - "src": "2821:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 488, - "name": "Identifier", - "src": "2854:18:1" - } - ], - "id": 489, - "name": "BinaryOperation", - "src": "2821:51:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"only the current guardian set can change the guardian set\"", - "value": "only the current guardian set can change the guardian set" - }, - "id": 490, - "name": "Literal", - "src": "2874:59:1" - } - ], - "id": 491, - "name": "FunctionCall", - "src": "2813:121:1" - } - ], - "id": 492, - "name": "ExpressionStatement", - "src": "2813:121:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 889, - "type": "function (bytes memory)", - "value": "vaaUpdateGuardianSet" - }, - "id": 493, - "name": "Identifier", - "src": "2948:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 494, - "name": "Identifier", - "src": "2969:10:1" - } - ], - "id": 495, - "name": "MemberAccess", - "src": "2969:18:1" - } - ], - "id": 496, - "name": "FunctionCall", - "src": "2948:40:1" - } - ], - "id": 497, - "name": "ExpressionStatement", - "src": "2948:40:1" - } - ], - "id": 498, - "name": "Block", - "src": "2799:200:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 499, - "name": "Identifier", - "src": "3009:10:1" - } - ], - "id": 500, - "name": "MemberAccess", - "src": "3009:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30783130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 16", - "value": "0x10" - }, - "id": 501, - "name": "Literal", - "src": "3030:4:1" - } - ], - "id": 502, - "name": "BinaryOperation", - "src": "3009:25:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1051, - "type": "function (bytes memory)", - "value": "vaaTransfer" - }, - "id": 503, - "name": "Identifier", - "src": "3050:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 504, - "name": "Identifier", - "src": "3062:10:1" - } - ], - "id": 505, - "name": "MemberAccess", - "src": "3062:18:1" - } - ], - "id": 506, - "name": "FunctionCall", - "src": "3050:31:1" - } - ], - "id": 507, - "name": "ExpressionStatement", - "src": "3050:31:1" - } - ], - "id": 508, - "name": "Block", - "src": "3036:56:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 509, - "name": "Identifier", - "src": "3112:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e76616c69642056414120616374696f6e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"invalid VAA action\"", - "value": "invalid VAA action" - }, - "id": 510, - "name": "Literal", - "src": "3119:20:1" - } - ], - "id": 511, - "name": "FunctionCall", - "src": "3112:28:1" - } - ], - "id": 512, - "name": "ExpressionStatement", - "src": "3112:28:1" - } - ], - "id": 513, - "name": "Block", - "src": "3098:53:1" - } - ], - "id": 514, - "name": "IfStatement", - "src": "3005:146:1" - } - ], - "id": 515, - "name": "IfStatement", - "src": "2768:383:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 420, - "type": "mapping(bytes32 => bool)", - "value": "consumedVAAs" - }, - "id": 516, - "name": "Identifier", - "src": "3196:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 517, - "name": "Identifier", - "src": "3209:10:1" - } - ], - "id": 518, - "name": "MemberAccess", - "src": "3209:15:1" - } - ], - "id": 519, - "name": "IndexAccess", - "src": "3196:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 520, - "name": "Literal", - "src": "3228:4:1" - } - ], - "id": 521, - "name": "Assignment", - "src": "3196:36:1" - } - ], - "id": 522, - "name": "ExpressionStatement", - "src": "3196:36:1" - } - ], - "id": 523, - "name": "Block", - "src": "2673:566:1" - } - ], - "id": 524, - "name": "FunctionDefinition", - "src": "2600:639:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "600b9aa6", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "parseAndVerifyVAA", - "overrides": null, - "scope": 1420, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "vaa", - "overrides": null, - "scope": 781, - "stateVariable": false, - "storageLocation": "calldata", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 525, - "name": "ElementaryTypeName", - "src": "3472:5:1" - } - ], - "id": 526, - "name": "VariableDeclaration", - "src": "3472:18:1" - } - ], - "id": 527, - "name": "ParameterList", - "src": "3471:20:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parsed_vaa", - "overrides": null, - "scope": 781, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.ParsedVAA", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ParsedVAA", - "referencedDeclaration": 408, - "type": "struct Wormhole.ParsedVAA" - }, - "id": 528, - "name": "UserDefinedTypeName", - "src": "3513:9:1" - } - ], - "id": 529, - "name": "VariableDeclaration", - "src": "3513:27:1" - } - ], - "id": 530, - "name": "ParameterList", - "src": "3512:29:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "version", - "referencedDeclaration": 397, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 531, - "name": "Identifier", - "src": "3552:10:1" - } - ], - "id": 533, - "name": "MemberAccess", - "src": "3552:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 534, - "name": "Identifier", - "src": "3573:3:1" - } - ], - "id": 535, - "name": "MemberAccess", - "src": "3573:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 536, - "name": "Literal", - "src": "3585:1:1" - } - ], - "id": 537, - "name": "FunctionCall", - "src": "3573:14:1" - } - ], - "id": 538, - "name": "Assignment", - "src": "3552:35:1" - } - ], - "id": 539, - "name": "ExpressionStatement", - "src": "3552:35:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 540, - "name": "Identifier", - "src": "3597:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "version", - "referencedDeclaration": 397, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 541, - "name": "Identifier", - "src": "3605:10:1" - } - ], - "id": 542, - "name": "MemberAccess", - "src": "3605:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 543, - "name": "Literal", - "src": "3627:1:1" - } - ], - "id": 544, - "name": "BinaryOperation", - "src": "3605:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5641412076657273696f6e20696e636f6d70617469626c65", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA version incompatible\"", - "value": "VAA version incompatible" - }, - "id": 545, - "name": "Literal", - "src": "3630:26:1" - } - ], - "id": 546, - "name": "FunctionCall", - "src": "3597:60:1" - } - ], - "id": 547, - "name": "ExpressionStatement", - "src": "3597:60:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 548, - "name": "Identifier", - "src": "3714:10:1" - } - ], - "id": 550, - "name": "MemberAccess", - "src": "3714:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 551, - "name": "Identifier", - "src": "3746:3:1" - } - ], - "id": 552, - "name": "MemberAccess", - "src": "3746:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 553, - "name": "Literal", - "src": "3759:1:1" - } - ], - "id": 554, - "name": "FunctionCall", - "src": "3746:15:1" - } - ], - "id": 555, - "name": "Assignment", - "src": "3714:47:1" - } - ], - "id": 556, - "name": "ExpressionStatement", - "src": "3714:47:1" - }, - { - "attributes": { - "assignments": [558] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "len_signers", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 557, - "name": "ElementaryTypeName", - "src": "3772:7:1" - } - ], - "id": 558, - "name": "VariableDeclaration", - "src": "3772:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 559, - "name": "Identifier", - "src": "3794:3:1" - } - ], - "id": 560, - "name": "MemberAccess", - "src": "3794:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 561, - "name": "Literal", - "src": "3806:1:1" - } - ], - "id": 562, - "name": "FunctionCall", - "src": "3794:14:1" - } - ], - "id": 563, - "name": "VariableDeclarationStatement", - "src": "3772:36:1" - }, - { - "attributes": { - "assignments": [565] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offset", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 564, - "name": "ElementaryTypeName", - "src": "3818:4:1" - } - ], - "id": 565, - "name": "VariableDeclaration", - "src": "3818:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "36", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 6", - "value": "6" - }, - "id": 566, - "name": "Literal", - "src": "3832:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 567, - "name": "Literal", - "src": "3836:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 568, - "name": "Identifier", - "src": "3841:11:1" - } - ], - "id": 569, - "name": "BinaryOperation", - "src": "3836:16:1" - } - ], - "id": 570, - "name": "BinaryOperation", - "src": "3832:20:1" - } - ], - "id": 571, - "name": "VariableDeclarationStatement", - "src": "3818:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "timestamp", - "referencedDeclaration": 403, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 572, - "name": "Identifier", - "src": "3897:10:1" - } - ], - "id": 574, - "name": "MemberAccess", - "src": "3897:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 575, - "name": "Identifier", - "src": "3920:3:1" - } - ], - "id": 576, - "name": "MemberAccess", - "src": "3920:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 577, - "name": "Identifier", - "src": "3933:6:1" - } - ], - "id": 578, - "name": "FunctionCall", - "src": "3920:20:1" - } - ], - "id": 579, - "name": "Assignment", - "src": "3897:43:1" - } - ], - "id": 580, - "name": "ExpressionStatement", - "src": "3897:43:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 581, - "name": "Identifier", - "src": "3976:10:1" - } - ], - "id": 583, - "name": "MemberAccess", - "src": "3976:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -8, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "keccak256" - }, - "id": 584, - "name": "Identifier", - "src": "3994:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "slice", - "referencedDeclaration": 55, - "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 585, - "name": "Identifier", - "src": "4004:3:1" - } - ], - "id": 586, - "name": "MemberAccess", - "src": "4004:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 587, - "name": "Identifier", - "src": "4014:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 588, - "name": "Identifier", - "src": "4022:3:1" - } - ], - "id": 589, - "name": "MemberAccess", - "src": "4022:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 590, - "name": "Identifier", - "src": "4035:6:1" - } - ], - "id": 591, - "name": "BinaryOperation", - "src": "4022:19:1" - } - ], - "id": 592, - "name": "FunctionCall", - "src": "4004:38:1" - } - ], - "id": 593, - "name": "FunctionCall", - "src": "3994:49:1" - } - ], - "id": 594, - "name": "Assignment", - "src": "3976:67:1" - } - ], - "id": 595, - "name": "ExpressionStatement", - "src": "3976:67:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 596, - "name": "Identifier", - "src": "4053:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 420, - "type": "mapping(bytes32 => bool)", - "value": "consumedVAAs" - }, - "id": 597, - "name": "Identifier", - "src": "4062:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 598, - "name": "Identifier", - "src": "4075:10:1" - } - ], - "id": 599, - "name": "MemberAccess", - "src": "4075:15:1" - } - ], - "id": 600, - "name": "IndexAccess", - "src": "4062:29:1" - } - ], - "id": 601, - "name": "UnaryOperation", - "src": "4061:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5641412077617320616c7265616479206578656375746564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA was already executed\"", - "value": "VAA was already executed" - }, - "id": 602, - "name": "Literal", - "src": "4093:26:1" - } - ], - "id": 603, - "name": "FunctionCall", - "src": "4053:67:1" - } - ], - "id": 604, - "name": "ExpressionStatement", - "src": "4053:67:1" - }, - { - "attributes": { - "assignments": [606] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "guardian_set", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 605, - "name": "UserDefinedTypeName", - "src": "4131:11:1" - } - ], - "id": 606, - "name": "VariableDeclaration", - "src": "4131:31:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 607, - "name": "Identifier", - "src": "4165:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 608, - "name": "Identifier", - "src": "4179:10:1" - } - ], - "id": 609, - "name": "MemberAccess", - "src": "4179:29:1" - } - ], - "id": 610, - "name": "IndexAccess", - "src": "4165:44:1" - } - ], - "id": 611, - "name": "VariableDeclarationStatement", - "src": "4131:78:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 612, - "name": "Identifier", - "src": "4219:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 613, - "name": "Identifier", - "src": "4227:12:1" - } - ], - "id": 614, - "name": "MemberAccess", - "src": "4227:17:1" - } - ], - "id": 615, - "name": "MemberAccess", - "src": "4227:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 616, - "name": "Literal", - "src": "4254:1:1" - } - ], - "id": 617, - "name": "BinaryOperation", - "src": "4227:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e76616c696420677561726469616e20736574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"invalid guardian set\"", - "value": "invalid guardian set" - }, - "id": 618, - "name": "Literal", - "src": "4257:22:1" - } - ], - "id": 619, - "name": "FunctionCall", - "src": "4219:61:1" - } - ], - "id": 620, - "name": "ExpressionStatement", - "src": "4219:61:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 621, - "name": "Identifier", - "src": "4290:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "||", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 622, - "name": "Identifier", - "src": "4298:12:1" - } - ], - "id": 623, - "name": "MemberAccess", - "src": "4298:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 624, - "name": "Literal", - "src": "4330:1:1" - } - ], - "id": 625, - "name": "BinaryOperation", - "src": "4298:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 626, - "name": "Identifier", - "src": "4335:12:1" - } - ], - "id": 627, - "name": "MemberAccess", - "src": "4335:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 628, - "name": "Identifier", - "src": "4366:5:1" - } - ], - "id": 629, - "name": "MemberAccess", - "src": "4366:15:1" - } - ], - "id": 630, - "name": "BinaryOperation", - "src": "4335:46:1" - } - ], - "id": 631, - "name": "BinaryOperation", - "src": "4298:83:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "677561726469616e20736574206861732065787069726564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"guardian set has expired\"", - "value": "guardian set has expired" - }, - "id": 632, - "name": "Literal", - "src": "4383:26:1" - } - ], - "id": 633, - "name": "FunctionCall", - "src": "4290:120:1" - } - ], - "id": 634, - "name": "ExpressionStatement", - "src": "4290:120:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 635, - "name": "Identifier", - "src": "4517:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 636, - "name": "Identifier", - "src": "4527:12:1" - } - ], - "id": 637, - "name": "MemberAccess", - "src": "4527:17:1" - } - ], - "id": 638, - "name": "MemberAccess", - "src": "4527:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 639, - "name": "Literal", - "src": "4554:2:1" - } - ], - "id": 640, - "name": "BinaryOperation", - "src": "4527:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "33", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 3", - "value": "3" - }, - "id": 641, - "name": "Literal", - "src": "4559:1:1" - } - ], - "id": 642, - "name": "BinaryOperation", - "src": "4527:33:1" - } - ], - "id": 643, - "name": "TupleExpression", - "src": "4526:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 644, - "name": "Literal", - "src": "4564:1:1" - } - ], - "id": 645, - "name": "BinaryOperation", - "src": "4526:39:1" - } - ], - "id": 646, - "name": "TupleExpression", - "src": "4525:41:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 647, - "name": "Literal", - "src": "4569:2:1" - } - ], - "id": 648, - "name": "BinaryOperation", - "src": "4525:46:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 649, - "name": "Literal", - "src": "4574:1:1" - } - ], - "id": 650, - "name": "BinaryOperation", - "src": "4525:50:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 651, - "name": "Identifier", - "src": "4579:11:1" - } - ], - "id": 652, - "name": "BinaryOperation", - "src": "4525:65:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6e6f2071756f72756d", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"no quorum\"", - "value": "no quorum" - }, - "id": 653, - "name": "Literal", - "src": "4592:11:1" - } - ], - "id": 654, - "name": "FunctionCall", - "src": "4517:87:1" - } - ], - "id": 655, - "name": "ExpressionStatement", - "src": "4517:87:1" - }, - { - "attributes": { - "assignments": [657] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "last_index", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "int16", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "int16", - "type": "int16" - }, - "id": 656, - "name": "ElementaryTypeName", - "src": "4615:5:1" - } - ], - "id": 657, - "name": "VariableDeclaration", - "src": "4615:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "-", - "prefix": true, - "type": "int_const -1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 658, - "name": "Literal", - "src": "4636:1:1" - } - ], - "id": 659, - "name": "UnaryOperation", - "src": "4634:3:1" - } - ], - "id": 660, - "name": "VariableDeclarationStatement", - "src": "4615:22:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [662] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "i", - "overrides": null, - "scope": 750, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 661, - "name": "ElementaryTypeName", - "src": "4652:4:1" - } - ], - "id": 662, - "name": "VariableDeclaration", - "src": "4652:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 663, - "name": "Literal", - "src": "4661:1:1" - } - ], - "id": 664, - "name": "VariableDeclarationStatement", - "src": "4652:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 665, - "name": "Identifier", - "src": "4664:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 666, - "name": "Identifier", - "src": "4668:11:1" - } - ], - "id": 667, - "name": "BinaryOperation", - "src": "4664:15:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 668, - "name": "Identifier", - "src": "4681:1:1" - } - ], - "id": 669, - "name": "UnaryOperation", - "src": "4681:3:1" - } - ], - "id": 670, - "name": "ExpressionStatement", - "src": "4681:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [672] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "index", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 671, - "name": "ElementaryTypeName", - "src": "4700:5:1" - } - ], - "id": 672, - "name": "VariableDeclaration", - "src": "4700:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 673, - "name": "Identifier", - "src": "4714:3:1" - } - ], - "id": 674, - "name": "MemberAccess", - "src": "4714:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "36", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 6", - "value": "6" - }, - "id": 675, - "name": "Literal", - "src": "4726:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 676, - "name": "Identifier", - "src": "4730:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 677, - "name": "Literal", - "src": "4734:2:1" - } - ], - "id": 678, - "name": "BinaryOperation", - "src": "4730:6:1" - } - ], - "id": 679, - "name": "BinaryOperation", - "src": "4726:10:1" - } - ], - "id": 680, - "name": "FunctionCall", - "src": "4714:23:1" - } - ], - "id": 681, - "name": "VariableDeclarationStatement", - "src": "4700:37:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 682, - "name": "Identifier", - "src": "4751:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 683, - "name": "Identifier", - "src": "4759:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 657, - "type": "int16", - "value": "last_index" - }, - "id": 684, - "name": "Identifier", - "src": "4767:10:1" - } - ], - "id": 685, - "name": "BinaryOperation", - "src": "4759:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"signature indices must be ascending\"", - "value": "signature indices must be ascending" - }, - "id": 686, - "name": "Literal", - "src": "4779:37:1" - } - ], - "id": 687, - "name": "FunctionCall", - "src": "4751:66:1" - } - ], - "id": 688, - "name": "ExpressionStatement", - "src": "4751:66:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "int16" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 657, - "type": "int16", - "value": "last_index" - }, - "id": 689, - "name": "Identifier", - "src": "4831:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "int16", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(int16)" - }, - "children": [ - { - "attributes": { - "name": "int16", - "type": null - }, - "id": 690, - "name": "ElementaryTypeName", - "src": "4844:5:1" - } - ], - "id": 691, - "name": "ElementaryTypeNameExpression", - "src": "4844:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 692, - "name": "Identifier", - "src": "4850:5:1" - } - ], - "id": 693, - "name": "FunctionCall", - "src": "4844:12:1" - } - ], - "id": 694, - "name": "Assignment", - "src": "4831:25:1" - } - ], - "id": 695, - "name": "ExpressionStatement", - "src": "4831:25:1" - }, - { - "attributes": { - "assignments": [697] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "r", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 696, - "name": "ElementaryTypeName", - "src": "4871:7:1" - } - ], - "id": 697, - "name": "VariableDeclaration", - "src": "4871:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 698, - "name": "Identifier", - "src": "4883:3:1" - } - ], - "id": 699, - "name": "MemberAccess", - "src": "4883:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "37", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 7", - "value": "7" - }, - "id": 700, - "name": "Literal", - "src": "4897:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 701, - "name": "Identifier", - "src": "4901:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 702, - "name": "Literal", - "src": "4905:2:1" - } - ], - "id": 703, - "name": "BinaryOperation", - "src": "4901:6:1" - } - ], - "id": 704, - "name": "BinaryOperation", - "src": "4897:10:1" - } - ], - "id": 705, - "name": "FunctionCall", - "src": "4883:25:1" - } - ], - "id": 706, - "name": "VariableDeclarationStatement", - "src": "4871:37:1" - }, - { - "attributes": { - "assignments": [708] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "s", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 707, - "name": "ElementaryTypeName", - "src": "4922:7:1" - } - ], - "id": 708, - "name": "VariableDeclaration", - "src": "4922:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 709, - "name": "Identifier", - "src": "4934:3:1" - } - ], - "id": 710, - "name": "MemberAccess", - "src": "4934:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3339", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 39", - "value": "39" - }, - "id": 711, - "name": "Literal", - "src": "4948:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 712, - "name": "Identifier", - "src": "4953:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 713, - "name": "Literal", - "src": "4957:2:1" - } - ], - "id": 714, - "name": "BinaryOperation", - "src": "4953:6:1" - } - ], - "id": 715, - "name": "BinaryOperation", - "src": "4948:11:1" - } - ], - "id": 716, - "name": "FunctionCall", - "src": "4934:26:1" - } - ], - "id": 717, - "name": "VariableDeclarationStatement", - "src": "4922:38:1" - }, - { - "attributes": { - "assignments": [719] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "v", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 718, - "name": "ElementaryTypeName", - "src": "4974:5:1" - } - ], - "id": 719, - "name": "VariableDeclaration", - "src": "4974:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 720, - "name": "Identifier", - "src": "4984:3:1" - } - ], - "id": 721, - "name": "MemberAccess", - "src": "4984:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 722, - "name": "Literal", - "src": "4996:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 723, - "name": "Identifier", - "src": "5001:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 724, - "name": "Literal", - "src": "5005:2:1" - } - ], - "id": 725, - "name": "BinaryOperation", - "src": "5001:6:1" - } - ], - "id": 726, - "name": "BinaryOperation", - "src": "4996:11:1" - } - ], - "id": 727, - "name": "FunctionCall", - "src": "4984:24:1" - } - ], - "id": 728, - "name": "VariableDeclarationStatement", - "src": "4974:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 719, - "type": "uint8", - "value": "v" - }, - "id": 729, - "name": "Identifier", - "src": "5022:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3237", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 27", - "value": "27" - }, - "id": 730, - "name": "Literal", - "src": "5027:2:1" - } - ], - "id": 731, - "name": "Assignment", - "src": "5022:7:1" - } - ], - "id": 732, - "name": "ExpressionStatement", - "src": "5022:7:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 733, - "name": "Identifier", - "src": "5043:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -6, - "type": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)", - "value": "ecrecover" - }, - "id": 734, - "name": "Identifier", - "src": "5051:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 735, - "name": "Identifier", - "src": "5061:10:1" - } - ], - "id": 736, - "name": "MemberAccess", - "src": "5061:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 719, - "type": "uint8", - "value": "v" - }, - "id": 737, - "name": "Identifier", - "src": "5078:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 697, - "type": "bytes32", - "value": "r" - }, - "id": 738, - "name": "Identifier", - "src": "5081:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "s" - }, - "id": 739, - "name": "Identifier", - "src": "5084:1:1" - } - ], - "id": 740, - "name": "FunctionCall", - "src": "5051:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 741, - "name": "Identifier", - "src": "5090:12:1" - } - ], - "id": 742, - "name": "MemberAccess", - "src": "5090:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 743, - "name": "Identifier", - "src": "5108:5:1" - } - ], - "id": 744, - "name": "IndexAccess", - "src": "5090:24:1" - } - ], - "id": 745, - "name": "BinaryOperation", - "src": "5051:63:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "564141207369676e617475726520696e76616c6964", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA signature invalid\"", - "value": "VAA signature invalid" - }, - "id": 746, - "name": "Literal", - "src": "5116:23:1" - } - ], - "id": 747, - "name": "FunctionCall", - "src": "5043:97:1" - } - ], - "id": 748, - "name": "ExpressionStatement", - "src": "5043:97:1" - } - ], - "id": 749, - "name": "Block", - "src": "4686:465:1" - } - ], - "id": 750, - "name": "ForStatement", - "src": "4647:504:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 751, - "name": "Identifier", - "src": "5161:10:1" - } - ], - "id": 753, - "name": "MemberAccess", - "src": "5161:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 754, - "name": "Identifier", - "src": "5181:3:1" - } - ], - "id": 755, - "name": "MemberAccess", - "src": "5181:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 756, - "name": "Identifier", - "src": "5193:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 757, - "name": "Literal", - "src": "5202:1:1" - } - ], - "id": 758, - "name": "BinaryOperation", - "src": "5193:10:1" - } - ], - "id": 759, - "name": "FunctionCall", - "src": "5181:23:1" - } - ], - "id": 760, - "name": "Assignment", - "src": "5161:43:1" - } - ], - "id": 761, - "name": "ExpressionStatement", - "src": "5161:43:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 762, - "name": "Identifier", - "src": "5214:10:1" - } - ], - "id": 764, - "name": "MemberAccess", - "src": "5214:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "slice", - "referencedDeclaration": 55, - "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 765, - "name": "Identifier", - "src": "5235:3:1" - } - ], - "id": 766, - "name": "MemberAccess", - "src": "5235:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 767, - "name": "Identifier", - "src": "5245:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 768, - "name": "Literal", - "src": "5254:1:1" - } - ], - "id": 769, - "name": "BinaryOperation", - "src": "5245:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 770, - "name": "Identifier", - "src": "5257:3:1" - } - ], - "id": 771, - "name": "MemberAccess", - "src": "5257:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 772, - "name": "Identifier", - "src": "5271:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 773, - "name": "Literal", - "src": "5280:1:1" - } - ], - "id": 774, - "name": "BinaryOperation", - "src": "5271:10:1" - } - ], - "id": 775, - "name": "TupleExpression", - "src": "5270:12:1" - } - ], - "id": 776, - "name": "BinaryOperation", - "src": "5257:25:1" - } - ], - "id": 777, - "name": "FunctionCall", - "src": "5235:48:1" - } - ], - "id": 778, - "name": "Assignment", - "src": "5214:69:1" - } - ], - "id": 779, - "name": "ExpressionStatement", - "src": "5214:69:1" - } - ], - "id": 780, - "name": "Block", - "src": "3542:1748:1" - } - ], - "id": 781, - "name": "FunctionDefinition", - "src": "3445:1845:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "vaaUpdateGuardianSet", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 889, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 782, - "name": "ElementaryTypeName", - "src": "5326:5:1" - } - ], - "id": 783, - "name": "VariableDeclaration", - "src": "5326:17:1" - } - ], - "id": 784, - "name": "ParameterList", - "src": "5325:19:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 785, - "name": "ParameterList", - "src": "5353:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [787] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardian_set_index", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 786, - "name": "ElementaryTypeName", - "src": "5363:6:1" - } - ], - "id": 787, - "name": "VariableDeclaration", - "src": "5363:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 788, - "name": "Identifier", - "src": "5395:4:1" - } - ], - "id": 789, - "name": "MemberAccess", - "src": "5395:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 790, - "name": "Literal", - "src": "5409:1:1" - } - ], - "id": 791, - "name": "FunctionCall", - "src": "5395:16:1" - } - ], - "id": 792, - "name": "VariableDeclarationStatement", - "src": "5363:48:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 793, - "name": "Identifier", - "src": "5421:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 787, - "type": "uint32", - "value": "new_guardian_set_index" - }, - "id": 794, - "name": "Identifier", - "src": "5429:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 795, - "name": "Identifier", - "src": "5455:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 796, - "name": "Literal", - "src": "5476:1:1" - } - ], - "id": 797, - "name": "BinaryOperation", - "src": "5455:22:1" - } - ], - "id": 798, - "name": "BinaryOperation", - "src": "5429:48:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e646578206d75737420696e63726561736520696e207374657073206f662031", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"index must increase in steps of 1\"", - "value": "index must increase in steps of 1" - }, - "id": 799, - "name": "Literal", - "src": "5479:35:1" - } - ], - "id": 800, - "name": "FunctionCall", - "src": "5421:94:1" - } - ], - "id": 801, - "name": "ExpressionStatement", - "src": "5421:94:1" - }, - { - "attributes": { - "assignments": [803] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "len", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 802, - "name": "ElementaryTypeName", - "src": "5525:5:1" - } - ], - "id": 803, - "name": "VariableDeclaration", - "src": "5525:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 804, - "name": "Identifier", - "src": "5537:4:1" - } - ], - "id": 805, - "name": "MemberAccess", - "src": "5537:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 806, - "name": "Literal", - "src": "5550:1:1" - } - ], - "id": 807, - "name": "FunctionCall", - "src": "5537:15:1" - } - ], - "id": 808, - "name": "VariableDeclarationStatement", - "src": "5525:27:1" - }, - { - "attributes": { - "assignments": [813] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardians", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "memory", - "type": "address[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 811, - "name": "ElementaryTypeName", - "src": "5563:7:1" - } - ], - "id": 812, - "name": "ArrayTypeName", - "src": "5563:9:1" - } - ], - "id": 813, - "name": "VariableDeclaration", - "src": "5563:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address[] memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "function (uint256) pure returns (address[] memory)" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 814, - "name": "ElementaryTypeName", - "src": "5600:7:1" - } - ], - "id": 815, - "name": "ArrayTypeName", - "src": "5600:9:1" - } - ], - "id": 816, - "name": "NewExpression", - "src": "5596:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 803, - "type": "uint8", - "value": "len" - }, - "id": 817, - "name": "Identifier", - "src": "5610:3:1" - } - ], - "id": 818, - "name": "FunctionCall", - "src": "5596:18:1" - } - ], - "id": 819, - "name": "VariableDeclarationStatement", - "src": "5563:51:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [821] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "i", - "overrides": null, - "scope": 848, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 820, - "name": "ElementaryTypeName", - "src": "5629:4:1" - } - ], - "id": 821, - "name": "VariableDeclaration", - "src": "5629:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 822, - "name": "Literal", - "src": "5638:1:1" - } - ], - "id": 823, - "name": "VariableDeclarationStatement", - "src": "5629:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 824, - "name": "Identifier", - "src": "5641:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 803, - "type": "uint8", - "value": "len" - }, - "id": 825, - "name": "Identifier", - "src": "5645:3:1" - } - ], - "id": 826, - "name": "BinaryOperation", - "src": "5641:7:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 827, - "name": "Identifier", - "src": "5650:1:1" - } - ], - "id": 828, - "name": "UnaryOperation", - "src": "5650:3:1" - } - ], - "id": 829, - "name": "ExpressionStatement", - "src": "5650:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [831] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "addr", - "overrides": null, - "scope": 847, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 830, - "name": "ElementaryTypeName", - "src": "5669:7:1" - } - ], - "id": 831, - "name": "VariableDeclaration", - "src": "5669:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 832, - "name": "Identifier", - "src": "5684:4:1" - } - ], - "id": 833, - "name": "MemberAccess", - "src": "5684:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 834, - "name": "Literal", - "src": "5699:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 835, - "name": "Identifier", - "src": "5703:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3230", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 20", - "value": "20" - }, - "id": 836, - "name": "Literal", - "src": "5707:2:1" - } - ], - "id": 837, - "name": "BinaryOperation", - "src": "5703:6:1" - } - ], - "id": 838, - "name": "BinaryOperation", - "src": "5699:10:1" - } - ], - "id": 839, - "name": "FunctionCall", - "src": "5684:26:1" - } - ], - "id": 840, - "name": "VariableDeclarationStatement", - "src": "5669:41:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 813, - "type": "address[] memory", - "value": "new_guardians" - }, - "id": 841, - "name": "Identifier", - "src": "5724:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 842, - "name": "Identifier", - "src": "5738:1:1" - } - ], - "id": 843, - "name": "IndexAccess", - "src": "5724:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 831, - "type": "address", - "value": "addr" - }, - "id": 844, - "name": "Identifier", - "src": "5743:4:1" - } - ], - "id": 845, - "name": "Assignment", - "src": "5724:23:1" - } - ], - "id": 846, - "name": "ExpressionStatement", - "src": "5724:23:1" - } - ], - "id": 847, - "name": "Block", - "src": "5655:103:1" - } - ], - "id": 848, - "name": "ForStatement", - "src": "5624:134:1" - }, - { - "attributes": { - "assignments": [850] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "old_guardian_set_index", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 849, - "name": "ElementaryTypeName", - "src": "5768:6:1" - } - ], - "id": 850, - "name": "VariableDeclaration", - "src": "5768:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 851, - "name": "Identifier", - "src": "5800:18:1" - } - ], - "id": 852, - "name": "VariableDeclarationStatement", - "src": "5768:50:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 853, - "name": "Identifier", - "src": "5828:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 787, - "type": "uint32", - "value": "new_guardian_set_index" - }, - "id": 854, - "name": "Identifier", - "src": "5849:22:1" - } - ], - "id": 855, - "name": "Assignment", - "src": "5828:43:1" - } - ], - "id": 856, - "name": "ExpressionStatement", - "src": "5828:43:1" - }, - { - "attributes": { - "assignments": [858] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardian_set", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 857, - "name": "UserDefinedTypeName", - "src": "5882:11:1" - } - ], - "id": 858, - "name": "VariableDeclaration", - "src": "5882:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": true, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "struct Wormhole.GuardianSet memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 371, - "type": "type(struct Wormhole.GuardianSet storage pointer)", - "value": "GuardianSet" - }, - "id": 859, - "name": "Identifier", - "src": "5920:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 813, - "type": "address[] memory", - "value": "new_guardians" - }, - "id": 860, - "name": "Identifier", - "src": "5932:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 861, - "name": "Literal", - "src": "5947:1:1" - } - ], - "id": 862, - "name": "FunctionCall", - "src": "5920:29:1" - } - ], - "id": 863, - "name": "VariableDeclarationStatement", - "src": "5882:67:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 864, - "name": "Identifier", - "src": "5959:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 865, - "name": "Identifier", - "src": "5973:18:1" - } - ], - "id": 866, - "name": "IndexAccess", - "src": "5959:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 858, - "type": "struct Wormhole.GuardianSet memory", - "value": "new_guardian_set" - }, - "id": 867, - "name": "Identifier", - "src": "5995:16:1" - } - ], - "id": 868, - "name": "Assignment", - "src": "5959:52:1" - } - ], - "id": 869, - "name": "ExpressionStatement", - "src": "5959:52:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 870, - "name": "Identifier", - "src": "6021:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 850, - "type": "uint32", - "value": "old_guardian_set_index" - }, - "id": 871, - "name": "Identifier", - "src": "6035:22:1" - } - ], - "id": 872, - "name": "IndexAccess", - "src": "6021:37:1" - } - ], - "id": 873, - "name": "MemberAccess", - "src": "6021:53:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint32)" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": null - }, - "id": 874, - "name": "ElementaryTypeName", - "src": "6077:6:1" - } - ], - "id": 875, - "name": "ElementaryTypeNameExpression", - "src": "6077:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 876, - "name": "Identifier", - "src": "6084:5:1" - } - ], - "id": 877, - "name": "MemberAccess", - "src": "6084:15:1" - } - ], - "id": 878, - "name": "FunctionCall", - "src": "6077:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 416, - "type": "uint32", - "value": "guardian_set_expirity" - }, - "id": 879, - "name": "Identifier", - "src": "6103:21:1" - } - ], - "id": 880, - "name": "BinaryOperation", - "src": "6077:47:1" - } - ], - "id": 881, - "name": "Assignment", - "src": "6021:103:1" - } - ], - "id": 882, - "name": "ExpressionStatement", - "src": "6021:103:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 377, - "type": "function (uint32,uint32)", - "value": "LogGuardianSetChanged" - }, - "id": 883, - "name": "Identifier", - "src": "6140:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 850, - "type": "uint32", - "value": "old_guardian_set_index" - }, - "id": 884, - "name": "Identifier", - "src": "6162:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 885, - "name": "Identifier", - "src": "6186:18:1" - } - ], - "id": 886, - "name": "FunctionCall", - "src": "6140:65:1" - } - ], - "id": 887, - "name": "EmitStatement", - "src": "6135:70:1" - } - ], - "id": 888, - "name": "Block", - "src": "5353:859:1" - } - ], - "id": 889, - "name": "FunctionDefinition", - "src": "5296:916:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "vaaTransfer", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 1051, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 890, - "name": "ElementaryTypeName", - "src": "6239:5:1" - } - ], - "id": 891, - "name": "VariableDeclaration", - "src": "6239:17:1" - } - ], - "id": 892, - "name": "ParameterList", - "src": "6238:19:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 893, - "name": "ParameterList", - "src": "6266:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [895] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "source_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 894, - "name": "ElementaryTypeName", - "src": "6319:5:1" - } - ], - "id": 895, - "name": "VariableDeclaration", - "src": "6319:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 896, - "name": "Identifier", - "src": "6340:4:1" - } - ], - "id": 897, - "name": "MemberAccess", - "src": "6340:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 898, - "name": "Literal", - "src": "6353:1:1" - } - ], - "id": 899, - "name": "FunctionCall", - "src": "6340:15:1" - } - ], - "id": 900, - "name": "VariableDeclarationStatement", - "src": "6319:36:1" - }, - { - "attributes": { - "assignments": [902] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 901, - "name": "ElementaryTypeName", - "src": "6366:5:1" - } - ], - "id": 902, - "name": "VariableDeclaration", - "src": "6366:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 903, - "name": "Identifier", - "src": "6387:4:1" - } - ], - "id": 904, - "name": "MemberAccess", - "src": "6387:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 905, - "name": "Literal", - "src": "6400:1:1" - } - ], - "id": 906, - "name": "FunctionCall", - "src": "6387:15:1" - } - ], - "id": 907, - "name": "VariableDeclarationStatement", - "src": "6366:36:1" - }, - { - "attributes": { - "assignments": [909] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_address", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 908, - "name": "ElementaryTypeName", - "src": "6521:7:1" - } - ], - "id": 909, - "name": "VariableDeclaration", - "src": "6521:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 910, - "name": "Identifier", - "src": "6546:4:1" - } - ], - "id": 911, - "name": "MemberAccess", - "src": "6546:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "+", - "type": "int_const 50" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3338", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 38", - "value": "38" - }, - "id": 912, - "name": "Literal", - "src": "6561:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3132", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 12", - "value": "12" - }, - "id": 913, - "name": "Literal", - "src": "6566:2:1" - } - ], - "id": 914, - "name": "BinaryOperation", - "src": "6561:7:1" - } - ], - "id": 915, - "name": "FunctionCall", - "src": "6546:23:1" - } - ], - "id": 916, - "name": "VariableDeclarationStatement", - "src": "6521:48:1" - }, - { - "attributes": { - "assignments": [918] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 917, - "name": "ElementaryTypeName", - "src": "6580:5:1" - } - ], - "id": 918, - "name": "VariableDeclaration", - "src": "6580:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 919, - "name": "Identifier", - "src": "6600:4:1" - } - ], - "id": 920, - "name": "MemberAccess", - "src": "6600:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3730", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 70", - "value": "70" - }, - "id": 921, - "name": "Literal", - "src": "6613:2:1" - } - ], - "id": 922, - "name": "FunctionCall", - "src": "6600:16:1" - } - ], - "id": 923, - "name": "VariableDeclarationStatement", - "src": "6580:36:1" - }, - { - "attributes": { - "assignments": [925] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 924, - "name": "ElementaryTypeName", - "src": "6680:7:1" - } - ], - "id": 925, - "name": "VariableDeclaration", - "src": "6680:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint256", - "referencedDeclaration": 271, - "type": "function (bytes memory,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 926, - "name": "Identifier", - "src": "6697:4:1" - } - ], - "id": 927, - "name": "MemberAccess", - "src": "6697:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "313034", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 104", - "value": "104" - }, - "id": 928, - "name": "Literal", - "src": "6712:3:1" - } - ], - "id": 929, - "name": "FunctionCall", - "src": "6697:19:1" - } - ], - "id": 930, - "name": "VariableDeclarationStatement", - "src": "6680:36:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 931, - "name": "Identifier", - "src": "6727:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 895, - "type": "uint8", - "value": "source_chain" - }, - "id": 932, - "name": "Identifier", - "src": "6735:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 902, - "type": "uint8", - "value": "target_chain" - }, - "id": 933, - "name": "Identifier", - "src": "6751:12:1" - } - ], - "id": 934, - "name": "BinaryOperation", - "src": "6735:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"same chain transfers are not supported\"", - "value": "same chain transfers are not supported" - }, - "id": 935, - "name": "Literal", - "src": "6765:40:1" - } - ], - "id": 936, - "name": "FunctionCall", - "src": "6727:79:1" - } - ], - "id": 937, - "name": "ExpressionStatement", - "src": "6727:79:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 938, - "name": "Identifier", - "src": "6816:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 902, - "type": "uint8", - "value": "target_chain" - }, - "id": 939, - "name": "Identifier", - "src": "6824:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 940, - "name": "Identifier", - "src": "6840:8:1" - } - ], - "id": 941, - "name": "BinaryOperation", - "src": "6824:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472616e73666572206d75737420626520696e636f6d696e67", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"transfer must be incoming\"", - "value": "transfer must be incoming" - }, - "id": 942, - "name": "Literal", - "src": "6850:27:1" - } - ], - "id": 943, - "name": "FunctionCall", - "src": "6816:62:1" - } - ], - "id": 944, - "name": "ExpressionStatement", - "src": "6816:62:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 945, - "name": "Identifier", - "src": "6893:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 946, - "name": "Identifier", - "src": "6908:8:1" - } - ], - "id": 947, - "name": "BinaryOperation", - "src": "6893:23:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [949] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 948, - "name": "ElementaryTypeName", - "src": "6932:7:1" - } - ], - "id": 949, - "name": "VariableDeclaration", - "src": "6932:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 950, - "name": "Identifier", - "src": "6956:4:1" - } - ], - "id": 951, - "name": "MemberAccess", - "src": "6956:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 952, - "name": "Literal", - "src": "6971:2:1" - } - ], - "id": 953, - "name": "FunctionCall", - "src": "6956:18:1" - } - ], - "id": 954, - "name": "VariableDeclarationStatement", - "src": "6932:42:1" - }, - { - "attributes": { - "assignments": [956] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_id", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 955, - "name": "ElementaryTypeName", - "src": "6988:7:1" - } - ], - "id": 956, - "name": "VariableDeclaration", - "src": "6988:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -8, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "keccak256" - }, - "id": 957, - "name": "Identifier", - "src": "7007:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodePacked", - "referencedDeclaration": null, - "type": "function () pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 958, - "name": "Identifier", - "src": "7017:3:1" - } - ], - "id": 959, - "name": "MemberAccess", - "src": "7017:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 960, - "name": "Identifier", - "src": "7034:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 949, - "type": "bytes32", - "value": "token_address" - }, - "id": 961, - "name": "Identifier", - "src": "7047:13:1" - } - ], - "id": 962, - "name": "FunctionCall", - "src": "7017:44:1" - } - ], - "id": 963, - "name": "FunctionCall", - "src": "7007:55:1" - } - ], - "id": 964, - "name": "VariableDeclarationStatement", - "src": "6988:74:1" - }, - { - "attributes": { - "assignments": [966] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "wrapped_asset", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 965, - "name": "ElementaryTypeName", - "src": "7154:7:1" - } - ], - "id": 966, - "name": "VariableDeclaration", - "src": "7154:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 424, - "type": "mapping(bytes32 => address)", - "value": "wrappedAssets" - }, - "id": 967, - "name": "Identifier", - "src": "7178:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 956, - "type": "bytes32", - "value": "asset_id" - }, - "id": 968, - "name": "Identifier", - "src": "7192:8:1" - } - ], - "id": 969, - "name": "IndexAccess", - "src": "7178:23:1" - } - ], - "id": 970, - "name": "VariableDeclarationStatement", - "src": "7154:47:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 971, - "name": "Identifier", - "src": "7219:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 972, - "name": "ElementaryTypeName", - "src": "7236:7:1" - } - ], - "id": 973, - "name": "ElementaryTypeNameExpression", - "src": "7236:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 974, - "name": "Literal", - "src": "7244:1:1" - } - ], - "id": 975, - "name": "FunctionCall", - "src": "7236:10:1" - } - ], - "id": 976, - "name": "BinaryOperation", - "src": "7219:27:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [978] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_decimals", - "overrides": null, - "scope": 993, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 977, - "name": "ElementaryTypeName", - "src": "7266:5:1" - } - ], - "id": 978, - "name": "VariableDeclaration", - "src": "7266:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 979, - "name": "Identifier", - "src": "7289:4:1" - } - ], - "id": 980, - "name": "MemberAccess", - "src": "7289:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "313033", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 103", - "value": "103" - }, - "id": 981, - "name": "Literal", - "src": "7302:3:1" - } - ], - "id": 982, - "name": "FunctionCall", - "src": "7289:17:1" - } - ], - "id": 983, - "name": "VariableDeclarationStatement", - "src": "7266:40:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 984, - "name": "Identifier", - "src": "7324:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1094, - "type": "function (bytes32,uint8,bytes32,uint8) returns (address)", - "value": "deployWrappedAsset" - }, - "id": 985, - "name": "Identifier", - "src": "7340:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 956, - "type": "bytes32", - "value": "asset_id" - }, - "id": 986, - "name": "Identifier", - "src": "7359:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 987, - "name": "Identifier", - "src": "7369:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 949, - "type": "bytes32", - "value": "token_address" - }, - "id": 988, - "name": "Identifier", - "src": "7382:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 978, - "type": "uint8", - "value": "asset_decimals" - }, - "id": 989, - "name": "Identifier", - "src": "7397:14:1" - } - ], - "id": 990, - "name": "FunctionCall", - "src": "7340:72:1" - } - ], - "id": 991, - "name": "Assignment", - "src": "7324:88:1" - } - ], - "id": 992, - "name": "ExpressionStatement", - "src": "7324:88:1" - } - ], - "id": 993, - "name": "Block", - "src": "7248:179:1" - } - ], - "id": 994, - "name": "IfStatement", - "src": "7215:212:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mint", - "referencedDeclaration": 1511, - "type": "function (address,uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 995, - "name": "Identifier", - "src": "7441:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 996, - "name": "Identifier", - "src": "7454:13:1" - } - ], - "id": 997, - "name": "FunctionCall", - "src": "7441:27:1" - } - ], - "id": 998, - "name": "MemberAccess", - "src": "7441:32:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 909, - "type": "address", - "value": "target_address" - }, - "id": 999, - "name": "Identifier", - "src": "7474:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1000, - "name": "Identifier", - "src": "7490:6:1" - } - ], - "id": 1001, - "name": "FunctionCall", - "src": "7441:56:1" - } - ], - "id": 1002, - "name": "ExpressionStatement", - "src": "7441:56:1" - } - ], - "id": 1003, - "name": "Block", - "src": "6918:590:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1005] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1048, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1004, - "name": "ElementaryTypeName", - "src": "7528:7:1" - } - ], - "id": 1005, - "name": "VariableDeclaration", - "src": "7528:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 1006, - "name": "Identifier", - "src": "7552:4:1" - } - ], - "id": 1007, - "name": "MemberAccess", - "src": "7552:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "+", - "type": "int_const 83" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 1008, - "name": "Literal", - "src": "7567:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3132", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 12", - "value": "12" - }, - "id": 1009, - "name": "Literal", - "src": "7572:2:1" - } - ], - "id": 1010, - "name": "BinaryOperation", - "src": "7567:7:1" - } - ], - "id": 1011, - "name": "FunctionCall", - "src": "7552:23:1" - } - ], - "id": 1012, - "name": "VariableDeclarationStatement", - "src": "7528:47:1" - }, - { - "attributes": { - "assignments": [1014] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1048, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1013, - "name": "ElementaryTypeName", - "src": "7590:5:1" - } - ], - "id": 1014, - "name": "VariableDeclaration", - "src": "7590:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1015, - "name": "Identifier", - "src": "7607:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1005, - "type": "address", - "value": "token_address" - }, - "id": 1016, - "name": "Identifier", - "src": "7613:13:1" - } - ], - "id": 1017, - "name": "FunctionCall", - "src": "7607:20:1" - } - ], - "id": 1018, - "name": "MemberAccess", - "src": "7607:29:1" - } - ], - "id": 1019, - "name": "FunctionCall", - "src": "7607:31:1" - } - ], - "id": 1020, - "name": "VariableDeclarationStatement", - "src": "7590:48:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1014, - "type": "uint8", - "value": "decimals" - }, - "id": 1021, - "name": "Identifier", - "src": "7727:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1022, - "name": "Literal", - "src": "7738:1:1" - } - ], - "id": 1023, - "name": "BinaryOperation", - "src": "7727:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1024, - "name": "Identifier", - "src": "7759:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mul", - "referencedDeclaration": 2388, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1025, - "name": "Identifier", - "src": "7768:6:1" - } - ], - "id": 1026, - "name": "MemberAccess", - "src": "7768:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1027, - "name": "Literal", - "src": "7779:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1028, - "name": "ElementaryTypeName", - "src": "7785:7:1" - } - ], - "id": 1029, - "name": "ElementaryTypeNameExpression", - "src": "7785:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1014, - "type": "uint8", - "value": "decimals" - }, - "id": 1030, - "name": "Identifier", - "src": "7793:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1031, - "name": "Literal", - "src": "7804:1:1" - } - ], - "id": 1032, - "name": "BinaryOperation", - "src": "7793:12:1" - } - ], - "id": 1033, - "name": "FunctionCall", - "src": "7785:21:1" - } - ], - "id": 1034, - "name": "BinaryOperation", - "src": "7779:27:1" - } - ], - "id": 1035, - "name": "FunctionCall", - "src": "7768:39:1" - } - ], - "id": 1036, - "name": "Assignment", - "src": "7759:48:1" - } - ], - "id": 1037, - "name": "ExpressionStatement", - "src": "7759:48:1" - } - ], - "id": 1038, - "name": "Block", - "src": "7741:81:1" - } - ], - "id": 1039, - "name": "IfStatement", - "src": "7723:99:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransfer", - "referencedDeclaration": 3120, - "type": "function (contract IERC20,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1040, - "name": "Identifier", - "src": "7835:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1005, - "type": "address", - "value": "token_address" - }, - "id": 1041, - "name": "Identifier", - "src": "7842:13:1" - } - ], - "id": 1042, - "name": "FunctionCall", - "src": "7835:21:1" - } - ], - "id": 1043, - "name": "MemberAccess", - "src": "7835:34:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 909, - "type": "address", - "value": "target_address" - }, - "id": 1044, - "name": "Identifier", - "src": "7870:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1045, - "name": "Identifier", - "src": "7886:6:1" - } - ], - "id": 1046, - "name": "FunctionCall", - "src": "7835:58:1" - } - ], - "id": 1047, - "name": "ExpressionStatement", - "src": "7835:58:1" - } - ], - "id": 1048, - "name": "Block", - "src": "7514:390:1" - } - ], - "id": 1049, - "name": "IfStatement", - "src": "6889:1015:1" - } - ], - "id": 1050, - "name": "Block", - "src": "6266:1644:1" - } - ], - "id": 1051, - "name": "FunctionDefinition", - "src": "6218:1692:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "deployWrappedAsset", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "seed", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1052, - "name": "ElementaryTypeName", - "src": "7944:7:1" - } - ], - "id": 1053, - "name": "VariableDeclaration", - "src": "7944:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1054, - "name": "ElementaryTypeName", - "src": "7958:5:1" - } - ], - "id": 1055, - "name": "VariableDeclaration", - "src": "7958:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1056, - "name": "ElementaryTypeName", - "src": "7977:7:1" - } - ], - "id": 1057, - "name": "VariableDeclaration", - "src": "7977:21:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1058, - "name": "ElementaryTypeName", - "src": "8000:5:1" - } - ], - "id": 1059, - "name": "VariableDeclaration", - "src": "8000:14:1" - } - ], - "id": 1060, - "name": "ParameterList", - "src": "7943:72:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1061, - "name": "ElementaryTypeName", - "src": "8033:7:1" - } - ], - "id": 1062, - "name": "VariableDeclaration", - "src": "8033:13:1" - } - ], - "id": 1063, - "name": "ParameterList", - "src": "8032:15:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1065] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "targetBytes", - "overrides": null, - "scope": 1093, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes20", - "type": "bytes20" - }, - "id": 1064, - "name": "ElementaryTypeName", - "src": "8225:7:1" - } - ], - "id": 1065, - "name": "VariableDeclaration", - "src": "8225:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes20)" - }, - "children": [ - { - "attributes": { - "name": "bytes20", - "type": null - }, - "id": 1066, - "name": "ElementaryTypeName", - "src": "8247:7:1" - } - ], - "id": 1067, - "name": "ElementaryTypeNameExpression", - "src": "8247:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 359, - "type": "address", - "value": "wrappedAssetMaster" - }, - "id": 1068, - "name": "Identifier", - "src": "8255:18:1" - } - ], - "id": 1069, - "name": "FunctionCall", - "src": "8247:27:1" - } - ], - "id": 1070, - "name": "VariableDeclarationStatement", - "src": "8225:49:1" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1062, - "isOffset": false, - "isSlot": false, - "src": "8593:5:1", - "valueSize": 1 - }, - { - "declaration": 1053, - "isOffset": false, - "isSlot": false, - "src": "8626:4:1", - "valueSize": 1 - }, - { - "declaration": 1065, - "isOffset": false, - "isSlot": false, - "src": "8463:11:1", - "valueSize": 1 - } - ], - "operations": "{\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n}" - }, - "children": [], - "id": 1071, - "name": "InlineAssembly", - "src": "8284:357:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "initialize", - "referencedDeclaration": 1490, - "type": "function (uint8,bytes32,uint8) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1072, - "name": "Identifier", - "src": "8679:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1073, - "name": "Identifier", - "src": "8692:5:1" - } - ], - "id": 1074, - "name": "FunctionCall", - "src": "8679:19:1" - } - ], - "id": 1075, - "name": "MemberAccess", - "src": "8679:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1055, - "type": "uint8", - "value": "token_chain" - }, - "id": 1076, - "name": "Identifier", - "src": "8710:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1057, - "type": "bytes32", - "value": "token_address" - }, - "id": 1077, - "name": "Identifier", - "src": "8723:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1059, - "type": "uint8", - "value": "decimals" - }, - "id": 1078, - "name": "Identifier", - "src": "8738:8:1" - } - ], - "id": 1079, - "name": "FunctionCall", - "src": "8679:68:1" - } - ], - "id": 1080, - "name": "ExpressionStatement", - "src": "8679:68:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 424, - "type": "mapping(bytes32 => address)", - "value": "wrappedAssets" - }, - "id": 1081, - "name": "Identifier", - "src": "8783:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1053, - "type": "bytes32", - "value": "seed" - }, - "id": 1082, - "name": "Identifier", - "src": "8797:4:1" - } - ], - "id": 1083, - "name": "IndexAccess", - "src": "8783:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1084, - "name": "Identifier", - "src": "8805:5:1" - } - ], - "id": 1085, - "name": "Assignment", - "src": "8783:27:1" - } - ], - "id": 1086, - "name": "ExpressionStatement", - "src": "8783:27:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 428, - "type": "mapping(address => bool)", - "value": "isWrappedAsset" - }, - "id": 1087, - "name": "Identifier", - "src": "8820:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1088, - "name": "Identifier", - "src": "8835:5:1" - } - ], - "id": 1089, - "name": "IndexAccess", - "src": "8820:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1090, - "name": "Literal", - "src": "8844:4:1" - } - ], - "id": 1091, - "name": "Assignment", - "src": "8820:28:1" - } - ], - "id": 1092, - "name": "ExpressionStatement", - "src": "8820:28:1" - } - ], - "id": 1093, - "name": "Block", - "src": "8047:808:1" - } - ], - "id": 1094, - "name": "FunctionDefinition", - "src": "7916:939:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "70713960", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "lockAssets", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1095, - "name": "ElementaryTypeName", - "src": "8890:7:1" - } - ], - "id": 1096, - "name": "VariableDeclaration", - "src": "8890:13:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1097, - "name": "ElementaryTypeName", - "src": "8913:7:1" - } - ], - "id": 1098, - "name": "VariableDeclaration", - "src": "8913:14:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1099, - "name": "ElementaryTypeName", - "src": "8937:7:1" - } - ], - "id": 1100, - "name": "VariableDeclaration", - "src": "8937:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1101, - "name": "ElementaryTypeName", - "src": "8964:5:1" - } - ], - "id": 1102, - "name": "VariableDeclaration", - "src": "8964:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 1103, - "name": "ElementaryTypeName", - "src": "8992:6:1" - } - ], - "id": 1104, - "name": "VariableDeclaration", - "src": "8992:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "refund_dust", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1105, - "name": "ElementaryTypeName", - "src": "9014:4:1" - } - ], - "id": 1106, - "name": "VariableDeclaration", - "src": "9014:16:1" - } - ], - "id": 1107, - "name": "ParameterList", - "src": "8880:156:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1110, - "name": "ParameterList", - "src": "9057:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 1108, - "name": "Identifier", - "src": "9044:12:1" - } - ], - "id": 1109, - "name": "ModifierInvocation", - "src": "9044:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1111, - "name": "Identifier", - "src": "9067:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1102, - "type": "uint8", - "value": "target_chain" - }, - "id": 1112, - "name": "Identifier", - "src": "9075:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1113, - "name": "Identifier", - "src": "9091:8:1" - } - ], - "id": 1114, - "name": "BinaryOperation", - "src": "9075:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"must not transfer to the same chain\"", - "value": "must not transfer to the same chain" - }, - "id": 1115, - "name": "Literal", - "src": "9101:37:1" - } - ], - "id": 1116, - "name": "FunctionCall", - "src": "9067:72:1" - } - ], - "id": 1117, - "name": "ExpressionStatement", - "src": "9067:72:1" - }, - { - "attributes": { - "assignments": [1119] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_chain", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1118, - "name": "ElementaryTypeName", - "src": "9150:5:1" - } - ], - "id": 1119, - "name": "VariableDeclaration", - "src": "9150:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1120, - "name": "Identifier", - "src": "9170:8:1" - } - ], - "id": 1121, - "name": "VariableDeclarationStatement", - "src": "9150:28:1" - }, - { - "attributes": { - "assignments": [1123], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_address", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1122, - "name": "ElementaryTypeName", - "src": "9188:7:1" - } - ], - "id": 1123, - "name": "VariableDeclaration", - "src": "9188:21:1" - } - ], - "id": 1124, - "name": "VariableDeclarationStatement", - "src": "9188:21:1" - }, - { - "attributes": { - "assignments": [1126] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1125, - "name": "ElementaryTypeName", - "src": "9219:5:1" - } - ], - "id": 1126, - "name": "VariableDeclaration", - "src": "9219:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1127, - "name": "Identifier", - "src": "9236:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1128, - "name": "Identifier", - "src": "9242:5:1" - } - ], - "id": 1129, - "name": "FunctionCall", - "src": "9236:12:1" - } - ], - "id": 1130, - "name": "MemberAccess", - "src": "9236:21:1" - } - ], - "id": 1131, - "name": "FunctionCall", - "src": "9236:23:1" - } - ], - "id": 1132, - "name": "VariableDeclarationStatement", - "src": "9219:40:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 428, - "type": "mapping(address => bool)", - "value": "isWrappedAsset" - }, - "id": 1133, - "name": "Identifier", - "src": "9274:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1134, - "name": "Identifier", - "src": "9289:5:1" - } - ], - "id": 1135, - "name": "IndexAccess", - "src": "9274:21:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "burn", - "referencedDeclaration": 1532, - "type": "function (address,uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1136, - "name": "Identifier", - "src": "9311:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1137, - "name": "Identifier", - "src": "9324:5:1" - } - ], - "id": 1138, - "name": "FunctionCall", - "src": "9311:19:1" - } - ], - "id": 1139, - "name": "MemberAccess", - "src": "9311:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1140, - "name": "Identifier", - "src": "9336:3:1" - } - ], - "id": 1141, - "name": "MemberAccess", - "src": "9336:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1142, - "name": "Identifier", - "src": "9348:6:1" - } - ], - "id": 1143, - "name": "FunctionCall", - "src": "9311:44:1" - } - ], - "id": 1144, - "name": "ExpressionStatement", - "src": "9311:44:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1119, - "type": "uint8", - "value": "asset_chain" - }, - "id": 1145, - "name": "Identifier", - "src": "9369:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "assetChain", - "referencedDeclaration": 1443, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1146, - "name": "Identifier", - "src": "9383:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1147, - "name": "Identifier", - "src": "9396:5:1" - } - ], - "id": 1148, - "name": "FunctionCall", - "src": "9383:19:1" - } - ], - "id": 1149, - "name": "MemberAccess", - "src": "9383:30:1" - } - ], - "id": 1150, - "name": "FunctionCall", - "src": "9383:32:1" - } - ], - "id": 1151, - "name": "Assignment", - "src": "9369:46:1" - } - ], - "id": 1152, - "name": "ExpressionStatement", - "src": "9369:46:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1153, - "name": "Identifier", - "src": "9429:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "assetAddress", - "referencedDeclaration": 1445, - "type": "function () view external returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1154, - "name": "Identifier", - "src": "9445:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1155, - "name": "Identifier", - "src": "9458:5:1" - } - ], - "id": 1156, - "name": "FunctionCall", - "src": "9445:19:1" - } - ], - "id": 1157, - "name": "MemberAccess", - "src": "9445:32:1" - } - ], - "id": 1158, - "name": "FunctionCall", - "src": "9445:34:1" - } - ], - "id": 1159, - "name": "Assignment", - "src": "9429:50:1" - } - ], - "id": 1160, - "name": "ExpressionStatement", - "src": "9429:50:1" - } - ], - "id": 1161, - "name": "Block", - "src": "9297:193:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1163] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "balanceBefore", - "overrides": null, - "scope": 1286, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1162, - "name": "ElementaryTypeName", - "src": "9510:7:1" - } - ], - "id": 1163, - "name": "VariableDeclaration", - "src": "9510:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balanceOf", - "referencedDeclaration": 3025, - "type": "function (address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1164, - "name": "Identifier", - "src": "9534:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1165, - "name": "Identifier", - "src": "9541:5:1" - } - ], - "id": 1166, - "name": "FunctionCall", - "src": "9534:13:1" - } - ], - "id": 1167, - "name": "MemberAccess", - "src": "9534:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1168, - "name": "ElementaryTypeName", - "src": "9558:7:1" - } - ], - "id": 1169, - "name": "ElementaryTypeNameExpression", - "src": "9558:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1170, - "name": "Identifier", - "src": "9566:4:1" - } - ], - "id": 1171, - "name": "FunctionCall", - "src": "9558:13:1" - } - ], - "id": 1172, - "name": "FunctionCall", - "src": "9534:38:1" - } - ], - "id": 1173, - "name": "VariableDeclarationStatement", - "src": "9510:62:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransferFrom", - "referencedDeclaration": 3145, - "type": "function (contract IERC20,address,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1174, - "name": "Identifier", - "src": "9586:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1175, - "name": "Identifier", - "src": "9593:5:1" - } - ], - "id": 1176, - "name": "FunctionCall", - "src": "9586:13:1" - } - ], - "id": 1177, - "name": "MemberAccess", - "src": "9586:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1178, - "name": "Identifier", - "src": "9617:3:1" - } - ], - "id": 1179, - "name": "MemberAccess", - "src": "9617:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1180, - "name": "ElementaryTypeName", - "src": "9629:7:1" - } - ], - "id": 1181, - "name": "ElementaryTypeNameExpression", - "src": "9629:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1182, - "name": "Identifier", - "src": "9637:4:1" - } - ], - "id": 1183, - "name": "FunctionCall", - "src": "9629:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1184, - "name": "Identifier", - "src": "9644:6:1" - } - ], - "id": 1185, - "name": "FunctionCall", - "src": "9586:65:1" - } - ], - "id": 1186, - "name": "ExpressionStatement", - "src": "9586:65:1" - }, - { - "attributes": { - "assignments": [1188] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "balanceAfter", - "overrides": null, - "scope": 1286, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1187, - "name": "ElementaryTypeName", - "src": "9665:7:1" - } - ], - "id": 1188, - "name": "VariableDeclaration", - "src": "9665:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balanceOf", - "referencedDeclaration": 3025, - "type": "function (address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1189, - "name": "Identifier", - "src": "9688:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1190, - "name": "Identifier", - "src": "9695:5:1" - } - ], - "id": 1191, - "name": "FunctionCall", - "src": "9688:13:1" - } - ], - "id": 1192, - "name": "MemberAccess", - "src": "9688:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1193, - "name": "ElementaryTypeName", - "src": "9712:7:1" - } - ], - "id": 1194, - "name": "ElementaryTypeNameExpression", - "src": "9712:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1195, - "name": "Identifier", - "src": "9720:4:1" - } - ], - "id": 1196, - "name": "FunctionCall", - "src": "9712:13:1" - } - ], - "id": 1197, - "name": "FunctionCall", - "src": "9688:38:1" - } - ], - "id": 1198, - "name": "VariableDeclarationStatement", - "src": "9665:61:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1199, - "name": "Identifier", - "src": "9931:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2354, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1188, - "type": "uint256", - "value": "balanceAfter" - }, - "id": 1200, - "name": "Identifier", - "src": "9940:12:1" - } - ], - "id": 1201, - "name": "MemberAccess", - "src": "9940:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1163, - "type": "uint256", - "value": "balanceBefore" - }, - "id": 1202, - "name": "Identifier", - "src": "9957:13:1" - } - ], - "id": 1203, - "name": "FunctionCall", - "src": "9940:31:1" - } - ], - "id": 1204, - "name": "Assignment", - "src": "9931:40:1" - } - ], - "id": 1205, - "name": "ExpressionStatement", - "src": "9931:40:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1206, - "name": "Identifier", - "src": "10046:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1207, - "name": "Literal", - "src": "10057:1:1" - } - ], - "id": 1208, - "name": "BinaryOperation", - "src": "10046:12:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1210] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "original_amount", - "overrides": null, - "scope": 1253, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1209, - "name": "ElementaryTypeName", - "src": "10078:7:1" - } - ], - "id": 1210, - "name": "VariableDeclaration", - "src": "10078:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1211, - "name": "Identifier", - "src": "10104:6:1" - } - ], - "id": 1212, - "name": "VariableDeclarationStatement", - "src": "10078:32:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1213, - "name": "Identifier", - "src": "10128:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1214, - "name": "Identifier", - "src": "10137:6:1" - } - ], - "id": 1215, - "name": "MemberAccess", - "src": "10137:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1216, - "name": "Literal", - "src": "10148:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1217, - "name": "ElementaryTypeName", - "src": "10154:7:1" - } - ], - "id": 1218, - "name": "ElementaryTypeNameExpression", - "src": "10154:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1219, - "name": "Identifier", - "src": "10162:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1220, - "name": "Literal", - "src": "10173:1:1" - } - ], - "id": 1221, - "name": "BinaryOperation", - "src": "10162:12:1" - } - ], - "id": 1222, - "name": "FunctionCall", - "src": "10154:21:1" - } - ], - "id": 1223, - "name": "BinaryOperation", - "src": "10148:27:1" - } - ], - "id": 1224, - "name": "FunctionCall", - "src": "10137:39:1" - } - ], - "id": 1225, - "name": "Assignment", - "src": "10128:48:1" - } - ], - "id": 1226, - "name": "ExpressionStatement", - "src": "10128:48:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1106, - "type": "bool", - "value": "refund_dust" - }, - "id": 1227, - "name": "Identifier", - "src": "10199:11:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransfer", - "referencedDeclaration": 3120, - "type": "function (contract IERC20,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1228, - "name": "Identifier", - "src": "10234:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1229, - "name": "Identifier", - "src": "10241:5:1" - } - ], - "id": 1230, - "name": "FunctionCall", - "src": "10234:13:1" - } - ], - "id": 1231, - "name": "MemberAccess", - "src": "10234:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1232, - "name": "Identifier", - "src": "10261:3:1" - } - ], - "id": 1233, - "name": "MemberAccess", - "src": "10261:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mod", - "referencedDeclaration": 2432, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1210, - "type": "uint256", - "value": "original_amount" - }, - "id": 1234, - "name": "Identifier", - "src": "10273:15:1" - } - ], - "id": 1235, - "name": "MemberAccess", - "src": "10273:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1236, - "name": "Literal", - "src": "10293:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1237, - "name": "ElementaryTypeName", - "src": "10299:7:1" - } - ], - "id": 1238, - "name": "ElementaryTypeNameExpression", - "src": "10299:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1239, - "name": "Identifier", - "src": "10307:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1240, - "name": "Literal", - "src": "10318:1:1" - } - ], - "id": 1241, - "name": "BinaryOperation", - "src": "10307:12:1" - } - ], - "id": 1242, - "name": "FunctionCall", - "src": "10299:21:1" - } - ], - "id": 1243, - "name": "BinaryOperation", - "src": "10293:27:1" - } - ], - "id": 1244, - "name": "FunctionCall", - "src": "10273:48:1" - } - ], - "id": 1245, - "name": "FunctionCall", - "src": "10234:88:1" - } - ], - "id": 1246, - "name": "ExpressionStatement", - "src": "10234:88:1" - } - ], - "id": 1247, - "name": "Block", - "src": "10212:129:1" - } - ], - "id": 1248, - "name": "IfStatement", - "src": "10195:146:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1249, - "name": "Identifier", - "src": "10359:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1250, - "name": "Literal", - "src": "10370:1:1" - } - ], - "id": 1251, - "name": "Assignment", - "src": "10359:12:1" - } - ], - "id": 1252, - "name": "ExpressionStatement", - "src": "10359:12:1" - } - ], - "id": 1253, - "name": "Block", - "src": "10060:326:1" - } - ], - "id": 1254, - "name": "IfStatement", - "src": "10042:344:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1255, - "name": "Identifier", - "src": "10400:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1188, - "type": "uint256", - "value": "balanceAfter" - }, - "id": 1256, - "name": "Identifier", - "src": "10408:12:1" - } - ], - "id": 1257, - "name": "MemberAccess", - "src": "10408:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1258, - "name": "Literal", - "src": "10425:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1259, - "name": "ElementaryTypeName", - "src": "10431:7:1" - } - ], - "id": 1260, - "name": "ElementaryTypeNameExpression", - "src": "10431:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1261, - "name": "Identifier", - "src": "10439:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1262, - "name": "Identifier", - "src": "10445:5:1" - } - ], - "id": 1263, - "name": "FunctionCall", - "src": "10439:12:1" - } - ], - "id": 1264, - "name": "MemberAccess", - "src": "10439:21:1" - } - ], - "id": 1265, - "name": "FunctionCall", - "src": "10439:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1266, - "name": "Literal", - "src": "10465:1:1" - } - ], - "id": 1267, - "name": "BinaryOperation", - "src": "10439:27:1" - } - ], - "id": 1268, - "name": "FunctionCall", - "src": "10431:36:1" - } - ], - "id": 1269, - "name": "BinaryOperation", - "src": "10425:42:1" - } - ], - "id": 1270, - "name": "FunctionCall", - "src": "10408:60:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 357, - "type": "uint64", - "value": "MAX_UINT64" - }, - "id": 1271, - "name": "Identifier", - "src": "10472:10:1" - } - ], - "id": 1272, - "name": "BinaryOperation", - "src": "10408:74:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"bridge balance would exceed maximum\"", - "value": "bridge balance would exceed maximum" - }, - "id": 1273, - "name": "Literal", - "src": "10484:37:1" - } - ], - "id": 1274, - "name": "FunctionCall", - "src": "10400:122:1" - } - ], - "id": 1275, - "name": "ExpressionStatement", - "src": "10400:122:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1276, - "name": "Identifier", - "src": "10537:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1277, - "name": "ElementaryTypeName", - "src": "10553:7:1" - } - ], - "id": 1278, - "name": "ElementaryTypeNameExpression", - "src": "10553:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1279, - "name": "ElementaryTypeName", - "src": "10561:7:1" - } - ], - "id": 1280, - "name": "ElementaryTypeNameExpression", - "src": "10561:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1281, - "name": "Identifier", - "src": "10569:5:1" - } - ], - "id": 1282, - "name": "FunctionCall", - "src": "10561:14:1" - } - ], - "id": 1283, - "name": "FunctionCall", - "src": "10553:23:1" - } - ], - "id": 1284, - "name": "Assignment", - "src": "10537:39:1" - } - ], - "id": 1285, - "name": "ExpressionStatement", - "src": "10537:39:1" - } - ], - "id": 1286, - "name": "Block", - "src": "9496:1091:1" - } - ], - "id": 1287, - "name": "IfStatement", - "src": "9270:1317:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1288, - "name": "Identifier", - "src": "10636:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1289, - "name": "Identifier", - "src": "10644:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1290, - "name": "Literal", - "src": "10654:1:1" - } - ], - "id": 1291, - "name": "BinaryOperation", - "src": "10644:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"truncated amount must not be 0\"", - "value": "truncated amount must not be 0" - }, - "id": 1292, - "name": "Literal", - "src": "10657:32:1" - } - ], - "id": 1293, - "name": "FunctionCall", - "src": "10636:54:1" - } - ], - "id": 1294, - "name": "ExpressionStatement", - "src": "10636:54:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 395, - "type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)", - "value": "LogTokensLocked" - }, - "id": 1295, - "name": "Identifier", - "src": "10706:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1102, - "type": "uint8", - "value": "target_chain" - }, - "id": 1296, - "name": "Identifier", - "src": "10722:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1119, - "type": "uint8", - "value": "asset_chain" - }, - "id": 1297, - "name": "Identifier", - "src": "10736:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1298, - "name": "Identifier", - "src": "10749:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1299, - "name": "Identifier", - "src": "10759:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1300, - "name": "ElementaryTypeName", - "src": "10774:7:1" - } - ], - "id": 1301, - "name": "ElementaryTypeNameExpression", - "src": "10774:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1302, - "name": "ElementaryTypeName", - "src": "10782:7:1" - } - ], - "id": 1303, - "name": "ElementaryTypeNameExpression", - "src": "10782:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1304, - "name": "Identifier", - "src": "10790:3:1" - } - ], - "id": 1305, - "name": "MemberAccess", - "src": "10790:10:1" - } - ], - "id": 1306, - "name": "FunctionCall", - "src": "10782:19:1" - } - ], - "id": 1307, - "name": "FunctionCall", - "src": "10774:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1100, - "type": "bytes32", - "value": "recipient" - }, - "id": 1308, - "name": "Identifier", - "src": "10804:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1309, - "name": "Identifier", - "src": "10815:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1104, - "type": "uint32", - "value": "nonce" - }, - "id": 1310, - "name": "Identifier", - "src": "10823:5:1" - } - ], - "id": 1311, - "name": "FunctionCall", - "src": "10706:123:1" - } - ], - "id": 1312, - "name": "EmitStatement", - "src": "10701:128:1" - } - ], - "id": 1313, - "name": "Block", - "src": "9057:1779:1" - } - ], - "id": 1314, - "name": "FunctionDefinition", - "src": "8861:1975:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "58d62e46", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "lockETH", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1315, - "name": "ElementaryTypeName", - "src": "10868:7:1" - } - ], - "id": 1316, - "name": "VariableDeclaration", - "src": "10868:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1317, - "name": "ElementaryTypeName", - "src": "10895:5:1" - } - ], - "id": 1318, - "name": "VariableDeclaration", - "src": "10895:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 1319, - "name": "ElementaryTypeName", - "src": "10923:6:1" - } - ], - "id": 1320, - "name": "VariableDeclaration", - "src": "10923:12:1" - } - ], - "id": 1321, - "name": "ParameterList", - "src": "10858:83:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1324, - "name": "ParameterList", - "src": "10970:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 1322, - "name": "Identifier", - "src": "10957:12:1" - } - ], - "id": 1323, - "name": "ModifierInvocation", - "src": "10957:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1325, - "name": "Identifier", - "src": "10980:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1318, - "type": "uint8", - "value": "target_chain" - }, - "id": 1326, - "name": "Identifier", - "src": "10988:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1327, - "name": "Identifier", - "src": "11004:8:1" - } - ], - "id": 1328, - "name": "BinaryOperation", - "src": "10988:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"must not transfer to the same chain\"", - "value": "must not transfer to the same chain" - }, - "id": 1329, - "name": "Literal", - "src": "11014:37:1" - } - ], - "id": 1330, - "name": "FunctionCall", - "src": "10980:72:1" - } - ], - "id": 1331, - "name": "ExpressionStatement", - "src": "10980:72:1" - }, - { - "attributes": { - "assignments": [1333] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "remainder", - "overrides": null, - "scope": 1402, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1332, - "name": "ElementaryTypeName", - "src": "11063:7:1" - } - ], - "id": 1333, - "name": "VariableDeclaration", - "src": "11063:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mod", - "referencedDeclaration": 2432, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1334, - "name": "Identifier", - "src": "11083:3:1" - } - ], - "id": 1335, - "name": "MemberAccess", - "src": "11083:9:1" - } - ], - "id": 1336, - "name": "MemberAccess", - "src": "11083:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "**", - "type": "int_const 1000000000" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1337, - "name": "Literal", - "src": "11097:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1338, - "name": "Literal", - "src": "11103:1:1" - } - ], - "id": 1339, - "name": "BinaryOperation", - "src": "11097:7:1" - } - ], - "id": 1340, - "name": "FunctionCall", - "src": "11083:22:1" - } - ], - "id": 1341, - "name": "VariableDeclarationStatement", - "src": "11063:42:1" - }, - { - "attributes": { - "assignments": [1343] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "transfer_amount", - "overrides": null, - "scope": 1402, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1342, - "name": "ElementaryTypeName", - "src": "11115:7:1" - } - ], - "id": 1343, - "name": "VariableDeclaration", - "src": "11115:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1344, - "name": "Identifier", - "src": "11141:3:1" - } - ], - "id": 1345, - "name": "MemberAccess", - "src": "11141:9:1" - } - ], - "id": 1346, - "name": "MemberAccess", - "src": "11141:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "**", - "type": "int_const 1000000000" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1347, - "name": "Literal", - "src": "11155:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1348, - "name": "Literal", - "src": "11161:1:1" - } - ], - "id": 1349, - "name": "BinaryOperation", - "src": "11155:7:1" - } - ], - "id": 1350, - "name": "FunctionCall", - "src": "11141:22:1" - } - ], - "id": 1351, - "name": "VariableDeclarationStatement", - "src": "11115:48:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1352, - "name": "Identifier", - "src": "11173:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1343, - "type": "uint256", - "value": "transfer_amount" - }, - "id": 1353, - "name": "Identifier", - "src": "11181:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1354, - "name": "Literal", - "src": "11200:1:1" - } - ], - "id": 1355, - "name": "BinaryOperation", - "src": "11181:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"truncated amount must not be 0\"", - "value": "truncated amount must not be 0" - }, - "id": 1356, - "name": "Literal", - "src": "11203:32:1" - } - ], - "id": 1357, - "name": "FunctionCall", - "src": "11173:63:1" - } - ], - "id": 1358, - "name": "ExpressionStatement", - "src": "11173:63:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transfer", - "referencedDeclaration": null, - "type": "function (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1359, - "name": "Identifier", - "src": "11282:3:1" - } - ], - "id": 1362, - "name": "MemberAccess", - "src": "11282:10:1" - } - ], - "id": 1363, - "name": "MemberAccess", - "src": "11282:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1333, - "type": "uint256", - "value": "remainder" - }, - "id": 1364, - "name": "Identifier", - "src": "11302:9:1" - } - ], - "id": 1365, - "name": "FunctionCall", - "src": "11282:30:1" - } - ], - "id": 1366, - "name": "ExpressionStatement", - "src": "11282:30:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "type": "function () payable external" - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "deposit", - "referencedDeclaration": 1425, - "type": "function () payable external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WETH", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1431, - "type": "type(contract WETH)", - "value": "WETH" - }, - "id": 1367, - "name": "Identifier", - "src": "11356:4:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 365, - "type": "address", - "value": "WETHAddress" - }, - "id": 1368, - "name": "Identifier", - "src": "11361:11:1" - } - ], - "id": 1369, - "name": "FunctionCall", - "src": "11356:17:1" - } - ], - "id": 1370, - "name": "MemberAccess", - "src": "11356:25:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1371, - "name": "Identifier", - "src": "11390:3:1" - } - ], - "id": 1372, - "name": "MemberAccess", - "src": "11390:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1333, - "type": "uint256", - "value": "remainder" - }, - "id": 1373, - "name": "Identifier", - "src": "11402:9:1" - } - ], - "id": 1374, - "name": "BinaryOperation", - "src": "11390:21:1" - } - ], - "id": 1375, - "name": "FunctionCallOptions", - "src": "11356:56:1" - } - ], - "id": 1376, - "name": "FunctionCall", - "src": "11356:58:1" - } - ], - "id": 1377, - "name": "ExpressionStatement", - "src": "11356:58:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 395, - "type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)", - "value": "LogTokensLocked" - }, - "id": 1378, - "name": "Identifier", - "src": "11461:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1318, - "type": "uint8", - "value": "target_chain" - }, - "id": 1379, - "name": "Identifier", - "src": "11477:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1380, - "name": "Identifier", - "src": "11491:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1381, - "name": "Literal", - "src": "11501:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1382, - "name": "ElementaryTypeName", - "src": "11504:7:1" - } - ], - "id": 1383, - "name": "ElementaryTypeNameExpression", - "src": "11504:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1384, - "name": "ElementaryTypeName", - "src": "11512:7:1" - } - ], - "id": 1385, - "name": "ElementaryTypeNameExpression", - "src": "11512:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 365, - "type": "address", - "value": "WETHAddress" - }, - "id": 1386, - "name": "Identifier", - "src": "11520:11:1" - } - ], - "id": 1387, - "name": "FunctionCall", - "src": "11512:20:1" - } - ], - "id": 1388, - "name": "FunctionCall", - "src": "11504:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1389, - "name": "ElementaryTypeName", - "src": "11535:7:1" - } - ], - "id": 1390, - "name": "ElementaryTypeNameExpression", - "src": "11535:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1391, - "name": "ElementaryTypeName", - "src": "11543:7:1" - } - ], - "id": 1392, - "name": "ElementaryTypeNameExpression", - "src": "11543:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1393, - "name": "Identifier", - "src": "11551:3:1" - } - ], - "id": 1394, - "name": "MemberAccess", - "src": "11551:10:1" - } - ], - "id": 1395, - "name": "FunctionCall", - "src": "11543:19:1" - } - ], - "id": 1396, - "name": "FunctionCall", - "src": "11535:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1316, - "type": "bytes32", - "value": "recipient" - }, - "id": 1397, - "name": "Identifier", - "src": "11565:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1343, - "type": "uint256", - "value": "transfer_amount" - }, - "id": 1398, - "name": "Identifier", - "src": "11576:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1320, - "type": "uint32", - "value": "nonce" - }, - "id": 1399, - "name": "Identifier", - "src": "11593:5:1" - } - ], - "id": 1400, - "name": "FunctionCall", - "src": "11461:138:1" - } - ], - "id": 1401, - "name": "EmitStatement", - "src": "11456:143:1" - } - ], - "id": 1402, - "name": "Block", - "src": "10970:636:1" - } - ], - "id": 1403, - "name": "FunctionDefinition", - "src": "10842:764:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "fallback", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1404, - "name": "ParameterList", - "src": "11620:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1405, - "name": "ParameterList", - "src": "11640:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 1406, - "name": "Identifier", - "src": "11641:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"please use lockETH to transfer ETH to Solana\"", - "value": "please use lockETH to transfer ETH to Solana" - }, - "id": 1407, - "name": "Literal", - "src": "11648:46:1" - } - ], - "id": 1408, - "name": "FunctionCall", - "src": "11641:54:1" - } - ], - "id": 1409, - "name": "ExpressionStatement", - "src": "11641:54:1" - } - ], - "id": 1410, - "name": "Block", - "src": "11640:57:1" - } - ], - "id": 1411, - "name": "FunctionDefinition", - "src": "11612:85:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "receive", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1412, - "name": "ParameterList", - "src": "11710:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1413, - "name": "ParameterList", - "src": "11730:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 1414, - "name": "Identifier", - "src": "11731:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"please use lockETH to transfer ETH to Solana\"", - "value": "please use lockETH to transfer ETH to Solana" - }, - "id": 1415, - "name": "Literal", - "src": "11738:46:1" - } - ], - "id": 1416, - "name": "FunctionCall", - "src": "11731:54:1" - } - ], - "id": 1417, - "name": "ExpressionStatement", - "src": "11731:54:1" - } - ], - "id": 1418, - "name": "Block", - "src": "11730:57:1" - } - ], - "id": 1419, - "name": "FunctionDefinition", - "src": "11703:84:1" - } - ], - "id": 1420, - "name": "ContractDefinition", - "src": "463:11326:1" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3086], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "linearizedBaseContracts": [1431, 3086], - "name": "WETH", - "scope": 1432 - }, - "children": [ - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 1421, - "name": "UserDefinedTypeName", - "src": "11810:6:1" - } - ], - "id": 1422, - "name": "InheritanceSpecifier", - "src": "11810:6:1" - }, - { - "attributes": { - "body": null, - "documentation": null, - "functionSelector": "d0e30db0", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "deposit", - "overrides": null, - "scope": 1431, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1423, - "name": "ParameterList", - "src": "11839:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1424, - "name": "ParameterList", - "src": "11858:0:1" - } - ], - "id": 1425, - "name": "FunctionDefinition", - "src": "11823:36:1" - }, - { - "attributes": { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "withdraw", - "overrides": null, - "scope": 1431, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1430, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1426, - "name": "ElementaryTypeName", - "src": "11883:7:1" - } - ], - "id": 1427, - "name": "VariableDeclaration", - "src": "11883:14:1" - } - ], - "id": 1428, - "name": "ParameterList", - "src": "11882:16:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1429, - "name": "ParameterList", - "src": "11907:0:1" - } - ], - "id": 1430, - "name": "FunctionDefinition", - "src": "11865:43:1" - } - ], - "id": 1431, - "name": "ContractDefinition", - "src": "11792:118:1" - } - ], - "id": 1432, - "name": "SourceUnit", - "src": "64:11847:1" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.871Z", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." - }, - "approve(address,uint256)": { - "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." - }, - "balanceOf(address)": { - "details": "Returns the amount of tokens owned by `account`." - }, - "totalSupply()": { - "details": "Returns the amount of tokens in existence." - }, - "transfer(address,uint256)": { - "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - }, - "transferFrom(address,address,uint256)": { - "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/Wormhole.json b/packages/bridge-sdk/contracts/Wormhole.json deleted file mode 100644 index 410f7b1..0000000 --- a/packages/bridge-sdk/contracts/Wormhole.json +++ /dev/null @@ -1,32263 +0,0 @@ -{ - "contractName": "Wormhole", - "abi": [ - { - "inputs": [ - { - "components": [ - { - "internalType": "address[]", - "name": "keys", - "type": "address[]" - }, - { - "internalType": "uint32", - "name": "expiration_time", - "type": "uint32" - } - ], - "internalType": "struct Wormhole.GuardianSet", - "name": "initial_guardian_set", - "type": "tuple" - }, - { - "internalType": "address", - "name": "wrapped_asset_master", - "type": "address" - }, - { - "internalType": "uint32", - "name": "_guardian_set_expirity", - "type": "uint32" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "oldGuardianIndex", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newGuardianIndex", - "type": "uint32" - } - ], - "name": "LogGuardianSetChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "target_chain", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "token_chain", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "token_decimals", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "token", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "sender", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - } - ], - "name": "LogTokensLocked", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "consumedVAAs", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian_set_expirity", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian_set_index", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "guardian_sets", - "outputs": [ - { - "internalType": "uint32", - "name": "expiration_time", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isWrappedAsset", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wrappedAssetMaster", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "wrappedAssets", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "idx", - "type": "uint32" - } - ], - "name": "getGuardianSet", - "outputs": [ - { - "components": [ - { - "internalType": "address[]", - "name": "keys", - "type": "address[]" - }, - { - "internalType": "uint32", - "name": "expiration_time", - "type": "uint32" - } - ], - "internalType": "struct Wormhole.GuardianSet", - "name": "gs", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "vaa", - "type": "bytes" - } - ], - "name": "submitVAA", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "vaa", - "type": "bytes" - } - ], - "name": "parseAndVerifyVAA", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "version", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "uint32", - "name": "guardian_set_index", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - } - ], - "internalType": "struct Wormhole.ParsedVAA", - "name": "parsed_vaa", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "target_chain", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "refund_dust", - "type": "bool" - } - ], - "name": "lockAssets", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "target_chain", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - } - ], - "name": "lockETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"internalType\":\"struct Wormhole.GuardianSet\",\"name\":\"initial_guardian_set\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"wrapped_asset_master\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_guardian_set_expirity\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldGuardianIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newGuardianIndex\",\"type\":\"uint32\"}],\"name\":\"LogGuardianSetChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"token_chain\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"token_decimals\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"token\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sender\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"}],\"name\":\"LogTokensLocked\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"consumedVAAs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"idx\",\"type\":\"uint32\"}],\"name\":\"getGuardianSet\",\"outputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"internalType\":\"struct Wormhole.GuardianSet\",\"name\":\"gs\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian_set_expirity\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian_set_index\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"guardian_sets\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWrappedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"refund_dust\",\"type\":\"bool\"}],\"name\":\"lockAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"}],\"name\":\"lockETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"vaa\",\"type\":\"bytes\"}],\"name\":\"parseAndVerifyVAA\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"guardian_set_index\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"internalType\":\"struct Wormhole.ParsedVAA\",\"name\":\"parsed_vaa\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"vaa\",\"type\":\"bytes\"}],\"name\":\"submitVAA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedAssetMaster\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"wrappedAssets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":\"Wormhole\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol\":{\"keccak256\":\"0x4a28e69afc4c1c1aee48c7b497f9b8452b295ddcf4bbf453d594a1467016d5f2\",\"license\":\"Unlicense\",\"urls\":[\"bzz-raw://279e22c43f79567e9f7842cfca8ad2329bbbad2eac30413b620796d51f308719\",\"dweb:/ipfs/QmbdRLJYoKJxDbDLeverNMHsNFEcxnohAA713UFLjLm3Jy\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol\":{\"keccak256\":\"0xdbd8e88a0a6cb69b6edc83c34d3c51a67560cb0a88d52e908c6d391435242999\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://630e2d852c4e534cff7d1beb00c3fc165a73d6e3a7ee394c5850cbf4047b0a32\",\"dweb:/ipfs/QmUe3mc6HwXCoL1Q6NACA4kMb6mavMKdZxDqVYG2jycoTh\"]},\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol\":{\"keccak256\":\"0x1aca747b823c4d8492ae379cfd9495e8ff19726302d943da56b2bb71aebecc73\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://716c755b41c76deb60297664878f07e0972867918fde13c20c196263d3daa554\",\"dweb:/ipfs/QmbrxvDYfcgSjBBnDdXyZJcwd8pYyyrQhYqY5h6DaxWKcy\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://991b44ff44e0496e8554a90f4c0512c28faed45104d40430019f3c67ea67740e\",\"dweb:/ipfs/Qmc3nRapVbcctELoZS5qe17zLkFB3bETBfwzCTMF1CSuGE\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a849c2d95e85463909e5b5c920b13e7a11216ca14127085e16d22b9379d52a\",\"dweb:/ipfs/QmUg3CZDbCCcQdroEpexBy5ZFd5vD1UWijWQq9qHZjtJNQ\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b95e56c1640d0ef789fc5c16269e141e992f6c8ac97cc6d377bd3825e9cab182\",\"dweb:/ipfs/QmVzaxJZY51EhagrcNnkxoU6Uq17RhATe7aHvtkC6wUkgK\"]}},\"version\":1}", - "bytecode": "0x60806040526002600160146101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b50604051620044543803806200445483398181016040528101906200005391906200033e565b600160008190555082600260008063ffffffff1681526020019081526020016000206000820151816000019080519060200190620000939291906200014b565b5060208201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055509050506000600360006101000a81548163ffffffff021916908363ffffffff16021790555080600360046101000a81548163ffffffff021916908363ffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200047c565b828054828255906000526020600020908101928215620001c7579160200282015b82811115620001c65782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906200016c565b5b509050620001d69190620001da565b5090565b5b808211156200021357600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101620001db565b5090565b600081519050620002288162000448565b92915050565b600082601f8301126200024057600080fd5b8151620002576200025182620003db565b620003ad565b915081818352602084019350602081019050838560208402820111156200027d57600080fd5b60005b83811015620002b1578162000296888262000217565b84526020840193506020830192505060018101905062000280565b5050505092915050565b600060408284031215620002ce57600080fd5b620002da6040620003ad565b9050600082015167ffffffffffffffff811115620002f757600080fd5b62000305848285016200022e565b60008301525060206200031b8482850162000327565b60208301525092915050565b600081519050620003388162000462565b92915050565b6000806000606084860312156200035457600080fd5b600084015167ffffffffffffffff8111156200036f57600080fd5b6200037d86828701620002bb565b9350506020620003908682870162000217565b9250506040620003a38682870162000327565b9150509250925092565b6000604051905081810181811067ffffffffffffffff82111715620003d157600080fd5b8060405250919050565b600067ffffffffffffffff821115620003f357600080fd5b602082029050602081019050919050565b6000620004118262000418565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b620004538162000404565b81146200045f57600080fd5b50565b6200046d8162000438565b81146200047957600080fd5b50565b613fc8806200048c6000396000f3fe6080604052600436106100ab5760003560e01c80637071396011610064578063707139601461024d578063822d82b31461027657806399da1d3c146102a1578063a31fe409146102cc578063b6694c2a14610309578063f951975a14610346576100eb565b80631a2be4da146101265780633bc0aee61461016357806342b0aefa1461018c5780634db47840146101c957806358d62e46146101f4578063600b9aa614610210576100eb565b366100eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100e290613927565b60405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011d90613927565b60405180910390fd5b34801561013257600080fd5b5061014d60048036038101906101489190612a8a565b610383565b60405161015a9190613845565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190612c06565b6103a3565b005b34801561019857600080fd5b506101b360048036038101906101ae9190612c74565b610526565b6040516101c09190613c2b565b60405180910390f35b3480156101d557600080fd5b506101de610554565b6040516101eb9190613c2b565b60405180910390f35b61020e60048036038101906102099190612bb7565b61056a565b005b34801561021c57600080fd5b5061023760048036038101906102329190612c06565b6107f0565b6040516102449190613c09565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190612ab3565b611094565b005b34801561028257600080fd5b5061028b61172a565b6040516102989190613c2b565b60405180910390f35b3480156102ad57600080fd5b506102b6611740565b6040516102c39190613786565b60405180910390f35b3480156102d857600080fd5b506102f360048036038101906102ee9190612b65565b611766565b6040516103009190613845565b60405180910390f35b34801561031557600080fd5b50610330600480360381019061032b9190612b65565b611786565b60405161033d9190613786565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190612c74565b6117b9565b60405161037a9190613be7565b60405180910390f35b60066020528060005260406000206000915054906101000a900460ff1681565b600260005414156103e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e090613ba7565b60405180910390fd5b60026000819055506103f961283e565b61040383836107f0565b90506001816080015160ff16141561048b57600360009054906101000a900463ffffffff1663ffffffff16816040015163ffffffff1614610479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047090613987565b60405180910390fd5b6104868160a001516118a6565b6104e9565b6010816080015160ff1614156104ad576104a88160a00151611b87565b6104e8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df906138e7565b60405180910390fd5b5b6001600460008360200151815260200190815260200160002060006101000a81548160ff0219169083151502179055505060016000819055505050565b60026020528060005260406000206000915090508060010160009054906101000a900463ffffffff16905081565b600360049054906101000a900463ffffffff1681565b600260005414156105b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a790613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168260ff161415610610576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060790613a27565b60405180910390fd5b6000610629633b9aca0034611f0590919063ffffffff16565b90506000610644633b9aca0034611f5b90919063ffffffff16565b9050600081141561068a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068190613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156106d0573d6000803e3d6000fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db08334036040518263ffffffff1660e01b81526004016000604051808303818588803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b50505050503373ffffffffffffffffffffffffffffffffffffffff1660001b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1660001b7f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab886600160149054906101000a900460ff1660098a878a6040516107d996959493929190613ca6565b60405180910390a350506001600081905550505050565b6107f861283e565b610850600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b816000019060ff16908160ff16815250506001816000015160ff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a2906139e7565b60405180910390fd5b610903600184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b816040019063ffffffff16908163ffffffff16815250506000610974600585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b60ff16905060008160420260060190506109db8186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b836060019063ffffffff16908163ffffffff1681525050610a508182878790500387878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b80519060200120836020018181525050600460008460200151815260200190815260200160002060009054906101000a900460ff1615610ac5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abc90613907565b60405180910390fd5b610acd612889565b60026000856040015163ffffffff1663ffffffff16815260200190815260200160002060405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b36575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600081600001515111610bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf090613bc7565b60405180910390fd5b6000816020015163ffffffff161480610c1b575042816020015163ffffffff16115b610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613b07565b60405180910390fd5b826001600a60026003600a8660000151510281610c7357fe5b040281610c7c57fe5b04011115610cbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb690613ac7565b60405180910390fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b84811015610fb2576000610d4e604283026006018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b90508260010b8160ff1613610d98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8f90613b47565b60405180910390fd5b8060ff1692506000610dfd604284026007018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610e5e604285026027018c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610ebf604286026047018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b9050601b8101905086600001518460ff1681518110610eda57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1660018b6020015183868660405160008152602001604052604051610f1f9493929190613860565b6020604051602081039080840390855afa158015610f41573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614610fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9890613a47565b60405180910390fd5b505050508080600101915050610ce7565b5061100d6004840188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b856080019060ff16908160ff16815250506110826005840160058501898990500389898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b8560a001819052505050505092915050565b600260005414156110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d190613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168360ff16141561113a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113190613a27565b60405180910390fd5b6000600160149054906101000a900460ff1690506000808873ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561119757600080fd5b505afa1580156111ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cf9190612c9d565b9050600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611395578873ffffffffffffffffffffffffffffffffffffffff16639dc29fac338a6040518363ffffffff1660e01b815260040161125e9291906137bc565b600060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff1663026b05396040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d657600080fd5b505afa1580156112ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130e9190612c9d565b92508873ffffffffffffffffffffffffffffffffffffffff16631ba46cfd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190612b8e565b9150611677565b60008973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113d091906137a1565b60206040518083038186803b1580156113e857600080fd5b505afa1580156113fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114209190612c4b565b905061144f33308b8d73ffffffffffffffffffffffffffffffffffffffff1661218d909392919063ffffffff16565b60008a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161148a91906137a1565b60206040518083038186803b1580156114a257600080fd5b505afa1580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612c4b565b90506114ef828261221690919063ffffffff16565b995060098360ff1611156115735760008a905061151e6009850360ff16600a0a8c611f5b90919063ffffffff16565b9a50861561156d5761156c336115466009870360ff16600a0a84611f0590919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b5b60099350505b67ffffffffffffffff801661161760098d73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156115c957600080fd5b505afa1580156115dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116019190612c9d565b0360ff16600a0a83611f5b90919063ffffffff16565b1115611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f906138c7565b60405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff1660001b935050505b60008814156116bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b290613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1660001b827f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab88886858c8e8c60405161170f96959493929190613d07565b60405180910390a35050506001600081905550505050505050565b600360009054906101000a900463ffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117c1612889565b600260008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561187057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611826575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050919050565b60006118bc60008361200f90919063ffffffff16565b90506001600360009054906101000a900463ffffffff160163ffffffff168163ffffffff1614611921576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191890613aa7565b60405180910390fd5b6000611937600484611fb190919063ffffffff16565b905060608160ff1667ffffffffffffffff8111801561195557600080fd5b506040519080825280602002602001820160405280156119845781602001602082028036833780820191505090505b50905060005b8260ff16811015611a075760006119b060148302600501876122ec90919063ffffffff16565b9050808383815181106119bf57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505050808060010191505061198a565b506000600360009054906101000a900463ffffffff16905083600360006101000a81548163ffffffff021916908363ffffffff160217905550611a48612889565b6040518060400160405280848152602001600063ffffffff1681525090508060026000600360009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000206000820151816000019080519060200190611ab49291906128a9565b5060208201518160010160006101000a81548163ffffffff021916908363ffffffff160217905550905050600360049054906101000a900463ffffffff164201600260008463ffffffff1663ffffffff16815260200190815260200160002060010160006101000a81548163ffffffff021916908363ffffffff1602179055507fdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a6282600360009054906101000a900463ffffffff16604051611b77929190613c46565b60405180910390a1505050505050565b6000611b9d600483611fb190919063ffffffff16565b90506000611bb5600584611fb190919063ffffffff16565b90506000611bcd6032856122ec90919063ffffffff16565b90506000611be5604686611fb190919063ffffffff16565b90506000611bfd60688761235990919063ffffffff16565b90508360ff168560ff161415611c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3f90613b87565b60405180910390fd5b600160149054906101000a900460ff1660ff168460ff1614611c9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9690613ae7565b60405180910390fd5b600160149054906101000a900460ff1660ff168260ff1614611e0a576000611cd160478861212f90919063ffffffff16565b905060008382604051602001611ce892919061375a565b60405160208183030381529060405280519060200120905060006005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d95576000611d8360678b611fb190919063ffffffff16565b9050611d91838786846123b7565b9150505b8073ffffffffffffffffffffffffffffffffffffffff166340c10f1987866040518363ffffffff1660e01b8152600401611dd092919061381c565b600060405180830381600087803b158015611dea57600080fd5b505af1158015611dfe573d6000803e3d6000fd5b50505050505050611efd565b6000611e206053886122ec90919063ffffffff16565b905060008173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6a57600080fd5b505afa158015611e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea29190612c9d565b905060098160ff161115611ecf57611ecc6009820360ff16600a0a8461256090919063ffffffff16565b92505b611efa85848473ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b50505b505050505050565b6000808211611f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4090613a07565b60405180910390fd5b818381611f5257fe5b06905092915050565b6000808211611f9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f96906139a7565b60405180910390fd5b818381611fa857fe5b04905092915050565b60006001820183511015611ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff1906139c7565b60405180910390fd5b60008260018501015190508091505092915050565b60006004820183511015612058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204f906139c7565b60405180910390fd5b60008260048501015190508091505092915050565b6060818301845110156120b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ac906139c7565b60405180910390fd5b60608215600081146120d257604051915060208201604052612123565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561211057805183526020830192506020810190506120f3565b50868552601f19601f8301166040525050505b50809150509392505050565b60006020820183511015612178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216f906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b612210846323b872dd60e01b8585856040516024016121ae939291906137e5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b50505050565b60008282111561225b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225290613947565b60405180910390fd5b818303905092915050565b6122e78363a9059cbb60e01b848460405160240161228592919061381c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b505050565b60006014820183511015612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232c906139c7565b60405180910390fd5b60006c01000000000000000000000000836020860101510490508091505092915050565b600060208201835110156123a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612399906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660601b90506040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528160148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152866037826000f59250508173ffffffffffffffffffffffffffffffffffffffff1663a7a2d3fb8686866040518463ffffffff1660e01b815260040161247b93929190613c6f565b600060405180830381600087803b15801561249557600080fd5b505af11580156124a9573d6000803e3d6000fd5b50505050816005600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050949350505050565b60008083141561257357600090506125ca565b600082840290508284828161258457fe5b04146125c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125bc90613a67565b60405180910390fd5b809150505b92915050565b6060612632826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126979092919063ffffffff16565b905060008151111561269257808060200190518101906126529190612b3c565b612691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268890613b67565b60405180910390fd5b5b505050565b60606126a684846000856126af565b90509392505050565b6060824710156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb90613967565b60405180910390fd5b6126fd856127c4565b61273c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273390613b27565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516127669190613743565b60006040518083038185875af1925050503d80600081146127a3576040519150601f19603f3d011682016040523d82523d6000602084013e6127a8565b606091505b50915091506127b88282866127d7565b92505050949350505050565b600080823b905060008111915050919050565b606083156127e757829050612837565b6000835111156127fa5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161282e91906138a5565b60405180910390fd5b9392505050565b6040518060c00160405280600060ff16815260200160008019168152602001600063ffffffff168152602001600063ffffffff168152602001600060ff168152602001606081525090565b604051806040016040528060608152602001600063ffffffff1681525090565b828054828255906000526020600020908101928215612922579160200282015b828111156129215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906128c9565b5b50905061292f9190612933565b5090565b5b8082111561296a57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612934565b5090565b60008135905061297d81613f08565b92915050565b60008135905061299281613f1f565b92915050565b6000815190506129a781613f1f565b92915050565b6000813590506129bc81613f36565b92915050565b6000815190506129d181613f36565b92915050565b60008083601f8401126129e957600080fd5b8235905067ffffffffffffffff811115612a0257600080fd5b602083019150836001820283011115612a1a57600080fd5b9250929050565b600081359050612a3081613f4d565b92915050565b600081519050612a4581613f4d565b92915050565b600081359050612a5a81613f64565b92915050565b600081359050612a6f81613f7b565b92915050565b600081519050612a8481613f7b565b92915050565b600060208284031215612a9c57600080fd5b6000612aaa8482850161296e565b91505092915050565b60008060008060008060c08789031215612acc57600080fd5b6000612ada89828a0161296e565b9650506020612aeb89828a01612a21565b9550506040612afc89828a016129ad565b9450506060612b0d89828a01612a60565b9350506080612b1e89828a01612a4b565b92505060a0612b2f89828a01612983565b9150509295509295509295565b600060208284031215612b4e57600080fd5b6000612b5c84828501612998565b91505092915050565b600060208284031215612b7757600080fd5b6000612b85848285016129ad565b91505092915050565b600060208284031215612ba057600080fd5b6000612bae848285016129c2565b91505092915050565b600080600060608486031215612bcc57600080fd5b6000612bda868287016129ad565b9350506020612beb86828701612a60565b9250506040612bfc86828701612a4b565b9150509250925092565b60008060208385031215612c1957600080fd5b600083013567ffffffffffffffff811115612c3357600080fd5b612c3f858286016129d7565b92509250509250929050565b600060208284031215612c5d57600080fd5b6000612c6b84828501612a36565b91505092915050565b600060208284031215612c8657600080fd5b6000612c9484828501612a4b565b91505092915050565b600060208284031215612caf57600080fd5b6000612cbd84828501612a75565b91505092915050565b6000612cd28383612ced565b60208301905092915050565b612ce781613e53565b82525050565b612cf681613de4565b82525050565b612d0581613de4565b82525050565b6000612d1682613d78565b612d208185613da6565b9350612d2b83613d68565b8060005b83811015612d5c578151612d438882612cc6565b9750612d4e83613d99565b925050600181019050612d2f565b5085935050505092915050565b612d7281613df6565b82525050565b612d8181613e02565b82525050565b612d9081613e02565b82525050565b612da7612da282613e02565b613ece565b82525050565b6000612db882613d83565b612dc28185613db7565b9350612dd2818560208601613e9b565b612ddb81613eea565b840191505092915050565b6000612df182613d83565b612dfb8185613dc8565b9350612e0b818560208601613e9b565b80840191505092915050565b612e2081613e65565b82525050565b6000612e3182613d8e565b612e3b8185613dd3565b9350612e4b818560208601613e9b565b612e5481613eea565b840191505092915050565b6000612e6c602383613dd3565b91507f6272696467652062616c616e636520776f756c6420657863656564206d61786960008301527f6d756d00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ed2601283613dd3565b91507f696e76616c69642056414120616374696f6e00000000000000000000000000006000830152602082019050919050565b6000612f12601883613dd3565b91507f5641412077617320616c726561647920657865637574656400000000000000006000830152602082019050919050565b6000612f52602c83613dd3565b91507f706c6561736520757365206c6f636b45544820746f207472616e73666572204560008301527f544820746f20536f6c616e6100000000000000000000000000000000000000006020830152604082019050919050565b6000612fb8601e83613dd3565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b6000612ff8602683613dd3565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061305e603983613dd3565b91507f6f6e6c79207468652063757272656e7420677561726469616e2073657420636160008301527f6e206368616e67652074686520677561726469616e20736574000000000000006020830152604082019050919050565b60006130c4601a83613dd3565b91507f536166654d6174683a206469766973696f6e206279207a65726f0000000000006000830152602082019050919050565b6000613104601283613dd3565b91507f52656164206f7574206f6620626f756e647300000000000000000000000000006000830152602082019050919050565b6000613144601883613dd3565b91507f5641412076657273696f6e20696e636f6d70617469626c6500000000000000006000830152602082019050919050565b6000613184601883613dd3565b91507f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000006000830152602082019050919050565b60006131c4602383613dd3565b91507f6d757374206e6f74207472616e7366657220746f207468652073616d6520636860008301527f61696e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061322a601583613dd3565b91507f564141207369676e617475726520696e76616c696400000000000000000000006000830152602082019050919050565b600061326a602183613dd3565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006132d0601e83613dd3565b91507f7472756e636174656420616d6f756e74206d757374206e6f74206265203000006000830152602082019050919050565b6000613310602183613dd3565b91507f696e646578206d75737420696e63726561736520696e207374657073206f662060008301527f31000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613376600983613dd3565b91507f6e6f2071756f72756d00000000000000000000000000000000000000000000006000830152602082019050919050565b60006133b6601983613dd3565b91507f7472616e73666572206d75737420626520696e636f6d696e67000000000000006000830152602082019050919050565b60006133f6601883613dd3565b91507f677561726469616e2073657420686173206578706972656400000000000000006000830152602082019050919050565b6000613436601d83613dd3565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b6000613476602383613dd3565b91507f7369676e617475726520696e6469636573206d75737420626520617363656e6460008301527f696e6700000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006134dc602a83613dd3565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000613542602683613dd3565b91507f73616d6520636861696e207472616e736665727320617265206e6f742073757060008301527f706f7274656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006135a8601f83613dd3565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b60006135e8601483613dd3565b91507f696e76616c696420677561726469616e207365740000000000000000000000006000830152602082019050919050565b600060408301600083015184820360008601526136388282612d0b565b915050602083015161364d60208601826136f0565b508091505092915050565b600060c083016000830151613670600086018261370e565b5060208301516136836020860182612d78565b50604083015161369660408601826136f0565b5060608301516136a960608601826136f0565b5060808301516136bc608086018261370e565b5060a083015184820360a08601526136d48282612dad565b9150508091505092915050565b6136ea81613e2c565b82525050565b6136f981613e36565b82525050565b61370881613e36565b82525050565b61371781613e46565b82525050565b61372681613e46565b82525050565b61373d61373882613e46565b613ed8565b82525050565b600061374f8284612de6565b915081905092915050565b6000613766828561372c565b6001820191506137768284612d96565b6020820191508190509392505050565b600060208201905061379b6000830184612cfc565b92915050565b60006020820190506137b66000830184612cde565b92915050565b60006040820190506137d16000830185612cde565b6137de60208301846136e1565b9392505050565b60006060820190506137fa6000830186612cfc565b6138076020830185612cfc565b61381460408301846136e1565b949350505050565b60006040820190506138316000830185612cfc565b61383e60208301846136e1565b9392505050565b600060208201905061385a6000830184612d69565b92915050565b60006080820190506138756000830187612d87565b613882602083018661371d565b61388f6040830185612d87565b61389c6060830184612d87565b95945050505050565b600060208201905081810360008301526138bf8184612e26565b905092915050565b600060208201905081810360008301526138e081612e5f565b9050919050565b6000602082019050818103600083015261390081612ec5565b9050919050565b6000602082019050818103600083015261392081612f05565b9050919050565b6000602082019050818103600083015261394081612f45565b9050919050565b6000602082019050818103600083015261396081612fab565b9050919050565b6000602082019050818103600083015261398081612feb565b9050919050565b600060208201905081810360008301526139a081613051565b9050919050565b600060208201905081810360008301526139c0816130b7565b9050919050565b600060208201905081810360008301526139e0816130f7565b9050919050565b60006020820190508181036000830152613a0081613137565b9050919050565b60006020820190508181036000830152613a2081613177565b9050919050565b60006020820190508181036000830152613a40816131b7565b9050919050565b60006020820190508181036000830152613a608161321d565b9050919050565b60006020820190508181036000830152613a808161325d565b9050919050565b60006020820190508181036000830152613aa0816132c3565b9050919050565b60006020820190508181036000830152613ac081613303565b9050919050565b60006020820190508181036000830152613ae081613369565b9050919050565b60006020820190508181036000830152613b00816133a9565b9050919050565b60006020820190508181036000830152613b20816133e9565b9050919050565b60006020820190508181036000830152613b4081613429565b9050919050565b60006020820190508181036000830152613b6081613469565b9050919050565b60006020820190508181036000830152613b80816134cf565b9050919050565b60006020820190508181036000830152613ba081613535565b9050919050565b60006020820190508181036000830152613bc08161359b565b9050919050565b60006020820190508181036000830152613be0816135db565b9050919050565b60006020820190508181036000830152613c01818461361b565b905092915050565b60006020820190508181036000830152613c238184613658565b905092915050565b6000602082019050613c4060008301846136ff565b92915050565b6000604082019050613c5b60008301856136ff565b613c6860208301846136ff565b9392505050565b6000606082019050613c84600083018661371d565b613c916020830185612d87565b613c9e604083018461371d565b949350505050565b600060c082019050613cbb600083018961371d565b613cc8602083018861371d565b613cd56040830187612e17565b613ce26060830186612d87565b613cef60808301856136e1565b613cfc60a08301846136ff565b979650505050505050565b600060c082019050613d1c600083018961371d565b613d29602083018861371d565b613d36604083018761371d565b613d436060830186612d87565b613d5060808301856136e1565b613d5d60a08301846136ff565b979650505050505050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000613def82613e0c565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b6000613e5e82613e77565b9050919050565b6000613e7082613e46565b9050919050565b6000613e8282613e89565b9050919050565b6000613e9482613e0c565b9050919050565b60005b83811015613eb9578082015181840152602081019050613e9e565b83811115613ec8576000848401525b50505050565b6000819050919050565b6000613ee382613efb565b9050919050565b6000601f19601f8301169050919050565b60008160f81b9050919050565b613f1181613de4565b8114613f1c57600080fd5b50565b613f2881613df6565b8114613f3357600080fd5b50565b613f3f81613e02565b8114613f4a57600080fd5b50565b613f5681613e2c565b8114613f6157600080fd5b50565b613f6d81613e36565b8114613f7857600080fd5b50565b613f8481613e46565b8114613f8f57600080fd5b5056fea2646970667358221220be6268c55fc12db2a6d48a837359a790ca4e234bc0d1c3c7914a3dcb9598614464736f6c634300060c0033", - "deployedBytecode": "0x6080604052600436106100ab5760003560e01c80637071396011610064578063707139601461024d578063822d82b31461027657806399da1d3c146102a1578063a31fe409146102cc578063b6694c2a14610309578063f951975a14610346576100eb565b80631a2be4da146101265780633bc0aee61461016357806342b0aefa1461018c5780634db47840146101c957806358d62e46146101f4578063600b9aa614610210576100eb565b366100eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100e290613927565b60405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011d90613927565b60405180910390fd5b34801561013257600080fd5b5061014d60048036038101906101489190612a8a565b610383565b60405161015a9190613845565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190612c06565b6103a3565b005b34801561019857600080fd5b506101b360048036038101906101ae9190612c74565b610526565b6040516101c09190613c2b565b60405180910390f35b3480156101d557600080fd5b506101de610554565b6040516101eb9190613c2b565b60405180910390f35b61020e60048036038101906102099190612bb7565b61056a565b005b34801561021c57600080fd5b5061023760048036038101906102329190612c06565b6107f0565b6040516102449190613c09565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190612ab3565b611094565b005b34801561028257600080fd5b5061028b61172a565b6040516102989190613c2b565b60405180910390f35b3480156102ad57600080fd5b506102b6611740565b6040516102c39190613786565b60405180910390f35b3480156102d857600080fd5b506102f360048036038101906102ee9190612b65565b611766565b6040516103009190613845565b60405180910390f35b34801561031557600080fd5b50610330600480360381019061032b9190612b65565b611786565b60405161033d9190613786565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190612c74565b6117b9565b60405161037a9190613be7565b60405180910390f35b60066020528060005260406000206000915054906101000a900460ff1681565b600260005414156103e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e090613ba7565b60405180910390fd5b60026000819055506103f961283e565b61040383836107f0565b90506001816080015160ff16141561048b57600360009054906101000a900463ffffffff1663ffffffff16816040015163ffffffff1614610479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047090613987565b60405180910390fd5b6104868160a001516118a6565b6104e9565b6010816080015160ff1614156104ad576104a88160a00151611b87565b6104e8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df906138e7565b60405180910390fd5b5b6001600460008360200151815260200190815260200160002060006101000a81548160ff0219169083151502179055505060016000819055505050565b60026020528060005260406000206000915090508060010160009054906101000a900463ffffffff16905081565b600360049054906101000a900463ffffffff1681565b600260005414156105b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a790613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168260ff161415610610576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060790613a27565b60405180910390fd5b6000610629633b9aca0034611f0590919063ffffffff16565b90506000610644633b9aca0034611f5b90919063ffffffff16565b9050600081141561068a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068190613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156106d0573d6000803e3d6000fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db08334036040518263ffffffff1660e01b81526004016000604051808303818588803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b50505050503373ffffffffffffffffffffffffffffffffffffffff1660001b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1660001b7f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab886600160149054906101000a900460ff1660098a878a6040516107d996959493929190613ca6565b60405180910390a350506001600081905550505050565b6107f861283e565b610850600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b816000019060ff16908160ff16815250506001816000015160ff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a2906139e7565b60405180910390fd5b610903600184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b816040019063ffffffff16908163ffffffff16815250506000610974600585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b60ff16905060008160420260060190506109db8186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b836060019063ffffffff16908163ffffffff1681525050610a508182878790500387878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b80519060200120836020018181525050600460008460200151815260200190815260200160002060009054906101000a900460ff1615610ac5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abc90613907565b60405180910390fd5b610acd612889565b60026000856040015163ffffffff1663ffffffff16815260200190815260200160002060405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b36575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600081600001515111610bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf090613bc7565b60405180910390fd5b6000816020015163ffffffff161480610c1b575042816020015163ffffffff16115b610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613b07565b60405180910390fd5b826001600a60026003600a8660000151510281610c7357fe5b040281610c7c57fe5b04011115610cbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb690613ac7565b60405180910390fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b84811015610fb2576000610d4e604283026006018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b90508260010b8160ff1613610d98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8f90613b47565b60405180910390fd5b8060ff1692506000610dfd604284026007018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610e5e604285026027018c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610ebf604286026047018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b9050601b8101905086600001518460ff1681518110610eda57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1660018b6020015183868660405160008152602001604052604051610f1f9493929190613860565b6020604051602081039080840390855afa158015610f41573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614610fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9890613a47565b60405180910390fd5b505050508080600101915050610ce7565b5061100d6004840188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b856080019060ff16908160ff16815250506110826005840160058501898990500389898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b8560a001819052505050505092915050565b600260005414156110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d190613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168360ff16141561113a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113190613a27565b60405180910390fd5b6000600160149054906101000a900460ff1690506000808873ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561119757600080fd5b505afa1580156111ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cf9190612c9d565b9050600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611395578873ffffffffffffffffffffffffffffffffffffffff16639dc29fac338a6040518363ffffffff1660e01b815260040161125e9291906137bc565b600060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff1663026b05396040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d657600080fd5b505afa1580156112ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130e9190612c9d565b92508873ffffffffffffffffffffffffffffffffffffffff16631ba46cfd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190612b8e565b9150611677565b60008973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113d091906137a1565b60206040518083038186803b1580156113e857600080fd5b505afa1580156113fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114209190612c4b565b905061144f33308b8d73ffffffffffffffffffffffffffffffffffffffff1661218d909392919063ffffffff16565b60008a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161148a91906137a1565b60206040518083038186803b1580156114a257600080fd5b505afa1580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612c4b565b90506114ef828261221690919063ffffffff16565b995060098360ff1611156115735760008a905061151e6009850360ff16600a0a8c611f5b90919063ffffffff16565b9a50861561156d5761156c336115466009870360ff16600a0a84611f0590919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b5b60099350505b67ffffffffffffffff801661161760098d73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156115c957600080fd5b505afa1580156115dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116019190612c9d565b0360ff16600a0a83611f5b90919063ffffffff16565b1115611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f906138c7565b60405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff1660001b935050505b60008814156116bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b290613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1660001b827f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab88886858c8e8c60405161170f96959493929190613d07565b60405180910390a35050506001600081905550505050505050565b600360009054906101000a900463ffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117c1612889565b600260008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561187057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611826575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050919050565b60006118bc60008361200f90919063ffffffff16565b90506001600360009054906101000a900463ffffffff160163ffffffff168163ffffffff1614611921576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191890613aa7565b60405180910390fd5b6000611937600484611fb190919063ffffffff16565b905060608160ff1667ffffffffffffffff8111801561195557600080fd5b506040519080825280602002602001820160405280156119845781602001602082028036833780820191505090505b50905060005b8260ff16811015611a075760006119b060148302600501876122ec90919063ffffffff16565b9050808383815181106119bf57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505050808060010191505061198a565b506000600360009054906101000a900463ffffffff16905083600360006101000a81548163ffffffff021916908363ffffffff160217905550611a48612889565b6040518060400160405280848152602001600063ffffffff1681525090508060026000600360009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000206000820151816000019080519060200190611ab49291906128a9565b5060208201518160010160006101000a81548163ffffffff021916908363ffffffff160217905550905050600360049054906101000a900463ffffffff164201600260008463ffffffff1663ffffffff16815260200190815260200160002060010160006101000a81548163ffffffff021916908363ffffffff1602179055507fdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a6282600360009054906101000a900463ffffffff16604051611b77929190613c46565b60405180910390a1505050505050565b6000611b9d600483611fb190919063ffffffff16565b90506000611bb5600584611fb190919063ffffffff16565b90506000611bcd6032856122ec90919063ffffffff16565b90506000611be5604686611fb190919063ffffffff16565b90506000611bfd60688761235990919063ffffffff16565b90508360ff168560ff161415611c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3f90613b87565b60405180910390fd5b600160149054906101000a900460ff1660ff168460ff1614611c9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9690613ae7565b60405180910390fd5b600160149054906101000a900460ff1660ff168260ff1614611e0a576000611cd160478861212f90919063ffffffff16565b905060008382604051602001611ce892919061375a565b60405160208183030381529060405280519060200120905060006005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d95576000611d8360678b611fb190919063ffffffff16565b9050611d91838786846123b7565b9150505b8073ffffffffffffffffffffffffffffffffffffffff166340c10f1987866040518363ffffffff1660e01b8152600401611dd092919061381c565b600060405180830381600087803b158015611dea57600080fd5b505af1158015611dfe573d6000803e3d6000fd5b50505050505050611efd565b6000611e206053886122ec90919063ffffffff16565b905060008173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6a57600080fd5b505afa158015611e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea29190612c9d565b905060098160ff161115611ecf57611ecc6009820360ff16600a0a8461256090919063ffffffff16565b92505b611efa85848473ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b50505b505050505050565b6000808211611f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4090613a07565b60405180910390fd5b818381611f5257fe5b06905092915050565b6000808211611f9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f96906139a7565b60405180910390fd5b818381611fa857fe5b04905092915050565b60006001820183511015611ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff1906139c7565b60405180910390fd5b60008260018501015190508091505092915050565b60006004820183511015612058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204f906139c7565b60405180910390fd5b60008260048501015190508091505092915050565b6060818301845110156120b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ac906139c7565b60405180910390fd5b60608215600081146120d257604051915060208201604052612123565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561211057805183526020830192506020810190506120f3565b50868552601f19601f8301166040525050505b50809150509392505050565b60006020820183511015612178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216f906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b612210846323b872dd60e01b8585856040516024016121ae939291906137e5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b50505050565b60008282111561225b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225290613947565b60405180910390fd5b818303905092915050565b6122e78363a9059cbb60e01b848460405160240161228592919061381c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b505050565b60006014820183511015612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232c906139c7565b60405180910390fd5b60006c01000000000000000000000000836020860101510490508091505092915050565b600060208201835110156123a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612399906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660601b90506040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528160148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152866037826000f59250508173ffffffffffffffffffffffffffffffffffffffff1663a7a2d3fb8686866040518463ffffffff1660e01b815260040161247b93929190613c6f565b600060405180830381600087803b15801561249557600080fd5b505af11580156124a9573d6000803e3d6000fd5b50505050816005600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050949350505050565b60008083141561257357600090506125ca565b600082840290508284828161258457fe5b04146125c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125bc90613a67565b60405180910390fd5b809150505b92915050565b6060612632826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126979092919063ffffffff16565b905060008151111561269257808060200190518101906126529190612b3c565b612691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268890613b67565b60405180910390fd5b5b505050565b60606126a684846000856126af565b90509392505050565b6060824710156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb90613967565b60405180910390fd5b6126fd856127c4565b61273c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273390613b27565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516127669190613743565b60006040518083038185875af1925050503d80600081146127a3576040519150601f19603f3d011682016040523d82523d6000602084013e6127a8565b606091505b50915091506127b88282866127d7565b92505050949350505050565b600080823b905060008111915050919050565b606083156127e757829050612837565b6000835111156127fa5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161282e91906138a5565b60405180910390fd5b9392505050565b6040518060c00160405280600060ff16815260200160008019168152602001600063ffffffff168152602001600063ffffffff168152602001600060ff168152602001606081525090565b604051806040016040528060608152602001600063ffffffff1681525090565b828054828255906000526020600020908101928215612922579160200282015b828111156129215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906128c9565b5b50905061292f9190612933565b5090565b5b8082111561296a57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612934565b5090565b60008135905061297d81613f08565b92915050565b60008135905061299281613f1f565b92915050565b6000815190506129a781613f1f565b92915050565b6000813590506129bc81613f36565b92915050565b6000815190506129d181613f36565b92915050565b60008083601f8401126129e957600080fd5b8235905067ffffffffffffffff811115612a0257600080fd5b602083019150836001820283011115612a1a57600080fd5b9250929050565b600081359050612a3081613f4d565b92915050565b600081519050612a4581613f4d565b92915050565b600081359050612a5a81613f64565b92915050565b600081359050612a6f81613f7b565b92915050565b600081519050612a8481613f7b565b92915050565b600060208284031215612a9c57600080fd5b6000612aaa8482850161296e565b91505092915050565b60008060008060008060c08789031215612acc57600080fd5b6000612ada89828a0161296e565b9650506020612aeb89828a01612a21565b9550506040612afc89828a016129ad565b9450506060612b0d89828a01612a60565b9350506080612b1e89828a01612a4b565b92505060a0612b2f89828a01612983565b9150509295509295509295565b600060208284031215612b4e57600080fd5b6000612b5c84828501612998565b91505092915050565b600060208284031215612b7757600080fd5b6000612b85848285016129ad565b91505092915050565b600060208284031215612ba057600080fd5b6000612bae848285016129c2565b91505092915050565b600080600060608486031215612bcc57600080fd5b6000612bda868287016129ad565b9350506020612beb86828701612a60565b9250506040612bfc86828701612a4b565b9150509250925092565b60008060208385031215612c1957600080fd5b600083013567ffffffffffffffff811115612c3357600080fd5b612c3f858286016129d7565b92509250509250929050565b600060208284031215612c5d57600080fd5b6000612c6b84828501612a36565b91505092915050565b600060208284031215612c8657600080fd5b6000612c9484828501612a4b565b91505092915050565b600060208284031215612caf57600080fd5b6000612cbd84828501612a75565b91505092915050565b6000612cd28383612ced565b60208301905092915050565b612ce781613e53565b82525050565b612cf681613de4565b82525050565b612d0581613de4565b82525050565b6000612d1682613d78565b612d208185613da6565b9350612d2b83613d68565b8060005b83811015612d5c578151612d438882612cc6565b9750612d4e83613d99565b925050600181019050612d2f565b5085935050505092915050565b612d7281613df6565b82525050565b612d8181613e02565b82525050565b612d9081613e02565b82525050565b612da7612da282613e02565b613ece565b82525050565b6000612db882613d83565b612dc28185613db7565b9350612dd2818560208601613e9b565b612ddb81613eea565b840191505092915050565b6000612df182613d83565b612dfb8185613dc8565b9350612e0b818560208601613e9b565b80840191505092915050565b612e2081613e65565b82525050565b6000612e3182613d8e565b612e3b8185613dd3565b9350612e4b818560208601613e9b565b612e5481613eea565b840191505092915050565b6000612e6c602383613dd3565b91507f6272696467652062616c616e636520776f756c6420657863656564206d61786960008301527f6d756d00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ed2601283613dd3565b91507f696e76616c69642056414120616374696f6e00000000000000000000000000006000830152602082019050919050565b6000612f12601883613dd3565b91507f5641412077617320616c726561647920657865637574656400000000000000006000830152602082019050919050565b6000612f52602c83613dd3565b91507f706c6561736520757365206c6f636b45544820746f207472616e73666572204560008301527f544820746f20536f6c616e6100000000000000000000000000000000000000006020830152604082019050919050565b6000612fb8601e83613dd3565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b6000612ff8602683613dd3565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061305e603983613dd3565b91507f6f6e6c79207468652063757272656e7420677561726469616e2073657420636160008301527f6e206368616e67652074686520677561726469616e20736574000000000000006020830152604082019050919050565b60006130c4601a83613dd3565b91507f536166654d6174683a206469766973696f6e206279207a65726f0000000000006000830152602082019050919050565b6000613104601283613dd3565b91507f52656164206f7574206f6620626f756e647300000000000000000000000000006000830152602082019050919050565b6000613144601883613dd3565b91507f5641412076657273696f6e20696e636f6d70617469626c6500000000000000006000830152602082019050919050565b6000613184601883613dd3565b91507f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000006000830152602082019050919050565b60006131c4602383613dd3565b91507f6d757374206e6f74207472616e7366657220746f207468652073616d6520636860008301527f61696e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061322a601583613dd3565b91507f564141207369676e617475726520696e76616c696400000000000000000000006000830152602082019050919050565b600061326a602183613dd3565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006132d0601e83613dd3565b91507f7472756e636174656420616d6f756e74206d757374206e6f74206265203000006000830152602082019050919050565b6000613310602183613dd3565b91507f696e646578206d75737420696e63726561736520696e207374657073206f662060008301527f31000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613376600983613dd3565b91507f6e6f2071756f72756d00000000000000000000000000000000000000000000006000830152602082019050919050565b60006133b6601983613dd3565b91507f7472616e73666572206d75737420626520696e636f6d696e67000000000000006000830152602082019050919050565b60006133f6601883613dd3565b91507f677561726469616e2073657420686173206578706972656400000000000000006000830152602082019050919050565b6000613436601d83613dd3565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b6000613476602383613dd3565b91507f7369676e617475726520696e6469636573206d75737420626520617363656e6460008301527f696e6700000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006134dc602a83613dd3565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000613542602683613dd3565b91507f73616d6520636861696e207472616e736665727320617265206e6f742073757060008301527f706f7274656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006135a8601f83613dd3565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b60006135e8601483613dd3565b91507f696e76616c696420677561726469616e207365740000000000000000000000006000830152602082019050919050565b600060408301600083015184820360008601526136388282612d0b565b915050602083015161364d60208601826136f0565b508091505092915050565b600060c083016000830151613670600086018261370e565b5060208301516136836020860182612d78565b50604083015161369660408601826136f0565b5060608301516136a960608601826136f0565b5060808301516136bc608086018261370e565b5060a083015184820360a08601526136d48282612dad565b9150508091505092915050565b6136ea81613e2c565b82525050565b6136f981613e36565b82525050565b61370881613e36565b82525050565b61371781613e46565b82525050565b61372681613e46565b82525050565b61373d61373882613e46565b613ed8565b82525050565b600061374f8284612de6565b915081905092915050565b6000613766828561372c565b6001820191506137768284612d96565b6020820191508190509392505050565b600060208201905061379b6000830184612cfc565b92915050565b60006020820190506137b66000830184612cde565b92915050565b60006040820190506137d16000830185612cde565b6137de60208301846136e1565b9392505050565b60006060820190506137fa6000830186612cfc565b6138076020830185612cfc565b61381460408301846136e1565b949350505050565b60006040820190506138316000830185612cfc565b61383e60208301846136e1565b9392505050565b600060208201905061385a6000830184612d69565b92915050565b60006080820190506138756000830187612d87565b613882602083018661371d565b61388f6040830185612d87565b61389c6060830184612d87565b95945050505050565b600060208201905081810360008301526138bf8184612e26565b905092915050565b600060208201905081810360008301526138e081612e5f565b9050919050565b6000602082019050818103600083015261390081612ec5565b9050919050565b6000602082019050818103600083015261392081612f05565b9050919050565b6000602082019050818103600083015261394081612f45565b9050919050565b6000602082019050818103600083015261396081612fab565b9050919050565b6000602082019050818103600083015261398081612feb565b9050919050565b600060208201905081810360008301526139a081613051565b9050919050565b600060208201905081810360008301526139c0816130b7565b9050919050565b600060208201905081810360008301526139e0816130f7565b9050919050565b60006020820190508181036000830152613a0081613137565b9050919050565b60006020820190508181036000830152613a2081613177565b9050919050565b60006020820190508181036000830152613a40816131b7565b9050919050565b60006020820190508181036000830152613a608161321d565b9050919050565b60006020820190508181036000830152613a808161325d565b9050919050565b60006020820190508181036000830152613aa0816132c3565b9050919050565b60006020820190508181036000830152613ac081613303565b9050919050565b60006020820190508181036000830152613ae081613369565b9050919050565b60006020820190508181036000830152613b00816133a9565b9050919050565b60006020820190508181036000830152613b20816133e9565b9050919050565b60006020820190508181036000830152613b4081613429565b9050919050565b60006020820190508181036000830152613b6081613469565b9050919050565b60006020820190508181036000830152613b80816134cf565b9050919050565b60006020820190508181036000830152613ba081613535565b9050919050565b60006020820190508181036000830152613bc08161359b565b9050919050565b60006020820190508181036000830152613be0816135db565b9050919050565b60006020820190508181036000830152613c01818461361b565b905092915050565b60006020820190508181036000830152613c238184613658565b905092915050565b6000602082019050613c4060008301846136ff565b92915050565b6000604082019050613c5b60008301856136ff565b613c6860208301846136ff565b9392505050565b6000606082019050613c84600083018661371d565b613c916020830185612d87565b613c9e604083018461371d565b949350505050565b600060c082019050613cbb600083018961371d565b613cc8602083018861371d565b613cd56040830187612e17565b613ce26060830186612d87565b613cef60808301856136e1565b613cfc60a08301846136ff565b979650505050505050565b600060c082019050613d1c600083018961371d565b613d29602083018861371d565b613d36604083018761371d565b613d436060830186612d87565b613d5060808301856136e1565b613d5d60a08301846136ff565b979650505050505050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000613def82613e0c565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b6000613e5e82613e77565b9050919050565b6000613e7082613e46565b9050919050565b6000613e8282613e89565b9050919050565b6000613e9482613e0c565b9050919050565b60005b83811015613eb9578082015181840152602081019050613e9e565b83811115613ec8576000848401525b50505050565b6000819050919050565b6000613ee382613efb565b9050919050565b6000601f19601f8301169050919050565b60008160f81b9050919050565b613f1181613de4565b8114613f1c57600080fd5b50565b613f2881613df6565b8114613f3357600080fd5b50565b613f3f81613e02565b8114613f4a57600080fd5b50565b613f5681613e2c565b8114613f6157600080fd5b50565b613f6d81613e36565b8114613f7857600080fd5b50565b613f8481613e46565b8114613f8f57600080fd5b5056fea2646970667358221220be6268c55fc12db2a6d48a837359a790ca4e234bc0d1c3c7914a3dcb9598614464736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "463:11326:1:-:0;;;793:1;776:18;;;;;;;;;;;;;;;;;;;;2106:360;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1645:1:10;1760:7;:22;;;;2256:20:1;2237:13;:16;2251:1;2237:16;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2350:1;2329:18;;:22;;;;;;;;;;;;;;;;;;2385;2361:21;;:46;;;;;;;;;;;;;;;;;;2439:20;2418:18;;:41;;;;;;;;;;;;;;;;;;2106:360;;;463:11326;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:134:-1:-;;89:6;83:13;74:22;;101:33;128:5;101:33;:::i;:::-;68:71;;;;:::o;164:722::-;;292:3;285:4;277:6;273:17;269:27;259:2;;310:1;307;300:12;259:2;340:6;334:13;362:80;377:64;434:6;377:64;:::i;:::-;362:80;:::i;:::-;353:89;;459:5;484:6;477:5;470:21;514:4;506:6;502:17;492:27;;536:4;531:3;527:14;520:21;;589:6;636:3;628:4;620:6;616:17;611:3;607:27;604:36;601:2;;;653:1;650;643:12;601:2;678:1;663:217;688:6;685:1;682:13;663:217;;;746:3;768:48;812:3;800:10;768:48;:::i;:::-;763:3;756:61;840:4;835:3;831:14;824:21;;868:4;863:3;859:14;852:21;;720:160;710:1;707;703:9;698:14;;663:217;;;667:14;252:634;;;;;;;:::o;928:617::-;;1056:4;1044:9;1039:3;1035:19;1031:30;1028:2;;;1074:1;1071;1064:12;1028:2;1092:20;1107:4;1092:20;:::i;:::-;1083:29;;1183:1;1172:9;1168:17;1162:24;1206:18;1198:6;1195:30;1192:2;;;1238:1;1235;1228:12;1192:2;1273:85;1354:3;1345:6;1334:9;1330:22;1273:85;:::i;:::-;1266:4;1259:5;1255:16;1248:111;1122:248;1431:2;1464:59;1519:3;1510:6;1499:9;1495:22;1464:59;:::i;:::-;1457:4;1450:5;1446:16;1439:85;1380:155;1022:523;;;;:::o;1552:132::-;;1635:6;1629:13;1620:22;;1647:32;1673:5;1647:32;:::i;:::-;1614:70;;;;:::o;1691:668::-;;;;1867:2;1855:9;1846:7;1842:23;1838:32;1835:2;;;1883:1;1880;1873:12;1835:2;1939:1;1928:9;1924:17;1918:24;1962:18;1954:6;1951:30;1948:2;;;1994:1;1991;1984:12;1948:2;2014:92;2098:7;2089:6;2078:9;2074:22;2014:92;:::i;:::-;2004:102;;1897:215;2143:2;2161:64;2217:7;2208:6;2197:9;2193:22;2161:64;:::i;:::-;2151:74;;2122:109;2262:2;2280:63;2335:7;2326:6;2315:9;2311:22;2280:63;:::i;:::-;2270:73;;2241:108;1829:530;;;;;:::o;2366:256::-;;2428:2;2422:9;2412:19;;2466:4;2458:6;2454:17;2565:6;2553:10;2550:22;2529:18;2517:10;2514:34;2511:62;2508:2;;;2586:1;2583;2576:12;2508:2;2606:10;2602:2;2595:22;2406:216;;;;:::o;2629:304::-;;2788:18;2780:6;2777:30;2774:2;;;2820:1;2817;2810:12;2774:2;2855:4;2847:6;2843:17;2835:25;;2918:4;2912;2908:15;2900:23;;2711:222;;;:::o;2940:91::-;;3002:24;3020:5;3002:24;:::i;:::-;2991:35;;2985:46;;;:::o;3038:121::-;;3111:42;3104:5;3100:54;3089:65;;3083:76;;;:::o;3166:88::-;;3238:10;3231:5;3227:22;3216:33;;3210:44;;;:::o;3261:117::-;3330:24;3348:5;3330:24;:::i;:::-;3323:5;3320:35;3310:2;;3369:1;3366;3359:12;3310:2;3304:74;:::o;3385:115::-;3453:23;3470:5;3453:23;:::i;:::-;3446:5;3443:34;3433:2;;3491:1;3488;3481:12;3433:2;3427:73;:::o;463:11326:1:-;;;;;;;", - "deployedSourceMap": "463:11326:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11731:54;;;;;;;;;;:::i;:::-;;;;;;;;463:11326;11641:54;;;;;;;;;;:::i;:::-;;;;;;;;2053:46;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2600:639;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1609:51;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1819:35;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;10842:764;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3445:1845;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;8861:1975;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1701:32;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;708:33;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1900:44;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1999:48;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2472:122;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2053:46;;;;;;;;;;;;;;;;;;;;;;:::o;2600:639::-;1688:1:10;2277:7;;:19;;2269:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;1688:1;2407:7;:18;;;;2683:27:1::1;;:::i;:::-;2713:22;2731:3;;2713:17;:22::i;:::-;2683:52;;2793:4;2772:10;:17;;;:25;;;2768:383;;;2854:18;;;;;;;;;;;2821:51;;:10;:29;;;:51;;;2813:121;;;;;;;;;;;;:::i;:::-;;;;;;;;;2948:40;2969:10;:18;;;2948:20;:40::i;:::-;2768:383;;;3030:4;3009:10;:17;;;:25;;;3005:146;;;3050:31;3062:10;:18;;;3050:11;:31::i;:::-;3005:146;;;3112:28;;;;;;;;;;:::i;:::-;;;;;;;;3005:146;2768:383;3228:4;3196:12;:29;3209:10;:15;;;3196:29;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;2436:1:10;1645::::0;2580:7;:22;;;;2600:639:1;;:::o;1609:51::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1819:35::-;;;;;;;;;;;;;:::o;10842:764::-;1688:1:10;2277:7;;:19;;2269:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;1688:1;2407:7;:18;;;;11004:8:1::1;;;;;;;;;;;10988:24;;:12;:24;;;;10980:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;11063:17;11083:22;11097:7;11083:9;:13;;:22;;;;:::i;:::-;11063:42;;11115:23;11141:22;11155:7;11141:9;:13;;:22;;;;:::i;:::-;11115:48;;11200:1;11181:15;:20;;11173:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;11282:10;:19;;:30;11302:9;11282:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;877:42;11356:25;;;11402:9;11390;:21;11356:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;11551:10;11543:19;;11535:28;;877:42;11512:20;;11504:29;;11461:138;11477:12;11491:8;;;;;;;;;;;11501:1;11565:9;11576:15;11593:5;11461:138;;;;;;;;;;;:::i;:::-;;;;;;;;2436:1:10;;1645::::0;2580:7;:22;;;;10842:764:1;;;:::o;3445:1845::-;3513:27;;:::i;:::-;3573:14;3585:1;3573:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:14;;;;:::i;:::-;3552:10;:18;;:35;;;;;;;;;;;3627:1;3605:10;:18;;;:23;;;3597:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;3746:15;3759:1;3746:3;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;;;;:::i;:::-;3714:10;:29;;:47;;;;;;;;;;;3772:19;3794:14;3806:1;3794:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:14;;;;:::i;:::-;3772:36;;;;3818:11;3841;3836:2;:16;3832:1;:20;3818:34;;3920:20;3933:6;3920:3;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:20;;;;:::i;:::-;3897:10;:20;;:43;;;;;;;;;;;4004:38;4014:6;4035;4022:3;;:10;;:19;4004:3;;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;;;:::i;:::-;3994:49;;;;;;3976:10;:15;;:67;;;;;4062:12;:29;4075:10;:15;;;4062:29;;;;;;;;;;;;;;;;;;;;;4061:30;4053:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;4131:31;;:::i;:::-;4165:13;:44;4179:10;:29;;;4165:44;;;;;;;;;;;;;;;4131:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4254:1;4227:12;:17;;;:24;:28;4219:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;4330:1;4298:12;:28;;;:33;;;:83;;;;4366:15;4335:12;:28;;;:46;;;4298:83;4290:120;;;;;;;;;;;;:::i;:::-;;;;;;;;;4579:11;4574:1;4569:2;4564:1;4559;4554:2;4527:12;:17;;;:24;:29;:33;;;;;;4526:39;4525:46;;;;;;:50;:65;;4517:87;;;;;;;;;;;;:::i;:::-;;;;;;;;;4615:16;4634:3;4615:22;;4652:6;4647:504;4668:11;4664:1;:15;4647:504;;;4700:11;4714:23;4734:2;4730:1;:6;4726:1;:10;4714:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;;:::i;:::-;4700:37;;4767:10;4759:18;;:5;:18;;;4751:66;;;;;;;;;;;;:::i;:::-;;;;;;;;;4850:5;4844:12;;4831:25;;4871:9;4883:25;4905:2;4901:1;:6;4897:1;:10;4883:3;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:25;;;;:::i;:::-;4871:37;;4922:9;4934:26;4957:2;4953:1;:6;4948:2;:11;4934:3;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;:::i;:::-;4922:38;;4974:7;4984:24;5005:2;5001:1;:6;4996:2;:11;4984:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:24;;;;:::i;:::-;4974:34;;5027:2;5022:7;;;;5090:12;:17;;;5108:5;5090:24;;;;;;;;;;;;;;;;5051:63;;:35;5061:10;:15;;;5078:1;5081;5084;5051:35;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:63;;;5043:97;;;;;;;;;;;;:::i;:::-;;;;;;;;;4647:504;;;;4681:3;;;;;;;4647:504;;;;5181:23;5202:1;5193:6;:10;5181:3;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;;:::i;:::-;5161:10;:17;;:43;;;;;;;;;;;5235:48;5254:1;5245:6;:10;5280:1;5271:6;:10;5257:3;;:10;;:25;5235:3;;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:48;;;;;:::i;:::-;5214:10;:18;;:69;;;;3445:1845;;;;;;;;:::o;8861:1975::-;1688:1:10;2277:7;;:19;;2269:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;1688:1;2407:7;:18;;;;9091:8:1::1;;;;;;;;;;;9075:24;;:12;:24;;;;9067:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;9150:17;9170:8;;;;;;;;;;;9150:28;;9188:21;9219:14:::0;9242:5:::1;9236:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9219:40;;9274:14;:21;9289:5;9274:21;;;;;;;;;;;;;;;;;;;;;;;;;9270:1317;;;9324:5;9311:24;;;9336:10;9348:6;9311:44;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;9396:5;9383:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9369:46;;9458:5;9445:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9429:50;;9270:1317;;;9510:21;9541:5;9534:23;;;9566:4;9534:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9510:62;;9586:65;9617:10;9637:4;9644:6;9593:5;9586:30;;;;:65;;;;;;:::i;:::-;9665:20;9695:5;9688:23;;;9720:4;9688:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9665:61;;9940:31;9957:13;9940:12;:16;;:31;;;;:::i;:::-;9931:40;;10057:1;10046:8;:12;;;10042:344;;;10078:23;10104:6;10078:32;;10137:39;10173:1;10162:8;:12;10154:21;;10148:2;:27;10137:6;:10;;:39;;;;:::i;:::-;10128:48;;10199:11;10195:146;;;10234:88;10261:10;10273:48;10318:1;10307:8;:12;10299:21;;10293:2;:27;10273:15;:19;;:48;;;;:::i;:::-;10241:5;10234:26;;;;:88;;;;;:::i;:::-;10195:146;10370:1;10359:12;;10042:344;;630:26;10408:74:::0;::::1;:60;10465:1;10445:5;10439:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:27;10431:36;;10425:2;:42;10408:12;:16;;:60;;;;:::i;:::-;:74;;10400:122;;;;;;;;;;;;:::i;:::-;;;;;;;;;10569:5;10561:14;;10553:23;;10537:39;;9270:1317;;;10654:1;10644:6;:11;;10636:54;;;;;;;;;;;;:::i;:::-;;;;;;;;;10790:10;10782:19;;10774:28;;10759:13;10706:123;10722:12;10736:11;10749:8;10804:9;10815:6;10823:5;10706:123;;;;;;;;;;;:::i;:::-;;;;;;;;2436:1:10;;;1645::::0;2580:7;:22;;;;8861:1975:1;;;;;;:::o;1701:32::-;;;;;;;;;;;;;:::o;708:33::-;;;;;;;;;;;;;:::o;1900:44::-;;;;;;;;;;;;;;;;;;;;;;:::o;1999:48::-;;;;;;;;;;;;;;;;;;;;;;:::o;2472:122::-;2529:21;;:::i;:::-;2569:13;:18;2583:3;2569:18;;;;;;;;;;;;;;;2562:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2472:122;;;:::o;5296:916::-;5363:29;5395:16;5409:1;5395:4;:13;;:16;;;;:::i;:::-;5363:48;;5476:1;5455:18;;;;;;;;;;;:22;5429:48;;:22;:48;;;5421:94;;;;;;;;;;;;:::i;:::-;;;;;;;;;5525:9;5537:15;5550:1;5537:4;:12;;:15;;;;:::i;:::-;5525:27;;5563:30;5610:3;5596:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5563:51;;5629:6;5624:134;5645:3;5641:7;;:1;:7;5624:134;;;5669:12;5684:26;5707:2;5703:1;:6;5699:1;:10;5684:4;:14;;:26;;;;:::i;:::-;5669:41;;5743:4;5724:13;5738:1;5724:16;;;;;;;;;;;;;:23;;;;;;;;;;;5624:134;5650:3;;;;;;;5624:134;;;;5768:29;5800:18;;;;;;;;;;;5768:50;;5849:22;5828:18;;:43;;;;;;;;;;;;;;;;;;5882:35;;:::i;:::-;5920:29;;;;;;;;5932:13;5920:29;;;;5947:1;5920:29;;;;;5882:67;;5995:16;5959:13;:33;5973:18;;;;;;;;;;;5959:33;;;;;;;;;;;;;;;:52;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6103:21;;;;;;;;;;;6084:15;6077:47;6021:13;:37;6035:22;6021:37;;;;;;;;;;;;;;;:53;;;:103;;;;;;;;;;;;;;;;;;6140:65;6162:22;6186:18;;;;;;;;;;;6140:65;;;;;;;:::i;:::-;;;;;;;;5296:916;;;;;;:::o;6218:1692::-;6319:18;6340:15;6353:1;6340:4;:12;;:15;;;;:::i;:::-;6319:36;;6366:18;6387:15;6400:1;6387:4;:12;;:15;;;;:::i;:::-;6366:36;;6521:22;6546:23;6561:7;6546:4;:14;;:23;;;;:::i;:::-;6521:48;;6580:17;6600:16;6613:2;6600:4;:12;;:16;;;;:::i;:::-;6580:36;;6680:14;6697:19;6712:3;6697:4;:14;;:19;;;;:::i;:::-;6680:36;;6751:12;6735:28;;:12;:28;;;;6727:79;;;;;;;;;;;;:::i;:::-;;;;;;;;;6840:8;;;;;;;;;;;6824:24;;:12;:24;;;6816:62;;;;;;;;;;;;:::i;:::-;;;;;;;;;6908:8;;;;;;;;;;;6893:23;;:11;:23;;;6889:1015;;6932:21;6956:18;6971:2;6956:4;:14;;:18;;;;:::i;:::-;6932:42;;6988:16;7034:11;7047:13;7017:44;;;;;;;;;:::i;:::-;;;;;;;;;;;;;7007:55;;;;;;6988:74;;7154:21;7178:13;:23;7192:8;7178:23;;;;;;;;;;;;;;;;;;;;;7154:47;;7244:1;7219:27;;:13;:27;;;7215:212;;;7266:20;7289:17;7302:3;7289:4;:12;;:17;;;;:::i;:::-;7266:40;;7340:72;7359:8;7369:11;7382:13;7397:14;7340:18;:72::i;:::-;7324:88;;7215:212;;7454:13;7441:32;;;7474:14;7490:6;7441:56;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6889:1015;;;;;;7528:21;7552:23;7567:7;7552:4;:14;;:23;;;;:::i;:::-;7528:47;;7590:14;7613:13;7607:29;;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7590:48;;7738:1;7727:8;:12;;;7723:99;;;7768:39;7804:1;7793:8;:12;7785:21;;7779:2;:27;7768:6;:10;;:39;;;;:::i;:::-;7759:48;;7723:99;7835:58;7870:14;7886:6;7842:13;7835:34;;;;:58;;;;;:::i;:::-;6889:1015;;;6218:1692;;;;;;:::o;4820:148:4:-;4878:7;4909:1;4905;:5;4897:42;;;;;;;;;;;;:::i;:::-;;;;;;;;;4960:1;4956;:5;;;;;;4949:12;;4820:148;;;;:::o;4217:150::-;4275:7;4306:1;4302;:5;4294:44;;;;;;;;;;;;:::i;:::-;;;;;;;;;4359:1;4355;:5;;;;;;4348:12;;4217:150;;;;:::o;11710:302:0:-;11787:5;11839:1;11830:6;:10;11812:6;:13;:29;;11804:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;11874:14;11962:6;11956:3;11948:6;11944:16;11940:29;11934:36;11922:48;;11997:8;11990:15;;;11710:302;;;;:::o;12329:305::-;12407:6;12460:1;12451:6;:10;12433:6;:13;:29;;12425:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;12495:15;12584:6;12578:3;12570:6;12566:16;12562:29;12556:36;12544:48;;12619:8;12612:15;;;12329:305;;;;:::o;8865:2480::-;8999:12;9062:7;9053:6;:16;9035:6;:13;:35;;9027:66;;;;;;;;;;;;:::i;:::-;;;;;;;;;9104:22;9174:7;9167:15;9200:1;9195:1895;;;;11231:4;11225:11;11212:24;;11282:4;11271:9;11267:20;11261:4;11254:34;9160:2142;;9195:1895;9369:4;9363:11;9350:24;;9996:2;9987:7;9983:16;10362:9;10355:17;10349:4;10345:28;10333:9;10322;10318:25;10314:60;10410:7;10406:2;10402:16;10654:6;10640:9;10633:17;10627:4;10623:28;10611:9;10603:6;10599:22;10595:57;10591:70;10436:417;10687:3;10683:2;10680:11;10436:417;;;10831:2;10825:9;10821:2;10814:21;10728:4;10724:2;10720:13;10714:19;;10768:4;10764:2;10760:13;10754:19;;10436:417;;;10440:239;10889:7;10878:9;10871:26;11071:2;11067:7;11062:2;11058;11054:11;11050:25;11044:4;11037:39;9202:1888;;;9160:2142;;11329:9;11322:16;;;8865:2480;;;;;:::o;13895:319::-;13974:7;14028:2;14019:6;:11;14001:6;:13;:30;;13993:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;14064:19;14161:6;14154:4;14146:6;14142:17;14138:30;14132:37;14117:52;;14196:11;14189:18;;;13895:319;;;;:::o;885:203:7:-;985:96;1005:5;1035:27;;;1064:4;1070:2;1074:5;1012:68;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;985:19;:96::i;:::-;885:203;;;;:::o;3136:155:4:-;3194:7;3226:1;3221;:6;;3213:49;;;;;;;;;;;;:::i;:::-;;;;;;;;;3283:1;3279;:5;3272:12;;3136:155;;;;:::o;704:175:7:-;786:86;806:5;836:23;;;861:2;865:5;813:58;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;786:19;:86::i;:::-;704:175;;;:::o;11351:353:0:-;11430:7;11484:2;11475:6;:11;11457:6;:13;:30;;11449:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;11520:19;11631:27;11621:6;11614:4;11606:6;11602:17;11598:30;11592:37;11588:71;11573:86;;11686:11;11679:18;;;11351:353;;;;:::o;13579:310::-;13658:7;13712:2;13703:6;:11;13685:6;:13;:30;;13677:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;13748:16;13839:6;13832:4;13824:6;13820:17;13816:30;13810:37;13798:49;;13874:8;13867:15;;;13579:310;;;;:::o;7916:939:1:-;8033:13;8225:19;8255:18;;;;;;;;;;;8247:27;;8225:49;;8326:4;8320:11;8358:66;8351:5;8344:81;8463:11;8456:4;8449:5;8445:16;8438:37;8513:66;8506:4;8499:5;8495:16;8488:92;8626:4;8620;8613:5;8610:1;8602:29;8593:38;;8293:348;8692:5;8679:30;;;8710:11;8723:13;8738:8;8679:68;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8805:5;8783:13;:19;8797:4;8783:19;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;8844:4;8820:14;:21;8835:5;8820:21;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;7916:939;;;;;;;:::o;3538:215:4:-;3596:7;3624:1;3619;:6;3615:20;;;3634:1;3627:8;;;;3615:20;3645:9;3661:1;3657;:5;3645:17;;3689:1;3684;3680;:5;;;;;;:10;3672:56;;;;;;;;;;;;:::i;:::-;;;;;;;;;3745:1;3738:8;;;3538:215;;;;;:::o;2967:751:7:-;3386:23;3412:69;3440:4;3412:69;;;;;;;;;;;;;;;;;3420:5;3412:27;;;;:69;;;;;:::i;:::-;3386:95;;3515:1;3495:10;:17;:21;3491:221;;;3635:10;3624:30;;;;;;;;;;;;:::i;:::-;3616:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;3491:221;2967:751;;;:::o;3581:193:8:-;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;;3581:193;;;;;:::o;4608:523::-;4735:12;4792:5;4767:21;:30;;4759:81;;;;;;;;;;;;:::i;:::-;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;4981:12;4995:23;5022:6;:11;;5042:5;5050:4;5022:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;;;;4608:523;;;;;;:::o;726:413::-;786:4;989:12;1098:7;1086:20;1078:28;;1131:1;1124:4;:8;1117:15;;;726:413;;;:::o;7091:725::-;7206:12;7234:7;7230:580;;;7264:10;7257:17;;;;7230:580;7395:1;7375:10;:17;:21;7371:429;;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7772:12;7765:20;;;;;;;;;;;:::i;:::-;;;;;;;;7091:725;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130::-;;85:6;72:20;63:29;;97:33;124:5;97:33;:::i;:::-;57:78;;;;:::o;142:124::-;;219:6;206:20;197:29;;231:30;255:5;231:30;:::i;:::-;191:75;;;;:::o;273:128::-;;354:6;348:13;339:22;;366:30;390:5;366:30;:::i;:::-;333:68;;;;:::o;408:130::-;;488:6;475:20;466:29;;500:33;527:5;500:33;:::i;:::-;460:78;;;;:::o;545:134::-;;629:6;623:13;614:22;;641:33;668:5;641:33;:::i;:::-;608:71;;;;:::o;700:336::-;;;814:3;807:4;799:6;795:17;791:27;781:2;;832:1;829;822:12;781:2;865:6;852:20;842:30;;892:18;884:6;881:30;878:2;;;924:1;921;914:12;878:2;958:4;950:6;946:17;934:29;;1009:3;1001:4;993:6;989:17;979:8;975:32;972:41;969:2;;;1026:1;1023;1016:12;969:2;774:262;;;;;:::o;1044:130::-;;1124:6;1111:20;1102:29;;1136:33;1163:5;1136:33;:::i;:::-;1096:78;;;;:::o;1181:134::-;;1265:6;1259:13;1250:22;;1277:33;1304:5;1277:33;:::i;:::-;1244:71;;;;:::o;1322:128::-;;1401:6;1388:20;1379:29;;1413:32;1439:5;1413:32;:::i;:::-;1373:77;;;;:::o;1457:126::-;;1535:6;1522:20;1513:29;;1547:31;1572:5;1547:31;:::i;:::-;1507:76;;;;:::o;1590:130::-;;1672:6;1666:13;1657:22;;1684:31;1709:5;1684:31;:::i;:::-;1651:69;;;;:::o;1727:241::-;;1831:2;1819:9;1810:7;1806:23;1802:32;1799:2;;;1847:1;1844;1837:12;1799:2;1882:1;1899:53;1944:7;1935:6;1924:9;1920:22;1899:53;:::i;:::-;1889:63;;1861:97;1793:175;;;;:::o;1975:857::-;;;;;;;2158:3;2146:9;2137:7;2133:23;2129:33;2126:2;;;2175:1;2172;2165:12;2126:2;2210:1;2227:53;2272:7;2263:6;2252:9;2248:22;2227:53;:::i;:::-;2217:63;;2189:97;2317:2;2335:53;2380:7;2371:6;2360:9;2356:22;2335:53;:::i;:::-;2325:63;;2296:98;2425:2;2443:53;2488:7;2479:6;2468:9;2464:22;2443:53;:::i;:::-;2433:63;;2404:98;2533:2;2551:51;2594:7;2585:6;2574:9;2570:22;2551:51;:::i;:::-;2541:61;;2512:96;2639:3;2658:52;2702:7;2693:6;2682:9;2678:22;2658:52;:::i;:::-;2648:62;;2618:98;2747:3;2766:50;2808:7;2799:6;2788:9;2784:22;2766:50;:::i;:::-;2756:60;;2726:96;2120:712;;;;;;;;:::o;2839:257::-;;2951:2;2939:9;2930:7;2926:23;2922:32;2919:2;;;2967:1;2964;2957:12;2919:2;3002:1;3019:61;3072:7;3063:6;3052:9;3048:22;3019:61;:::i;:::-;3009:71;;2981:105;2913:183;;;;:::o;3103:241::-;;3207:2;3195:9;3186:7;3182:23;3178:32;3175:2;;;3223:1;3220;3213:12;3175:2;3258:1;3275:53;3320:7;3311:6;3300:9;3296:22;3275:53;:::i;:::-;3265:63;;3237:97;3169:175;;;;:::o;3351:263::-;;3466:2;3454:9;3445:7;3441:23;3437:32;3434:2;;;3482:1;3479;3472:12;3434:2;3517:1;3534:64;3590:7;3581:6;3570:9;3566:22;3534:64;:::i;:::-;3524:74;;3496:108;3428:186;;;;:::o;3621:485::-;;;;3756:2;3744:9;3735:7;3731:23;3727:32;3724:2;;;3772:1;3769;3762:12;3724:2;3807:1;3824:53;3869:7;3860:6;3849:9;3845:22;3824:53;:::i;:::-;3814:63;;3786:97;3914:2;3932:51;3975:7;3966:6;3955:9;3951:22;3932:51;:::i;:::-;3922:61;;3893:96;4020:2;4038:52;4082:7;4073:6;4062:9;4058:22;4038:52;:::i;:::-;4028:62;;3999:97;3718:388;;;;;:::o;4113:365::-;;;4236:2;4224:9;4215:7;4211:23;4207:32;4204:2;;;4252:1;4249;4242:12;4204:2;4315:1;4304:9;4300:17;4287:31;4338:18;4330:6;4327:30;4324:2;;;4370:1;4367;4360:12;4324:2;4398:64;4454:7;4445:6;4434:9;4430:22;4398:64;:::i;:::-;4380:82;;;;4266:202;4198:280;;;;;:::o;4485:263::-;;4600:2;4588:9;4579:7;4575:23;4571:32;4568:2;;;4616:1;4613;4606:12;4568:2;4651:1;4668:64;4724:7;4715:6;4704:9;4700:22;4668:64;:::i;:::-;4658:74;;4630:108;4562:186;;;;:::o;4755:239::-;;4858:2;4846:9;4837:7;4833:23;4829:32;4826:2;;;4874:1;4871;4864:12;4826:2;4909:1;4926:52;4970:7;4961:6;4950:9;4946:22;4926:52;:::i;:::-;4916:62;;4888:96;4820:174;;;;:::o;5001:259::-;;5114:2;5102:9;5093:7;5089:23;5085:32;5082:2;;;5130:1;5127;5120:12;5082:2;5165:1;5182:62;5236:7;5227:6;5216:9;5212:22;5182:62;:::i;:::-;5172:72;;5144:106;5076:184;;;;:::o;5268:173::-;;5355:46;5397:3;5389:6;5355:46;:::i;:::-;5430:4;5425:3;5421:14;5407:28;;5348:93;;;;:::o;5449:142::-;5540:45;5579:5;5540:45;:::i;:::-;5535:3;5528:58;5522:69;;:::o;5598:103::-;5671:24;5689:5;5671:24;:::i;:::-;5666:3;5659:37;5653:48;;:::o;5708:113::-;5791:24;5809:5;5791:24;:::i;:::-;5786:3;5779:37;5773:48;;:::o;5859:670::-;;5994:54;6042:5;5994:54;:::i;:::-;6061:76;6130:6;6125:3;6061:76;:::i;:::-;6054:83;;6158:56;6208:5;6158:56;:::i;:::-;6234:7;6262:1;6247:260;6272:6;6269:1;6266:13;6247:260;;;6339:6;6333:13;6360:63;6419:3;6404:13;6360:63;:::i;:::-;6353:70;;6440:60;6493:6;6440:60;:::i;:::-;6430:70;;6304:203;6294:1;6291;6287:9;6282:14;;6247:260;;;6251:14;6520:3;6513:10;;5973:556;;;;;;;:::o;6537:104::-;6614:21;6629:5;6614:21;:::i;:::-;6609:3;6602:34;6596:45;;:::o;6648:103::-;6721:24;6739:5;6721:24;:::i;:::-;6716:3;6709:37;6703:48;;:::o;6758:113::-;6841:24;6859:5;6841:24;:::i;:::-;6836:3;6829:37;6823:48;;:::o;6878:152::-;6979:45;6999:24;7017:5;6999:24;:::i;:::-;6979:45;:::i;:::-;6974:3;6967:58;6961:69;;:::o;7037:323::-;;7137:38;7169:5;7137:38;:::i;:::-;7187:60;7240:6;7235:3;7187:60;:::i;:::-;7180:67;;7252:52;7297:6;7292:3;7285:4;7278:5;7274:16;7252:52;:::i;:::-;7325:29;7347:6;7325:29;:::i;:::-;7320:3;7316:39;7309:46;;7117:243;;;;;:::o;7367:356::-;;7495:38;7527:5;7495:38;:::i;:::-;7545:88;7626:6;7621:3;7545:88;:::i;:::-;7538:95;;7638:52;7683:6;7678:3;7671:4;7664:5;7660:16;7638:52;:::i;:::-;7711:6;7706:3;7702:16;7695:23;;7475:248;;;;;:::o;7730:138::-;7819:43;7856:5;7819:43;:::i;:::-;7814:3;7807:56;7801:67;;:::o;7875:347::-;;7987:39;8020:5;7987:39;:::i;:::-;8038:71;8102:6;8097:3;8038:71;:::i;:::-;8031:78;;8114:52;8159:6;8154:3;8147:4;8140:5;8136:16;8114:52;:::i;:::-;8187:29;8209:6;8187:29;:::i;:::-;8182:3;8178:39;8171:46;;7967:255;;;;;:::o;8230:372::-;;8390:67;8454:2;8449:3;8390:67;:::i;:::-;8383:74;;8490:34;8486:1;8481:3;8477:11;8470:55;8559:5;8554:2;8549:3;8545:12;8538:27;8593:2;8588:3;8584:12;8577:19;;8376:226;;;:::o;8611:318::-;;8771:67;8835:2;8830:3;8771:67;:::i;:::-;8764:74;;8871:20;8867:1;8862:3;8858:11;8851:41;8920:2;8915:3;8911:12;8904:19;;8757:172;;;:::o;8938:324::-;;9098:67;9162:2;9157:3;9098:67;:::i;:::-;9091:74;;9198:26;9194:1;9189:3;9185:11;9178:47;9253:2;9248:3;9244:12;9237:19;;9084:178;;;:::o;9271:381::-;;9431:67;9495:2;9490:3;9431:67;:::i;:::-;9424:74;;9531:34;9527:1;9522:3;9518:11;9511:55;9600:14;9595:2;9590:3;9586:12;9579:36;9643:2;9638:3;9634:12;9627:19;;9417:235;;;:::o;9661:330::-;;9821:67;9885:2;9880:3;9821:67;:::i;:::-;9814:74;;9921:32;9917:1;9912:3;9908:11;9901:53;9982:2;9977:3;9973:12;9966:19;;9807:184;;;:::o;10000:375::-;;10160:67;10224:2;10219:3;10160:67;:::i;:::-;10153:74;;10260:34;10256:1;10251:3;10247:11;10240:55;10329:8;10324:2;10319:3;10315:12;10308:30;10366:2;10361:3;10357:12;10350:19;;10146:229;;;:::o;10384:394::-;;10544:67;10608:2;10603:3;10544:67;:::i;:::-;10537:74;;10644:34;10640:1;10635:3;10631:11;10624:55;10713:27;10708:2;10703:3;10699:12;10692:49;10769:2;10764:3;10760:12;10753:19;;10530:248;;;:::o;10787:326::-;;10947:67;11011:2;11006:3;10947:67;:::i;:::-;10940:74;;11047:28;11043:1;11038:3;11034:11;11027:49;11104:2;11099:3;11095:12;11088:19;;10933:180;;;:::o;11122:318::-;;11282:67;11346:2;11341:3;11282:67;:::i;:::-;11275:74;;11382:20;11378:1;11373:3;11369:11;11362:41;11431:2;11426:3;11422:12;11415:19;;11268:172;;;:::o;11449:324::-;;11609:67;11673:2;11668:3;11609:67;:::i;:::-;11602:74;;11709:26;11705:1;11700:3;11696:11;11689:47;11764:2;11759:3;11755:12;11748:19;;11595:178;;;:::o;11782:324::-;;11942:67;12006:2;12001:3;11942:67;:::i;:::-;11935:74;;12042:26;12038:1;12033:3;12029:11;12022:47;12097:2;12092:3;12088:12;12081:19;;11928:178;;;:::o;12115:372::-;;12275:67;12339:2;12334:3;12275:67;:::i;:::-;12268:74;;12375:34;12371:1;12366:3;12362:11;12355:55;12444:5;12439:2;12434:3;12430:12;12423:27;12478:2;12473:3;12469:12;12462:19;;12261:226;;;:::o;12496:321::-;;12656:67;12720:2;12715:3;12656:67;:::i;:::-;12649:74;;12756:23;12752:1;12747:3;12743:11;12736:44;12808:2;12803:3;12799:12;12792:19;;12642:175;;;:::o;12826:370::-;;12986:67;13050:2;13045:3;12986:67;:::i;:::-;12979:74;;13086:34;13082:1;13077:3;13073:11;13066:55;13155:3;13150:2;13145:3;13141:12;13134:25;13187:2;13182:3;13178:12;13171:19;;12972:224;;;:::o;13205:330::-;;13365:67;13429:2;13424:3;13365:67;:::i;:::-;13358:74;;13465:32;13461:1;13456:3;13452:11;13445:53;13526:2;13521:3;13517:12;13510:19;;13351:184;;;:::o;13544:370::-;;13704:67;13768:2;13763:3;13704:67;:::i;:::-;13697:74;;13804:34;13800:1;13795:3;13791:11;13784:55;13873:3;13868:2;13863:3;13859:12;13852:25;13905:2;13900:3;13896:12;13889:19;;13690:224;;;:::o;13923:308::-;;14083:66;14147:1;14142:3;14083:66;:::i;:::-;14076:73;;14182:11;14178:1;14173:3;14169:11;14162:32;14222:2;14217:3;14213:12;14206:19;;14069:162;;;:::o;14240:325::-;;14400:67;14464:2;14459:3;14400:67;:::i;:::-;14393:74;;14500:27;14496:1;14491:3;14487:11;14480:48;14556:2;14551:3;14547:12;14540:19;;14386:179;;;:::o;14574:324::-;;14734:67;14798:2;14793:3;14734:67;:::i;:::-;14727:74;;14834:26;14830:1;14825:3;14821:11;14814:47;14889:2;14884:3;14880:12;14873:19;;14720:178;;;:::o;14907:329::-;;15067:67;15131:2;15126:3;15067:67;:::i;:::-;15060:74;;15167:31;15163:1;15158:3;15154:11;15147:52;15227:2;15222:3;15218:12;15211:19;;15053:183;;;:::o;15245:372::-;;15405:67;15469:2;15464:3;15405:67;:::i;:::-;15398:74;;15505:34;15501:1;15496:3;15492:11;15485:55;15574:5;15569:2;15564:3;15560:12;15553:27;15608:2;15603:3;15599:12;15592:19;;15391:226;;;:::o;15626:379::-;;15786:67;15850:2;15845:3;15786:67;:::i;:::-;15779:74;;15886:34;15882:1;15877:3;15873:11;15866:55;15955:12;15950:2;15945:3;15941:12;15934:34;15996:2;15991:3;15987:12;15980:19;;15772:233;;;:::o;16014:375::-;;16174:67;16238:2;16233:3;16174:67;:::i;:::-;16167:74;;16274:34;16270:1;16265:3;16261:11;16254:55;16343:8;16338:2;16333:3;16329:12;16322:30;16380:2;16375:3;16371:12;16364:19;;16160:229;;;:::o;16398:331::-;;16558:67;16622:2;16617:3;16558:67;:::i;:::-;16551:74;;16658:33;16654:1;16649:3;16645:11;16638:54;16720:2;16715:3;16711:12;16704:19;;16544:185;;;:::o;16738:320::-;;16898:67;16962:2;16957:3;16898:67;:::i;:::-;16891:74;;16998:22;16994:1;16989:3;16985:11;16978:43;17049:2;17044:3;17040:12;17033:19;;16884:174;;;:::o;17131:616::-;;17288:4;17283:3;17279:14;17371:4;17364:5;17360:16;17354:23;17423:3;17417:4;17413:14;17406:4;17401:3;17397:14;17390:38;17443:103;17541:4;17527:12;17443:103;:::i;:::-;17435:111;;17308:250;17642:4;17635:5;17631:16;17625:23;17654:61;17709:4;17704:3;17700:14;17686:12;17654:61;:::i;:::-;17568:153;17738:4;17731:11;;17261:486;;;;;:::o;17815:1202::-;;17968:4;17963:3;17959:14;18054:4;18047:5;18043:16;18037:23;18066:59;18119:4;18114:3;18110:14;18096:12;18066:59;:::i;:::-;17988:143;18204:4;18197:5;18193:16;18187:23;18216:63;18273:4;18268:3;18264:14;18250:12;18216:63;:::i;:::-;18141:144;18372:4;18365:5;18361:16;18355:23;18384:61;18439:4;18434:3;18430:14;18416:12;18384:61;:::i;:::-;18295:156;18529:4;18522:5;18518:16;18512:23;18541:61;18596:4;18591:3;18587:14;18573:12;18541:61;:::i;:::-;18461:147;18683:4;18676:5;18672:16;18666:23;18695:59;18748:4;18743:3;18739:14;18725:12;18695:59;:::i;:::-;18618:142;18836:4;18829:5;18825:16;18819:23;18888:3;18882:4;18878:14;18871:4;18866:3;18862:14;18855:38;18908:71;18974:4;18960:12;18908:71;:::i;:::-;18900:79;;18770:221;19008:4;19001:11;;17941:1076;;;;;:::o;19024:113::-;19107:24;19125:5;19107:24;:::i;:::-;19102:3;19095:37;19089:48;;:::o;19144:100::-;19215:23;19232:5;19215:23;:::i;:::-;19210:3;19203:36;19197:47;;:::o;19251:110::-;19332:23;19349:5;19332:23;:::i;:::-;19327:3;19320:36;19314:47;;:::o;19368:97::-;19437:22;19453:5;19437:22;:::i;:::-;19432:3;19425:35;19419:46;;:::o;19472:107::-;19551:22;19567:5;19551:22;:::i;:::-;19546:3;19539:35;19533:46;;:::o;19586:144::-;19683:41;19701:22;19717:5;19701:22;:::i;:::-;19683:41;:::i;:::-;19678:3;19671:54;19665:65;;:::o;19737:271::-;;19890:93;19979:3;19970:6;19890:93;:::i;:::-;19883:100;;20000:3;19993:10;;19871:137;;;;:::o;20015:383::-;;20167:71;20234:3;20225:6;20167:71;:::i;:::-;20260:1;20255:3;20251:11;20244:18;;20273:75;20344:3;20335:6;20273:75;:::i;:::-;20370:2;20365:3;20361:12;20354:19;;20390:3;20383:10;;20155:243;;;;;:::o;20405:222::-;;20532:2;20521:9;20517:18;20509:26;;20546:71;20614:1;20603:9;20599:17;20590:6;20546:71;:::i;:::-;20503:124;;;;:::o;20634:238::-;;20769:2;20758:9;20754:18;20746:26;;20783:79;20859:1;20848:9;20844:17;20835:6;20783:79;:::i;:::-;20740:132;;;;:::o;20879:349::-;;21042:2;21031:9;21027:18;21019:26;;21056:79;21132:1;21121:9;21117:17;21108:6;21056:79;:::i;:::-;21146:72;21214:2;21203:9;21199:18;21190:6;21146:72;:::i;:::-;21013:215;;;;;:::o;21235:444::-;;21418:2;21407:9;21403:18;21395:26;;21432:71;21500:1;21489:9;21485:17;21476:6;21432:71;:::i;:::-;21514:72;21582:2;21571:9;21567:18;21558:6;21514:72;:::i;:::-;21597;21665:2;21654:9;21650:18;21641:6;21597:72;:::i;:::-;21389:290;;;;;;:::o;21686:333::-;;21841:2;21830:9;21826:18;21818:26;;21855:71;21923:1;21912:9;21908:17;21899:6;21855:71;:::i;:::-;21937:72;22005:2;21994:9;21990:18;21981:6;21937:72;:::i;:::-;21812:207;;;;;:::o;22026:210::-;;22147:2;22136:9;22132:18;22124:26;;22161:65;22223:1;22212:9;22208:17;22199:6;22161:65;:::i;:::-;22118:118;;;;:::o;22243:548::-;;22450:3;22439:9;22435:19;22427:27;;22465:71;22533:1;22522:9;22518:17;22509:6;22465:71;:::i;:::-;22547:68;22611:2;22600:9;22596:18;22587:6;22547:68;:::i;:::-;22626:72;22694:2;22683:9;22679:18;22670:6;22626:72;:::i;:::-;22709;22777:2;22766:9;22762:18;22753:6;22709:72;:::i;:::-;22421:370;;;;;;;:::o;22798:310::-;;22945:2;22934:9;22930:18;22922:26;;22995:9;22989:4;22985:20;22981:1;22970:9;22966:17;22959:47;23020:78;23093:4;23084:6;23020:78;:::i;:::-;23012:86;;22916:192;;;;:::o;23115:416::-;;23315:2;23304:9;23300:18;23292:26;;23365:9;23359:4;23355:20;23351:1;23340:9;23336:17;23329:47;23390:131;23516:4;23390:131;:::i;:::-;23382:139;;23286:245;;;:::o;23538:416::-;;23738:2;23727:9;23723:18;23715:26;;23788:9;23782:4;23778:20;23774:1;23763:9;23759:17;23752:47;23813:131;23939:4;23813:131;:::i;:::-;23805:139;;23709:245;;;:::o;23961:416::-;;24161:2;24150:9;24146:18;24138:26;;24211:9;24205:4;24201:20;24197:1;24186:9;24182:17;24175:47;24236:131;24362:4;24236:131;:::i;:::-;24228:139;;24132:245;;;:::o;24384:416::-;;24584:2;24573:9;24569:18;24561:26;;24634:9;24628:4;24624:20;24620:1;24609:9;24605:17;24598:47;24659:131;24785:4;24659:131;:::i;:::-;24651:139;;24555:245;;;:::o;24807:416::-;;25007:2;24996:9;24992:18;24984:26;;25057:9;25051:4;25047:20;25043:1;25032:9;25028:17;25021:47;25082:131;25208:4;25082:131;:::i;:::-;25074:139;;24978:245;;;:::o;25230:416::-;;25430:2;25419:9;25415:18;25407:26;;25480:9;25474:4;25470:20;25466:1;25455:9;25451:17;25444:47;25505:131;25631:4;25505:131;:::i;:::-;25497:139;;25401:245;;;:::o;25653:416::-;;25853:2;25842:9;25838:18;25830:26;;25903:9;25897:4;25893:20;25889:1;25878:9;25874:17;25867:47;25928:131;26054:4;25928:131;:::i;:::-;25920:139;;25824:245;;;:::o;26076:416::-;;26276:2;26265:9;26261:18;26253:26;;26326:9;26320:4;26316:20;26312:1;26301:9;26297:17;26290:47;26351:131;26477:4;26351:131;:::i;:::-;26343:139;;26247:245;;;:::o;26499:416::-;;26699:2;26688:9;26684:18;26676:26;;26749:9;26743:4;26739:20;26735:1;26724:9;26720:17;26713:47;26774:131;26900:4;26774:131;:::i;:::-;26766:139;;26670:245;;;:::o;26922:416::-;;27122:2;27111:9;27107:18;27099:26;;27172:9;27166:4;27162:20;27158:1;27147:9;27143:17;27136:47;27197:131;27323:4;27197:131;:::i;:::-;27189:139;;27093:245;;;:::o;27345:416::-;;27545:2;27534:9;27530:18;27522:26;;27595:9;27589:4;27585:20;27581:1;27570:9;27566:17;27559:47;27620:131;27746:4;27620:131;:::i;:::-;27612:139;;27516:245;;;:::o;27768:416::-;;27968:2;27957:9;27953:18;27945:26;;28018:9;28012:4;28008:20;28004:1;27993:9;27989:17;27982:47;28043:131;28169:4;28043:131;:::i;:::-;28035:139;;27939:245;;;:::o;28191:416::-;;28391:2;28380:9;28376:18;28368:26;;28441:9;28435:4;28431:20;28427:1;28416:9;28412:17;28405:47;28466:131;28592:4;28466:131;:::i;:::-;28458:139;;28362:245;;;:::o;28614:416::-;;28814:2;28803:9;28799:18;28791:26;;28864:9;28858:4;28854:20;28850:1;28839:9;28835:17;28828:47;28889:131;29015:4;28889:131;:::i;:::-;28881:139;;28785:245;;;:::o;29037:416::-;;29237:2;29226:9;29222:18;29214:26;;29287:9;29281:4;29277:20;29273:1;29262:9;29258:17;29251:47;29312:131;29438:4;29312:131;:::i;:::-;29304:139;;29208:245;;;:::o;29460:416::-;;29660:2;29649:9;29645:18;29637:26;;29710:9;29704:4;29700:20;29696:1;29685:9;29681:17;29674:47;29735:131;29861:4;29735:131;:::i;:::-;29727:139;;29631:245;;;:::o;29883:416::-;;30083:2;30072:9;30068:18;30060:26;;30133:9;30127:4;30123:20;30119:1;30108:9;30104:17;30097:47;30158:131;30284:4;30158:131;:::i;:::-;30150:139;;30054:245;;;:::o;30306:416::-;;30506:2;30495:9;30491:18;30483:26;;30556:9;30550:4;30546:20;30542:1;30531:9;30527:17;30520:47;30581:131;30707:4;30581:131;:::i;:::-;30573:139;;30477:245;;;:::o;30729:416::-;;30929:2;30918:9;30914:18;30906:26;;30979:9;30973:4;30969:20;30965:1;30954:9;30950:17;30943:47;31004:131;31130:4;31004:131;:::i;:::-;30996:139;;30900:245;;;:::o;31152:416::-;;31352:2;31341:9;31337:18;31329:26;;31402:9;31396:4;31392:20;31388:1;31377:9;31373:17;31366:47;31427:131;31553:4;31427:131;:::i;:::-;31419:139;;31323:245;;;:::o;31575:416::-;;31775:2;31764:9;31760:18;31752:26;;31825:9;31819:4;31815:20;31811:1;31800:9;31796:17;31789:47;31850:131;31976:4;31850:131;:::i;:::-;31842:139;;31746:245;;;:::o;31998:416::-;;32198:2;32187:9;32183:18;32175:26;;32248:9;32242:4;32238:20;32234:1;32223:9;32219:17;32212:47;32273:131;32399:4;32273:131;:::i;:::-;32265:139;;32169:245;;;:::o;32421:416::-;;32621:2;32610:9;32606:18;32598:26;;32671:9;32665:4;32661:20;32657:1;32646:9;32642:17;32635:47;32696:131;32822:4;32696:131;:::i;:::-;32688:139;;32592:245;;;:::o;32844:416::-;;33044:2;33033:9;33029:18;33021:26;;33094:9;33088:4;33084:20;33080:1;33069:9;33065:17;33058:47;33119:131;33245:4;33119:131;:::i;:::-;33111:139;;33015:245;;;:::o;33267:416::-;;33467:2;33456:9;33452:18;33444:26;;33517:9;33511:4;33507:20;33503:1;33492:9;33488:17;33481:47;33542:131;33668:4;33542:131;:::i;:::-;33534:139;;33438:245;;;:::o;33690:382::-;;33873:2;33862:9;33858:18;33850:26;;33923:9;33917:4;33913:20;33909:1;33898:9;33894:17;33887:47;33948:114;34057:4;34048:6;33948:114;:::i;:::-;33940:122;;33844:228;;;;:::o;34079:374::-;;34258:2;34247:9;34243:18;34235:26;;34308:9;34302:4;34298:20;34294:1;34283:9;34279:17;34272:47;34333:110;34438:4;34429:6;34333:110;:::i;:::-;34325:118;;34229:224;;;;:::o;34460:218::-;;34585:2;34574:9;34570:18;34562:26;;34599:69;34665:1;34654:9;34650:17;34641:6;34599:69;:::i;:::-;34556:122;;;;:::o;34685:325::-;;34836:2;34825:9;34821:18;34813:26;;34850:69;34916:1;34905:9;34901:17;34892:6;34850:69;:::i;:::-;34930:70;34996:2;34985:9;34981:18;34972:6;34930:70;:::i;:::-;34807:203;;;;;:::o;35017:428::-;;35192:2;35181:9;35177:18;35169:26;;35206:67;35270:1;35259:9;35255:17;35246:6;35206:67;:::i;:::-;35284:72;35352:2;35341:9;35337:18;35328:6;35284:72;:::i;:::-;35367:68;35431:2;35420:9;35416:18;35407:6;35367:68;:::i;:::-;35163:282;;;;;;:::o;35452:772::-;;35715:3;35704:9;35700:19;35692:27;;35730:67;35794:1;35783:9;35779:17;35770:6;35730:67;:::i;:::-;35808:68;35872:2;35861:9;35857:18;35848:6;35808:68;:::i;:::-;35887:78;35961:2;35950:9;35946:18;35937:6;35887:78;:::i;:::-;35976:72;36044:2;36033:9;36029:18;36020:6;35976:72;:::i;:::-;36059:73;36127:3;36116:9;36112:19;36103:6;36059:73;:::i;:::-;36143:71;36209:3;36198:9;36194:19;36185:6;36143:71;:::i;:::-;35686:538;;;;;;;;;:::o;36231:752::-;;36484:3;36473:9;36469:19;36461:27;;36499:67;36563:1;36552:9;36548:17;36539:6;36499:67;:::i;:::-;36577:68;36641:2;36630:9;36626:18;36617:6;36577:68;:::i;:::-;36656;36720:2;36709:9;36705:18;36696:6;36656:68;:::i;:::-;36735:72;36803:2;36792:9;36788:18;36779:6;36735:72;:::i;:::-;36818:73;36886:3;36875:9;36871:19;36862:6;36818:73;:::i;:::-;36902:71;36968:3;36957:9;36953:19;36944:6;36902:71;:::i;:::-;36455:528;;;;;;;;;:::o;36990:151::-;;37076:3;37068:11;;37114:4;37109:3;37105:14;37097:22;;37062:79;;;:::o;37148:137::-;;37257:5;37251:12;37241:22;;37222:63;;;:::o;37292:121::-;;37385:5;37379:12;37369:22;;37350:63;;;:::o;37420:122::-;;37514:5;37508:12;37498:22;;37479:63;;;:::o;37549:108::-;;37647:4;37642:3;37638:14;37630:22;;37624:33;;;:::o;37665:168::-;;37785:6;37780:3;37773:19;37822:4;37817:3;37813:14;37798:29;;37766:67;;;;:::o;37842:152::-;;37946:6;37941:3;37934:19;37983:4;37978:3;37974:14;37959:29;;37927:67;;;;:::o;38003:144::-;;38138:3;38123:18;;38116:31;;;;:::o;38156:163::-;;38271:6;38266:3;38259:19;38308:4;38303:3;38299:14;38284:29;;38252:67;;;;:::o;38327:91::-;;38389:24;38407:5;38389:24;:::i;:::-;38378:35;;38372:46;;;:::o;38425:85::-;;38498:5;38491:13;38484:21;38473:32;;38467:43;;;:::o;38517:72::-;;38579:5;38568:16;;38562:27;;;:::o;38596:121::-;;38669:42;38662:5;38658:54;38647:65;;38641:76;;;:::o;38724:72::-;;38786:5;38775:16;;38769:27;;;:::o;38803:88::-;;38875:10;38868:5;38864:22;38853:33;;38847:44;;;:::o;38898:81::-;;38969:4;38962:5;38958:16;38947:27;;38941:38;;;:::o;38986:129::-;;39073:37;39104:5;39073:37;:::i;:::-;39060:50;;39054:61;;;:::o;39122:112::-;;39207:22;39223:5;39207:22;:::i;:::-;39194:35;;39188:46;;;:::o;39241:121::-;;39320:37;39351:5;39320:37;:::i;:::-;39307:50;;39301:61;;;:::o;39369:108::-;;39448:24;39466:5;39448:24;:::i;:::-;39435:37;;39429:48;;;:::o;39485:268::-;39550:1;39557:101;39571:6;39568:1;39565:13;39557:101;;;39647:1;39642:3;39638:11;39632:18;39628:1;39623:3;39619:11;39612:39;39593:2;39590:1;39586:10;39581:15;;39557:101;;;39673:6;39670:1;39667:13;39664:2;;;39738:1;39729:6;39724:3;39720:16;39713:27;39664:2;39534:219;;;;:::o;39761:74::-;;39825:5;39814:16;;39808:27;;;:::o;39842:88::-;;39904:21;39919:5;39904:21;:::i;:::-;39893:32;;39887:43;;;:::o;39937:97::-;;40025:2;40021:7;40016:2;40009:5;40005:14;40001:28;39991:38;;39985:49;;;:::o;40042:96::-;;40122:5;40117:3;40113:15;40091:37;;40085:53;;;:::o;40146:117::-;40215:24;40233:5;40215:24;:::i;:::-;40208:5;40205:35;40195:2;;40254:1;40251;40244:12;40195:2;40189:74;:::o;40270:111::-;40336:21;40351:5;40336:21;:::i;:::-;40329:5;40326:32;40316:2;;40372:1;40369;40362:12;40316:2;40310:71;:::o;40388:117::-;40457:24;40475:5;40457:24;:::i;:::-;40450:5;40447:35;40437:2;;40496:1;40493;40486:12;40437:2;40431:74;:::o;40512:117::-;40581:24;40599:5;40581:24;:::i;:::-;40574:5;40571:35;40561:2;;40620:1;40617;40610:12;40561:2;40555:74;:::o;40636:115::-;40704:23;40721:5;40704:23;:::i;:::-;40697:5;40694:34;40684:2;;40742:1;40739;40732:12;40684:2;40678:73;:::o;40758:113::-;40825:22;40841:5;40825:22;:::i;:::-;40818:5;40815:33;40805:2;;40862:1;40859;40852:12;40805:2;40799:72;:::o", - "source": "// contracts/Wormhole.sol\n// SPDX-License-Identifier: Apache 2\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport \"./BytesLib.sol\";\nimport \"./WrappedAsset.sol\";\n\ncontract Wormhole is ReentrancyGuard {\n using SafeERC20 for IERC20;\n using BytesLib for bytes;\n using SafeMath for uint256;\n\n uint64 constant MAX_UINT64 = 18_446_744_073_709_551_615;\n\n // Address of the Wrapped asset template\n address public wrappedAssetMaster;\n\n // Chain ID of Ethereum\n uint8 CHAIN_ID = 2;\n\n // Address of the official WETH contract\n address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n struct GuardianSet {\n address[] keys;\n uint32 expiration_time;\n }\n\n event LogGuardianSetChanged(\n uint32 oldGuardianIndex,\n uint32 newGuardianIndex\n );\n\n event LogTokensLocked(\n uint8 target_chain,\n uint8 token_chain,\n uint8 token_decimals,\n bytes32 indexed token,\n bytes32 indexed sender,\n bytes32 recipient,\n uint256 amount,\n uint32 nonce\n );\n\n struct ParsedVAA {\n uint8 version;\n bytes32 hash;\n uint32 guardian_set_index;\n uint32 timestamp;\n uint8 action;\n bytes payload;\n }\n\n // Mapping of guardian_set_index => guardian set\n mapping(uint32 => GuardianSet) public guardian_sets;\n // Current active guardian set\n uint32 public guardian_set_index;\n\n // Period for which a guardian set stays active after it has been replaced\n uint32 public guardian_set_expirity;\n\n // Mapping of already consumedVAAs\n mapping(bytes32 => bool) public consumedVAAs;\n\n // Mapping of wrapped asset ERC20 contracts\n mapping(bytes32 => address) public wrappedAssets;\n mapping(address => bool) public isWrappedAsset;\n\n constructor(GuardianSet memory initial_guardian_set, address wrapped_asset_master, uint32 _guardian_set_expirity) public {\n guardian_sets[0] = initial_guardian_set;\n // Explicitly set for doc purposes\n guardian_set_index = 0;\n guardian_set_expirity = _guardian_set_expirity;\n\n wrappedAssetMaster = wrapped_asset_master;\n }\n\n function getGuardianSet(uint32 idx) view public returns (GuardianSet memory gs) {\n return guardian_sets[idx];\n }\n\n function submitVAA(\n bytes calldata vaa\n ) public nonReentrant {\n ParsedVAA memory parsed_vaa = parseAndVerifyVAA(vaa);\n // Process VAA\n if (parsed_vaa.action == 0x01) {\n require(parsed_vaa.guardian_set_index == guardian_set_index, \"only the current guardian set can change the guardian set\");\n vaaUpdateGuardianSet(parsed_vaa.payload);\n } else if (parsed_vaa.action == 0x10) {\n vaaTransfer(parsed_vaa.payload);\n } else {\n revert(\"invalid VAA action\");\n }\n\n // Set the VAA as consumed\n consumedVAAs[parsed_vaa.hash] = true;\n }\n\n // parseAndVerifyVAA parses raw VAA data into a struct and verifies whether it contains sufficient signatures of an\n // active guardian set i.e. is valid according to Wormhole consensus rules.\n function parseAndVerifyVAA(bytes calldata vaa) public view returns (ParsedVAA memory parsed_vaa) {\n parsed_vaa.version = vaa.toUint8(0);\n require(parsed_vaa.version == 1, \"VAA version incompatible\");\n\n // Load 4 bytes starting from index 1\n parsed_vaa.guardian_set_index = vaa.toUint32(1);\n\n uint256 len_signers = vaa.toUint8(5);\n uint offset = 6 + 66 * len_signers;\n\n // Load 4 bytes timestamp\n parsed_vaa.timestamp = vaa.toUint32(offset);\n\n // Hash the body\n parsed_vaa.hash = keccak256(vaa.slice(offset, vaa.length - offset));\n require(!consumedVAAs[parsed_vaa.hash], \"VAA was already executed\");\n\n GuardianSet memory guardian_set = guardian_sets[parsed_vaa.guardian_set_index];\n require(guardian_set.keys.length > 0, \"invalid guardian set\");\n require(guardian_set.expiration_time == 0 || guardian_set.expiration_time > block.timestamp, \"guardian set has expired\");\n // We're using a fixed point number transformation with 1 decimal to deal with rounding.\n require(((guardian_set.keys.length * 10 / 3) * 2) / 10 + 1 <= len_signers, \"no quorum\");\n\n int16 last_index = - 1;\n for (uint i = 0; i < len_signers; i++) {\n uint8 index = vaa.toUint8(6 + i * 66);\n require(index > last_index, \"signature indices must be ascending\");\n last_index = int16(index);\n\n bytes32 r = vaa.toBytes32(7 + i * 66);\n bytes32 s = vaa.toBytes32(39 + i * 66);\n uint8 v = vaa.toUint8(71 + i * 66);\n v += 27;\n require(ecrecover(parsed_vaa.hash, v, r, s) == guardian_set.keys[index], \"VAA signature invalid\");\n }\n\n parsed_vaa.action = vaa.toUint8(offset + 4);\n parsed_vaa.payload = vaa.slice(offset + 5, vaa.length - (offset + 5));\n }\n\n function vaaUpdateGuardianSet(bytes memory data) private {\n uint32 new_guardian_set_index = data.toUint32(0);\n require(new_guardian_set_index == guardian_set_index + 1, \"index must increase in steps of 1\");\n uint8 len = data.toUint8(4);\n\n address[] memory new_guardians = new address[](len);\n for (uint i = 0; i < len; i++) {\n address addr = data.toAddress(5 + i * 20);\n new_guardians[i] = addr;\n }\n\n uint32 old_guardian_set_index = guardian_set_index;\n guardian_set_index = new_guardian_set_index;\n\n GuardianSet memory new_guardian_set = GuardianSet(new_guardians, 0);\n guardian_sets[guardian_set_index] = new_guardian_set;\n guardian_sets[old_guardian_set_index].expiration_time = uint32(block.timestamp) + guardian_set_expirity;\n\n emit LogGuardianSetChanged(old_guardian_set_index, guardian_set_index);\n }\n\n function vaaTransfer(bytes memory data) private {\n //uint32 nonce = data.toUint64(0);\n uint8 source_chain = data.toUint8(4);\n\n uint8 target_chain = data.toUint8(5);\n //bytes32 source_address = data.toBytes32(6);\n //bytes32 target_address = data.toBytes32(38);\n address target_address = data.toAddress(38 + 12);\n\n uint8 token_chain = data.toUint8(70);\n //bytes32 token_address = data.toBytes32(71);\n uint256 amount = data.toUint256(104);\n\n require(source_chain != target_chain, \"same chain transfers are not supported\");\n require(target_chain == CHAIN_ID, \"transfer must be incoming\");\n\n if (token_chain != CHAIN_ID) {\n bytes32 token_address = data.toBytes32(71);\n bytes32 asset_id = keccak256(abi.encodePacked(token_chain, token_address));\n\n // if yes: mint to address\n // if no: create and mint\n address wrapped_asset = wrappedAssets[asset_id];\n if (wrapped_asset == address(0)) {\n uint8 asset_decimals = data.toUint8(103);\n wrapped_asset = deployWrappedAsset(asset_id, token_chain, token_address, asset_decimals);\n }\n\n WrappedAsset(wrapped_asset).mint(target_address, amount);\n } else {\n address token_address = data.toAddress(71 + 12);\n\n uint8 decimals = ERC20(token_address).decimals();\n\n // Readjust decimals if they've previously been truncated\n if (decimals > 9) {\n amount = amount.mul(10 ** uint256(decimals - 9));\n }\n IERC20(token_address).safeTransfer(target_address, amount);\n }\n }\n\n function deployWrappedAsset(bytes32 seed, uint8 token_chain, bytes32 token_address, uint8 decimals) private returns (address asset){\n // Taken from https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/packages/lib/contracts/upgradeability/ProxyFactory.sol\n // Licensed under MIT\n bytes20 targetBytes = bytes20(wrappedAssetMaster);\n assembly {\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n }\n\n // Call initializer\n WrappedAsset(asset).initialize(token_chain, token_address, decimals);\n\n // Store address\n wrappedAssets[seed] = asset;\n isWrappedAsset[asset] = true;\n }\n\n function lockAssets(\n address asset,\n uint256 amount,\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce,\n bool refund_dust\n ) public nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint8 asset_chain = CHAIN_ID;\n bytes32 asset_address;\n uint8 decimals = ERC20(asset).decimals();\n\n if (isWrappedAsset[asset]) {\n WrappedAsset(asset).burn(msg.sender, amount);\n asset_chain = WrappedAsset(asset).assetChain();\n asset_address = WrappedAsset(asset).assetAddress();\n } else {\n uint256 balanceBefore = IERC20(asset).balanceOf(address(this));\n IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n\n // The amount that was transferred in is the delta between balance before and after the transfer.\n // This is to properly handle tokens that charge a fee on transfer.\n amount = balanceAfter.sub(balanceBefore);\n\n // Decimal adjust amount - we keep the dust\n if (decimals > 9) {\n uint256 original_amount = amount;\n amount = amount.div(10 ** uint256(decimals - 9));\n\n if (refund_dust) {\n IERC20(asset).safeTransfer(msg.sender, original_amount.mod(10 ** uint256(decimals - 9)));\n }\n\n decimals = 9;\n }\n\n require(balanceAfter.div(10 ** uint256(ERC20(asset).decimals() - 9)) <= MAX_UINT64, \"bridge balance would exceed maximum\");\n\n asset_address = bytes32(uint256(asset));\n }\n\n // Check here after truncation\n require(amount != 0, \"truncated amount must not be 0\");\n\n emit LogTokensLocked(target_chain, asset_chain, decimals, asset_address, bytes32(uint256(msg.sender)), recipient, amount, nonce);\n }\n\n function lockETH(\n bytes32 recipient,\n uint8 target_chain,\n uint32 nonce\n ) public payable nonReentrant {\n require(target_chain != CHAIN_ID, \"must not transfer to the same chain\");\n\n uint256 remainder = msg.value.mod(10 ** 9);\n uint256 transfer_amount = msg.value.div(10 ** 9);\n require(transfer_amount != 0, \"truncated amount must not be 0\");\n\n // Transfer back remainder\n msg.sender.transfer(remainder);\n\n // Wrap tx value in WETH\n WETH(WETHAddress).deposit{value : msg.value - remainder}();\n\n // Log deposit of WETH\n emit LogTokensLocked(target_chain, CHAIN_ID, 9, bytes32(uint256(WETHAddress)), bytes32(uint256(msg.sender)), recipient, transfer_amount, nonce);\n }\n\n fallback() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n\n receive() external payable {revert(\"please use lockETH to transfer ETH to Solana\");}\n}\n\n\ninterface WETH is IERC20 {\n function deposit() external payable;\n\n function withdraw(uint256 amount) external;\n}\n", - "sourcePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "ast": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "exportedSymbols": { - "WETH": [1431], - "Wormhole": [1420] - }, - "id": 1432, - "license": "Apache 2", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 335, - "literals": ["solidity", "^", "0.6", ".0"], - "nodeType": "PragmaDirective", - "src": "64:23:1" - }, - { - "id": 336, - "literals": ["experimental", "ABIEncoderV2"], - "nodeType": "PragmaDirective", - "src": "88:33:1" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 337, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3009, - "src": "123:55:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "id": 338, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3087, - "src": "179:56:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "id": 339, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3300, - "src": "236:59:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "id": 340, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 2506, - "src": "296:51:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 341, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 3659, - "src": "348:59:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "file": "./BytesLib.sol", - "id": 342, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 334, - "src": "408:24:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "file": "./WrappedAsset.sol", - "id": 343, - "nodeType": "ImportDirective", - "scope": 1432, - "sourceUnit": 2148, - "src": "433:28:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 344, - "name": "ReentrancyGuard", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3658, - "src": "484:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$3658", - "typeString": "contract ReentrancyGuard" - } - }, - "id": 345, - "nodeType": "InheritanceSpecifier", - "src": "484:15:1" - } - ], - "contractDependencies": [3658], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1420, - "linearizedBaseContracts": [1420, 3658], - "name": "Wormhole", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 348, - "libraryName": { - "contractScope": null, - "id": 346, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3299, - "src": "512:9:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3299", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "506:27:1", - "typeName": { - "contractScope": null, - "id": 347, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "526:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - } - }, - { - "id": 351, - "libraryName": { - "contractScope": null, - "id": 349, - "name": "BytesLib", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 333, - "src": "544:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_BytesLib_$333", - "typeString": "library BytesLib" - } - }, - "nodeType": "UsingForDirective", - "src": "538:25:1", - "typeName": { - "id": 350, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "557:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - } - }, - { - "id": 354, - "libraryName": { - "contractScope": null, - "id": 352, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2505, - "src": "574:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2505", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "568:27:1", - "typeName": { - "id": 353, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "587:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": true, - "id": 357, - "mutability": "constant", - "name": "MAX_UINT64", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "601:55:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - }, - "typeName": { - "id": 355, - "name": "uint64", - "nodeType": "ElementaryTypeName", - "src": "601:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31385f3434365f3734345f3037335f3730395f3535315f363135", - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "630:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18446744073709551615_by_1", - "typeString": "int_const 18446744073709551615" - }, - "value": "18_446_744_073_709_551_615" - }, - "visibility": "internal" - }, - { - "constant": false, - "functionSelector": "99da1d3c", - "id": 359, - "mutability": "mutable", - "name": "wrappedAssetMaster", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "708:33:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 358, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "708:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 362, - "mutability": "mutable", - "name": "CHAIN_ID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "776:18:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 360, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "776:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "793:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 365, - "mutability": "constant", - "name": "WETHAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "846:73:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 363, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "846:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "877:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - }, - "visibility": "internal" - }, - { - "canonicalName": "Wormhole.GuardianSet", - "id": 371, - "members": [ - { - "constant": false, - "id": 368, - "mutability": "mutable", - "name": "keys", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 371, - "src": "955:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 366, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "955:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 367, - "length": null, - "nodeType": "ArrayTypeName", - "src": "955:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 370, - "mutability": "mutable", - "name": "expiration_time", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 371, - "src": "979:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 369, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "979:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "GuardianSet", - "nodeType": "StructDefinition", - "scope": 1420, - "src": "926:82:1", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 377, - "name": "LogGuardianSetChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 373, - "indexed": false, - "mutability": "mutable", - "name": "oldGuardianIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 377, - "src": "1051:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 372, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1051:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 375, - "indexed": false, - "mutability": "mutable", - "name": "newGuardianIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 377, - "src": "1084:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 374, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1084:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1041:72:1" - }, - "src": "1014:100:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 395, - "name": "LogTokensLocked", - "nodeType": "EventDefinition", - "parameters": { - "id": 394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 379, - "indexed": false, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1151:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 378, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1151:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 381, - "indexed": false, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1179:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 380, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1179:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 383, - "indexed": false, - "mutability": "mutable", - "name": "token_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1206:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 382, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1206:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 385, - "indexed": true, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1236:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 384, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1236:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 387, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1267:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 386, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1267:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 389, - "indexed": false, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1299:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 388, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 391, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1326:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 390, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1326:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 393, - "indexed": false, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 395, - "src": "1350:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 392, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1350:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1141:227:1" - }, - "src": "1120:249:1" - }, - { - "canonicalName": "Wormhole.ParsedVAA", - "id": 408, - "members": [ - { - "constant": false, - "id": 397, - "mutability": "mutable", - "name": "version", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1402:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 396, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1402:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 399, - "mutability": "mutable", - "name": "hash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1425:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 398, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1425:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 401, - "mutability": "mutable", - "name": "guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1447:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 400, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1447:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 403, - "mutability": "mutable", - "name": "timestamp", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1482:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 402, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1482:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 405, - "mutability": "mutable", - "name": "action", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1508:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 404, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1508:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 407, - "mutability": "mutable", - "name": "payload", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 408, - "src": "1530:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 406, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1530:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "ParsedVAA", - "nodeType": "StructDefinition", - "scope": 1420, - "src": "1375:175:1", - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "42b0aefa", - "id": 412, - "mutability": "mutable", - "name": "guardian_sets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1609:51:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "typeName": { - "id": 411, - "keyType": { - "id": 409, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1617:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Mapping", - "src": "1609:30:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "valueType": { - "contractScope": null, - "id": 410, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "1627:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "822d82b3", - "id": 414, - "mutability": "mutable", - "name": "guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1701:32:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 413, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1701:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4db47840", - "id": 416, - "mutability": "mutable", - "name": "guardian_set_expirity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1819:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 415, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1819:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a31fe409", - "id": 420, - "mutability": "mutable", - "name": "consumedVAAs", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1900:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 419, - "keyType": { - "id": 417, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1908:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1900:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 418, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1919:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "b6694c2a", - "id": 424, - "mutability": "mutable", - "name": "wrappedAssets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "1999:48:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "typeName": { - "id": 423, - "keyType": { - "id": 421, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2007:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1999:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "valueType": { - "id": 422, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2018:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "1a2be4da", - "id": 428, - "mutability": "mutable", - "name": "isWrappedAsset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1420, - "src": "2053:46:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "typeName": { - "id": 427, - "keyType": { - "id": 425, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2061:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2053:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 426, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2072:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 455, - "nodeType": "Block", - "src": "2227:239:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 437, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "2237:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 439, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2251:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2237:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 440, - "name": "initial_guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2256:20:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "src": "2237:39:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 442, - "nodeType": "ExpressionStatement", - "src": "2237:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 443, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "2329:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2350:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2329:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 446, - "nodeType": "ExpressionStatement", - "src": "2329:22:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 447, - "name": "guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "2361:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 448, - "name": "_guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "2385:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "2361:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 450, - "nodeType": "ExpressionStatement", - "src": "2361:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 451, - "name": "wrappedAssetMaster", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "2418:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 452, - "name": "wrapped_asset_master", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 432, - "src": "2439:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2418:41:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 454, - "nodeType": "ExpressionStatement", - "src": "2418:41:1" - } - ] - }, - "documentation": null, - "id": 456, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 430, - "mutability": "mutable", - "name": "initial_guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2118:39:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 429, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "2118:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 432, - "mutability": "mutable", - "name": "wrapped_asset_master", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2159:28:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2159:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 434, - "mutability": "mutable", - "name": "_guardian_set_expirity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 456, - "src": "2189:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 433, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2117:102:1" - }, - "returnParameters": { - "id": 436, - "nodeType": "ParameterList", - "parameters": [], - "src": "2227:0:1" - }, - "scope": 1420, - "src": "2106:360:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 467, - "nodeType": "Block", - "src": "2552:42:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 463, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "2569:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 465, - "indexExpression": { - "argumentTypes": null, - "id": 464, - "name": "idx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 458, - "src": "2583:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2569:18:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "functionReturnParameters": 462, - "id": 466, - "nodeType": "Return", - "src": "2562:25:1" - } - ] - }, - "documentation": null, - "functionSelector": "f951975a", - "id": 468, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getGuardianSet", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 459, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 458, - "mutability": "mutable", - "name": "idx", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 468, - "src": "2496:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 457, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2496:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2495:12:1" - }, - "returnParameters": { - "id": 462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "gs", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 468, - "src": "2529:21:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 460, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "2529:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2528:23:1" - }, - "scope": 1420, - "src": "2472:122:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 523, - "nodeType": "Block", - "src": "2673:566:1", - "statements": [ - { - "assignments": [476], - "declarations": [ - { - "constant": false, - "id": 476, - "mutability": "mutable", - "name": "parsed_vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2683:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA" - }, - "typeName": { - "contractScope": null, - "id": 475, - "name": "ParsedVAA", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 408, - "src": "2683:9:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr", - "typeString": "struct Wormhole.ParsedVAA" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 480, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 478, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 470, - "src": "2731:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 477, - "name": "parseAndVerifyVAA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "2713:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes_calldata_ptr_$returns$_t_struct$_ParsedVAA_$408_memory_ptr_$", - "typeString": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)" - } - }, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2713:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2683:52:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 481, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2772:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 482, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "2772:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30783031", - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2793:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "0x01" - }, - "src": "2772:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 499, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3009:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "3009:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30783130", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3030:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "0x10" - }, - "src": "3009:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 513, - "nodeType": "Block", - "src": "3098:53:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "696e76616c69642056414120616374696f6e", - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3119:20:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - }, - "value": "invalid VAA action" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - } - ], - "id": 509, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "3112:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3112:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 512, - "nodeType": "ExpressionStatement", - "src": "3112:28:1" - } - ] - }, - "id": 514, - "nodeType": "IfStatement", - "src": "3005:146:1", - "trueBody": { - "id": 508, - "nodeType": "Block", - "src": "3036:56:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 504, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3062:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "3062:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 503, - "name": "vaaTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "3050:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes memory)" - } - }, - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3050:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 507, - "nodeType": "ExpressionStatement", - "src": "3050:31:1" - } - ] - } - }, - "id": 515, - "nodeType": "IfStatement", - "src": "2768:383:1", - "trueBody": { - "id": 498, - "nodeType": "Block", - "src": "2799:200:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 486, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2821:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 487, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "2821:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 488, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "2854:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "2821:51:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574", - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2874:59:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - }, - "value": "only the current guardian set can change the guardian set" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - } - ], - "id": 485, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "2813:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2813:121:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 492, - "nodeType": "ExpressionStatement", - "src": "2813:121:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 494, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "2969:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "2969:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 493, - "name": "vaaUpdateGuardianSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 889, - "src": "2948:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes memory)" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2948:40:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 497, - "nodeType": "ExpressionStatement", - "src": "2948:40:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 516, - "name": "consumedVAAs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 420, - "src": "3196:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 519, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 517, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "3209:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 518, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "3209:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3196:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3228:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3196:36:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 522, - "nodeType": "ExpressionStatement", - "src": "3196:36:1" - } - ] - }, - "documentation": null, - "functionSelector": "3bc0aee6", - "id": 524, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 473, - "modifierName": { - "argumentTypes": null, - "id": 472, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "2660:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2660:12:1" - } - ], - "name": "submitVAA", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 471, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 470, - "mutability": "mutable", - "name": "vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 524, - "src": "2628:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 469, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2628:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2618:34:1" - }, - "returnParameters": { - "id": 474, - "nodeType": "ParameterList", - "parameters": [], - "src": "2673:0:1" - }, - "scope": 1420, - "src": "2600:639:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 780, - "nodeType": "Block", - "src": "3542:1748:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 531, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3552:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 533, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "version", - "nodeType": "MemberAccess", - "referencedDeclaration": 397, - "src": "3552:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3585:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "expression": { - "argumentTypes": null, - "id": 534, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3573:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "3573:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3573:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "3552:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 539, - "nodeType": "ExpressionStatement", - "src": "3552:35:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 541, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3605:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "version", - "nodeType": "MemberAccess", - "referencedDeclaration": 397, - "src": "3605:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3627:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3605:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5641412076657273696f6e20696e636f6d70617469626c65", - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - }, - "value": "VAA version incompatible" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - } - ], - "id": 540, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "3597:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3597:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 547, - "nodeType": "ExpressionStatement", - "src": "3597:60:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 548, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3714:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 550, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "3714:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3759:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 551, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3746:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "3746:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3746:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "3714:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 556, - "nodeType": "ExpressionStatement", - "src": "3714:47:1" - }, - { - "assignments": [558], - "declarations": [ - { - "constant": false, - "id": 558, - "mutability": "mutable", - "name": "len_signers", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "3772:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 557, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3772:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "35", - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3806:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "expression": { - "argumentTypes": null, - "id": 559, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3794:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "3794:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3794:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3772:36:1" - }, - { - "assignments": [565], - "declarations": [ - { - "constant": false, - "id": 565, - "mutability": "mutable", - "name": "offset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "3818:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 564, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3818:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 571, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3832:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3836:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 568, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "3841:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3832:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3818:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 572, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3897:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 574, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": 403, - "src": "3897:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 577, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "3933:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 575, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "3920:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "3920:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3920:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "3897:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 580, - "nodeType": "ExpressionStatement", - "src": "3897:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 581, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "3976:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 583, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "3976:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 587, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "4014:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 588, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4022:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4022:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 590, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "4035:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4022:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 585, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4004:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "slice", - "nodeType": "MemberAccess", - "referencedDeclaration": 55, - "src": "4004:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - } - }, - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4004:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 584, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "3994:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3994:49:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "3976:67:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 595, - "nodeType": "ExpressionStatement", - "src": "3976:67:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "4061:30:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 597, - "name": "consumedVAAs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 420, - "src": "4062:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 600, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 598, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "4075:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "4075:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4062:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5641412077617320616c7265616479206578656375746564", - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4093:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - }, - "value": "VAA was already executed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - } - ], - "id": 596, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4053:67:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 604, - "nodeType": "ExpressionStatement", - "src": "4053:67:1" - }, - { - "assignments": [606], - "declarations": [ - { - "constant": false, - "id": 606, - "mutability": "mutable", - "name": "guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "4131:31:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 605, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "4131:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 611, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 607, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "4165:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 610, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 608, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "4179:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "guardian_set_index", - "nodeType": "MemberAccess", - "referencedDeclaration": 401, - "src": "4179:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4165:44:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4131:78:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 613, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4227:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "4227:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4227:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4254:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4227:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e76616c696420677561726469616e20736574", - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4257:22:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - }, - "value": "invalid guardian set" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - } - ], - "id": 612, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4219:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4219:61:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 620, - "nodeType": "ExpressionStatement", - "src": "4219:61:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 622, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4298:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 623, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "4298:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4330:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4298:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 626, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4335:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 627, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "4335:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "4366:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4366:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4335:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4298:83:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "677561726469616e20736574206861732065787069726564", - "id": 632, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4383:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - }, - "value": "guardian set has expired" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - } - ], - "id": 621, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4290:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4290:120:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 634, - "nodeType": "ExpressionStatement", - "src": "4290:120:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 636, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "4527:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 637, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "4527:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4527:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4554:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4527:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4559:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "4527:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 643, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4526:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4564:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "4526:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 646, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4525:41:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4569:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4525:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 649, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4574:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4525:50:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 651, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "4579:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4525:65:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f2071756f72756d", - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4592:11:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - }, - "value": "no quorum" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - } - ], - "id": 635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4517:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4517:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 655, - "nodeType": "ExpressionStatement", - "src": "4517:87:1" - }, - { - "assignments": [657], - "declarations": [ - { - "constant": false, - "id": 657, - "mutability": "mutable", - "name": "last_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 780, - "src": "4615:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "typeName": { - "id": 656, - "name": "int16", - "nodeType": "ElementaryTypeName", - "src": "4615:5:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 660, - "initialValue": { - "argumentTypes": null, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "4634:3:1", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4636:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4615:22:1" - }, - { - "body": { - "id": 749, - "nodeType": "Block", - "src": "4686:465:1", - "statements": [ - { - "assignments": [672], - "declarations": [ - { - "constant": false, - "id": 672, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4700:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 671, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "4700:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 681, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4726:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 676, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4730:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4734:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4730:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4726:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 673, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4714:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "4714:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4714:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4700:37:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 683, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "4759:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 684, - "name": "last_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4767:10:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "src": "4759:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67", - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4779:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - }, - "value": "signature indices must be ascending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - } - ], - "id": 682, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4751:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4751:66:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "4751:66:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 689, - "name": "last_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4831:10:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 692, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "4850:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4844:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int16_$", - "typeString": "type(int16)" - }, - "typeName": { - "id": 690, - "name": "int16", - "nodeType": "ElementaryTypeName", - "src": "4844:5:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4844:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "src": "4831:25:1", - "typeDescriptions": { - "typeIdentifier": "t_int16", - "typeString": "int16" - } - }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "4831:25:1" - }, - { - "assignments": [697], - "declarations": [ - { - "constant": false, - "id": 697, - "mutability": "mutable", - "name": "r", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4871:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 696, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 706, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4897:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4901:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4905:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4901:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4897:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 698, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4883:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "4883:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4883:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4871:37:1" - }, - { - "assignments": [708], - "declarations": [ - { - "constant": false, - "id": 708, - "mutability": "mutable", - "name": "s", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4922:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 707, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4922:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 717, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3339", - "id": 711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4948:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_39_by_1", - "typeString": "int_const 39" - }, - "value": "39" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4953:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4957:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "4953:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4948:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 709, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4934:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "4934:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4934:26:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4922:38:1" - }, - { - "assignments": [719], - "declarations": [ - { - "constant": false, - "id": 719, - "mutability": "mutable", - "name": "v", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 749, - "src": "4974:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 718, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "4974:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 728, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3731", - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4996:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 723, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "5001:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3636", - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5005:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_66_by_1", - "typeString": "int_const 66" - }, - "value": "66" - }, - "src": "5001:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4996:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 720, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "4984:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "4984:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:24:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4974:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 729, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "5022:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3237", - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5027:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "5022:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 732, - "nodeType": "ExpressionStatement", - "src": "5022:7:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 735, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5061:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 736, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hash", - "nodeType": "MemberAccess", - "referencedDeclaration": 399, - "src": "5061:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 737, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "5078:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 738, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "5081:1:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 739, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "5084:1:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 734, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -6, - "src": "5051:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5051:35:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 741, - "name": "guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "5090:12:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "id": 742, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "keys", - "nodeType": "MemberAccess", - "referencedDeclaration": 368, - "src": "5090:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 744, - "indexExpression": { - "argumentTypes": null, - "id": 743, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "5108:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5090:24:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5051:63:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "564141207369676e617475726520696e76616c6964", - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5116:23:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - }, - "value": "VAA signature invalid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - } - ], - "id": 733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5043:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5043:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 748, - "nodeType": "ExpressionStatement", - "src": "5043:97:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 665, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4664:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 666, - "name": "len_signers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 558, - "src": "4668:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4664:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 750, - "initializationExpression": { - "assignments": [662], - "declarations": [ - { - "constant": false, - "id": 662, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 750, - "src": "4652:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 661, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4652:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 664, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4661:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4652:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "4681:3:1", - "subExpression": { - "argumentTypes": null, - "id": 668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 662, - "src": "4681:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 670, - "nodeType": "ExpressionStatement", - "src": "4681:3:1" - }, - "nodeType": "ForStatement", - "src": "4647:504:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 751, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5161:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "action", - "nodeType": "MemberAccess", - "referencedDeclaration": 405, - "src": "5161:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 756, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5193:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "34", - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5202:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "src": "5193:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 754, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5181:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "5181:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5181:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5161:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 761, - "nodeType": "ExpressionStatement", - "src": "5161:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 762, - "name": "parsed_vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5214:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA memory" - } - }, - "id": 764, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "payload", - "nodeType": "MemberAccess", - "referencedDeclaration": 407, - "src": "5214:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 767, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5245:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5254:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "5245:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 770, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5257:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5257:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "offset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 565, - "src": "5271:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5280:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "5271:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 775, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5270:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5257:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 765, - "name": "vaa", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "5235:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "slice", - "nodeType": "MemberAccess", - "referencedDeclaration": 55, - "src": "5235:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - } - }, - "id": 777, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5235:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5214:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 779, - "nodeType": "ExpressionStatement", - "src": "5214:69:1" - } - ] - }, - "documentation": null, - "functionSelector": "600b9aa6", - "id": 781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "parseAndVerifyVAA", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 526, - "mutability": "mutable", - "name": "vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 781, - "src": "3472:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 525, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3472:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3471:20:1" - }, - "returnParameters": { - "id": 530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 529, - "mutability": "mutable", - "name": "parsed_vaa", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 781, - "src": "3513:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_memory_ptr", - "typeString": "struct Wormhole.ParsedVAA" - }, - "typeName": { - "contractScope": null, - "id": 528, - "name": "ParsedVAA", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 408, - "src": "3513:9:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_ParsedVAA_$408_storage_ptr", - "typeString": "struct Wormhole.ParsedVAA" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3512:29:1" - }, - "scope": 1420, - "src": "3445:1845:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 888, - "nodeType": "Block", - "src": "5353:859:1", - "statements": [ - { - "assignments": [787], - "declarations": [ - { - "constant": false, - "id": 787, - "mutability": "mutable", - "name": "new_guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5363:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 786, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5363:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 792, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5409:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "expression": { - "argumentTypes": null, - "id": 788, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5395:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint32", - "nodeType": "MemberAccess", - "referencedDeclaration": 163, - "src": "5395:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint32)" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5395:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5363:48:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 794, - "name": "new_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 787, - "src": "5429:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 795, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5455:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5476:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5455:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "5429:48:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420696e63726561736520696e207374657073206f662031", - "id": 799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5479:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - }, - "value": "index must increase in steps of 1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - } - ], - "id": 793, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "5421:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5421:94:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 801, - "nodeType": "ExpressionStatement", - "src": "5421:94:1" - }, - { - "assignments": [803], - "declarations": [ - { - "constant": false, - "id": 803, - "mutability": "mutable", - "name": "len", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5525:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 802, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "5525:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "34", - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5550:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 804, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5537:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "5537:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5537:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5525:27:1" - }, - { - "assignments": [813], - "declarations": [ - { - "constant": false, - "id": 813, - "mutability": "mutable", - "name": "new_guardians", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5563:30:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 811, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5563:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 812, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5563:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 819, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 817, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "5610:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5596:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 814, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5600:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 815, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5600:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5596:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5563:51:1" - }, - { - "body": { - "id": 847, - "nodeType": "Block", - "src": "5655:103:1", - "statements": [ - { - "assignments": [831], - "declarations": [ - { - "constant": false, - "id": 831, - "mutability": "mutable", - "name": "addr", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 847, - "src": "5669:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5669:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5699:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 835, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5703:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3230", - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5707:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_20_by_1", - "typeString": "int_const 20" - }, - "value": "20" - }, - "src": "5703:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5699:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 832, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 783, - "src": "5684:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "5684:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5684:26:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5669:41:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 841, - "name": "new_guardians", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 813, - "src": "5724:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 843, - "indexExpression": { - "argumentTypes": null, - "id": 842, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5738:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5724:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 844, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 831, - "src": "5743:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5724:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 846, - "nodeType": "ExpressionStatement", - "src": "5724:23:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 824, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5641:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 825, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "5645:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5641:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 848, - "initializationExpression": { - "assignments": [821], - "declarations": [ - { - "constant": false, - "id": 821, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 848, - "src": "5629:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 820, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5629:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 823, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5638:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5629:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "5650:3:1", - "subExpression": { - "argumentTypes": null, - "id": 827, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 821, - "src": "5650:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "5650:3:1" - }, - "nodeType": "ForStatement", - "src": "5624:134:1" - }, - { - "assignments": [850], - "declarations": [ - { - "constant": false, - "id": 850, - "mutability": "mutable", - "name": "old_guardian_set_index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5768:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 849, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5768:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 852, - "initialValue": { - "argumentTypes": null, - "id": 851, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5800:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5768:50:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 853, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5828:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 854, - "name": "new_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 787, - "src": "5849:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "5828:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 856, - "nodeType": "ExpressionStatement", - "src": "5828:43:1" - }, - { - "assignments": [858], - "declarations": [ - { - "constant": false, - "id": 858, - "mutability": "mutable", - "name": "new_guardian_set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "5882:35:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet" - }, - "typeName": { - "contractScope": null, - "id": 857, - "name": "GuardianSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 371, - "src": "5882:11:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage_ptr", - "typeString": "struct Wormhole.GuardianSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 863, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 860, - "name": "new_guardians", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 813, - "src": "5932:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5947:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 859, - "name": "GuardianSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "5920:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_GuardianSet_$371_storage_ptr_$", - "typeString": "type(struct Wormhole.GuardianSet storage pointer)" - } - }, - "id": 862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5920:29:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5882:67:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 864, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "5959:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 866, - "indexExpression": { - "argumentTypes": null, - "id": 865, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5973:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5959:33:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 867, - "name": "new_guardian_set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 858, - "src": "5995:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_memory_ptr", - "typeString": "struct Wormhole.GuardianSet memory" - } - }, - "src": "5959:52:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 869, - "nodeType": "ExpressionStatement", - "src": "5959:52:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 870, - "name": "guardian_sets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "6021:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_GuardianSet_$371_storage_$", - "typeString": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)" - } - }, - "id": 872, - "indexExpression": { - "argumentTypes": null, - "id": 871, - "name": "old_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 850, - "src": "6035:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6021:37:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_GuardianSet_$371_storage", - "typeString": "struct Wormhole.GuardianSet storage ref" - } - }, - "id": 873, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "expiration_time", - "nodeType": "MemberAccess", - "referencedDeclaration": 370, - "src": "6021:53:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 876, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "6084:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6084:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6077:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": { - "id": 874, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6077:6:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6077:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 879, - "name": "guardian_set_expirity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "6103:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6077:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6021:103:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 882, - "nodeType": "ExpressionStatement", - "src": "6021:103:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 884, - "name": "old_guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 850, - "src": "6162:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 885, - "name": "guardian_set_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "6186:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 883, - "name": "LogGuardianSetChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 377, - "src": "6140:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", - "typeString": "function (uint32,uint32)" - } - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6140:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 887, - "nodeType": "EmitStatement", - "src": "6135:70:1" - } - ] - }, - "documentation": null, - "id": 889, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "vaaUpdateGuardianSet", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 784, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 783, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "5326:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 782, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5326:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5325:19:1" - }, - "returnParameters": { - "id": 785, - "nodeType": "ParameterList", - "parameters": [], - "src": "5353:0:1" - }, - "scope": 1420, - "src": "5296:916:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1050, - "nodeType": "Block", - "src": "6266:1644:1", - "statements": [ - { - "assignments": [895], - "declarations": [ - { - "constant": false, - "id": 895, - "mutability": "mutable", - "name": "source_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6319:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 894, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6319:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 900, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "34", - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6353:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 896, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6340:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6340:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6340:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6319:36:1" - }, - { - "assignments": [902], - "declarations": [ - { - "constant": false, - "id": 902, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6366:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 901, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6366:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 907, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "35", - "id": 905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6400:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "expression": { - "argumentTypes": null, - "id": 903, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6387:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6387:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6387:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6366:36:1" - }, - { - "assignments": [909], - "declarations": [ - { - "constant": false, - "id": 909, - "mutability": "mutable", - "name": "target_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6521:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6521:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 916, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3338", - "id": 912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6561:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_38_by_1", - "typeString": "int_const 38" - }, - "value": "38" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6566:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "6561:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 910, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6546:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "6546:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6546:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6521:48:1" - }, - { - "assignments": [918], - "declarations": [ - { - "constant": false, - "id": 918, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6580:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 917, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6580:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 923, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3730", - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6613:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - }, - "value": "70" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - } - ], - "expression": { - "argumentTypes": null, - "id": 919, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6600:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "6600:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6600:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6580:36:1" - }, - { - "assignments": [925], - "declarations": [ - { - "constant": false, - "id": 925, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1050, - "src": "6680:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 924, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6680:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 930, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313034", - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6712:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - }, - "value": "104" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - } - ], - "expression": { - "argumentTypes": null, - "id": 926, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6697:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint256", - "nodeType": "MemberAccess", - "referencedDeclaration": 271, - "src": "6697:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint256)" - } - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6697:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6680:36:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 932, - "name": "source_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 895, - "src": "6735:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 933, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "6751:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6735:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564", - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6765:40:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - }, - "value": "same chain transfers are not supported" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - } - ], - "id": 931, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6727:79:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 937, - "nodeType": "ExpressionStatement", - "src": "6727:79:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 939, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "6824:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 940, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "6840:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6824:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472616e73666572206d75737420626520696e636f6d696e67", - "id": 942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6850:27:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - }, - "value": "transfer must be incoming" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - } - ], - "id": 938, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6816:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6816:62:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 944, - "nodeType": "ExpressionStatement", - "src": "6816:62:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 945, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "6893:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 946, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "6908:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "6893:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1048, - "nodeType": "Block", - "src": "7514:390:1", - "statements": [ - { - "assignments": [1005], - "declarations": [ - { - "constant": false, - "id": 1005, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "7528:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1004, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7528:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1012, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - }, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3731", - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7567:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 1009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7572:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "7567:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - ], - "expression": { - "argumentTypes": null, - "id": 1006, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "7552:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 82, - "src": "7552:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (address)" - } - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7552:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7528:47:1" - }, - { - "assignments": [1014], - "declarations": [ - { - "constant": false, - "id": 1014, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "7590:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1013, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7590:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1020, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1016, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "7613:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1015, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "7607:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7607:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "7607:29:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7607:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7590:48:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1021, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1014, - "src": "7727:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7738:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "7727:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1039, - "nodeType": "IfStatement", - "src": "7723:99:1", - "trueBody": { - "id": 1038, - "nodeType": "Block", - "src": "7741:81:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1024, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7759:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7779:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1030, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1014, - "src": "7793:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1031, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7804:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "7793:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7785:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1028, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7785:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7785:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7779:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1025, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7768:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2388, - "src": "7768:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7759:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1037, - "nodeType": "ExpressionStatement", - "src": "7759:48:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1044, - "name": "target_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "7870:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1045, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7886:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1041, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "7842:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1040, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "7835:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7835:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3120, - "src": "7835:34:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7835:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1047, - "nodeType": "ExpressionStatement", - "src": "7835:58:1" - } - ] - }, - "id": 1049, - "nodeType": "IfStatement", - "src": "6889:1015:1", - "trueBody": { - "id": 1003, - "nodeType": "Block", - "src": "6918:590:1", - "statements": [ - { - "assignments": [949], - "declarations": [ - { - "constant": false, - "id": 949, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "6932:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6932:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 954, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3731", - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6971:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - }, - "value": "71" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - } - ], - "expression": { - "argumentTypes": null, - "id": 950, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "6956:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toBytes32", - "nodeType": "MemberAccess", - "referencedDeclaration": 298, - "src": "6956:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (bytes32)" - } - }, - "id": 953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6956:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6932:42:1" - }, - { - "assignments": [956], - "declarations": [ - { - "constant": false, - "id": 956, - "mutability": "mutable", - "name": "asset_id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "6988:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 955, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6988:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 964, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 960, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "7034:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 961, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 949, - "src": "7047:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "7017:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7017:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7017:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 957, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "7007:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7007:55:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6988:74:1" - }, - { - "assignments": [966], - "declarations": [ - { - "constant": false, - "id": 966, - "mutability": "mutable", - "name": "wrapped_asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1003, - "src": "7154:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 965, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7154:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 970, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 967, - "name": "wrappedAssets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 424, - "src": "7178:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 969, - "indexExpression": { - "argumentTypes": null, - "id": 968, - "name": "asset_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "7192:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7178:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7154:47:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 971, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7219:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7244:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7236:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7236:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7236:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7219:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 994, - "nodeType": "IfStatement", - "src": "7215:212:1", - "trueBody": { - "id": 993, - "nodeType": "Block", - "src": "7248:179:1", - "statements": [ - { - "assignments": [978], - "declarations": [ - { - "constant": false, - "id": 978, - "mutability": "mutable", - "name": "asset_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 993, - "src": "7266:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 977, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7266:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 983, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313033", - "id": 981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7302:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - }, - "value": "103" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - } - ], - "expression": { - "argumentTypes": null, - "id": 979, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 891, - "src": "7289:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "toUint8", - "nodeType": "MemberAccess", - "referencedDeclaration": 109, - "src": "7289:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$bound_to$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory,uint256) pure returns (uint8)" - } - }, - "id": 982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7289:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7266:40:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 984, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7324:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 986, - "name": "asset_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "7359:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 987, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "7369:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 988, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 949, - "src": "7382:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 989, - "name": "asset_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 978, - "src": "7397:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 985, - "name": "deployWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1094, - "src": "7340:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_uint8_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,uint8) returns (address)" - } - }, - "id": 990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7340:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7324:88:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 992, - "nodeType": "ExpressionStatement", - "src": "7324:88:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 999, - "name": "target_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "7474:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1000, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "7490:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 996, - "name": "wrapped_asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "7454:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 995, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "7441:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7441:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1511, - "src": "7441:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7441:56:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "7441:56:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1051, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "vaaTransfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 891, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1051, - "src": "6239:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 890, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6239:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6238:19:1" - }, - "returnParameters": { - "id": 893, - "nodeType": "ParameterList", - "parameters": [], - "src": "6266:0:1" - }, - "scope": 1420, - "src": "6218:1692:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1093, - "nodeType": "Block", - "src": "8047:808:1", - "statements": [ - { - "assignments": [1065], - "declarations": [ - { - "constant": false, - "id": 1065, - "mutability": "mutable", - "name": "targetBytes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1093, - "src": "8225:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - }, - "typeName": { - "id": 1064, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "8225:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1070, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1068, - "name": "wrappedAssetMaster", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "8255:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8247:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes20_$", - "typeString": "type(bytes20)" - }, - "typeName": { - "id": 1066, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "8247:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8247:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8225:49:1" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "8293:348:1", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "8307:24:1", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8326:4:1", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "8320:5:1" - }, - "nodeType": "YulFunctionCall", - "src": "8320:11:1" - }, - "variables": [ - { - "name": "clone", - "nodeType": "YulTypedName", - "src": "8311:5:1", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8351:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8358:66:1", - "type": "", - "value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8344:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8344:81:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8344:81:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8449:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8456:4:1", - "type": "", - "value": "0x14" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8445:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "8445:16:1" - }, - { - "name": "targetBytes", - "nodeType": "YulIdentifier", - "src": "8463:11:1" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8438:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8438:37:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8438:37:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8499:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8506:4:1", - "type": "", - "value": "0x28" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8495:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "8495:16:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8513:66:1", - "type": "", - "value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "8488:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "8488:92:1" - }, - "nodeType": "YulExpressionStatement", - "src": "8488:92:1" - }, - { - "nodeType": "YulAssignment", - "src": "8593:38:1", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8610:1:1", - "type": "", - "value": "0" - }, - { - "name": "clone", - "nodeType": "YulIdentifier", - "src": "8613:5:1" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8620:4:1", - "type": "", - "value": "0x37" - }, - { - "name": "seed", - "nodeType": "YulIdentifier", - "src": "8626:4:1" - } - ], - "functionName": { - "name": "create2", - "nodeType": "YulIdentifier", - "src": "8602:7:1" - }, - "nodeType": "YulFunctionCall", - "src": "8602:29:1" - }, - "variableNames": [ - { - "name": "asset", - "nodeType": "YulIdentifier", - "src": "8593:5:1" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1062, - "isOffset": false, - "isSlot": false, - "src": "8593:5:1", - "valueSize": 1 - }, - { - "declaration": 1053, - "isOffset": false, - "isSlot": false, - "src": "8626:4:1", - "valueSize": 1 - }, - { - "declaration": 1065, - "isOffset": false, - "isSlot": false, - "src": "8463:11:1", - "valueSize": 1 - } - ], - "id": 1071, - "nodeType": "InlineAssembly", - "src": "8284:357:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1076, - "name": "token_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "8710:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1077, - "name": "token_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "8723:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1078, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1059, - "src": "8738:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1073, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8692:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1072, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "8679:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8679:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 1490, - "src": "8679:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_bytes32_$_t_uint8_$returns$__$", - "typeString": "function (uint8,bytes32,uint8) external" - } - }, - "id": 1079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8679:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1080, - "nodeType": "ExpressionStatement", - "src": "8679:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1081, - "name": "wrappedAssets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 424, - "src": "8783:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 1083, - "indexExpression": { - "argumentTypes": null, - "id": 1082, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "8797:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8783:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1084, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8805:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8783:27:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1086, - "nodeType": "ExpressionStatement", - "src": "8783:27:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1087, - "name": "isWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "8820:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1089, - "indexExpression": { - "argumentTypes": null, - "id": 1088, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "8835:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8820:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8844:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8820:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1092, - "nodeType": "ExpressionStatement", - "src": "8820:28:1" - } - ] - }, - "documentation": null, - "id": 1094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deployWrappedAsset", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1053, - "mutability": "mutable", - "name": "seed", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7944:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1052, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7944:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1055, - "mutability": "mutable", - "name": "token_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7958:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1054, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7958:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1057, - "mutability": "mutable", - "name": "token_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "7977:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1056, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7977:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "8000:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1058, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8000:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7943:72:1" - }, - "returnParameters": { - "id": 1063, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1062, - "mutability": "mutable", - "name": "asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1094, - "src": "8033:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1061, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8033:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8032:15:1" - }, - "scope": 1420, - "src": "7916:939:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1313, - "nodeType": "Block", - "src": "9057:1779:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1112, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "9075:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1113, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "9091:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "9075:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "id": 1115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9101:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - }, - "value": "must not transfer to the same chain" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "id": 1111, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9067:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9067:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1117, - "nodeType": "ExpressionStatement", - "src": "9067:72:1" - }, - { - "assignments": [1119], - "declarations": [ - { - "constant": false, - "id": 1119, - "mutability": "mutable", - "name": "asset_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9150:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1118, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9150:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1121, - "initialValue": { - "argumentTypes": null, - "id": 1120, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "9170:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9150:28:1" - }, - { - "assignments": [1123], - "declarations": [ - { - "constant": false, - "id": 1123, - "mutability": "mutable", - "name": "asset_address", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9188:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1122, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9188:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1124, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9188:21:1" - }, - { - "assignments": [1126], - "declarations": [ - { - "constant": false, - "id": 1126, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1313, - "src": "9219:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1125, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9219:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1132, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1128, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9242:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1127, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "9236:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9236:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "9236:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9236:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9219:40:1" - }, - { - "condition": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "isWrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "9274:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9289:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9274:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1286, - "nodeType": "Block", - "src": "9496:1091:1", - "statements": [ - { - "assignments": [1163], - "declarations": [ - { - "constant": false, - "id": 1163, - "mutability": "mutable", - "name": "balanceBefore", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1286, - "src": "9510:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9510:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1173, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1170, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9566:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1165, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9541:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1164, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9534:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9534:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 3025, - "src": "9534:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 1172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9534:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9510:62:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9617:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9617:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1182, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9629:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9629:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9629:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9644:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1175, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1174, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9586:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9586:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3145, - "src": "9586:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 1185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9586:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1186, - "nodeType": "ExpressionStatement", - "src": "9586:65:1" - }, - { - "assignments": [1188], - "declarations": [ - { - "constant": false, - "id": 1188, - "mutability": "mutable", - "name": "balanceAfter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1286, - "src": "9665:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9665:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1198, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1195, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "9720:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "id": 1194, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9712:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1193, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9712:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9712:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1190, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9695:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1189, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "9688:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9688:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 3025, - "src": "9688:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9688:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9665:61:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9931:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1202, - "name": "balanceBefore", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1163, - "src": "9957:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1200, - "name": "balanceAfter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "9940:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2354, - "src": "9940:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9940:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9931:40:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1205, - "nodeType": "ExpressionStatement", - "src": "9931:40:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1206, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10046:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10057:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10046:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1254, - "nodeType": "IfStatement", - "src": "10042:344:1", - "trueBody": { - "id": 1253, - "nodeType": "Block", - "src": "10060:326:1", - "statements": [ - { - "assignments": [1210], - "declarations": [ - { - "constant": false, - "id": 1210, - "mutability": "mutable", - "name": "original_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1253, - "src": "10078:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10078:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1212, - "initialValue": { - "argumentTypes": null, - "id": 1211, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10104:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10078:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1213, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10128:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10148:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1219, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10162:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10173:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10162:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1218, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10154:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10154:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10154:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10148:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1214, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10137:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "10137:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1224, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10137:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10128:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1226, - "nodeType": "ExpressionStatement", - "src": "10128:48:1" - }, - { - "condition": { - "argumentTypes": null, - "id": 1227, - "name": "refund_dust", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "10199:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1248, - "nodeType": "IfStatement", - "src": "10195:146:1", - "trueBody": { - "id": 1247, - "nodeType": "Block", - "src": "10212:129:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1232, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10261:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10261:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10293:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1239, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10307:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1240, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10318:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10307:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10299:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10299:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10293:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1234, - "name": "original_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1210, - "src": "10273:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 2432, - "src": "10273:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10273:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1229, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10241:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1228, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3086, - "src": "10234:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3086_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10234:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3120, - "src": "10234:26:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3086_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3086_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10234:88:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1246, - "nodeType": "ExpressionStatement", - "src": "10234:88:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1249, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10359:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "39", - "id": 1250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10370:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10359:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1252, - "nodeType": "ExpressionStatement", - "src": "10359:12:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10425:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1262, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10445:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1261, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3008, - "src": "10439:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$3008_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10439:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3008", - "typeString": "contract ERC20" - } - }, - "id": 1264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2584, - "src": "10439:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10439:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10465:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "10439:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1260, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10431:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1259, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10431:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10431:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10425:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1256, - "name": "balanceAfter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "10408:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "10408:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10408:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1271, - "name": "MAX_UINT64", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 357, - "src": "10472:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint64", - "typeString": "uint64" - } - }, - "src": "10408:74:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d", - "id": 1273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10484:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - }, - "value": "bridge balance would exceed maximum" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - } - ], - "id": 1255, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10400:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10400:122:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1275, - "nodeType": "ExpressionStatement", - "src": "10400:122:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "10537:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1281, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "10569:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10561:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10561:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10561:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10553:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1277, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10553:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10553:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10537:39:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "10537:39:1" - } - ] - }, - "id": 1287, - "nodeType": "IfStatement", - "src": "9270:1317:1", - "trueBody": { - "id": 1161, - "nodeType": "Block", - "src": "9297:193:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1140, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9336:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9336:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1142, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "9348:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1137, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9324:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1136, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9311:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1532, - "src": "9311:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 1143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1144, - "nodeType": "ExpressionStatement", - "src": "9311:44:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1145, - "name": "asset_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "9369:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1147, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9396:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1146, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9383:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9383:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "assetChain", - "nodeType": "MemberAccess", - "referencedDeclaration": 1443, - "src": "9383:30:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 1150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9383:32:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "9369:46:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1152, - "nodeType": "ExpressionStatement", - "src": "9369:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1153, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "9429:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1155, - "name": "asset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1096, - "src": "9458:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1154, - "name": "WrappedAsset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2147, - "src": "9445:12:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WrappedAsset_$2147_$", - "typeString": "type(contract WrappedAsset)" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9445:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WrappedAsset_$2147", - "typeString": "contract WrappedAsset" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "assetAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 1445, - "src": "9445:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$", - "typeString": "function () view external returns (bytes32)" - } - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9445:34:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9429:50:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1160, - "nodeType": "ExpressionStatement", - "src": "9429:50:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1289, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10644:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10654:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10644:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10657:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - }, - "value": "truncated amount must not be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "id": 1288, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10636:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10636:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1294, - "nodeType": "ExpressionStatement", - "src": "10636:54:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1296, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "10722:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1297, - "name": "asset_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "10736:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1298, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1126, - "src": "10749:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1299, - "name": "asset_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1123, - "src": "10759:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1304, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10790:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10790:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10782:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1302, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10782:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10782:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1301, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10774:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1300, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10774:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10774:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1308, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1100, - "src": "10804:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1309, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1098, - "src": "10815:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1310, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1104, - "src": "10823:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 1295, - "name": "LogTokensLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 395, - "src": "10706:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$", - "typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)" - } - }, - "id": 1311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10706:123:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1312, - "nodeType": "EmitStatement", - "src": "10701:128:1" - } - ] - }, - "documentation": null, - "functionSelector": "70713960", - "id": 1314, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1109, - "modifierName": { - "argumentTypes": null, - "id": 1108, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "9044:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9044:12:1" - } - ], - "name": "lockAssets", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1096, - "mutability": "mutable", - "name": "asset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8890:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1095, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8890:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1098, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8913:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1097, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8913:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1100, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8937:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1099, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8937:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1102, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8964:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1101, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8964:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1104, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "8992:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 1103, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "8992:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1106, - "mutability": "mutable", - "name": "refund_dust", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1314, - "src": "9014:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1105, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9014:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8880:156:1" - }, - "returnParameters": { - "id": 1110, - "nodeType": "ParameterList", - "parameters": [], - "src": "9057:0:1" - }, - "scope": 1420, - "src": "8861:1975:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1402, - "nodeType": "Block", - "src": "10970:636:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1326, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1318, - "src": "10988:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1327, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "11004:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "10988:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "id": 1329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11014:37:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - }, - "value": "must not transfer to the same chain" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "id": 1325, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "10980:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10980:72:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1331, - "nodeType": "ExpressionStatement", - "src": "10980:72:1" - }, - { - "assignments": [1333], - "declarations": [ - { - "constant": false, - "id": 1333, - "mutability": "mutable", - "name": "remainder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1402, - "src": "11063:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1332, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11063:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1341, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "id": 1339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11097:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11103:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "11097:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1334, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11083:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11083:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 2432, - "src": "11083:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11083:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11063:42:1" - }, - { - "assignments": [1343], - "declarations": [ - { - "constant": false, - "id": 1343, - "mutability": "mutable", - "name": "transfer_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1402, - "src": "11115:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1342, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11115:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1351, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "id": 1349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11155:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 1348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11161:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "11155:7:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1344, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11141:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11141:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2410, - "src": "11141:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:22:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11115:48:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1353, - "name": "transfer_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1343, - "src": "11181:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11200:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11181:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "id": 1356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11203:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - }, - "value": "truncated amount must not be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "id": 1352, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "11173:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11173:63:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1358, - "nodeType": "ExpressionStatement", - "src": "11173:63:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1364, - "name": "remainder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1333, - "src": "11302:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1359, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11282:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11282:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 1363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11282:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11282:30:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1366, - "nodeType": "ExpressionStatement", - "src": "11282:30:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1368, - "name": "WETHAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 365, - "src": "11361:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1367, - "name": "WETH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1431, - "src": "11356:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_WETH_$1431_$", - "typeString": "type(contract WETH)" - } - }, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11356:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_WETH_$1431", - "typeString": "contract WETH" - } - }, - "id": 1370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 1425, - "src": "11356:25:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$__$returns$__$", - "typeString": "function () payable external" - } - }, - "id": 1375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1371, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11390:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11390:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1373, - "name": "remainder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1333, - "src": "11402:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11390:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "11356:56:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$__$returns$__$value", - "typeString": "function () payable external" - } - }, - "id": 1376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11356:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1377, - "nodeType": "ExpressionStatement", - "src": "11356:58:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1379, - "name": "target_chain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1318, - "src": "11477:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1380, - "name": "CHAIN_ID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "11491:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "hexValue": "39", - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11501:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1386, - "name": "WETHAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 365, - "src": "11520:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11512:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11512:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11512:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11504:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1382, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11504:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11504:29:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1393, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11551:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11551:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11543:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11543:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11543:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 1389, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11535:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11535:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1397, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1316, - "src": "11565:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1398, - "name": "transfer_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1343, - "src": "11576:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1399, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1320, - "src": "11593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 1378, - "name": "LogTokensLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 395, - "src": "11461:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint8_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint32_$returns$__$", - "typeString": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)" - } - }, - "id": 1400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11461:138:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1401, - "nodeType": "EmitStatement", - "src": "11456:143:1" - } - ] - }, - "documentation": null, - "functionSelector": "58d62e46", - "id": 1403, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1323, - "modifierName": { - "argumentTypes": null, - "id": 1322, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3657, - "src": "10957:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10957:12:1" - } - ], - "name": "lockETH", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1321, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1316, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10868:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1315, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10868:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1318, - "mutability": "mutable", - "name": "target_chain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10895:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1317, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10895:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1320, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1403, - "src": "10923:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 1319, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10923:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10858:83:1" - }, - "returnParameters": { - "id": 1324, - "nodeType": "ParameterList", - "parameters": [], - "src": "10970:0:1" - }, - "scope": 1420, - "src": "10842:764:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1410, - "nodeType": "Block", - "src": "11640:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11648:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - }, - "value": "please use lockETH to transfer ETH to Solana" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "id": 1406, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "11641:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11641:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1409, - "nodeType": "ExpressionStatement", - "src": "11641:54:1" - } - ] - }, - "documentation": null, - "id": 1411, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1404, - "nodeType": "ParameterList", - "parameters": [], - "src": "11620:2:1" - }, - "returnParameters": { - "id": 1405, - "nodeType": "ParameterList", - "parameters": [], - "src": "11640:0:1" - }, - "scope": 1420, - "src": "11612:85:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 1418, - "nodeType": "Block", - "src": "11730:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "id": 1415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11738:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - }, - "value": "please use lockETH to transfer ETH to Solana" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "id": 1414, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "src": "11731:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11731:54:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1417, - "nodeType": "ExpressionStatement", - "src": "11731:54:1" - } - ] - }, - "documentation": null, - "id": 1419, - "implemented": true, - "kind": "receive", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1412, - "nodeType": "ParameterList", - "parameters": [], - "src": "11710:2:1" - }, - "returnParameters": { - "id": 1413, - "nodeType": "ParameterList", - "parameters": [], - "src": "11730:0:1" - }, - "scope": 1420, - "src": "11703:84:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1432, - "src": "463:11326:1" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1421, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "11810:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1422, - "nodeType": "InheritanceSpecifier", - "src": "11810:6:1" - } - ], - "contractDependencies": [3086], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1431, - "linearizedBaseContracts": [1431, 3086], - "name": "WETH", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "d0e30db0", - "id": 1425, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1423, - "nodeType": "ParameterList", - "parameters": [], - "src": "11839:2:1" - }, - "returnParameters": { - "id": 1424, - "nodeType": "ParameterList", - "parameters": [], - "src": "11858:0:1" - }, - "scope": 1431, - "src": "11823:36:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 1430, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1427, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1430, - "src": "11883:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11883:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11882:16:1" - }, - "returnParameters": { - "id": 1429, - "nodeType": "ParameterList", - "parameters": [], - "src": "11907:0:1" - }, - "scope": 1431, - "src": "11865:43:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1432, - "src": "11792:118:1" - } - ], - "src": "64:11847:1" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/Wormhole.sol", - "exportedSymbols": { - "WETH": [1431], - "Wormhole": [1420] - }, - "license": "Apache 2" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", "^", "0.6", ".0"] - }, - "id": 335, - "name": "PragmaDirective", - "src": "64:23:1" - }, - { - "attributes": { - "literals": ["experimental", "ABIEncoderV2"] - }, - "id": 336, - "name": "PragmaDirective", - "src": "88:33:1" - }, - { - "attributes": { - "SourceUnit": 3009, - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 337, - "name": "ImportDirective", - "src": "123:55:1" - }, - { - "attributes": { - "SourceUnit": 3087, - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 338, - "name": "ImportDirective", - "src": "179:56:1" - }, - { - "attributes": { - "SourceUnit": 3300, - "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 339, - "name": "ImportDirective", - "src": "236:59:1" - }, - { - "attributes": { - "SourceUnit": 2506, - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 340, - "name": "ImportDirective", - "src": "296:51:1" - }, - { - "attributes": { - "SourceUnit": 3659, - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 341, - "name": "ImportDirective", - "src": "348:59:1" - }, - { - "attributes": { - "SourceUnit": 334, - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/BytesLib.sol", - "file": "./BytesLib.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 342, - "name": "ImportDirective", - "src": "408:24:1" - }, - { - "attributes": { - "SourceUnit": 2148, - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "file": "./WrappedAsset.sol", - "scope": 1432, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 343, - "name": "ImportDirective", - "src": "433:28:1" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3658], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [1420, 3658], - "name": "Wormhole", - "scope": 1432 - }, - "children": [ - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ReentrancyGuard", - "referencedDeclaration": 3658, - "type": "contract ReentrancyGuard" - }, - "id": 344, - "name": "UserDefinedTypeName", - "src": "484:15:1" - } - ], - "id": 345, - "name": "InheritanceSpecifier", - "src": "484:15:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeERC20", - "referencedDeclaration": 3299, - "type": "library SafeERC20" - }, - "id": 346, - "name": "UserDefinedTypeName", - "src": "512:9:1" - }, - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 347, - "name": "UserDefinedTypeName", - "src": "526:6:1" - } - ], - "id": 348, - "name": "UsingForDirective", - "src": "506:27:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "BytesLib", - "referencedDeclaration": 333, - "type": "library BytesLib" - }, - "id": 349, - "name": "UserDefinedTypeName", - "src": "544:8:1" - }, - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 350, - "name": "ElementaryTypeName", - "src": "557:5:1" - } - ], - "id": 351, - "name": "UsingForDirective", - "src": "538:25:1" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeMath", - "referencedDeclaration": 2505, - "type": "library SafeMath" - }, - "id": 352, - "name": "UserDefinedTypeName", - "src": "574:8:1" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 353, - "name": "ElementaryTypeName", - "src": "587:7:1" - } - ], - "id": 354, - "name": "UsingForDirective", - "src": "568:27:1" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "MAX_UINT64", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint64", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint64", - "type": "uint64" - }, - "id": 355, - "name": "ElementaryTypeName", - "src": "601:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31385f3434365f3734345f3037335f3730395f3535315f363135", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 18446744073709551615", - "value": "18_446_744_073_709_551_615" - }, - "id": 356, - "name": "Literal", - "src": "630:26:1" - } - ], - "id": 357, - "name": "VariableDeclaration", - "src": "601:55:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "99da1d3c", - "mutability": "mutable", - "name": "wrappedAssetMaster", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 358, - "name": "ElementaryTypeName", - "src": "708:7:1" - } - ], - "id": 359, - "name": "VariableDeclaration", - "src": "708:33:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "CHAIN_ID", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint8", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 360, - "name": "ElementaryTypeName", - "src": "776:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 361, - "name": "Literal", - "src": "793:1:1" - } - ], - "id": 362, - "name": "VariableDeclaration", - "src": "776:18:1" - }, - { - "attributes": { - "constant": true, - "mutability": "constant", - "name": "WETHAddress", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 363, - "name": "ElementaryTypeName", - "src": "846:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "address payable", - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - }, - "id": 364, - "name": "Literal", - "src": "877:42:1" - } - ], - "id": 365, - "name": "VariableDeclaration", - "src": "846:73:1" - }, - { - "attributes": { - "canonicalName": "Wormhole.GuardianSet", - "name": "GuardianSet", - "scope": 1420, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "keys", - "overrides": null, - "scope": 371, - "stateVariable": false, - "storageLocation": "default", - "type": "address[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 366, - "name": "ElementaryTypeName", - "src": "955:7:1" - } - ], - "id": 367, - "name": "ArrayTypeName", - "src": "955:9:1" - } - ], - "id": 368, - "name": "VariableDeclaration", - "src": "955:14:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "expiration_time", - "overrides": null, - "scope": 371, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 369, - "name": "ElementaryTypeName", - "src": "979:6:1" - } - ], - "id": 370, - "name": "VariableDeclaration", - "src": "979:22:1" - } - ], - "id": 371, - "name": "StructDefinition", - "src": "926:82:1" - }, - { - "attributes": { - "anonymous": false, - "documentation": null, - "name": "LogGuardianSetChanged" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "oldGuardianIndex", - "overrides": null, - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 372, - "name": "ElementaryTypeName", - "src": "1051:6:1" - } - ], - "id": 373, - "name": "VariableDeclaration", - "src": "1051:23:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "newGuardianIndex", - "overrides": null, - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 374, - "name": "ElementaryTypeName", - "src": "1084:6:1" - } - ], - "id": 375, - "name": "VariableDeclaration", - "src": "1084:23:1" - } - ], - "id": 376, - "name": "ParameterList", - "src": "1041:72:1" - } - ], - "id": 377, - "name": "EventDefinition", - "src": "1014:100:1" - }, - { - "attributes": { - "anonymous": false, - "documentation": null, - "name": "LogTokensLocked" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 378, - "name": "ElementaryTypeName", - "src": "1151:5:1" - } - ], - "id": 379, - "name": "VariableDeclaration", - "src": "1151:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 380, - "name": "ElementaryTypeName", - "src": "1179:5:1" - } - ], - "id": 381, - "name": "VariableDeclaration", - "src": "1179:17:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "token_decimals", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 382, - "name": "ElementaryTypeName", - "src": "1206:5:1" - } - ], - "id": 383, - "name": "VariableDeclaration", - "src": "1206:20:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "token", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 384, - "name": "ElementaryTypeName", - "src": "1236:7:1" - } - ], - "id": 385, - "name": "VariableDeclaration", - "src": "1236:21:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 386, - "name": "ElementaryTypeName", - "src": "1267:7:1" - } - ], - "id": 387, - "name": "VariableDeclaration", - "src": "1267:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 388, - "name": "ElementaryTypeName", - "src": "1299:7:1" - } - ], - "id": 389, - "name": "VariableDeclaration", - "src": "1299:17:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 390, - "name": "ElementaryTypeName", - "src": "1326:7:1" - } - ], - "id": 391, - "name": "VariableDeclaration", - "src": "1326:14:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 395, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 392, - "name": "ElementaryTypeName", - "src": "1350:6:1" - } - ], - "id": 393, - "name": "VariableDeclaration", - "src": "1350:12:1" - } - ], - "id": 394, - "name": "ParameterList", - "src": "1141:227:1" - } - ], - "id": 395, - "name": "EventDefinition", - "src": "1120:249:1" - }, - { - "attributes": { - "canonicalName": "Wormhole.ParsedVAA", - "name": "ParsedVAA", - "scope": 1420, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "version", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 396, - "name": "ElementaryTypeName", - "src": "1402:5:1" - } - ], - "id": 397, - "name": "VariableDeclaration", - "src": "1402:13:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "hash", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 398, - "name": "ElementaryTypeName", - "src": "1425:7:1" - } - ], - "id": 399, - "name": "VariableDeclaration", - "src": "1425:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "guardian_set_index", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 400, - "name": "ElementaryTypeName", - "src": "1447:6:1" - } - ], - "id": 401, - "name": "VariableDeclaration", - "src": "1447:25:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "timestamp", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 402, - "name": "ElementaryTypeName", - "src": "1482:6:1" - } - ], - "id": 403, - "name": "VariableDeclaration", - "src": "1482:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "action", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 404, - "name": "ElementaryTypeName", - "src": "1508:5:1" - } - ], - "id": 405, - "name": "VariableDeclaration", - "src": "1508:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "payload", - "overrides": null, - "scope": 408, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 406, - "name": "ElementaryTypeName", - "src": "1530:5:1" - } - ], - "id": 407, - "name": "VariableDeclaration", - "src": "1530:13:1" - } - ], - "id": 408, - "name": "StructDefinition", - "src": "1375:175:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "42b0aefa", - "mutability": "mutable", - "name": "guardian_sets", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(uint32 => struct Wormhole.GuardianSet)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(uint32 => struct Wormhole.GuardianSet)" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 409, - "name": "ElementaryTypeName", - "src": "1617:6:1" - }, - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 410, - "name": "UserDefinedTypeName", - "src": "1627:11:1" - } - ], - "id": 411, - "name": "Mapping", - "src": "1609:30:1" - } - ], - "id": 412, - "name": "VariableDeclaration", - "src": "1609:51:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "822d82b3", - "mutability": "mutable", - "name": "guardian_set_index", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 413, - "name": "ElementaryTypeName", - "src": "1701:6:1" - } - ], - "id": 414, - "name": "VariableDeclaration", - "src": "1701:32:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "4db47840", - "mutability": "mutable", - "name": "guardian_set_expirity", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 415, - "name": "ElementaryTypeName", - "src": "1819:6:1" - } - ], - "id": 416, - "name": "VariableDeclaration", - "src": "1819:35:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "a31fe409", - "mutability": "mutable", - "name": "consumedVAAs", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bool)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bool)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 417, - "name": "ElementaryTypeName", - "src": "1908:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 418, - "name": "ElementaryTypeName", - "src": "1919:4:1" - } - ], - "id": 419, - "name": "Mapping", - "src": "1900:24:1" - } - ], - "id": 420, - "name": "VariableDeclaration", - "src": "1900:44:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "b6694c2a", - "mutability": "mutable", - "name": "wrappedAssets", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => address)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => address)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 421, - "name": "ElementaryTypeName", - "src": "2007:7:1" - }, - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 422, - "name": "ElementaryTypeName", - "src": "2018:7:1" - } - ], - "id": 423, - "name": "Mapping", - "src": "1999:27:1" - } - ], - "id": 424, - "name": "VariableDeclaration", - "src": "1999:48:1" - }, - { - "attributes": { - "constant": false, - "functionSelector": "1a2be4da", - "mutability": "mutable", - "name": "isWrappedAsset", - "overrides": null, - "scope": 1420, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => bool)", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => bool)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 425, - "name": "ElementaryTypeName", - "src": "2061:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 426, - "name": "ElementaryTypeName", - "src": "2072:4:1" - } - ], - "id": 427, - "name": "Mapping", - "src": "2053:24:1" - } - ], - "id": 428, - "name": "VariableDeclaration", - "src": "2053:46:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": true, - "kind": "constructor", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "initial_guardian_set", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 429, - "name": "UserDefinedTypeName", - "src": "2118:11:1" - } - ], - "id": 430, - "name": "VariableDeclaration", - "src": "2118:39:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "wrapped_asset_master", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 431, - "name": "ElementaryTypeName", - "src": "2159:7:1" - } - ], - "id": 432, - "name": "VariableDeclaration", - "src": "2159:28:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_guardian_set_expirity", - "overrides": null, - "scope": 456, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 433, - "name": "ElementaryTypeName", - "src": "2189:6:1" - } - ], - "id": 434, - "name": "VariableDeclaration", - "src": "2189:29:1" - } - ], - "id": 435, - "name": "ParameterList", - "src": "2117:102:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 436, - "name": "ParameterList", - "src": "2227:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 437, - "name": "Identifier", - "src": "2237:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 438, - "name": "Literal", - "src": "2251:1:1" - } - ], - "id": 439, - "name": "IndexAccess", - "src": "2237:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 430, - "type": "struct Wormhole.GuardianSet memory", - "value": "initial_guardian_set" - }, - "id": 440, - "name": "Identifier", - "src": "2256:20:1" - } - ], - "id": 441, - "name": "Assignment", - "src": "2237:39:1" - } - ], - "id": 442, - "name": "ExpressionStatement", - "src": "2237:39:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 443, - "name": "Identifier", - "src": "2329:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 444, - "name": "Literal", - "src": "2350:1:1" - } - ], - "id": 445, - "name": "Assignment", - "src": "2329:22:1" - } - ], - "id": 446, - "name": "ExpressionStatement", - "src": "2329:22:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 416, - "type": "uint32", - "value": "guardian_set_expirity" - }, - "id": 447, - "name": "Identifier", - "src": "2361:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 434, - "type": "uint32", - "value": "_guardian_set_expirity" - }, - "id": 448, - "name": "Identifier", - "src": "2385:22:1" - } - ], - "id": 449, - "name": "Assignment", - "src": "2361:46:1" - } - ], - "id": 450, - "name": "ExpressionStatement", - "src": "2361:46:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 359, - "type": "address", - "value": "wrappedAssetMaster" - }, - "id": 451, - "name": "Identifier", - "src": "2418:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 432, - "type": "address", - "value": "wrapped_asset_master" - }, - "id": 452, - "name": "Identifier", - "src": "2439:20:1" - } - ], - "id": 453, - "name": "Assignment", - "src": "2418:41:1" - } - ], - "id": 454, - "name": "ExpressionStatement", - "src": "2418:41:1" - } - ], - "id": 455, - "name": "Block", - "src": "2227:239:1" - } - ], - "id": 456, - "name": "FunctionDefinition", - "src": "2106:360:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "f951975a", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "getGuardianSet", - "overrides": null, - "scope": 1420, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "idx", - "overrides": null, - "scope": 468, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 457, - "name": "ElementaryTypeName", - "src": "2496:6:1" - } - ], - "id": 458, - "name": "VariableDeclaration", - "src": "2496:10:1" - } - ], - "id": 459, - "name": "ParameterList", - "src": "2495:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "gs", - "overrides": null, - "scope": 468, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 460, - "name": "UserDefinedTypeName", - "src": "2529:11:1" - } - ], - "id": 461, - "name": "VariableDeclaration", - "src": "2529:21:1" - } - ], - "id": 462, - "name": "ParameterList", - "src": "2528:23:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 462 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 463, - "name": "Identifier", - "src": "2569:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 458, - "type": "uint32", - "value": "idx" - }, - "id": 464, - "name": "Identifier", - "src": "2583:3:1" - } - ], - "id": 465, - "name": "IndexAccess", - "src": "2569:18:1" - } - ], - "id": 466, - "name": "Return", - "src": "2562:25:1" - } - ], - "id": 467, - "name": "Block", - "src": "2552:42:1" - } - ], - "id": 468, - "name": "FunctionDefinition", - "src": "2472:122:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "3bc0aee6", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "submitVAA", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "vaa", - "overrides": null, - "scope": 524, - "stateVariable": false, - "storageLocation": "calldata", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 469, - "name": "ElementaryTypeName", - "src": "2628:5:1" - } - ], - "id": 470, - "name": "VariableDeclaration", - "src": "2628:18:1" - } - ], - "id": 471, - "name": "ParameterList", - "src": "2618:34:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 474, - "name": "ParameterList", - "src": "2673:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 472, - "name": "Identifier", - "src": "2660:12:1" - } - ], - "id": 473, - "name": "ModifierInvocation", - "src": "2660:12:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [476] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parsed_vaa", - "overrides": null, - "scope": 523, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.ParsedVAA", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ParsedVAA", - "referencedDeclaration": 408, - "type": "struct Wormhole.ParsedVAA" - }, - "id": 475, - "name": "UserDefinedTypeName", - "src": "2683:9:1" - } - ], - "id": 476, - "name": "VariableDeclaration", - "src": "2683:27:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "struct Wormhole.ParsedVAA memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 781, - "type": "function (bytes calldata) view returns (struct Wormhole.ParsedVAA memory)", - "value": "parseAndVerifyVAA" - }, - "id": 477, - "name": "Identifier", - "src": "2713:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 470, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 478, - "name": "Identifier", - "src": "2731:3:1" - } - ], - "id": 479, - "name": "FunctionCall", - "src": "2713:22:1" - } - ], - "id": 480, - "name": "VariableDeclarationStatement", - "src": "2683:52:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 481, - "name": "Identifier", - "src": "2772:10:1" - } - ], - "id": 482, - "name": "MemberAccess", - "src": "2772:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30783031", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "0x01" - }, - "id": 483, - "name": "Literal", - "src": "2793:4:1" - } - ], - "id": 484, - "name": "BinaryOperation", - "src": "2772:25:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_57f82f54015302e10ddc5f5b0f8eebea6891c2be815aa07f38e9301457bc8c6a", - "typeString": "literal_string \"only the current guardian set can change the guardian set\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 485, - "name": "Identifier", - "src": "2813:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 486, - "name": "Identifier", - "src": "2821:10:1" - } - ], - "id": 487, - "name": "MemberAccess", - "src": "2821:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 488, - "name": "Identifier", - "src": "2854:18:1" - } - ], - "id": 489, - "name": "BinaryOperation", - "src": "2821:51:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6f6e6c79207468652063757272656e7420677561726469616e207365742063616e206368616e67652074686520677561726469616e20736574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"only the current guardian set can change the guardian set\"", - "value": "only the current guardian set can change the guardian set" - }, - "id": 490, - "name": "Literal", - "src": "2874:59:1" - } - ], - "id": 491, - "name": "FunctionCall", - "src": "2813:121:1" - } - ], - "id": 492, - "name": "ExpressionStatement", - "src": "2813:121:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 889, - "type": "function (bytes memory)", - "value": "vaaUpdateGuardianSet" - }, - "id": 493, - "name": "Identifier", - "src": "2948:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 494, - "name": "Identifier", - "src": "2969:10:1" - } - ], - "id": 495, - "name": "MemberAccess", - "src": "2969:18:1" - } - ], - "id": 496, - "name": "FunctionCall", - "src": "2948:40:1" - } - ], - "id": 497, - "name": "ExpressionStatement", - "src": "2948:40:1" - } - ], - "id": 498, - "name": "Block", - "src": "2799:200:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 499, - "name": "Identifier", - "src": "3009:10:1" - } - ], - "id": 500, - "name": "MemberAccess", - "src": "3009:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30783130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 16", - "value": "0x10" - }, - "id": 501, - "name": "Literal", - "src": "3030:4:1" - } - ], - "id": 502, - "name": "BinaryOperation", - "src": "3009:25:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1051, - "type": "function (bytes memory)", - "value": "vaaTransfer" - }, - "id": 503, - "name": "Identifier", - "src": "3050:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 504, - "name": "Identifier", - "src": "3062:10:1" - } - ], - "id": 505, - "name": "MemberAccess", - "src": "3062:18:1" - } - ], - "id": 506, - "name": "FunctionCall", - "src": "3050:31:1" - } - ], - "id": 507, - "name": "ExpressionStatement", - "src": "3050:31:1" - } - ], - "id": 508, - "name": "Block", - "src": "3036:56:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_27b2ea60c72d322d8c69062a768962688555c44551176a8b0389f506128d4a66", - "typeString": "literal_string \"invalid VAA action\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 509, - "name": "Identifier", - "src": "3112:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e76616c69642056414120616374696f6e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"invalid VAA action\"", - "value": "invalid VAA action" - }, - "id": 510, - "name": "Literal", - "src": "3119:20:1" - } - ], - "id": 511, - "name": "FunctionCall", - "src": "3112:28:1" - } - ], - "id": 512, - "name": "ExpressionStatement", - "src": "3112:28:1" - } - ], - "id": 513, - "name": "Block", - "src": "3098:53:1" - } - ], - "id": 514, - "name": "IfStatement", - "src": "3005:146:1" - } - ], - "id": 515, - "name": "IfStatement", - "src": "2768:383:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 420, - "type": "mapping(bytes32 => bool)", - "value": "consumedVAAs" - }, - "id": 516, - "name": "Identifier", - "src": "3196:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 476, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 517, - "name": "Identifier", - "src": "3209:10:1" - } - ], - "id": 518, - "name": "MemberAccess", - "src": "3209:15:1" - } - ], - "id": 519, - "name": "IndexAccess", - "src": "3196:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 520, - "name": "Literal", - "src": "3228:4:1" - } - ], - "id": 521, - "name": "Assignment", - "src": "3196:36:1" - } - ], - "id": 522, - "name": "ExpressionStatement", - "src": "3196:36:1" - } - ], - "id": 523, - "name": "Block", - "src": "2673:566:1" - } - ], - "id": 524, - "name": "FunctionDefinition", - "src": "2600:639:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "600b9aa6", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "parseAndVerifyVAA", - "overrides": null, - "scope": 1420, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "vaa", - "overrides": null, - "scope": 781, - "stateVariable": false, - "storageLocation": "calldata", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 525, - "name": "ElementaryTypeName", - "src": "3472:5:1" - } - ], - "id": 526, - "name": "VariableDeclaration", - "src": "3472:18:1" - } - ], - "id": 527, - "name": "ParameterList", - "src": "3471:20:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parsed_vaa", - "overrides": null, - "scope": 781, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.ParsedVAA", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "ParsedVAA", - "referencedDeclaration": 408, - "type": "struct Wormhole.ParsedVAA" - }, - "id": 528, - "name": "UserDefinedTypeName", - "src": "3513:9:1" - } - ], - "id": 529, - "name": "VariableDeclaration", - "src": "3513:27:1" - } - ], - "id": 530, - "name": "ParameterList", - "src": "3512:29:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "version", - "referencedDeclaration": 397, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 531, - "name": "Identifier", - "src": "3552:10:1" - } - ], - "id": 533, - "name": "MemberAccess", - "src": "3552:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 534, - "name": "Identifier", - "src": "3573:3:1" - } - ], - "id": 535, - "name": "MemberAccess", - "src": "3573:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 536, - "name": "Literal", - "src": "3585:1:1" - } - ], - "id": 537, - "name": "FunctionCall", - "src": "3573:14:1" - } - ], - "id": 538, - "name": "Assignment", - "src": "3552:35:1" - } - ], - "id": 539, - "name": "ExpressionStatement", - "src": "3552:35:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f94df49f756ee0c4605e9c5793f0e851f28a084ddaba07c34c32ea93810236a", - "typeString": "literal_string \"VAA version incompatible\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 540, - "name": "Identifier", - "src": "3597:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "version", - "referencedDeclaration": 397, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 541, - "name": "Identifier", - "src": "3605:10:1" - } - ], - "id": 542, - "name": "MemberAccess", - "src": "3605:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 543, - "name": "Literal", - "src": "3627:1:1" - } - ], - "id": 544, - "name": "BinaryOperation", - "src": "3605:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5641412076657273696f6e20696e636f6d70617469626c65", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA version incompatible\"", - "value": "VAA version incompatible" - }, - "id": 545, - "name": "Literal", - "src": "3630:26:1" - } - ], - "id": 546, - "name": "FunctionCall", - "src": "3597:60:1" - } - ], - "id": 547, - "name": "ExpressionStatement", - "src": "3597:60:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 548, - "name": "Identifier", - "src": "3714:10:1" - } - ], - "id": 550, - "name": "MemberAccess", - "src": "3714:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 551, - "name": "Identifier", - "src": "3746:3:1" - } - ], - "id": 552, - "name": "MemberAccess", - "src": "3746:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 553, - "name": "Literal", - "src": "3759:1:1" - } - ], - "id": 554, - "name": "FunctionCall", - "src": "3746:15:1" - } - ], - "id": 555, - "name": "Assignment", - "src": "3714:47:1" - } - ], - "id": 556, - "name": "ExpressionStatement", - "src": "3714:47:1" - }, - { - "attributes": { - "assignments": [558] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "len_signers", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 557, - "name": "ElementaryTypeName", - "src": "3772:7:1" - } - ], - "id": 558, - "name": "VariableDeclaration", - "src": "3772:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 559, - "name": "Identifier", - "src": "3794:3:1" - } - ], - "id": 560, - "name": "MemberAccess", - "src": "3794:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 561, - "name": "Literal", - "src": "3806:1:1" - } - ], - "id": 562, - "name": "FunctionCall", - "src": "3794:14:1" - } - ], - "id": 563, - "name": "VariableDeclarationStatement", - "src": "3772:36:1" - }, - { - "attributes": { - "assignments": [565] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offset", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 564, - "name": "ElementaryTypeName", - "src": "3818:4:1" - } - ], - "id": 565, - "name": "VariableDeclaration", - "src": "3818:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "36", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 6", - "value": "6" - }, - "id": 566, - "name": "Literal", - "src": "3832:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 567, - "name": "Literal", - "src": "3836:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 568, - "name": "Identifier", - "src": "3841:11:1" - } - ], - "id": 569, - "name": "BinaryOperation", - "src": "3836:16:1" - } - ], - "id": 570, - "name": "BinaryOperation", - "src": "3832:20:1" - } - ], - "id": 571, - "name": "VariableDeclarationStatement", - "src": "3818:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "timestamp", - "referencedDeclaration": 403, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 572, - "name": "Identifier", - "src": "3897:10:1" - } - ], - "id": 574, - "name": "MemberAccess", - "src": "3897:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 575, - "name": "Identifier", - "src": "3920:3:1" - } - ], - "id": 576, - "name": "MemberAccess", - "src": "3920:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 577, - "name": "Identifier", - "src": "3933:6:1" - } - ], - "id": 578, - "name": "FunctionCall", - "src": "3920:20:1" - } - ], - "id": 579, - "name": "Assignment", - "src": "3897:43:1" - } - ], - "id": 580, - "name": "ExpressionStatement", - "src": "3897:43:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 581, - "name": "Identifier", - "src": "3976:10:1" - } - ], - "id": 583, - "name": "MemberAccess", - "src": "3976:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -8, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "keccak256" - }, - "id": 584, - "name": "Identifier", - "src": "3994:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "slice", - "referencedDeclaration": 55, - "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 585, - "name": "Identifier", - "src": "4004:3:1" - } - ], - "id": 586, - "name": "MemberAccess", - "src": "4004:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 587, - "name": "Identifier", - "src": "4014:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 588, - "name": "Identifier", - "src": "4022:3:1" - } - ], - "id": 589, - "name": "MemberAccess", - "src": "4022:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 590, - "name": "Identifier", - "src": "4035:6:1" - } - ], - "id": 591, - "name": "BinaryOperation", - "src": "4022:19:1" - } - ], - "id": 592, - "name": "FunctionCall", - "src": "4004:38:1" - } - ], - "id": 593, - "name": "FunctionCall", - "src": "3994:49:1" - } - ], - "id": 594, - "name": "Assignment", - "src": "3976:67:1" - } - ], - "id": 595, - "name": "ExpressionStatement", - "src": "3976:67:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c9f12104d534b328038b37a96c0a685f6c00604447c9f6b300f1a21a9a56028", - "typeString": "literal_string \"VAA was already executed\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 596, - "name": "Identifier", - "src": "4053:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 420, - "type": "mapping(bytes32 => bool)", - "value": "consumedVAAs" - }, - "id": 597, - "name": "Identifier", - "src": "4062:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 598, - "name": "Identifier", - "src": "4075:10:1" - } - ], - "id": 599, - "name": "MemberAccess", - "src": "4075:15:1" - } - ], - "id": 600, - "name": "IndexAccess", - "src": "4062:29:1" - } - ], - "id": 601, - "name": "UnaryOperation", - "src": "4061:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5641412077617320616c7265616479206578656375746564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA was already executed\"", - "value": "VAA was already executed" - }, - "id": 602, - "name": "Literal", - "src": "4093:26:1" - } - ], - "id": 603, - "name": "FunctionCall", - "src": "4053:67:1" - } - ], - "id": 604, - "name": "ExpressionStatement", - "src": "4053:67:1" - }, - { - "attributes": { - "assignments": [606] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "guardian_set", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 605, - "name": "UserDefinedTypeName", - "src": "4131:11:1" - } - ], - "id": 606, - "name": "VariableDeclaration", - "src": "4131:31:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 607, - "name": "Identifier", - "src": "4165:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "guardian_set_index", - "referencedDeclaration": 401, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 608, - "name": "Identifier", - "src": "4179:10:1" - } - ], - "id": 609, - "name": "MemberAccess", - "src": "4179:29:1" - } - ], - "id": 610, - "name": "IndexAccess", - "src": "4165:44:1" - } - ], - "id": 611, - "name": "VariableDeclarationStatement", - "src": "4131:78:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef4d0f2354b2279f26c4ba4477a0c338dcdd31fbb9caa6ef52ec7856b55556f3", - "typeString": "literal_string \"invalid guardian set\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 612, - "name": "Identifier", - "src": "4219:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 613, - "name": "Identifier", - "src": "4227:12:1" - } - ], - "id": 614, - "name": "MemberAccess", - "src": "4227:17:1" - } - ], - "id": 615, - "name": "MemberAccess", - "src": "4227:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 616, - "name": "Literal", - "src": "4254:1:1" - } - ], - "id": 617, - "name": "BinaryOperation", - "src": "4227:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e76616c696420677561726469616e20736574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"invalid guardian set\"", - "value": "invalid guardian set" - }, - "id": 618, - "name": "Literal", - "src": "4257:22:1" - } - ], - "id": 619, - "name": "FunctionCall", - "src": "4219:61:1" - } - ], - "id": 620, - "name": "ExpressionStatement", - "src": "4219:61:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbe80c778d9be5c7f6d0de415ae854de0cf9a58da1d3e65a9d672ad42a10aaf1", - "typeString": "literal_string \"guardian set has expired\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 621, - "name": "Identifier", - "src": "4290:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "||", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 622, - "name": "Identifier", - "src": "4298:12:1" - } - ], - "id": 623, - "name": "MemberAccess", - "src": "4298:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 624, - "name": "Literal", - "src": "4330:1:1" - } - ], - "id": 625, - "name": "BinaryOperation", - "src": "4298:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 626, - "name": "Identifier", - "src": "4335:12:1" - } - ], - "id": 627, - "name": "MemberAccess", - "src": "4335:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 628, - "name": "Identifier", - "src": "4366:5:1" - } - ], - "id": 629, - "name": "MemberAccess", - "src": "4366:15:1" - } - ], - "id": 630, - "name": "BinaryOperation", - "src": "4335:46:1" - } - ], - "id": 631, - "name": "BinaryOperation", - "src": "4298:83:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "677561726469616e20736574206861732065787069726564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"guardian set has expired\"", - "value": "guardian set has expired" - }, - "id": 632, - "name": "Literal", - "src": "4383:26:1" - } - ], - "id": 633, - "name": "FunctionCall", - "src": "4290:120:1" - } - ], - "id": 634, - "name": "ExpressionStatement", - "src": "4290:120:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b18d2210a58b70fe2b7fd0e0f29d90614b1c4f3f5d8dbb518559998f90306fcb", - "typeString": "literal_string \"no quorum\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 635, - "name": "Identifier", - "src": "4517:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 636, - "name": "Identifier", - "src": "4527:12:1" - } - ], - "id": 637, - "name": "MemberAccess", - "src": "4527:17:1" - } - ], - "id": 638, - "name": "MemberAccess", - "src": "4527:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 639, - "name": "Literal", - "src": "4554:2:1" - } - ], - "id": 640, - "name": "BinaryOperation", - "src": "4527:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "33", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 3", - "value": "3" - }, - "id": 641, - "name": "Literal", - "src": "4559:1:1" - } - ], - "id": 642, - "name": "BinaryOperation", - "src": "4527:33:1" - } - ], - "id": 643, - "name": "TupleExpression", - "src": "4526:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 644, - "name": "Literal", - "src": "4564:1:1" - } - ], - "id": 645, - "name": "BinaryOperation", - "src": "4526:39:1" - } - ], - "id": 646, - "name": "TupleExpression", - "src": "4525:41:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 647, - "name": "Literal", - "src": "4569:2:1" - } - ], - "id": 648, - "name": "BinaryOperation", - "src": "4525:46:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 649, - "name": "Literal", - "src": "4574:1:1" - } - ], - "id": 650, - "name": "BinaryOperation", - "src": "4525:50:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 651, - "name": "Identifier", - "src": "4579:11:1" - } - ], - "id": 652, - "name": "BinaryOperation", - "src": "4525:65:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6e6f2071756f72756d", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"no quorum\"", - "value": "no quorum" - }, - "id": 653, - "name": "Literal", - "src": "4592:11:1" - } - ], - "id": 654, - "name": "FunctionCall", - "src": "4517:87:1" - } - ], - "id": 655, - "name": "ExpressionStatement", - "src": "4517:87:1" - }, - { - "attributes": { - "assignments": [657] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "last_index", - "overrides": null, - "scope": 780, - "stateVariable": false, - "storageLocation": "default", - "type": "int16", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "int16", - "type": "int16" - }, - "id": 656, - "name": "ElementaryTypeName", - "src": "4615:5:1" - } - ], - "id": 657, - "name": "VariableDeclaration", - "src": "4615:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "-", - "prefix": true, - "type": "int_const -1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 658, - "name": "Literal", - "src": "4636:1:1" - } - ], - "id": 659, - "name": "UnaryOperation", - "src": "4634:3:1" - } - ], - "id": 660, - "name": "VariableDeclarationStatement", - "src": "4615:22:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [662] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "i", - "overrides": null, - "scope": 750, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 661, - "name": "ElementaryTypeName", - "src": "4652:4:1" - } - ], - "id": 662, - "name": "VariableDeclaration", - "src": "4652:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 663, - "name": "Literal", - "src": "4661:1:1" - } - ], - "id": 664, - "name": "VariableDeclarationStatement", - "src": "4652:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 665, - "name": "Identifier", - "src": "4664:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 558, - "type": "uint256", - "value": "len_signers" - }, - "id": 666, - "name": "Identifier", - "src": "4668:11:1" - } - ], - "id": 667, - "name": "BinaryOperation", - "src": "4664:15:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 668, - "name": "Identifier", - "src": "4681:1:1" - } - ], - "id": 669, - "name": "UnaryOperation", - "src": "4681:3:1" - } - ], - "id": 670, - "name": "ExpressionStatement", - "src": "4681:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [672] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "index", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 671, - "name": "ElementaryTypeName", - "src": "4700:5:1" - } - ], - "id": 672, - "name": "VariableDeclaration", - "src": "4700:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 673, - "name": "Identifier", - "src": "4714:3:1" - } - ], - "id": 674, - "name": "MemberAccess", - "src": "4714:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "36", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 6", - "value": "6" - }, - "id": 675, - "name": "Literal", - "src": "4726:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 676, - "name": "Identifier", - "src": "4730:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 677, - "name": "Literal", - "src": "4734:2:1" - } - ], - "id": 678, - "name": "BinaryOperation", - "src": "4730:6:1" - } - ], - "id": 679, - "name": "BinaryOperation", - "src": "4726:10:1" - } - ], - "id": 680, - "name": "FunctionCall", - "src": "4714:23:1" - } - ], - "id": 681, - "name": "VariableDeclarationStatement", - "src": "4700:37:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de9ff8e5647eeed7691d313f96ed0065761ad2da429d76b3b7868b564890def8", - "typeString": "literal_string \"signature indices must be ascending\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 682, - "name": "Identifier", - "src": "4751:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int16", - "typeString": "int16" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 683, - "name": "Identifier", - "src": "4759:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 657, - "type": "int16", - "value": "last_index" - }, - "id": 684, - "name": "Identifier", - "src": "4767:10:1" - } - ], - "id": 685, - "name": "BinaryOperation", - "src": "4759:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7369676e617475726520696e6469636573206d75737420626520617363656e64696e67", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"signature indices must be ascending\"", - "value": "signature indices must be ascending" - }, - "id": 686, - "name": "Literal", - "src": "4779:37:1" - } - ], - "id": 687, - "name": "FunctionCall", - "src": "4751:66:1" - } - ], - "id": 688, - "name": "ExpressionStatement", - "src": "4751:66:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "int16" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 657, - "type": "int16", - "value": "last_index" - }, - "id": 689, - "name": "Identifier", - "src": "4831:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "int16", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(int16)" - }, - "children": [ - { - "attributes": { - "name": "int16", - "type": null - }, - "id": 690, - "name": "ElementaryTypeName", - "src": "4844:5:1" - } - ], - "id": 691, - "name": "ElementaryTypeNameExpression", - "src": "4844:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 692, - "name": "Identifier", - "src": "4850:5:1" - } - ], - "id": 693, - "name": "FunctionCall", - "src": "4844:12:1" - } - ], - "id": 694, - "name": "Assignment", - "src": "4831:25:1" - } - ], - "id": 695, - "name": "ExpressionStatement", - "src": "4831:25:1" - }, - { - "attributes": { - "assignments": [697] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "r", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 696, - "name": "ElementaryTypeName", - "src": "4871:7:1" - } - ], - "id": 697, - "name": "VariableDeclaration", - "src": "4871:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 698, - "name": "Identifier", - "src": "4883:3:1" - } - ], - "id": 699, - "name": "MemberAccess", - "src": "4883:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "37", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 7", - "value": "7" - }, - "id": 700, - "name": "Literal", - "src": "4897:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 701, - "name": "Identifier", - "src": "4901:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 702, - "name": "Literal", - "src": "4905:2:1" - } - ], - "id": 703, - "name": "BinaryOperation", - "src": "4901:6:1" - } - ], - "id": 704, - "name": "BinaryOperation", - "src": "4897:10:1" - } - ], - "id": 705, - "name": "FunctionCall", - "src": "4883:25:1" - } - ], - "id": 706, - "name": "VariableDeclarationStatement", - "src": "4871:37:1" - }, - { - "attributes": { - "assignments": [708] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "s", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 707, - "name": "ElementaryTypeName", - "src": "4922:7:1" - } - ], - "id": 708, - "name": "VariableDeclaration", - "src": "4922:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 709, - "name": "Identifier", - "src": "4934:3:1" - } - ], - "id": 710, - "name": "MemberAccess", - "src": "4934:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3339", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 39", - "value": "39" - }, - "id": 711, - "name": "Literal", - "src": "4948:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 712, - "name": "Identifier", - "src": "4953:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 713, - "name": "Literal", - "src": "4957:2:1" - } - ], - "id": 714, - "name": "BinaryOperation", - "src": "4953:6:1" - } - ], - "id": 715, - "name": "BinaryOperation", - "src": "4948:11:1" - } - ], - "id": 716, - "name": "FunctionCall", - "src": "4934:26:1" - } - ], - "id": 717, - "name": "VariableDeclarationStatement", - "src": "4922:38:1" - }, - { - "attributes": { - "assignments": [719] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "v", - "overrides": null, - "scope": 749, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 718, - "name": "ElementaryTypeName", - "src": "4974:5:1" - } - ], - "id": 719, - "name": "VariableDeclaration", - "src": "4974:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 720, - "name": "Identifier", - "src": "4984:3:1" - } - ], - "id": 721, - "name": "MemberAccess", - "src": "4984:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 722, - "name": "Literal", - "src": "4996:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 662, - "type": "uint256", - "value": "i" - }, - "id": 723, - "name": "Identifier", - "src": "5001:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3636", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 66", - "value": "66" - }, - "id": 724, - "name": "Literal", - "src": "5005:2:1" - } - ], - "id": 725, - "name": "BinaryOperation", - "src": "5001:6:1" - } - ], - "id": 726, - "name": "BinaryOperation", - "src": "4996:11:1" - } - ], - "id": 727, - "name": "FunctionCall", - "src": "4984:24:1" - } - ], - "id": 728, - "name": "VariableDeclarationStatement", - "src": "4974:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 719, - "type": "uint8", - "value": "v" - }, - "id": 729, - "name": "Identifier", - "src": "5022:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3237", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 27", - "value": "27" - }, - "id": 730, - "name": "Literal", - "src": "5027:2:1" - } - ], - "id": 731, - "name": "Assignment", - "src": "5022:7:1" - } - ], - "id": 732, - "name": "ExpressionStatement", - "src": "5022:7:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_862afa71aa5d7cd3e53f61178438850df5cce8f1009ff0681521493b85052621", - "typeString": "literal_string \"VAA signature invalid\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 733, - "name": "Identifier", - "src": "5043:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -6, - "type": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)", - "value": "ecrecover" - }, - "id": 734, - "name": "Identifier", - "src": "5051:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "hash", - "referencedDeclaration": 399, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 735, - "name": "Identifier", - "src": "5061:10:1" - } - ], - "id": 736, - "name": "MemberAccess", - "src": "5061:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 719, - "type": "uint8", - "value": "v" - }, - "id": 737, - "name": "Identifier", - "src": "5078:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 697, - "type": "bytes32", - "value": "r" - }, - "id": 738, - "name": "Identifier", - "src": "5081:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "s" - }, - "id": 739, - "name": "Identifier", - "src": "5084:1:1" - } - ], - "id": 740, - "name": "FunctionCall", - "src": "5051:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "member_name": "keys", - "referencedDeclaration": 368, - "type": "address[] memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 606, - "type": "struct Wormhole.GuardianSet memory", - "value": "guardian_set" - }, - "id": 741, - "name": "Identifier", - "src": "5090:12:1" - } - ], - "id": 742, - "name": "MemberAccess", - "src": "5090:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 672, - "type": "uint8", - "value": "index" - }, - "id": 743, - "name": "Identifier", - "src": "5108:5:1" - } - ], - "id": 744, - "name": "IndexAccess", - "src": "5090:24:1" - } - ], - "id": 745, - "name": "BinaryOperation", - "src": "5051:63:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "564141207369676e617475726520696e76616c6964", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"VAA signature invalid\"", - "value": "VAA signature invalid" - }, - "id": 746, - "name": "Literal", - "src": "5116:23:1" - } - ], - "id": 747, - "name": "FunctionCall", - "src": "5043:97:1" - } - ], - "id": 748, - "name": "ExpressionStatement", - "src": "5043:97:1" - } - ], - "id": 749, - "name": "Block", - "src": "4686:465:1" - } - ], - "id": 750, - "name": "ForStatement", - "src": "4647:504:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "action", - "referencedDeclaration": 405, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 751, - "name": "Identifier", - "src": "5161:10:1" - } - ], - "id": 753, - "name": "MemberAccess", - "src": "5161:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 754, - "name": "Identifier", - "src": "5181:3:1" - } - ], - "id": 755, - "name": "MemberAccess", - "src": "5181:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 756, - "name": "Identifier", - "src": "5193:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 757, - "name": "Literal", - "src": "5202:1:1" - } - ], - "id": 758, - "name": "BinaryOperation", - "src": "5193:10:1" - } - ], - "id": 759, - "name": "FunctionCall", - "src": "5181:23:1" - } - ], - "id": 760, - "name": "Assignment", - "src": "5161:43:1" - } - ], - "id": 761, - "name": "ExpressionStatement", - "src": "5161:43:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "payload", - "referencedDeclaration": 407, - "type": "bytes memory" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 529, - "type": "struct Wormhole.ParsedVAA memory", - "value": "parsed_vaa" - }, - "id": 762, - "name": "Identifier", - "src": "5214:10:1" - } - ], - "id": 764, - "name": "MemberAccess", - "src": "5214:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "slice", - "referencedDeclaration": 55, - "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 765, - "name": "Identifier", - "src": "5235:3:1" - } - ], - "id": 766, - "name": "MemberAccess", - "src": "5235:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 767, - "name": "Identifier", - "src": "5245:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 768, - "name": "Literal", - "src": "5254:1:1" - } - ], - "id": 769, - "name": "BinaryOperation", - "src": "5245:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 526, - "type": "bytes calldata", - "value": "vaa" - }, - "id": 770, - "name": "Identifier", - "src": "5257:3:1" - } - ], - "id": 771, - "name": "MemberAccess", - "src": "5257:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 565, - "type": "uint256", - "value": "offset" - }, - "id": 772, - "name": "Identifier", - "src": "5271:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 773, - "name": "Literal", - "src": "5280:1:1" - } - ], - "id": 774, - "name": "BinaryOperation", - "src": "5271:10:1" - } - ], - "id": 775, - "name": "TupleExpression", - "src": "5270:12:1" - } - ], - "id": 776, - "name": "BinaryOperation", - "src": "5257:25:1" - } - ], - "id": 777, - "name": "FunctionCall", - "src": "5235:48:1" - } - ], - "id": 778, - "name": "Assignment", - "src": "5214:69:1" - } - ], - "id": 779, - "name": "ExpressionStatement", - "src": "5214:69:1" - } - ], - "id": 780, - "name": "Block", - "src": "3542:1748:1" - } - ], - "id": 781, - "name": "FunctionDefinition", - "src": "3445:1845:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "vaaUpdateGuardianSet", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 889, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 782, - "name": "ElementaryTypeName", - "src": "5326:5:1" - } - ], - "id": 783, - "name": "VariableDeclaration", - "src": "5326:17:1" - } - ], - "id": 784, - "name": "ParameterList", - "src": "5325:19:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 785, - "name": "ParameterList", - "src": "5353:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [787] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardian_set_index", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 786, - "name": "ElementaryTypeName", - "src": "5363:6:1" - } - ], - "id": 787, - "name": "VariableDeclaration", - "src": "5363:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint32", - "referencedDeclaration": 163, - "type": "function (bytes memory,uint256) pure returns (uint32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 788, - "name": "Identifier", - "src": "5395:4:1" - } - ], - "id": 789, - "name": "MemberAccess", - "src": "5395:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 790, - "name": "Literal", - "src": "5409:1:1" - } - ], - "id": 791, - "name": "FunctionCall", - "src": "5395:16:1" - } - ], - "id": 792, - "name": "VariableDeclarationStatement", - "src": "5363:48:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a9c35350c4790f34190b54478b12348e0cbd9c4c717b5d4a6ca5709d71c4f33d", - "typeString": "literal_string \"index must increase in steps of 1\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 793, - "name": "Identifier", - "src": "5421:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 787, - "type": "uint32", - "value": "new_guardian_set_index" - }, - "id": 794, - "name": "Identifier", - "src": "5429:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 795, - "name": "Identifier", - "src": "5455:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 796, - "name": "Literal", - "src": "5476:1:1" - } - ], - "id": 797, - "name": "BinaryOperation", - "src": "5455:22:1" - } - ], - "id": 798, - "name": "BinaryOperation", - "src": "5429:48:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "696e646578206d75737420696e63726561736520696e207374657073206f662031", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"index must increase in steps of 1\"", - "value": "index must increase in steps of 1" - }, - "id": 799, - "name": "Literal", - "src": "5479:35:1" - } - ], - "id": 800, - "name": "FunctionCall", - "src": "5421:94:1" - } - ], - "id": 801, - "name": "ExpressionStatement", - "src": "5421:94:1" - }, - { - "attributes": { - "assignments": [803] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "len", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 802, - "name": "ElementaryTypeName", - "src": "5525:5:1" - } - ], - "id": 803, - "name": "VariableDeclaration", - "src": "5525:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 804, - "name": "Identifier", - "src": "5537:4:1" - } - ], - "id": 805, - "name": "MemberAccess", - "src": "5537:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 806, - "name": "Literal", - "src": "5550:1:1" - } - ], - "id": 807, - "name": "FunctionCall", - "src": "5537:15:1" - } - ], - "id": 808, - "name": "VariableDeclarationStatement", - "src": "5525:27:1" - }, - { - "attributes": { - "assignments": [813] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardians", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "memory", - "type": "address[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 811, - "name": "ElementaryTypeName", - "src": "5563:7:1" - } - ], - "id": 812, - "name": "ArrayTypeName", - "src": "5563:9:1" - } - ], - "id": 813, - "name": "VariableDeclaration", - "src": "5563:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address[] memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "function (uint256) pure returns (address[] memory)" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "address[]" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 814, - "name": "ElementaryTypeName", - "src": "5600:7:1" - } - ], - "id": 815, - "name": "ArrayTypeName", - "src": "5600:9:1" - } - ], - "id": 816, - "name": "NewExpression", - "src": "5596:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 803, - "type": "uint8", - "value": "len" - }, - "id": 817, - "name": "Identifier", - "src": "5610:3:1" - } - ], - "id": 818, - "name": "FunctionCall", - "src": "5596:18:1" - } - ], - "id": 819, - "name": "VariableDeclarationStatement", - "src": "5563:51:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [821] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "i", - "overrides": null, - "scope": 848, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 820, - "name": "ElementaryTypeName", - "src": "5629:4:1" - } - ], - "id": 821, - "name": "VariableDeclaration", - "src": "5629:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 822, - "name": "Literal", - "src": "5638:1:1" - } - ], - "id": 823, - "name": "VariableDeclarationStatement", - "src": "5629:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 824, - "name": "Identifier", - "src": "5641:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 803, - "type": "uint8", - "value": "len" - }, - "id": 825, - "name": "Identifier", - "src": "5645:3:1" - } - ], - "id": 826, - "name": "BinaryOperation", - "src": "5641:7:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 827, - "name": "Identifier", - "src": "5650:1:1" - } - ], - "id": 828, - "name": "UnaryOperation", - "src": "5650:3:1" - } - ], - "id": 829, - "name": "ExpressionStatement", - "src": "5650:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [831] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "addr", - "overrides": null, - "scope": 847, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 830, - "name": "ElementaryTypeName", - "src": "5669:7:1" - } - ], - "id": 831, - "name": "VariableDeclaration", - "src": "5669:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 783, - "type": "bytes memory", - "value": "data" - }, - "id": 832, - "name": "Identifier", - "src": "5684:4:1" - } - ], - "id": 833, - "name": "MemberAccess", - "src": "5684:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 834, - "name": "Literal", - "src": "5699:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 835, - "name": "Identifier", - "src": "5703:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3230", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 20", - "value": "20" - }, - "id": 836, - "name": "Literal", - "src": "5707:2:1" - } - ], - "id": 837, - "name": "BinaryOperation", - "src": "5703:6:1" - } - ], - "id": 838, - "name": "BinaryOperation", - "src": "5699:10:1" - } - ], - "id": 839, - "name": "FunctionCall", - "src": "5684:26:1" - } - ], - "id": 840, - "name": "VariableDeclarationStatement", - "src": "5669:41:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 813, - "type": "address[] memory", - "value": "new_guardians" - }, - "id": 841, - "name": "Identifier", - "src": "5724:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 821, - "type": "uint256", - "value": "i" - }, - "id": 842, - "name": "Identifier", - "src": "5738:1:1" - } - ], - "id": 843, - "name": "IndexAccess", - "src": "5724:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 831, - "type": "address", - "value": "addr" - }, - "id": 844, - "name": "Identifier", - "src": "5743:4:1" - } - ], - "id": 845, - "name": "Assignment", - "src": "5724:23:1" - } - ], - "id": 846, - "name": "ExpressionStatement", - "src": "5724:23:1" - } - ], - "id": 847, - "name": "Block", - "src": "5655:103:1" - } - ], - "id": 848, - "name": "ForStatement", - "src": "5624:134:1" - }, - { - "attributes": { - "assignments": [850] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "old_guardian_set_index", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 849, - "name": "ElementaryTypeName", - "src": "5768:6:1" - } - ], - "id": 850, - "name": "VariableDeclaration", - "src": "5768:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 851, - "name": "Identifier", - "src": "5800:18:1" - } - ], - "id": 852, - "name": "VariableDeclarationStatement", - "src": "5768:50:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 853, - "name": "Identifier", - "src": "5828:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 787, - "type": "uint32", - "value": "new_guardian_set_index" - }, - "id": 854, - "name": "Identifier", - "src": "5849:22:1" - } - ], - "id": 855, - "name": "Assignment", - "src": "5828:43:1" - } - ], - "id": 856, - "name": "ExpressionStatement", - "src": "5828:43:1" - }, - { - "attributes": { - "assignments": [858] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "new_guardian_set", - "overrides": null, - "scope": 888, - "stateVariable": false, - "storageLocation": "memory", - "type": "struct Wormhole.GuardianSet", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "GuardianSet", - "referencedDeclaration": 371, - "type": "struct Wormhole.GuardianSet" - }, - "id": 857, - "name": "UserDefinedTypeName", - "src": "5882:11:1" - } - ], - "id": 858, - "name": "VariableDeclaration", - "src": "5882:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": true, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "struct Wormhole.GuardianSet memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 371, - "type": "type(struct Wormhole.GuardianSet storage pointer)", - "value": "GuardianSet" - }, - "id": 859, - "name": "Identifier", - "src": "5920:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 813, - "type": "address[] memory", - "value": "new_guardians" - }, - "id": 860, - "name": "Identifier", - "src": "5932:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 861, - "name": "Literal", - "src": "5947:1:1" - } - ], - "id": 862, - "name": "FunctionCall", - "src": "5920:29:1" - } - ], - "id": 863, - "name": "VariableDeclarationStatement", - "src": "5882:67:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 864, - "name": "Identifier", - "src": "5959:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 865, - "name": "Identifier", - "src": "5973:18:1" - } - ], - "id": 866, - "name": "IndexAccess", - "src": "5959:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 858, - "type": "struct Wormhole.GuardianSet memory", - "value": "new_guardian_set" - }, - "id": 867, - "name": "Identifier", - "src": "5995:16:1" - } - ], - "id": 868, - "name": "Assignment", - "src": "5959:52:1" - } - ], - "id": 869, - "name": "ExpressionStatement", - "src": "5959:52:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "member_name": "expiration_time", - "referencedDeclaration": 370, - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "struct Wormhole.GuardianSet storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 412, - "type": "mapping(uint32 => struct Wormhole.GuardianSet storage ref)", - "value": "guardian_sets" - }, - "id": 870, - "name": "Identifier", - "src": "6021:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 850, - "type": "uint32", - "value": "old_guardian_set_index" - }, - "id": 871, - "name": "Identifier", - "src": "6035:22:1" - } - ], - "id": 872, - "name": "IndexAccess", - "src": "6021:37:1" - } - ], - "id": 873, - "name": "MemberAccess", - "src": "6021:53:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint32)" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": null - }, - "id": 874, - "name": "ElementaryTypeName", - "src": "6077:6:1" - } - ], - "id": 875, - "name": "ElementaryTypeNameExpression", - "src": "6077:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "timestamp", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -4, - "type": "block", - "value": "block" - }, - "id": 876, - "name": "Identifier", - "src": "6084:5:1" - } - ], - "id": 877, - "name": "MemberAccess", - "src": "6084:15:1" - } - ], - "id": 878, - "name": "FunctionCall", - "src": "6077:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 416, - "type": "uint32", - "value": "guardian_set_expirity" - }, - "id": 879, - "name": "Identifier", - "src": "6103:21:1" - } - ], - "id": 880, - "name": "BinaryOperation", - "src": "6077:47:1" - } - ], - "id": 881, - "name": "Assignment", - "src": "6021:103:1" - } - ], - "id": 882, - "name": "ExpressionStatement", - "src": "6021:103:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 377, - "type": "function (uint32,uint32)", - "value": "LogGuardianSetChanged" - }, - "id": 883, - "name": "Identifier", - "src": "6140:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 850, - "type": "uint32", - "value": "old_guardian_set_index" - }, - "id": 884, - "name": "Identifier", - "src": "6162:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 414, - "type": "uint32", - "value": "guardian_set_index" - }, - "id": 885, - "name": "Identifier", - "src": "6186:18:1" - } - ], - "id": 886, - "name": "FunctionCall", - "src": "6140:65:1" - } - ], - "id": 887, - "name": "EmitStatement", - "src": "6135:70:1" - } - ], - "id": 888, - "name": "Block", - "src": "5353:859:1" - } - ], - "id": 889, - "name": "FunctionDefinition", - "src": "5296:916:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "vaaTransfer", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 1051, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 890, - "name": "ElementaryTypeName", - "src": "6239:5:1" - } - ], - "id": 891, - "name": "VariableDeclaration", - "src": "6239:17:1" - } - ], - "id": 892, - "name": "ParameterList", - "src": "6238:19:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 893, - "name": "ParameterList", - "src": "6266:0:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [895] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "source_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 894, - "name": "ElementaryTypeName", - "src": "6319:5:1" - } - ], - "id": 895, - "name": "VariableDeclaration", - "src": "6319:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 896, - "name": "Identifier", - "src": "6340:4:1" - } - ], - "id": 897, - "name": "MemberAccess", - "src": "6340:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 898, - "name": "Literal", - "src": "6353:1:1" - } - ], - "id": 899, - "name": "FunctionCall", - "src": "6340:15:1" - } - ], - "id": 900, - "name": "VariableDeclarationStatement", - "src": "6319:36:1" - }, - { - "attributes": { - "assignments": [902] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 901, - "name": "ElementaryTypeName", - "src": "6366:5:1" - } - ], - "id": 902, - "name": "VariableDeclaration", - "src": "6366:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 903, - "name": "Identifier", - "src": "6387:4:1" - } - ], - "id": 904, - "name": "MemberAccess", - "src": "6387:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "35", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 5", - "value": "5" - }, - "id": 905, - "name": "Literal", - "src": "6400:1:1" - } - ], - "id": 906, - "name": "FunctionCall", - "src": "6387:15:1" - } - ], - "id": 907, - "name": "VariableDeclarationStatement", - "src": "6366:36:1" - }, - { - "attributes": { - "assignments": [909] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_address", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 908, - "name": "ElementaryTypeName", - "src": "6521:7:1" - } - ], - "id": 909, - "name": "VariableDeclaration", - "src": "6521:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 910, - "name": "Identifier", - "src": "6546:4:1" - } - ], - "id": 911, - "name": "MemberAccess", - "src": "6546:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "+", - "type": "int_const 50" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3338", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 38", - "value": "38" - }, - "id": 912, - "name": "Literal", - "src": "6561:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3132", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 12", - "value": "12" - }, - "id": 913, - "name": "Literal", - "src": "6566:2:1" - } - ], - "id": 914, - "name": "BinaryOperation", - "src": "6561:7:1" - } - ], - "id": 915, - "name": "FunctionCall", - "src": "6546:23:1" - } - ], - "id": 916, - "name": "VariableDeclarationStatement", - "src": "6521:48:1" - }, - { - "attributes": { - "assignments": [918] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 917, - "name": "ElementaryTypeName", - "src": "6580:5:1" - } - ], - "id": 918, - "name": "VariableDeclaration", - "src": "6580:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_70_by_1", - "typeString": "int_const 70" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 919, - "name": "Identifier", - "src": "6600:4:1" - } - ], - "id": 920, - "name": "MemberAccess", - "src": "6600:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3730", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 70", - "value": "70" - }, - "id": 921, - "name": "Literal", - "src": "6613:2:1" - } - ], - "id": 922, - "name": "FunctionCall", - "src": "6600:16:1" - } - ], - "id": 923, - "name": "VariableDeclarationStatement", - "src": "6580:36:1" - }, - { - "attributes": { - "assignments": [925] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1050, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 924, - "name": "ElementaryTypeName", - "src": "6680:7:1" - } - ], - "id": 925, - "name": "VariableDeclaration", - "src": "6680:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_104_by_1", - "typeString": "int_const 104" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint256", - "referencedDeclaration": 271, - "type": "function (bytes memory,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 926, - "name": "Identifier", - "src": "6697:4:1" - } - ], - "id": 927, - "name": "MemberAccess", - "src": "6697:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "313034", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 104", - "value": "104" - }, - "id": 928, - "name": "Literal", - "src": "6712:3:1" - } - ], - "id": 929, - "name": "FunctionCall", - "src": "6697:19:1" - } - ], - "id": 930, - "name": "VariableDeclarationStatement", - "src": "6680:36:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4bc00dc2f1f687d1ecd0a604d39e62ed5081a3cef70cb858e5f565f9bb7da23", - "typeString": "literal_string \"same chain transfers are not supported\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 931, - "name": "Identifier", - "src": "6727:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 895, - "type": "uint8", - "value": "source_chain" - }, - "id": 932, - "name": "Identifier", - "src": "6735:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 902, - "type": "uint8", - "value": "target_chain" - }, - "id": 933, - "name": "Identifier", - "src": "6751:12:1" - } - ], - "id": 934, - "name": "BinaryOperation", - "src": "6735:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "73616d6520636861696e207472616e736665727320617265206e6f7420737570706f72746564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"same chain transfers are not supported\"", - "value": "same chain transfers are not supported" - }, - "id": 935, - "name": "Literal", - "src": "6765:40:1" - } - ], - "id": 936, - "name": "FunctionCall", - "src": "6727:79:1" - } - ], - "id": 937, - "name": "ExpressionStatement", - "src": "6727:79:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cbd36b1271ec4677f9b6b0ce3c590e298ab53454b431f3898527107beeed1a5a", - "typeString": "literal_string \"transfer must be incoming\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 938, - "name": "Identifier", - "src": "6816:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 902, - "type": "uint8", - "value": "target_chain" - }, - "id": 939, - "name": "Identifier", - "src": "6824:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 940, - "name": "Identifier", - "src": "6840:8:1" - } - ], - "id": 941, - "name": "BinaryOperation", - "src": "6824:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472616e73666572206d75737420626520696e636f6d696e67", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"transfer must be incoming\"", - "value": "transfer must be incoming" - }, - "id": 942, - "name": "Literal", - "src": "6850:27:1" - } - ], - "id": 943, - "name": "FunctionCall", - "src": "6816:62:1" - } - ], - "id": 944, - "name": "ExpressionStatement", - "src": "6816:62:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 945, - "name": "Identifier", - "src": "6893:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 946, - "name": "Identifier", - "src": "6908:8:1" - } - ], - "id": 947, - "name": "BinaryOperation", - "src": "6893:23:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [949] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 948, - "name": "ElementaryTypeName", - "src": "6932:7:1" - } - ], - "id": 949, - "name": "VariableDeclaration", - "src": "6932:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_71_by_1", - "typeString": "int_const 71" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toBytes32", - "referencedDeclaration": 298, - "type": "function (bytes memory,uint256) pure returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 950, - "name": "Identifier", - "src": "6956:4:1" - } - ], - "id": 951, - "name": "MemberAccess", - "src": "6956:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 952, - "name": "Literal", - "src": "6971:2:1" - } - ], - "id": 953, - "name": "FunctionCall", - "src": "6956:18:1" - } - ], - "id": 954, - "name": "VariableDeclarationStatement", - "src": "6932:42:1" - }, - { - "attributes": { - "assignments": [956] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_id", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 955, - "name": "ElementaryTypeName", - "src": "6988:7:1" - } - ], - "id": 956, - "name": "VariableDeclaration", - "src": "6988:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": -8, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "keccak256" - }, - "id": 957, - "name": "Identifier", - "src": "7007:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodePacked", - "referencedDeclaration": null, - "type": "function () pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 958, - "name": "Identifier", - "src": "7017:3:1" - } - ], - "id": 959, - "name": "MemberAccess", - "src": "7017:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 960, - "name": "Identifier", - "src": "7034:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 949, - "type": "bytes32", - "value": "token_address" - }, - "id": 961, - "name": "Identifier", - "src": "7047:13:1" - } - ], - "id": 962, - "name": "FunctionCall", - "src": "7017:44:1" - } - ], - "id": 963, - "name": "FunctionCall", - "src": "7007:55:1" - } - ], - "id": 964, - "name": "VariableDeclarationStatement", - "src": "6988:74:1" - }, - { - "attributes": { - "assignments": [966] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "wrapped_asset", - "overrides": null, - "scope": 1003, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 965, - "name": "ElementaryTypeName", - "src": "7154:7:1" - } - ], - "id": 966, - "name": "VariableDeclaration", - "src": "7154:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 424, - "type": "mapping(bytes32 => address)", - "value": "wrappedAssets" - }, - "id": 967, - "name": "Identifier", - "src": "7178:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 956, - "type": "bytes32", - "value": "asset_id" - }, - "id": 968, - "name": "Identifier", - "src": "7192:8:1" - } - ], - "id": 969, - "name": "IndexAccess", - "src": "7178:23:1" - } - ], - "id": 970, - "name": "VariableDeclarationStatement", - "src": "7154:47:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 971, - "name": "Identifier", - "src": "7219:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 972, - "name": "ElementaryTypeName", - "src": "7236:7:1" - } - ], - "id": 973, - "name": "ElementaryTypeNameExpression", - "src": "7236:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 974, - "name": "Literal", - "src": "7244:1:1" - } - ], - "id": 975, - "name": "FunctionCall", - "src": "7236:10:1" - } - ], - "id": 976, - "name": "BinaryOperation", - "src": "7219:27:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [978] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_decimals", - "overrides": null, - "scope": 993, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 977, - "name": "ElementaryTypeName", - "src": "7266:5:1" - } - ], - "id": 978, - "name": "VariableDeclaration", - "src": "7266:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_103_by_1", - "typeString": "int_const 103" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toUint8", - "referencedDeclaration": 109, - "type": "function (bytes memory,uint256) pure returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 979, - "name": "Identifier", - "src": "7289:4:1" - } - ], - "id": 980, - "name": "MemberAccess", - "src": "7289:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "313033", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 103", - "value": "103" - }, - "id": 981, - "name": "Literal", - "src": "7302:3:1" - } - ], - "id": 982, - "name": "FunctionCall", - "src": "7289:17:1" - } - ], - "id": 983, - "name": "VariableDeclarationStatement", - "src": "7266:40:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 984, - "name": "Identifier", - "src": "7324:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1094, - "type": "function (bytes32,uint8,bytes32,uint8) returns (address)", - "value": "deployWrappedAsset" - }, - "id": 985, - "name": "Identifier", - "src": "7340:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 956, - "type": "bytes32", - "value": "asset_id" - }, - "id": 986, - "name": "Identifier", - "src": "7359:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 918, - "type": "uint8", - "value": "token_chain" - }, - "id": 987, - "name": "Identifier", - "src": "7369:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 949, - "type": "bytes32", - "value": "token_address" - }, - "id": 988, - "name": "Identifier", - "src": "7382:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 978, - "type": "uint8", - "value": "asset_decimals" - }, - "id": 989, - "name": "Identifier", - "src": "7397:14:1" - } - ], - "id": 990, - "name": "FunctionCall", - "src": "7340:72:1" - } - ], - "id": 991, - "name": "Assignment", - "src": "7324:88:1" - } - ], - "id": 992, - "name": "ExpressionStatement", - "src": "7324:88:1" - } - ], - "id": 993, - "name": "Block", - "src": "7248:179:1" - } - ], - "id": 994, - "name": "IfStatement", - "src": "7215:212:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mint", - "referencedDeclaration": 1511, - "type": "function (address,uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 995, - "name": "Identifier", - "src": "7441:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 966, - "type": "address", - "value": "wrapped_asset" - }, - "id": 996, - "name": "Identifier", - "src": "7454:13:1" - } - ], - "id": 997, - "name": "FunctionCall", - "src": "7441:27:1" - } - ], - "id": 998, - "name": "MemberAccess", - "src": "7441:32:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 909, - "type": "address", - "value": "target_address" - }, - "id": 999, - "name": "Identifier", - "src": "7474:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1000, - "name": "Identifier", - "src": "7490:6:1" - } - ], - "id": 1001, - "name": "FunctionCall", - "src": "7441:56:1" - } - ], - "id": 1002, - "name": "ExpressionStatement", - "src": "7441:56:1" - } - ], - "id": 1003, - "name": "Block", - "src": "6918:590:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1005] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1048, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1004, - "name": "ElementaryTypeName", - "src": "7528:7:1" - } - ], - "id": 1005, - "name": "VariableDeclaration", - "src": "7528:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "toAddress", - "referencedDeclaration": 82, - "type": "function (bytes memory,uint256) pure returns (address)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 891, - "type": "bytes memory", - "value": "data" - }, - "id": 1006, - "name": "Identifier", - "src": "7552:4:1" - } - ], - "id": 1007, - "name": "MemberAccess", - "src": "7552:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_83_by_1", - "typeString": "int_const 83" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "+", - "type": "int_const 83" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3731", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 71", - "value": "71" - }, - "id": 1008, - "name": "Literal", - "src": "7567:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3132", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 12", - "value": "12" - }, - "id": 1009, - "name": "Literal", - "src": "7572:2:1" - } - ], - "id": 1010, - "name": "BinaryOperation", - "src": "7567:7:1" - } - ], - "id": 1011, - "name": "FunctionCall", - "src": "7552:23:1" - } - ], - "id": 1012, - "name": "VariableDeclarationStatement", - "src": "7528:47:1" - }, - { - "attributes": { - "assignments": [1014] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1048, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1013, - "name": "ElementaryTypeName", - "src": "7590:5:1" - } - ], - "id": 1014, - "name": "VariableDeclaration", - "src": "7590:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1015, - "name": "Identifier", - "src": "7607:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1005, - "type": "address", - "value": "token_address" - }, - "id": 1016, - "name": "Identifier", - "src": "7613:13:1" - } - ], - "id": 1017, - "name": "FunctionCall", - "src": "7607:20:1" - } - ], - "id": 1018, - "name": "MemberAccess", - "src": "7607:29:1" - } - ], - "id": 1019, - "name": "FunctionCall", - "src": "7607:31:1" - } - ], - "id": 1020, - "name": "VariableDeclarationStatement", - "src": "7590:48:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1014, - "type": "uint8", - "value": "decimals" - }, - "id": 1021, - "name": "Identifier", - "src": "7727:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1022, - "name": "Literal", - "src": "7738:1:1" - } - ], - "id": 1023, - "name": "BinaryOperation", - "src": "7727:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1024, - "name": "Identifier", - "src": "7759:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mul", - "referencedDeclaration": 2388, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1025, - "name": "Identifier", - "src": "7768:6:1" - } - ], - "id": 1026, - "name": "MemberAccess", - "src": "7768:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1027, - "name": "Literal", - "src": "7779:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1028, - "name": "ElementaryTypeName", - "src": "7785:7:1" - } - ], - "id": 1029, - "name": "ElementaryTypeNameExpression", - "src": "7785:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1014, - "type": "uint8", - "value": "decimals" - }, - "id": 1030, - "name": "Identifier", - "src": "7793:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1031, - "name": "Literal", - "src": "7804:1:1" - } - ], - "id": 1032, - "name": "BinaryOperation", - "src": "7793:12:1" - } - ], - "id": 1033, - "name": "FunctionCall", - "src": "7785:21:1" - } - ], - "id": 1034, - "name": "BinaryOperation", - "src": "7779:27:1" - } - ], - "id": 1035, - "name": "FunctionCall", - "src": "7768:39:1" - } - ], - "id": 1036, - "name": "Assignment", - "src": "7759:48:1" - } - ], - "id": 1037, - "name": "ExpressionStatement", - "src": "7759:48:1" - } - ], - "id": 1038, - "name": "Block", - "src": "7741:81:1" - } - ], - "id": 1039, - "name": "IfStatement", - "src": "7723:99:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransfer", - "referencedDeclaration": 3120, - "type": "function (contract IERC20,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1040, - "name": "Identifier", - "src": "7835:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1005, - "type": "address", - "value": "token_address" - }, - "id": 1041, - "name": "Identifier", - "src": "7842:13:1" - } - ], - "id": 1042, - "name": "FunctionCall", - "src": "7835:21:1" - } - ], - "id": 1043, - "name": "MemberAccess", - "src": "7835:34:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 909, - "type": "address", - "value": "target_address" - }, - "id": 1044, - "name": "Identifier", - "src": "7870:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 925, - "type": "uint256", - "value": "amount" - }, - "id": 1045, - "name": "Identifier", - "src": "7886:6:1" - } - ], - "id": 1046, - "name": "FunctionCall", - "src": "7835:58:1" - } - ], - "id": 1047, - "name": "ExpressionStatement", - "src": "7835:58:1" - } - ], - "id": 1048, - "name": "Block", - "src": "7514:390:1" - } - ], - "id": 1049, - "name": "IfStatement", - "src": "6889:1015:1" - } - ], - "id": 1050, - "name": "Block", - "src": "6266:1644:1" - } - ], - "id": 1051, - "name": "FunctionDefinition", - "src": "6218:1692:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "deployWrappedAsset", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "seed", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1052, - "name": "ElementaryTypeName", - "src": "7944:7:1" - } - ], - "id": 1053, - "name": "VariableDeclaration", - "src": "7944:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_chain", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1054, - "name": "ElementaryTypeName", - "src": "7958:5:1" - } - ], - "id": 1055, - "name": "VariableDeclaration", - "src": "7958:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "token_address", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1056, - "name": "ElementaryTypeName", - "src": "7977:7:1" - } - ], - "id": 1057, - "name": "VariableDeclaration", - "src": "7977:21:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1058, - "name": "ElementaryTypeName", - "src": "8000:5:1" - } - ], - "id": 1059, - "name": "VariableDeclaration", - "src": "8000:14:1" - } - ], - "id": 1060, - "name": "ParameterList", - "src": "7943:72:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset", - "overrides": null, - "scope": 1094, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1061, - "name": "ElementaryTypeName", - "src": "8033:7:1" - } - ], - "id": 1062, - "name": "VariableDeclaration", - "src": "8033:13:1" - } - ], - "id": 1063, - "name": "ParameterList", - "src": "8032:15:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1065] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "targetBytes", - "overrides": null, - "scope": 1093, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes20", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes20", - "type": "bytes20" - }, - "id": 1064, - "name": "ElementaryTypeName", - "src": "8225:7:1" - } - ], - "id": 1065, - "name": "VariableDeclaration", - "src": "8225:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes20)" - }, - "children": [ - { - "attributes": { - "name": "bytes20", - "type": null - }, - "id": 1066, - "name": "ElementaryTypeName", - "src": "8247:7:1" - } - ], - "id": 1067, - "name": "ElementaryTypeNameExpression", - "src": "8247:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 359, - "type": "address", - "value": "wrappedAssetMaster" - }, - "id": 1068, - "name": "Identifier", - "src": "8255:18:1" - } - ], - "id": 1069, - "name": "FunctionCall", - "src": "8247:27:1" - } - ], - "id": 1070, - "name": "VariableDeclarationStatement", - "src": "8225:49:1" - }, - { - "attributes": { - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1062, - "isOffset": false, - "isSlot": false, - "src": "8593:5:1", - "valueSize": 1 - }, - { - "declaration": 1053, - "isOffset": false, - "isSlot": false, - "src": "8626:4:1", - "valueSize": 1 - }, - { - "declaration": 1065, - "isOffset": false, - "isSlot": false, - "src": "8463:11:1", - "valueSize": 1 - } - ], - "operations": "{\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n asset := create2(0, clone, 0x37, seed)\n}" - }, - "children": [], - "id": 1071, - "name": "InlineAssembly", - "src": "8284:357:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "initialize", - "referencedDeclaration": 1490, - "type": "function (uint8,bytes32,uint8) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1072, - "name": "Identifier", - "src": "8679:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1073, - "name": "Identifier", - "src": "8692:5:1" - } - ], - "id": 1074, - "name": "FunctionCall", - "src": "8679:19:1" - } - ], - "id": 1075, - "name": "MemberAccess", - "src": "8679:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1055, - "type": "uint8", - "value": "token_chain" - }, - "id": 1076, - "name": "Identifier", - "src": "8710:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1057, - "type": "bytes32", - "value": "token_address" - }, - "id": 1077, - "name": "Identifier", - "src": "8723:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1059, - "type": "uint8", - "value": "decimals" - }, - "id": 1078, - "name": "Identifier", - "src": "8738:8:1" - } - ], - "id": 1079, - "name": "FunctionCall", - "src": "8679:68:1" - } - ], - "id": 1080, - "name": "ExpressionStatement", - "src": "8679:68:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 424, - "type": "mapping(bytes32 => address)", - "value": "wrappedAssets" - }, - "id": 1081, - "name": "Identifier", - "src": "8783:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1053, - "type": "bytes32", - "value": "seed" - }, - "id": 1082, - "name": "Identifier", - "src": "8797:4:1" - } - ], - "id": 1083, - "name": "IndexAccess", - "src": "8783:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1084, - "name": "Identifier", - "src": "8805:5:1" - } - ], - "id": 1085, - "name": "Assignment", - "src": "8783:27:1" - } - ], - "id": 1086, - "name": "ExpressionStatement", - "src": "8783:27:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 428, - "type": "mapping(address => bool)", - "value": "isWrappedAsset" - }, - "id": 1087, - "name": "Identifier", - "src": "8820:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1062, - "type": "address", - "value": "asset" - }, - "id": 1088, - "name": "Identifier", - "src": "8835:5:1" - } - ], - "id": 1089, - "name": "IndexAccess", - "src": "8820:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1090, - "name": "Literal", - "src": "8844:4:1" - } - ], - "id": 1091, - "name": "Assignment", - "src": "8820:28:1" - } - ], - "id": 1092, - "name": "ExpressionStatement", - "src": "8820:28:1" - } - ], - "id": 1093, - "name": "Block", - "src": "8047:808:1" - } - ], - "id": 1094, - "name": "FunctionDefinition", - "src": "7916:939:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "70713960", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "lockAssets", - "overrides": null, - "scope": 1420, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1095, - "name": "ElementaryTypeName", - "src": "8890:7:1" - } - ], - "id": 1096, - "name": "VariableDeclaration", - "src": "8890:13:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1097, - "name": "ElementaryTypeName", - "src": "8913:7:1" - } - ], - "id": 1098, - "name": "VariableDeclaration", - "src": "8913:14:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1099, - "name": "ElementaryTypeName", - "src": "8937:7:1" - } - ], - "id": 1100, - "name": "VariableDeclaration", - "src": "8937:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1101, - "name": "ElementaryTypeName", - "src": "8964:5:1" - } - ], - "id": 1102, - "name": "VariableDeclaration", - "src": "8964:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 1103, - "name": "ElementaryTypeName", - "src": "8992:6:1" - } - ], - "id": 1104, - "name": "VariableDeclaration", - "src": "8992:12:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "refund_dust", - "overrides": null, - "scope": 1314, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1105, - "name": "ElementaryTypeName", - "src": "9014:4:1" - } - ], - "id": 1106, - "name": "VariableDeclaration", - "src": "9014:16:1" - } - ], - "id": 1107, - "name": "ParameterList", - "src": "8880:156:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1110, - "name": "ParameterList", - "src": "9057:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 1108, - "name": "Identifier", - "src": "9044:12:1" - } - ], - "id": 1109, - "name": "ModifierInvocation", - "src": "9044:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1111, - "name": "Identifier", - "src": "9067:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1102, - "type": "uint8", - "value": "target_chain" - }, - "id": 1112, - "name": "Identifier", - "src": "9075:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1113, - "name": "Identifier", - "src": "9091:8:1" - } - ], - "id": 1114, - "name": "BinaryOperation", - "src": "9075:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"must not transfer to the same chain\"", - "value": "must not transfer to the same chain" - }, - "id": 1115, - "name": "Literal", - "src": "9101:37:1" - } - ], - "id": 1116, - "name": "FunctionCall", - "src": "9067:72:1" - } - ], - "id": 1117, - "name": "ExpressionStatement", - "src": "9067:72:1" - }, - { - "attributes": { - "assignments": [1119] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_chain", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1118, - "name": "ElementaryTypeName", - "src": "9150:5:1" - } - ], - "id": 1119, - "name": "VariableDeclaration", - "src": "9150:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1120, - "name": "Identifier", - "src": "9170:8:1" - } - ], - "id": 1121, - "name": "VariableDeclarationStatement", - "src": "9150:28:1" - }, - { - "attributes": { - "assignments": [1123], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "asset_address", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1122, - "name": "ElementaryTypeName", - "src": "9188:7:1" - } - ], - "id": 1123, - "name": "VariableDeclaration", - "src": "9188:21:1" - } - ], - "id": 1124, - "name": "VariableDeclarationStatement", - "src": "9188:21:1" - }, - { - "attributes": { - "assignments": [1126] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1313, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1125, - "name": "ElementaryTypeName", - "src": "9219:5:1" - } - ], - "id": 1126, - "name": "VariableDeclaration", - "src": "9219:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1127, - "name": "Identifier", - "src": "9236:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1128, - "name": "Identifier", - "src": "9242:5:1" - } - ], - "id": 1129, - "name": "FunctionCall", - "src": "9236:12:1" - } - ], - "id": 1130, - "name": "MemberAccess", - "src": "9236:21:1" - } - ], - "id": 1131, - "name": "FunctionCall", - "src": "9236:23:1" - } - ], - "id": 1132, - "name": "VariableDeclarationStatement", - "src": "9219:40:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 428, - "type": "mapping(address => bool)", - "value": "isWrappedAsset" - }, - "id": 1133, - "name": "Identifier", - "src": "9274:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1134, - "name": "Identifier", - "src": "9289:5:1" - } - ], - "id": 1135, - "name": "IndexAccess", - "src": "9274:21:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "burn", - "referencedDeclaration": 1532, - "type": "function (address,uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1136, - "name": "Identifier", - "src": "9311:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1137, - "name": "Identifier", - "src": "9324:5:1" - } - ], - "id": 1138, - "name": "FunctionCall", - "src": "9311:19:1" - } - ], - "id": 1139, - "name": "MemberAccess", - "src": "9311:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1140, - "name": "Identifier", - "src": "9336:3:1" - } - ], - "id": 1141, - "name": "MemberAccess", - "src": "9336:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1142, - "name": "Identifier", - "src": "9348:6:1" - } - ], - "id": 1143, - "name": "FunctionCall", - "src": "9311:44:1" - } - ], - "id": 1144, - "name": "ExpressionStatement", - "src": "9311:44:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1119, - "type": "uint8", - "value": "asset_chain" - }, - "id": 1145, - "name": "Identifier", - "src": "9369:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "assetChain", - "referencedDeclaration": 1443, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1146, - "name": "Identifier", - "src": "9383:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1147, - "name": "Identifier", - "src": "9396:5:1" - } - ], - "id": 1148, - "name": "FunctionCall", - "src": "9383:19:1" - } - ], - "id": 1149, - "name": "MemberAccess", - "src": "9383:30:1" - } - ], - "id": 1150, - "name": "FunctionCall", - "src": "9383:32:1" - } - ], - "id": 1151, - "name": "Assignment", - "src": "9369:46:1" - } - ], - "id": 1152, - "name": "ExpressionStatement", - "src": "9369:46:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1153, - "name": "Identifier", - "src": "9429:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "assetAddress", - "referencedDeclaration": 1445, - "type": "function () view external returns (bytes32)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WrappedAsset", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 2147, - "type": "type(contract WrappedAsset)", - "value": "WrappedAsset" - }, - "id": 1154, - "name": "Identifier", - "src": "9445:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1155, - "name": "Identifier", - "src": "9458:5:1" - } - ], - "id": 1156, - "name": "FunctionCall", - "src": "9445:19:1" - } - ], - "id": 1157, - "name": "MemberAccess", - "src": "9445:32:1" - } - ], - "id": 1158, - "name": "FunctionCall", - "src": "9445:34:1" - } - ], - "id": 1159, - "name": "Assignment", - "src": "9429:50:1" - } - ], - "id": 1160, - "name": "ExpressionStatement", - "src": "9429:50:1" - } - ], - "id": 1161, - "name": "Block", - "src": "9297:193:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1163] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "balanceBefore", - "overrides": null, - "scope": 1286, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1162, - "name": "ElementaryTypeName", - "src": "9510:7:1" - } - ], - "id": 1163, - "name": "VariableDeclaration", - "src": "9510:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balanceOf", - "referencedDeclaration": 3025, - "type": "function (address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1164, - "name": "Identifier", - "src": "9534:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1165, - "name": "Identifier", - "src": "9541:5:1" - } - ], - "id": 1166, - "name": "FunctionCall", - "src": "9534:13:1" - } - ], - "id": 1167, - "name": "MemberAccess", - "src": "9534:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1168, - "name": "ElementaryTypeName", - "src": "9558:7:1" - } - ], - "id": 1169, - "name": "ElementaryTypeNameExpression", - "src": "9558:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1170, - "name": "Identifier", - "src": "9566:4:1" - } - ], - "id": 1171, - "name": "FunctionCall", - "src": "9558:13:1" - } - ], - "id": 1172, - "name": "FunctionCall", - "src": "9534:38:1" - } - ], - "id": 1173, - "name": "VariableDeclarationStatement", - "src": "9510:62:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransferFrom", - "referencedDeclaration": 3145, - "type": "function (contract IERC20,address,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1174, - "name": "Identifier", - "src": "9586:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1175, - "name": "Identifier", - "src": "9593:5:1" - } - ], - "id": 1176, - "name": "FunctionCall", - "src": "9586:13:1" - } - ], - "id": 1177, - "name": "MemberAccess", - "src": "9586:30:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1178, - "name": "Identifier", - "src": "9617:3:1" - } - ], - "id": 1179, - "name": "MemberAccess", - "src": "9617:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1180, - "name": "ElementaryTypeName", - "src": "9629:7:1" - } - ], - "id": 1181, - "name": "ElementaryTypeNameExpression", - "src": "9629:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1182, - "name": "Identifier", - "src": "9637:4:1" - } - ], - "id": 1183, - "name": "FunctionCall", - "src": "9629:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1184, - "name": "Identifier", - "src": "9644:6:1" - } - ], - "id": 1185, - "name": "FunctionCall", - "src": "9586:65:1" - } - ], - "id": 1186, - "name": "ExpressionStatement", - "src": "9586:65:1" - }, - { - "attributes": { - "assignments": [1188] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "balanceAfter", - "overrides": null, - "scope": 1286, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1187, - "name": "ElementaryTypeName", - "src": "9665:7:1" - } - ], - "id": 1188, - "name": "VariableDeclaration", - "src": "9665:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "balanceOf", - "referencedDeclaration": 3025, - "type": "function (address) view external returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1189, - "name": "Identifier", - "src": "9688:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1190, - "name": "Identifier", - "src": "9695:5:1" - } - ], - "id": 1191, - "name": "FunctionCall", - "src": "9688:13:1" - } - ], - "id": 1192, - "name": "MemberAccess", - "src": "9688:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Wormhole_$1420", - "typeString": "contract Wormhole" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1193, - "name": "ElementaryTypeName", - "src": "9712:7:1" - } - ], - "id": 1194, - "name": "ElementaryTypeNameExpression", - "src": "9712:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -28, - "type": "contract Wormhole", - "value": "this" - }, - "id": 1195, - "name": "Identifier", - "src": "9720:4:1" - } - ], - "id": 1196, - "name": "FunctionCall", - "src": "9712:13:1" - } - ], - "id": 1197, - "name": "FunctionCall", - "src": "9688:38:1" - } - ], - "id": 1198, - "name": "VariableDeclarationStatement", - "src": "9665:61:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1199, - "name": "Identifier", - "src": "9931:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2354, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1188, - "type": "uint256", - "value": "balanceAfter" - }, - "id": 1200, - "name": "Identifier", - "src": "9940:12:1" - } - ], - "id": 1201, - "name": "MemberAccess", - "src": "9940:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1163, - "type": "uint256", - "value": "balanceBefore" - }, - "id": 1202, - "name": "Identifier", - "src": "9957:13:1" - } - ], - "id": 1203, - "name": "FunctionCall", - "src": "9940:31:1" - } - ], - "id": 1204, - "name": "Assignment", - "src": "9931:40:1" - } - ], - "id": 1205, - "name": "ExpressionStatement", - "src": "9931:40:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1206, - "name": "Identifier", - "src": "10046:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1207, - "name": "Literal", - "src": "10057:1:1" - } - ], - "id": 1208, - "name": "BinaryOperation", - "src": "10046:12:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [1210] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "original_amount", - "overrides": null, - "scope": 1253, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1209, - "name": "ElementaryTypeName", - "src": "10078:7:1" - } - ], - "id": 1210, - "name": "VariableDeclaration", - "src": "10078:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1211, - "name": "Identifier", - "src": "10104:6:1" - } - ], - "id": 1212, - "name": "VariableDeclarationStatement", - "src": "10078:32:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1213, - "name": "Identifier", - "src": "10128:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1214, - "name": "Identifier", - "src": "10137:6:1" - } - ], - "id": 1215, - "name": "MemberAccess", - "src": "10137:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1216, - "name": "Literal", - "src": "10148:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1217, - "name": "ElementaryTypeName", - "src": "10154:7:1" - } - ], - "id": 1218, - "name": "ElementaryTypeNameExpression", - "src": "10154:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1219, - "name": "Identifier", - "src": "10162:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1220, - "name": "Literal", - "src": "10173:1:1" - } - ], - "id": 1221, - "name": "BinaryOperation", - "src": "10162:12:1" - } - ], - "id": 1222, - "name": "FunctionCall", - "src": "10154:21:1" - } - ], - "id": 1223, - "name": "BinaryOperation", - "src": "10148:27:1" - } - ], - "id": 1224, - "name": "FunctionCall", - "src": "10137:39:1" - } - ], - "id": 1225, - "name": "Assignment", - "src": "10128:48:1" - } - ], - "id": 1226, - "name": "ExpressionStatement", - "src": "10128:48:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1106, - "type": "bool", - "value": "refund_dust" - }, - "id": 1227, - "name": "Identifier", - "src": "10199:11:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "safeTransfer", - "referencedDeclaration": 3120, - "type": "function (contract IERC20,address,uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract IERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3086, - "type": "type(contract IERC20)", - "value": "IERC20" - }, - "id": 1228, - "name": "Identifier", - "src": "10234:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1229, - "name": "Identifier", - "src": "10241:5:1" - } - ], - "id": 1230, - "name": "FunctionCall", - "src": "10234:13:1" - } - ], - "id": 1231, - "name": "MemberAccess", - "src": "10234:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1232, - "name": "Identifier", - "src": "10261:3:1" - } - ], - "id": 1233, - "name": "MemberAccess", - "src": "10261:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mod", - "referencedDeclaration": 2432, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1210, - "type": "uint256", - "value": "original_amount" - }, - "id": 1234, - "name": "Identifier", - "src": "10273:15:1" - } - ], - "id": 1235, - "name": "MemberAccess", - "src": "10273:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1236, - "name": "Literal", - "src": "10293:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1237, - "name": "ElementaryTypeName", - "src": "10299:7:1" - } - ], - "id": 1238, - "name": "ElementaryTypeNameExpression", - "src": "10299:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1239, - "name": "Identifier", - "src": "10307:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1240, - "name": "Literal", - "src": "10318:1:1" - } - ], - "id": 1241, - "name": "BinaryOperation", - "src": "10307:12:1" - } - ], - "id": 1242, - "name": "FunctionCall", - "src": "10299:21:1" - } - ], - "id": 1243, - "name": "BinaryOperation", - "src": "10293:27:1" - } - ], - "id": 1244, - "name": "FunctionCall", - "src": "10273:48:1" - } - ], - "id": 1245, - "name": "FunctionCall", - "src": "10234:88:1" - } - ], - "id": 1246, - "name": "ExpressionStatement", - "src": "10234:88:1" - } - ], - "id": 1247, - "name": "Block", - "src": "10212:129:1" - } - ], - "id": 1248, - "name": "IfStatement", - "src": "10195:146:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1249, - "name": "Identifier", - "src": "10359:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1250, - "name": "Literal", - "src": "10370:1:1" - } - ], - "id": 1251, - "name": "Assignment", - "src": "10359:12:1" - } - ], - "id": 1252, - "name": "ExpressionStatement", - "src": "10359:12:1" - } - ], - "id": 1253, - "name": "Block", - "src": "10060:326:1" - } - ], - "id": 1254, - "name": "IfStatement", - "src": "10042:344:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_173119466b5178b8ca47cb473e247f7a9a678958b1d751b4cef80e7a8162cdd4", - "typeString": "literal_string \"bridge balance would exceed maximum\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1255, - "name": "Identifier", - "src": "10400:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1188, - "type": "uint256", - "value": "balanceAfter" - }, - "id": 1256, - "name": "Identifier", - "src": "10408:12:1" - } - ], - "id": 1257, - "name": "MemberAccess", - "src": "10408:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "**", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1258, - "name": "Literal", - "src": "10425:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1259, - "name": "ElementaryTypeName", - "src": "10431:7:1" - } - ], - "id": 1260, - "name": "ElementaryTypeNameExpression", - "src": "10431:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "decimals", - "referencedDeclaration": 2584, - "type": "function () view external returns (uint8)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "contract ERC20", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3008, - "type": "type(contract ERC20)", - "value": "ERC20" - }, - "id": 1261, - "name": "Identifier", - "src": "10439:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1262, - "name": "Identifier", - "src": "10445:5:1" - } - ], - "id": 1263, - "name": "FunctionCall", - "src": "10439:12:1" - } - ], - "id": 1264, - "name": "MemberAccess", - "src": "10439:21:1" - } - ], - "id": 1265, - "name": "FunctionCall", - "src": "10439:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1266, - "name": "Literal", - "src": "10465:1:1" - } - ], - "id": 1267, - "name": "BinaryOperation", - "src": "10439:27:1" - } - ], - "id": 1268, - "name": "FunctionCall", - "src": "10431:36:1" - } - ], - "id": 1269, - "name": "BinaryOperation", - "src": "10425:42:1" - } - ], - "id": 1270, - "name": "FunctionCall", - "src": "10408:60:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 357, - "type": "uint64", - "value": "MAX_UINT64" - }, - "id": 1271, - "name": "Identifier", - "src": "10472:10:1" - } - ], - "id": 1272, - "name": "BinaryOperation", - "src": "10408:74:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6272696467652062616c616e636520776f756c6420657863656564206d6178696d756d", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"bridge balance would exceed maximum\"", - "value": "bridge balance would exceed maximum" - }, - "id": 1273, - "name": "Literal", - "src": "10484:37:1" - } - ], - "id": 1274, - "name": "FunctionCall", - "src": "10400:122:1" - } - ], - "id": 1275, - "name": "ExpressionStatement", - "src": "10400:122:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1276, - "name": "Identifier", - "src": "10537:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1277, - "name": "ElementaryTypeName", - "src": "10553:7:1" - } - ], - "id": 1278, - "name": "ElementaryTypeNameExpression", - "src": "10553:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1279, - "name": "ElementaryTypeName", - "src": "10561:7:1" - } - ], - "id": 1280, - "name": "ElementaryTypeNameExpression", - "src": "10561:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1096, - "type": "address", - "value": "asset" - }, - "id": 1281, - "name": "Identifier", - "src": "10569:5:1" - } - ], - "id": 1282, - "name": "FunctionCall", - "src": "10561:14:1" - } - ], - "id": 1283, - "name": "FunctionCall", - "src": "10553:23:1" - } - ], - "id": 1284, - "name": "Assignment", - "src": "10537:39:1" - } - ], - "id": 1285, - "name": "ExpressionStatement", - "src": "10537:39:1" - } - ], - "id": 1286, - "name": "Block", - "src": "9496:1091:1" - } - ], - "id": 1287, - "name": "IfStatement", - "src": "9270:1317:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1288, - "name": "Identifier", - "src": "10636:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1289, - "name": "Identifier", - "src": "10644:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1290, - "name": "Literal", - "src": "10654:1:1" - } - ], - "id": 1291, - "name": "BinaryOperation", - "src": "10644:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"truncated amount must not be 0\"", - "value": "truncated amount must not be 0" - }, - "id": 1292, - "name": "Literal", - "src": "10657:32:1" - } - ], - "id": 1293, - "name": "FunctionCall", - "src": "10636:54:1" - } - ], - "id": 1294, - "name": "ExpressionStatement", - "src": "10636:54:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 395, - "type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)", - "value": "LogTokensLocked" - }, - "id": 1295, - "name": "Identifier", - "src": "10706:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1102, - "type": "uint8", - "value": "target_chain" - }, - "id": 1296, - "name": "Identifier", - "src": "10722:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1119, - "type": "uint8", - "value": "asset_chain" - }, - "id": 1297, - "name": "Identifier", - "src": "10736:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1126, - "type": "uint8", - "value": "decimals" - }, - "id": 1298, - "name": "Identifier", - "src": "10749:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1123, - "type": "bytes32", - "value": "asset_address" - }, - "id": 1299, - "name": "Identifier", - "src": "10759:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1300, - "name": "ElementaryTypeName", - "src": "10774:7:1" - } - ], - "id": 1301, - "name": "ElementaryTypeNameExpression", - "src": "10774:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1302, - "name": "ElementaryTypeName", - "src": "10782:7:1" - } - ], - "id": 1303, - "name": "ElementaryTypeNameExpression", - "src": "10782:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1304, - "name": "Identifier", - "src": "10790:3:1" - } - ], - "id": 1305, - "name": "MemberAccess", - "src": "10790:10:1" - } - ], - "id": 1306, - "name": "FunctionCall", - "src": "10782:19:1" - } - ], - "id": 1307, - "name": "FunctionCall", - "src": "10774:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1100, - "type": "bytes32", - "value": "recipient" - }, - "id": 1308, - "name": "Identifier", - "src": "10804:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1098, - "type": "uint256", - "value": "amount" - }, - "id": 1309, - "name": "Identifier", - "src": "10815:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1104, - "type": "uint32", - "value": "nonce" - }, - "id": 1310, - "name": "Identifier", - "src": "10823:5:1" - } - ], - "id": 1311, - "name": "FunctionCall", - "src": "10706:123:1" - } - ], - "id": 1312, - "name": "EmitStatement", - "src": "10701:128:1" - } - ], - "id": 1313, - "name": "Block", - "src": "9057:1779:1" - } - ], - "id": 1314, - "name": "FunctionDefinition", - "src": "8861:1975:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "58d62e46", - "implemented": true, - "isConstructor": false, - "kind": "function", - "name": "lockETH", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1315, - "name": "ElementaryTypeName", - "src": "10868:7:1" - } - ], - "id": 1316, - "name": "VariableDeclaration", - "src": "10868:17:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "target_chain", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1317, - "name": "ElementaryTypeName", - "src": "10895:5:1" - } - ], - "id": 1318, - "name": "VariableDeclaration", - "src": "10895:18:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "nonce", - "overrides": null, - "scope": 1403, - "stateVariable": false, - "storageLocation": "default", - "type": "uint32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint32", - "type": "uint32" - }, - "id": 1319, - "name": "ElementaryTypeName", - "src": "10923:6:1" - } - ], - "id": 1320, - "name": "VariableDeclaration", - "src": "10923:12:1" - } - ], - "id": 1321, - "name": "ParameterList", - "src": "10858:83:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1324, - "name": "ParameterList", - "src": "10970:0:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 3657, - "type": "modifier ()", - "value": "nonReentrant" - }, - "id": 1322, - "name": "Identifier", - "src": "10957:12:1" - } - ], - "id": 1323, - "name": "ModifierInvocation", - "src": "10957:12:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84da05290fceea4e386923ffe3e265c937087704025788355b73caadd151270b", - "typeString": "literal_string \"must not transfer to the same chain\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1325, - "name": "Identifier", - "src": "10980:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1318, - "type": "uint8", - "value": "target_chain" - }, - "id": 1326, - "name": "Identifier", - "src": "10988:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1327, - "name": "Identifier", - "src": "11004:8:1" - } - ], - "id": 1328, - "name": "BinaryOperation", - "src": "10988:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6d757374206e6f74207472616e7366657220746f207468652073616d6520636861696e", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"must not transfer to the same chain\"", - "value": "must not transfer to the same chain" - }, - "id": 1329, - "name": "Literal", - "src": "11014:37:1" - } - ], - "id": 1330, - "name": "FunctionCall", - "src": "10980:72:1" - } - ], - "id": 1331, - "name": "ExpressionStatement", - "src": "10980:72:1" - }, - { - "attributes": { - "assignments": [1333] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "remainder", - "overrides": null, - "scope": 1402, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1332, - "name": "ElementaryTypeName", - "src": "11063:7:1" - } - ], - "id": 1333, - "name": "VariableDeclaration", - "src": "11063:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "mod", - "referencedDeclaration": 2432, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1334, - "name": "Identifier", - "src": "11083:3:1" - } - ], - "id": 1335, - "name": "MemberAccess", - "src": "11083:9:1" - } - ], - "id": 1336, - "name": "MemberAccess", - "src": "11083:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "**", - "type": "int_const 1000000000" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1337, - "name": "Literal", - "src": "11097:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1338, - "name": "Literal", - "src": "11103:1:1" - } - ], - "id": 1339, - "name": "BinaryOperation", - "src": "11097:7:1" - } - ], - "id": 1340, - "name": "FunctionCall", - "src": "11083:22:1" - } - ], - "id": 1341, - "name": "VariableDeclarationStatement", - "src": "11063:42:1" - }, - { - "attributes": { - "assignments": [1343] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "transfer_amount", - "overrides": null, - "scope": 1402, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1342, - "name": "ElementaryTypeName", - "src": "11115:7:1" - } - ], - "id": 1343, - "name": "VariableDeclaration", - "src": "11115:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "div", - "referencedDeclaration": 2410, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1344, - "name": "Identifier", - "src": "11141:3:1" - } - ], - "id": 1345, - "name": "MemberAccess", - "src": "11141:9:1" - } - ], - "id": 1346, - "name": "MemberAccess", - "src": "11141:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000_by_1", - "typeString": "int_const 1000000000" - }, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "operator": "**", - "type": "int_const 1000000000" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1347, - "name": "Literal", - "src": "11155:2:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1348, - "name": "Literal", - "src": "11161:1:1" - } - ], - "id": 1349, - "name": "BinaryOperation", - "src": "11155:7:1" - } - ], - "id": 1350, - "name": "FunctionCall", - "src": "11141:22:1" - } - ], - "id": 1351, - "name": "VariableDeclarationStatement", - "src": "11115:48:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_91dc3b6ab9754748867317f89b73413ba314ee8a1acb42b6836d39d61d9e310e", - "typeString": "literal_string \"truncated amount must not be 0\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1352, - "name": "Identifier", - "src": "11173:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1343, - "type": "uint256", - "value": "transfer_amount" - }, - "id": 1353, - "name": "Identifier", - "src": "11181:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1354, - "name": "Literal", - "src": "11200:1:1" - } - ], - "id": 1355, - "name": "BinaryOperation", - "src": "11181:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "7472756e636174656420616d6f756e74206d757374206e6f742062652030", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"truncated amount must not be 0\"", - "value": "truncated amount must not be 0" - }, - "id": 1356, - "name": "Literal", - "src": "11203:32:1" - } - ], - "id": 1357, - "name": "FunctionCall", - "src": "11173:63:1" - } - ], - "id": 1358, - "name": "ExpressionStatement", - "src": "11173:63:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "transfer", - "referencedDeclaration": null, - "type": "function (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1359, - "name": "Identifier", - "src": "11282:3:1" - } - ], - "id": 1362, - "name": "MemberAccess", - "src": "11282:10:1" - } - ], - "id": 1363, - "name": "MemberAccess", - "src": "11282:19:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1333, - "type": "uint256", - "value": "remainder" - }, - "id": 1364, - "name": "Identifier", - "src": "11302:9:1" - } - ], - "id": 1365, - "name": "FunctionCall", - "src": "11282:30:1" - } - ], - "id": 1366, - "name": "ExpressionStatement", - "src": "11282:30:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": ["value"], - "type": "function () payable external" - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "deposit", - "referencedDeclaration": 1425, - "type": "function () payable external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "contract WETH", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1431, - "type": "type(contract WETH)", - "value": "WETH" - }, - "id": 1367, - "name": "Identifier", - "src": "11356:4:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 365, - "type": "address", - "value": "WETHAddress" - }, - "id": 1368, - "name": "Identifier", - "src": "11361:11:1" - } - ], - "id": 1369, - "name": "FunctionCall", - "src": "11356:17:1" - } - ], - "id": 1370, - "name": "MemberAccess", - "src": "11356:25:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "value", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1371, - "name": "Identifier", - "src": "11390:3:1" - } - ], - "id": 1372, - "name": "MemberAccess", - "src": "11390:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1333, - "type": "uint256", - "value": "remainder" - }, - "id": 1373, - "name": "Identifier", - "src": "11402:9:1" - } - ], - "id": 1374, - "name": "BinaryOperation", - "src": "11390:21:1" - } - ], - "id": 1375, - "name": "FunctionCallOptions", - "src": "11356:56:1" - } - ], - "id": 1376, - "name": "FunctionCall", - "src": "11356:58:1" - } - ], - "id": 1377, - "name": "ExpressionStatement", - "src": "11356:58:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 395, - "type": "function (uint8,uint8,uint8,bytes32,bytes32,bytes32,uint256,uint32)", - "value": "LogTokensLocked" - }, - "id": 1378, - "name": "Identifier", - "src": "11461:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1318, - "type": "uint8", - "value": "target_chain" - }, - "id": 1379, - "name": "Identifier", - "src": "11477:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 362, - "type": "uint8", - "value": "CHAIN_ID" - }, - "id": 1380, - "name": "Identifier", - "src": "11491:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "39", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 9", - "value": "9" - }, - "id": 1381, - "name": "Literal", - "src": "11501:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1382, - "name": "ElementaryTypeName", - "src": "11504:7:1" - } - ], - "id": 1383, - "name": "ElementaryTypeNameExpression", - "src": "11504:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1384, - "name": "ElementaryTypeName", - "src": "11512:7:1" - } - ], - "id": 1385, - "name": "ElementaryTypeNameExpression", - "src": "11512:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 365, - "type": "address", - "value": "WETHAddress" - }, - "id": 1386, - "name": "Identifier", - "src": "11520:11:1" - } - ], - "id": 1387, - "name": "FunctionCall", - "src": "11512:20:1" - } - ], - "id": 1388, - "name": "FunctionCall", - "src": "11504:29:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 1389, - "name": "ElementaryTypeName", - "src": "11535:7:1" - } - ], - "id": 1390, - "name": "ElementaryTypeNameExpression", - "src": "11535:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": null - }, - "id": 1391, - "name": "ElementaryTypeName", - "src": "11543:7:1" - } - ], - "id": 1392, - "name": "ElementaryTypeNameExpression", - "src": "11543:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1393, - "name": "Identifier", - "src": "11551:3:1" - } - ], - "id": 1394, - "name": "MemberAccess", - "src": "11551:10:1" - } - ], - "id": 1395, - "name": "FunctionCall", - "src": "11543:19:1" - } - ], - "id": 1396, - "name": "FunctionCall", - "src": "11535:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1316, - "type": "bytes32", - "value": "recipient" - }, - "id": 1397, - "name": "Identifier", - "src": "11565:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1343, - "type": "uint256", - "value": "transfer_amount" - }, - "id": 1398, - "name": "Identifier", - "src": "11576:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1320, - "type": "uint32", - "value": "nonce" - }, - "id": 1399, - "name": "Identifier", - "src": "11593:5:1" - } - ], - "id": 1400, - "name": "FunctionCall", - "src": "11461:138:1" - } - ], - "id": 1401, - "name": "EmitStatement", - "src": "11456:143:1" - } - ], - "id": 1402, - "name": "Block", - "src": "10970:636:1" - } - ], - "id": 1403, - "name": "FunctionDefinition", - "src": "10842:764:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "fallback", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1404, - "name": "ParameterList", - "src": "11620:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1405, - "name": "ParameterList", - "src": "11640:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 1406, - "name": "Identifier", - "src": "11641:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"please use lockETH to transfer ETH to Solana\"", - "value": "please use lockETH to transfer ETH to Solana" - }, - "id": 1407, - "name": "Literal", - "src": "11648:46:1" - } - ], - "id": 1408, - "name": "FunctionCall", - "src": "11641:54:1" - } - ], - "id": 1409, - "name": "ExpressionStatement", - "src": "11641:54:1" - } - ], - "id": 1410, - "name": "Block", - "src": "11640:57:1" - } - ], - "id": 1411, - "name": "FunctionDefinition", - "src": "11612:85:1" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "receive", - "modifiers": [null], - "name": "", - "overrides": null, - "scope": 1420, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1412, - "name": "ParameterList", - "src": "11710:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1413, - "name": "ParameterList", - "src": "11730:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_414957345d33678f377f3c67303c55f683553546e00bb5a8689e656385e6efb2", - "typeString": "literal_string \"please use lockETH to transfer ETH to Solana\"" - } - ], - "overloadedDeclarations": [-19, -19], - "referencedDeclaration": -19, - "type": "function (string memory) pure", - "value": "revert" - }, - "id": 1414, - "name": "Identifier", - "src": "11731:6:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "706c6561736520757365206c6f636b45544820746f207472616e736665722045544820746f20536f6c616e61", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"please use lockETH to transfer ETH to Solana\"", - "value": "please use lockETH to transfer ETH to Solana" - }, - "id": 1415, - "name": "Literal", - "src": "11738:46:1" - } - ], - "id": 1416, - "name": "FunctionCall", - "src": "11731:54:1" - } - ], - "id": 1417, - "name": "ExpressionStatement", - "src": "11731:54:1" - } - ], - "id": 1418, - "name": "Block", - "src": "11730:57:1" - } - ], - "id": 1419, - "name": "FunctionDefinition", - "src": "11703:84:1" - } - ], - "id": 1420, - "name": "ContractDefinition", - "src": "463:11326:1" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3086], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "linearizedBaseContracts": [1431, 3086], - "name": "WETH", - "scope": 1432 - }, - "children": [ - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 1421, - "name": "UserDefinedTypeName", - "src": "11810:6:1" - } - ], - "id": 1422, - "name": "InheritanceSpecifier", - "src": "11810:6:1" - }, - { - "attributes": { - "body": null, - "documentation": null, - "functionSelector": "d0e30db0", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "deposit", - "overrides": null, - "scope": 1431, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1423, - "name": "ParameterList", - "src": "11839:2:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1424, - "name": "ParameterList", - "src": "11858:0:1" - } - ], - "id": 1425, - "name": "FunctionDefinition", - "src": "11823:36:1" - }, - { - "attributes": { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "implemented": false, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "withdraw", - "overrides": null, - "scope": 1431, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1430, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1426, - "name": "ElementaryTypeName", - "src": "11883:7:1" - } - ], - "id": 1427, - "name": "VariableDeclaration", - "src": "11883:14:1" - } - ], - "id": 1428, - "name": "ParameterList", - "src": "11882:16:1" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1429, - "name": "ParameterList", - "src": "11907:0:1" - } - ], - "id": 1430, - "name": "FunctionDefinition", - "src": "11865:43:1" - } - ], - "id": 1431, - "name": "ContractDefinition", - "src": "11792:118:1" - } - ], - "id": 1432, - "name": "SourceUnit", - "src": "64:11847:1" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.885Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/contracts/WrappedAsset.json b/packages/bridge-sdk/contracts/WrappedAsset.json deleted file mode 100644 index 451168f..0000000 --- a/packages/bridge-sdk/contracts/WrappedAsset.json +++ /dev/null @@ -1,19868 +0,0 @@ -{ - "contractName": "WrappedAsset", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "assetAddress", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assetChain", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "_assetChain", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_assetAddress", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"assetAddress\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"assetChain\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_assetChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_assetAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol\":\"WrappedAsset\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol\":{\"keccak256\":\"0x1aca747b823c4d8492ae379cfd9495e8ff19726302d943da56b2bb71aebecc73\",\"license\":\"Apache 2\",\"urls\":[\"bzz-raw://716c755b41c76deb60297664878f07e0972867918fde13c20c196263d3daa554\",\"dweb:/ipfs/QmbrxvDYfcgSjBBnDdXyZJcwd8pYyyrQhYqY5h6DaxWKcy\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}", - "bytecode": "0x60806040526012600760006101000a81548160ff021916908360ff16021790555034801561002c57600080fd5b50611e998061003c6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806340c10f19116100a2578063a457c2d711610071578063a457c2d7146104ff578063a7a2d3fb14610563578063a9059cbb146105ab578063dd62ed3e1461060f578063e78cea921461068757610116565b806340c10f191461038857806370a08231146103d657806395d89b411461042e5780639dc29fac146104b157610116565b806318160ddd116100e957806318160ddd146102435780631ba46cfd1461026157806323b872dd1461027f578063313ce56714610303578063395093511461032457610116565b8063026b05391461011b57806306fdde031461013c578063095ea7b3146101bf578063158ef93e14610223575b600080fd5b6101236106bb565b604051808260ff16815260200191505060405180910390f35b6101446106cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610184578082015181840152602081019050610169565b50505050905090810190601f1680156101b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61020b600480360360408110156101d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610800565b60405180821515815260200191505060405180910390f35b61022b61081e565b60405180821515815260200191505060405180910390f35b61024b610831565b6040518082815260200191505060405180910390f35b61026961083b565b6040518082815260200191505060405180910390f35b6102eb6004803603606081101561029557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610841565b60405180821515815260200191505060405180910390f35b61030b61091a565b604051808260ff16815260200191505060405180910390f35b6103706004803603604081101561033a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610931565b60405180821515815260200191505060405180910390f35b6103d46004803603604081101561039e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109e4565b005b610418600480360360208110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a98565b6040518082815260200191505060405180910390f35b610436610ae1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561047657808201518184015260208101905061045b565b50505050905090810190601f1680156104a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104fd600480360360408110156104c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61054b6004803603604081101561051557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b60405180821515815260200191505060405180910390f35b6105a96004803603606081101561057957600080fd5b81019080803560ff16906020019092919080359060200190929190803560ff169060200190929190505050610d04565b005b6105f7600480360360408110156105c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e70565b60405180821515815260200191505060405180910390f35b6106716004803603604081101561062557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e8e565b6040518082815260200191505060405180910390f35b61068f610f15565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900460ff1681565b60606106e760008054906101000a900460ff1660ff16610f3b565b6106ef61107f565b60405160200180807f576f726d686f6c652057726170706564202d200000000000000000000000000081525060130183805190602001908083835b6020831061074d578051825260208201915060208101905060208303925061072a565b6001836020036101000a038019825116818451168082178552505050505050905001807f2d0000000000000000000000000000000000000000000000000000000000000081525060010182805190602001908083835b602083106107c657805182526020820191506020810190506020830392506107a3565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905090565b600061081461080d611243565b848461124b565b6001905092915050565b600260009054906101000a900460ff1681565b6000600554905090565b60015481565b600061084e848484611442565b61090f8461085a611243565b61090a85604051806060016040528060288152602001611d6360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108c0611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b600190509392505050565b6000600760009054906101000a900460ff16905090565b60006109da61093e611243565b846109d5856004600061094f611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b61124b565b6001905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611e1a6025913960400191505060405180910390fd5b610a94828261183e565b5050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b795780601f10610b4e57610100808354040283529160200191610b79565b820191906000526020600020905b815481529060010190602001808311610b5c57829003601f168201915b5050505050905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dd16025913960400191505060405180910390fd5b610c3382826119fb565b5050565b6000610cfa610c44611243565b84610cf585604051806060016040528060258152602001611e3f6025913960046000610c6e611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b6001905092915050565b600260009054906101000a900460ff1615610d87576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548160ff021916908360ff1602179055508160018190555033600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260006101000a81548160ff0219169083151502179055506040518060400160405280600381526020017f575754000000000000000000000000000000000000000000000000000000000081525060069080519060200190610e4f929190611c38565b5080600760006101000a81548160ff021916908360ff160217905550505050565b6000610e84610e7d611243565b8484611442565b6001905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000821415610f83576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061107a565b600082905060005b60008214610fad578080600101915050600a8281610fa557fe5b049150610f8b565b60608167ffffffffffffffff81118015610fc657600080fd5b506040519080825280601f01601f191660200182016040528015610ff95781602001600182028036833780820191505090505b50905060006001830390505b6000861461107257600a868161101757fe5b0660300160f81b8282806001900393508151811061103157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a868161106a57fe5b049550611005565b819450505050505b919050565b6060806040518060400160405280601081526020017f30313233343536373839616263646566000000000000000000000000000000008152509050600060015490506060600260200260020160ff1667ffffffffffffffff811180156110e457600080fd5b506040519080825280601f01601f1916602001820160405280156111175781602001600182028036833780820191505090505b50905060005b602060ff168110156112395783600484836020811061113857fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff168151811061117057fe5b602001015160f81c60f81b82600283028151811061118a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083600f60f81b8483602081106111cb57fe5b1a60f81b1660f81c60ff16815181106111e057fe5b602001015160f81c60f81b8260028302600101815181106111fd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061111d565b5080935050505090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611df66024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611357576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d1b6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dac6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561154e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611cd66023913960400191505060405180910390fd5b6115ba81604051806060016040528060268152602001611d3d60269139600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061164f81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906117a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561176e578082015181840152602081019050611753565b50505050905090810190601f16801561179b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015611834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6118f6816005546117b690919063ffffffff16565b60058190555061194e81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d8b6021913960400191505060405180910390fd5b611aed81604051806060016040528060228152602001611cf960229139600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4581600554611bb590919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600082821115611c2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c7957805160ff1916838001178555611ca7565b82800160010185558215611ca7579182015b82811115611ca6578251825591602001919060010190611c8b565b5b509050611cb49190611cb8565b5090565b5b80821115611cd1576000816000905550600101611cb9565b509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f20616464726573736275726e2063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573736d696e742063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b3a2ff5f0503f2258e143f986f075a1cf9f8ce968a2954f3953e79c45d383ede64736f6c634300060c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806340c10f19116100a2578063a457c2d711610071578063a457c2d7146104ff578063a7a2d3fb14610563578063a9059cbb146105ab578063dd62ed3e1461060f578063e78cea921461068757610116565b806340c10f191461038857806370a08231146103d657806395d89b411461042e5780639dc29fac146104b157610116565b806318160ddd116100e957806318160ddd146102435780631ba46cfd1461026157806323b872dd1461027f578063313ce56714610303578063395093511461032457610116565b8063026b05391461011b57806306fdde031461013c578063095ea7b3146101bf578063158ef93e14610223575b600080fd5b6101236106bb565b604051808260ff16815260200191505060405180910390f35b6101446106cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610184578082015181840152602081019050610169565b50505050905090810190601f1680156101b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61020b600480360360408110156101d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610800565b60405180821515815260200191505060405180910390f35b61022b61081e565b60405180821515815260200191505060405180910390f35b61024b610831565b6040518082815260200191505060405180910390f35b61026961083b565b6040518082815260200191505060405180910390f35b6102eb6004803603606081101561029557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610841565b60405180821515815260200191505060405180910390f35b61030b61091a565b604051808260ff16815260200191505060405180910390f35b6103706004803603604081101561033a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610931565b60405180821515815260200191505060405180910390f35b6103d46004803603604081101561039e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109e4565b005b610418600480360360208110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a98565b6040518082815260200191505060405180910390f35b610436610ae1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561047657808201518184015260208101905061045b565b50505050905090810190601f1680156104a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104fd600480360360408110156104c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61054b6004803603604081101561051557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b60405180821515815260200191505060405180910390f35b6105a96004803603606081101561057957600080fd5b81019080803560ff16906020019092919080359060200190929190803560ff169060200190929190505050610d04565b005b6105f7600480360360408110156105c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e70565b60405180821515815260200191505060405180910390f35b6106716004803603604081101561062557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e8e565b6040518082815260200191505060405180910390f35b61068f610f15565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900460ff1681565b60606106e760008054906101000a900460ff1660ff16610f3b565b6106ef61107f565b60405160200180807f576f726d686f6c652057726170706564202d200000000000000000000000000081525060130183805190602001908083835b6020831061074d578051825260208201915060208101905060208303925061072a565b6001836020036101000a038019825116818451168082178552505050505050905001807f2d0000000000000000000000000000000000000000000000000000000000000081525060010182805190602001908083835b602083106107c657805182526020820191506020810190506020830392506107a3565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905090565b600061081461080d611243565b848461124b565b6001905092915050565b600260009054906101000a900460ff1681565b6000600554905090565b60015481565b600061084e848484611442565b61090f8461085a611243565b61090a85604051806060016040528060288152602001611d6360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108c0611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b600190509392505050565b6000600760009054906101000a900460ff16905090565b60006109da61093e611243565b846109d5856004600061094f611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b61124b565b6001905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611e1a6025913960400191505060405180910390fd5b610a94828261183e565b5050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b795780601f10610b4e57610100808354040283529160200191610b79565b820191906000526020600020905b815481529060010190602001808311610b5c57829003601f168201915b5050505050905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dd16025913960400191505060405180910390fd5b610c3382826119fb565b5050565b6000610cfa610c44611243565b84610cf585604051806060016040528060258152602001611e3f6025913960046000610c6e611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b6001905092915050565b600260009054906101000a900460ff1615610d87576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548160ff021916908360ff1602179055508160018190555033600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260006101000a81548160ff0219169083151502179055506040518060400160405280600381526020017f575754000000000000000000000000000000000000000000000000000000000081525060069080519060200190610e4f929190611c38565b5080600760006101000a81548160ff021916908360ff160217905550505050565b6000610e84610e7d611243565b8484611442565b6001905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000821415610f83576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061107a565b600082905060005b60008214610fad578080600101915050600a8281610fa557fe5b049150610f8b565b60608167ffffffffffffffff81118015610fc657600080fd5b506040519080825280601f01601f191660200182016040528015610ff95781602001600182028036833780820191505090505b50905060006001830390505b6000861461107257600a868161101757fe5b0660300160f81b8282806001900393508151811061103157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a868161106a57fe5b049550611005565b819450505050505b919050565b6060806040518060400160405280601081526020017f30313233343536373839616263646566000000000000000000000000000000008152509050600060015490506060600260200260020160ff1667ffffffffffffffff811180156110e457600080fd5b506040519080825280601f01601f1916602001820160405280156111175781602001600182028036833780820191505090505b50905060005b602060ff168110156112395783600484836020811061113857fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff168151811061117057fe5b602001015160f81c60f81b82600283028151811061118a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083600f60f81b8483602081106111cb57fe5b1a60f81b1660f81c60ff16815181106111e057fe5b602001015160f81c60f81b8260028302600101815181106111fd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061111d565b5080935050505090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611df66024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611357576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d1b6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dac6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561154e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611cd66023913960400191505060405180910390fd5b6115ba81604051806060016040528060268152602001611d3d60269139600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061164f81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906117a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561176e578082015181840152602081019050611753565b50505050905090810190601f16801561179b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015611834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6118f6816005546117b690919063ffffffff16565b60058190555061194e81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d8b6021913960400191505060405180910390fd5b611aed81604051806060016040528060228152602001611cf960229139600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4581600554611bb590919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600082821115611c2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c7957805160ff1916838001178555611ca7565b82800160010185558215611ca7579182015b82811115611ca6578251825591602001919060010190611c8b565b5b509050611cb49190611cb8565b5090565b5b80821115611cd1576000816000905550600101611cb9565b509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f20616464726573736275726e2063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573736d696e742063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b3a2ff5f0503f2258e143f986f075a1cf9f8ce968a2954f3953e79c45d383ede64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "304:10137:2:-:0;;;1622:2;1596:28;;;;;;;;;;;;;;;;;;;;304:10137;;;;;;;;;;;;;;;;", - "deployedSourceMap": "304:10137:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;351:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1690:176;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4826:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;413:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3849:98;;;:::i;:::-;;;;;;;;;;;;;;;;;;;380:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5444:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3708:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6148:207;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;835:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4005:117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3000:85;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1017:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6842:258;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;470:359;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4325:164;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4547:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;442:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;351:23;;;;;;;;;;;;:::o;1690:176::-;1727:13;1806:24;1819:10;;;;;;;;;;1806:24;;:12;:24::i;:::-;1837:20;:18;:20::i;:::-;1766:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1752:107;;1690:176;:::o;4826:158::-;4901:4;4917:39;4926:12;:10;:12::i;:::-;4940:7;4949:6;4917:8;:39::i;:::-;4973:4;4966:11;;4826:158;;;;:::o;413:23::-;;;;;;;;;;;;;:::o;3849:98::-;3902:7;3928:12;;3921:19;;3849:98;:::o;380:27::-;;;;:::o;5444:309::-;5542:4;5558:36;5568:6;5576:9;5587:6;5558:9;:36::i;:::-;5604:121;5613:6;5621:12;:10;:12::i;:::-;5635:89;5673:6;5635:89;;;;;;;;;;;;;;;;;:11;:19;5647:6;5635:19;;;;;;;;;;;;;;;:33;5655:12;:10;:12::i;:::-;5635:33;;;;;;;;;;;;;;;;:37;;:89;;;;;:::i;:::-;5604:8;:121::i;:::-;5742:4;5735:11;;5444:309;;;;;:::o;3708:81::-;3749:5;3773:9;;;;;;;;;;;3766:16;;3708:81;:::o;6148:207::-;6228:4;6244:83;6253:12;:10;:12::i;:::-;6267:7;6276:50;6315:10;6276:11;:25;6288:12;:10;:12::i;:::-;6276:25;;;;;;;;;;;;;;;:34;6302:7;6276:34;;;;;;;;;;;;;;;;:38;;:50;;;;:::i;:::-;6244:8;:83::i;:::-;6344:4;6337:11;;6148:207;;;;:::o;835:176::-;923:6;;;;;;;;;;;909:20;;:10;:20;;;901:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:22;988:7;997:6;982:5;:22::i;:::-;835:176;;:::o;4005:117::-;4071:7;4097:9;:18;4107:7;4097:18;;;;;;;;;;;;;;;;4090:25;;4005:117;;;:::o;3000:85::-;3039:13;3071:7;3064:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3000:85;:::o;1017:176::-;1105:6;;;;;;;;;;;1091:20;;:10;:20;;;1083:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1164:22;1170:7;1179:6;1164:5;:22::i;:::-;1017:176;;:::o;6842:258::-;6927:4;6943:129;6952:12;:10;:12::i;:::-;6966:7;6975:96;7014:15;6975:96;;;;;;;;;;;;;;;;;:11;:25;6987:12;:10;:12::i;:::-;6975:25;;;;;;;;;;;;;;;:34;7001:7;6975:34;;;;;;;;;;;;;;;;:38;;:96;;;;;:::i;:::-;6943:8;:129::i;:::-;7089:4;7082:11;;6842:258;;;;:::o;470:359::-;574:11;;;;;;;;;;;573:12;565:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;660:11;647:10;;:24;;;;;;;;;;;;;;;;;;696:13;681:12;:28;;;;728:10;719:6;;:19;;;;;;;;;;;;;;;;;;762:4;748:11;;:18;;;;;;;;;;;;;;;;;;777:15;;;;;;;;;;;;;;;;;:7;:15;;;;;;;;;;;;:::i;:::-;;814:8;802:9;;:20;;;;;;;;;;;;;;;;;;470:359;;;:::o;4325:164::-;4403:4;4419:42;4429:12;:10;:12::i;:::-;4443:9;4454:6;4419:9;:42::i;:::-;4478:4;4471:11;;4325:164;;;;:::o;4547:141::-;4628:7;4654:11;:18;4666:5;4654:18;;;;;;;;;;;;;;;:27;4673:7;4654:27;;;;;;;;;;;;;;;;4647:34;;4547:141;;;;:::o;442:21::-;;;;;;;;;;;;;:::o;1922:469::-;1976:27;2025:1;2019:2;:7;2015:48;;;2042:10;;;;;;;;;;;;;;;;;;;;;2015:48;2072:6;2081:2;2072:11;;2093:8;2111:66;2123:1;2118;:6;2111:66;;2140:5;;;;;;;2164:2;2159:7;;;;;;;;;2111:66;;;2186:17;2216:3;2206:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2186:34;;2230:6;2245:1;2239:3;:7;2230:16;;2256:100;2269:1;2263:2;:7;2256:100;;2319:2;2314;:7;;;;;;2309:2;:12;2298:25;;2286:4;2291:3;;;;;;;2286:9;;;;;;;;;;;:37;;;;;;;;;;;2343:2;2337:8;;;;;;;;;2256:100;;;2379:4;2365:19;;;;;;1922:469;;;;:::o;2447:440::-;2499:13;2524:21;:42;;;;;;;;;;;;;;;;;;;2576:12;2591;;2576:27;;2614:16;2661:1;2647:11;:15;2643:1;:19;2633:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2614:49;;2678:6;2673:180;2694:11;2690:15;;:1;:15;2673:180;;;2739:8;2770:1;2759:4;2764:1;2759:7;;;;;;;;;;:12;;;;;2753:19;;2748:25;;2739:35;;;;;;;;;;;;;;;;2726:3;2734:1;2730;:5;2726:10;;;;;;;;;;;:48;;;;;;;;;;;2805:8;2835:4;2825:14;;:4;2830:1;2825:7;;;;;;;;;;:14;2819:21;;2814:27;;2805:37;;;;;;;;;;;;;;;;2788:3;2800:1;2796;:5;2792:1;:9;2788:14;;;;;;;;;;;:54;;;;;;;;;;;2707:3;;;;;;;2673:180;;;;2876:3;2862:18;;;;;2447:440;:::o;598:104:9:-;651:15;685:10;678:17;;598:104;:::o;9696:332:2:-;9806:1;9789:19;;:5;:19;;;;9781:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9886:1;9867:21;;:7;:21;;;;9859:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9968:6;9938:11;:18;9950:5;9938:18;;;;;;;;;;;;;;;:27;9957:7;9938:27;;;;;;;;;;;;;;;:36;;;;10005:7;9989:32;;9998:5;9989:32;;;10014:6;9989:32;;;;;;;;;;;;;;;;;;9696:332;;;:::o;7574:464::-;7689:1;7671:20;;:6;:20;;;;7663:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7772:1;7751:23;;:9;:23;;;;7743:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7845;7867:6;7845:71;;;;;;;;;;;;;;;;;:9;:17;7855:6;7845:17;;;;;;;;;;;;;;;;:21;;:71;;;;;:::i;:::-;7825:9;:17;7835:6;7825:17;;;;;;;;;;;;;;;:91;;;;7949:32;7974:6;7949:9;:20;7959:9;7949:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;7926:9;:20;7936:9;7926:20;;;;;;;;;;;;;;;:55;;;;8013:9;7996:35;;8005:6;7996:35;;;8024:6;7996:35;;;;;;;;;;;;;;;;;;7574:464;;;:::o;5432:163:4:-;5518:7;5550:1;5545;:6;;5553:12;5537:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5587:1;5583;:5;5576:12;;5432:163;;;;;:::o;2690:175::-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o;8308:302:2:-;8402:1;8383:21;;:7;:21;;;;8375:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8466:24;8483:6;8466:12;;:16;;:24;;;;:::i;:::-;8451:12;:39;;;;8521:30;8544:6;8521:9;:18;8531:7;8521:18;;;;;;;;;;;;;;;;:22;;:30;;;;:::i;:::-;8500:9;:18;8510:7;8500:18;;;;;;;;;;;;;;;:51;;;;8587:7;8566:37;;8583:1;8566:37;;;8596:6;8566:37;;;;;;;;;;;;;;;;;;8308:302;;:::o;8929:342::-;9023:1;9004:21;;:7;:21;;;;8996:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9095:68;9118:6;9095:68;;;;;;;;;;;;;;;;;:9;:18;9105:7;9095:18;;;;;;;;;;;;;;;;:22;;:68;;;;;:::i;:::-;9074:9;:18;9084:7;9074:18;;;;;;;;;;;;;;;:89;;;;9188:24;9205:6;9188:12;;:16;;:24;;;;:::i;:::-;9173:12;:39;;;;9253:1;9227:37;;9236:7;9227:37;;;9257:6;9227:37;;;;;;;;;;;;;;;;;;8929:342;;:::o;3136:155:4:-;3194:7;3226:1;3221;:6;;3213:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3283:1;3279;:5;3272:12;;3136:155;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "// contracts/WrappedAsset.sol\n// SPDX-License-Identifier: Apache 2\npragma solidity ^0.6.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\n\ncontract WrappedAsset is IERC20, Context {\n uint8 public assetChain;\n bytes32 public assetAddress;\n bool public initialized;\n address public bridge;\n\n function initialize(uint8 _assetChain, bytes32 _assetAddress, uint8 decimals) public {\n require(!initialized, \"already initialized\");\n // Set local fields\n assetChain = _assetChain;\n assetAddress = _assetAddress;\n bridge = msg.sender;\n initialized = true;\n\n _symbol = \"WWT\";\n _decimals = decimals;\n }\n\n function mint(address account, uint256 amount) external {\n require(msg.sender == bridge, \"mint can only be called by the bridge\");\n\n _mint(account, amount);\n }\n\n function burn(address account, uint256 amount) external {\n require(msg.sender == bridge, \"burn can only be called by the bridge\");\n\n _burn(account, amount);\n }\n\n // Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol\n // Licensed under MIT\n\n using SafeMath for uint256;\n using Address for address;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _symbol;\n uint8 private _decimals = 18;\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return string(abi.encodePacked(\"Wormhole Wrapped - \", uintToString(assetChain), \"-\", assetAddressString()));\n }\n\n // https://ethereum.stackexchange.com/a/40977\n function uintToString(uint _i) internal pure returns (string memory _uintAsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint j = _i;\n uint len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint k = len - 1;\n while (_i != 0) {\n bstr[k--] = byte(uint8(48 + _i % 10));\n _i /= 10;\n }\n return string(bstr);\n }\n\n // https://ethereum.stackexchange.com/a/58341\n function assetAddressString() private view returns (string memory) {\n bytes memory alphabet = \"0123456789abcdef\";\n bytes32 data = assetAddress;\n\n bytes memory str = new bytes(2 + data.length * 2);\n for (uint i = 0; i < data.length; i++) {\n str[i * 2] = alphabet[uint(uint8(data[i] >> 4))];\n str[1 + i * 2] = alphabet[uint(uint8(data[i] & 0x0f))];\n }\n return string(str);\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n}\n", - "sourcePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "ast": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "exportedSymbols": { - "WrappedAsset": [2147] - }, - "id": 2148, - "license": "Apache 2", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1433, - "literals": ["solidity", "^", "0.6", ".0"], - "nodeType": "PragmaDirective", - "src": "67:23:2" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "id": 1434, - "nodeType": "ImportDirective", - "scope": 2148, - "sourceUnit": 3087, - "src": "92:56:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "id": 1435, - "nodeType": "ImportDirective", - "scope": 2148, - "sourceUnit": 2506, - "src": "149:51:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "file": "@openzeppelin/contracts/utils/Address.sol", - "id": 1436, - "nodeType": "ImportDirective", - "scope": 2148, - "sourceUnit": 3596, - "src": "201:51:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", - "file": "@openzeppelin/contracts/GSN/Context.sol", - "id": 1437, - "nodeType": "ImportDirective", - "scope": 2148, - "sourceUnit": 2151, - "src": "253:49:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1438, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3086, - "src": "329:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3086", - "typeString": "contract IERC20" - } - }, - "id": 1439, - "nodeType": "InheritanceSpecifier", - "src": "329:6:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1440, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3618, - "src": "337:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$3618", - "typeString": "contract Context" - } - }, - "id": 1441, - "nodeType": "InheritanceSpecifier", - "src": "337:7:2" - } - ], - "contractDependencies": [3086, 3618], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2147, - "linearizedBaseContracts": [2147, 3618, 3086], - "name": "WrappedAsset", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "026b0539", - "id": 1443, - "mutability": "mutable", - "name": "assetChain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "351:23:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1442, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "351:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "1ba46cfd", - "id": 1445, - "mutability": "mutable", - "name": "assetAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "380:27:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1444, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "380:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "158ef93e", - "id": 1447, - "mutability": "mutable", - "name": "initialized", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "413:23:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1446, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "413:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "e78cea92", - "id": 1449, - "mutability": "mutable", - "name": "bridge", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "442:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1448, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "442:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 1489, - "nodeType": "Block", - "src": "555:274:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "573:12:2", - "subExpression": { - "argumentTypes": null, - "id": 1459, - "name": "initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1447, - "src": "574:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 1461, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "587:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 1458, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "565:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "565:44:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1463, - "nodeType": "ExpressionStatement", - "src": "565:44:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1464, - "name": "assetChain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1443, - "src": "647:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1465, - "name": "_assetChain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1451, - "src": "660:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "647:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1467, - "nodeType": "ExpressionStatement", - "src": "647:24:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1468, - "name": "assetAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "681:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1469, - "name": "_assetAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1453, - "src": "696:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "681:28:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1471, - "nodeType": "ExpressionStatement", - "src": "681:28:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1472, - "name": "bridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1449, - "src": "719:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1473, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "728:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "728:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "719:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1476, - "nodeType": "ExpressionStatement", - "src": "719:19:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1477, - "name": "initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1447, - "src": "748:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1478, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "762:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "748:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1480, - "nodeType": "ExpressionStatement", - "src": "748:18:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1481, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1552, - "src": "777:7:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "575754", - "id": 1482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "787:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0d2d5a94d86195c9aab1dc351352ba0539c6da454bc9b63f5012e79c7d2d46e2", - "typeString": "literal_string \"WWT\"" - }, - "value": "WWT" - }, - "src": "777:15:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 1484, - "nodeType": "ExpressionStatement", - "src": "777:15:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1485, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1555, - "src": "802:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1486, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1455, - "src": "814:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "802:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1488, - "nodeType": "ExpressionStatement", - "src": "802:20:2" - } - ] - }, - "documentation": null, - "functionSelector": "a7a2d3fb", - "id": 1490, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1456, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1451, - "mutability": "mutable", - "name": "_assetChain", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1490, - "src": "490:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1450, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "490:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1453, - "mutability": "mutable", - "name": "_assetAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1490, - "src": "509:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1452, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "509:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1455, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1490, - "src": "532:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1454, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "532:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "489:58:2" - }, - "returnParameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [], - "src": "555:0:2" - }, - "scope": 2147, - "src": "470:359:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1510, - "nodeType": "Block", - "src": "891:120:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1498, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "909:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "909:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1500, - "name": "bridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1449, - "src": "923:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "909:20:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d696e742063616e206f6e6c792062652063616c6c65642062792074686520627269646765", - "id": 1502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "931:39:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e7702acf154d2f82cc8c1dd52813f94b0a08ea733aaf89d0cac26f6b55722c5a", - "typeString": "literal_string \"mint can only be called by the bridge\"" - }, - "value": "mint can only be called by the bridge" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e7702acf154d2f82cc8c1dd52813f94b0a08ea733aaf89d0cac26f6b55722c5a", - "typeString": "literal_string \"mint can only be called by the bridge\"" - } - ], - "id": 1497, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "901:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "901:70:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1504, - "nodeType": "ExpressionStatement", - "src": "901:70:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1506, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "988:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1507, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1494, - "src": "997:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1505, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2043, - "src": "982:5:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "982:22:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1509, - "nodeType": "ExpressionStatement", - "src": "982:22:2" - } - ] - }, - "documentation": null, - "functionSelector": "40c10f19", - "id": 1511, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1492, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1511, - "src": "849:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "849:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1494, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1511, - "src": "866:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1493, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "866:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "848:33:2" - }, - "returnParameters": { - "id": 1496, - "nodeType": "ParameterList", - "parameters": [], - "src": "891:0:2" - }, - "scope": 2147, - "src": "835:176:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 1531, - "nodeType": "Block", - "src": "1073:120:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1519, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1091:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1091:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1521, - "name": "bridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1449, - "src": "1105:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1091:20:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6275726e2063616e206f6e6c792062652063616c6c65642062792074686520627269646765", - "id": 1523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1113:39:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c31242aa9df4d29364b074986b1202ec8729deca727157a31be5e2473387893b", - "typeString": "literal_string \"burn can only be called by the bridge\"" - }, - "value": "burn can only be called by the bridge" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c31242aa9df4d29364b074986b1202ec8729deca727157a31be5e2473387893b", - "typeString": "literal_string \"burn can only be called by the bridge\"" - } - ], - "id": 1518, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "1083:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1083:70:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1525, - "nodeType": "ExpressionStatement", - "src": "1083:70:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1527, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1513, - "src": "1170:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1528, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1515, - "src": "1179:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1526, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2090, - "src": "1164:5:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1164:22:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1530, - "nodeType": "ExpressionStatement", - "src": "1164:22:2" - } - ] - }, - "documentation": null, - "functionSelector": "9dc29fac", - "id": 1532, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1516, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1513, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1532, - "src": "1031:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1512, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1031:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1515, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1532, - "src": "1048:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1514, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1048:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1030:33:2" - }, - "returnParameters": { - "id": 1517, - "nodeType": "ParameterList", - "parameters": [], - "src": "1073:0:2" - }, - "scope": 2147, - "src": "1017:176:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 1535, - "libraryName": { - "contractScope": null, - "id": 1533, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2505, - "src": "1349:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2505", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1343:27:2", - "typeName": { - "id": 1534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1362:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 1538, - "libraryName": { - "contractScope": null, - "id": 1536, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3595, - "src": "1381:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3595", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "1375:26:2", - "typeName": { - "id": 1537, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1393:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "constant": false, - "id": 1542, - "mutability": "mutable", - "name": "_balances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "1407:45:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 1541, - "keyType": { - "id": 1539, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1415:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1407:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 1540, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1426:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 1548, - "mutability": "mutable", - "name": "_allowances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "1459:67:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 1547, - "keyType": { - "id": 1543, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1467:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1459:47:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 1546, - "keyType": { - "id": 1544, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1486:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1478:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 1545, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1497:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 1550, - "mutability": "mutable", - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "1533:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1549, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1533:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 1552, - "mutability": "mutable", - "name": "_symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "1568:22:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 1551, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 1555, - "mutability": "mutable", - "name": "_decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2147, - "src": "1596:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1553, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1596:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 1554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1622:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "private" - }, - { - "body": { - "id": 1575, - "nodeType": "Block", - "src": "1742:124:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "576f726d686f6c652057726170706564202d20", - "id": 1565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1783:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5cf7e3c6b428de30b95e99bd5727c04cd18c12b66cf3176e2f95b4ceb77530a8", - "typeString": "literal_string \"Wormhole Wrapped - \"" - }, - "value": "Wormhole Wrapped - " - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1567, - "name": "assetChain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1443, - "src": "1819:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1566, - "name": "uintToString", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1654, - "src": "1806:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", - "typeString": "function (uint256) pure returns (string memory)" - } - }, - "id": 1568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1806:24:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "hexValue": "2d", - "id": 1569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1832:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", - "typeString": "literal_string \"-\"" - }, - "value": "-" - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1570, - "name": "assetAddressString", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1740, - "src": "1837:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_string_memory_ptr_$", - "typeString": "function () view returns (string memory)" - } - }, - "id": 1571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1837:20:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_5cf7e3c6b428de30b95e99bd5727c04cd18c12b66cf3176e2f95b4ceb77530a8", - "typeString": "literal_string \"Wormhole Wrapped - \"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", - "typeString": "literal_string \"-\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1563, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "1766:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1766:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1766:92:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1759:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_string_storage_ptr_$", - "typeString": "type(string storage pointer)" - }, - "typeName": { - "id": 1561, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1759:6:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1759:100:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 1560, - "id": 1574, - "nodeType": "Return", - "src": "1752:107:2" - } - ] - }, - "documentation": { - "id": 1556, - "nodeType": "StructuredDocumentation", - "src": "1631:54:2", - "text": " @dev Returns the name of the token." - }, - "functionSelector": "06fdde03", - "id": 1576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "name", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1557, - "nodeType": "ParameterList", - "parameters": [], - "src": "1703:2:2" - }, - "returnParameters": { - "id": 1560, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1559, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1576, - "src": "1727:13:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1558, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1727:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1726:15:2" - }, - "scope": 2147, - "src": "1690:176:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1653, - "nodeType": "Block", - "src": "2005:386:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1583, - "name": "_i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2019:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2025:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2019:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1589, - "nodeType": "IfStatement", - "src": "2015:48:2", - "trueBody": { - "id": 1588, - "nodeType": "Block", - "src": "2028:35:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2049:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", - "typeString": "literal_string \"0\"" - }, - "value": "0" - }, - "functionReturnParameters": 1582, - "id": 1587, - "nodeType": "Return", - "src": "2042:10:2" - } - ] - } - }, - { - "assignments": [1591], - "declarations": [ - { - "constant": false, - "id": 1591, - "mutability": "mutable", - "name": "j", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1653, - "src": "2072:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1590, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2072:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1593, - "initialValue": { - "argumentTypes": null, - "id": 1592, - "name": "_i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2081:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2072:11:2" - }, - { - "assignments": [1595], - "declarations": [ - { - "constant": false, - "id": 1595, - "mutability": "mutable", - "name": "len", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1653, - "src": "2093:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1594, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2093:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1596, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "2093:8:2" - }, - { - "body": { - "id": 1607, - "nodeType": "Block", - "src": "2126:51:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2140:5:2", - "subExpression": { - "argumentTypes": null, - "id": 1600, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1595, - "src": "2140:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1602, - "nodeType": "ExpressionStatement", - "src": "2140:5:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1603, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1591, - "src": "2159:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "/=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2164:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "2159:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1606, - "nodeType": "ExpressionStatement", - "src": "2159:7:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1597, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1591, - "src": "2118:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1598, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2123:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2118:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1608, - "nodeType": "WhileStatement", - "src": "2111:66:2" - }, - { - "assignments": [1610], - "declarations": [ - { - "constant": false, - "id": 1610, - "mutability": "mutable", - "name": "bstr", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1653, - "src": "2186:17:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1609, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2186:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1615, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1613, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1595, - "src": "2216:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2206:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (uint256) pure returns (bytes memory)" - }, - "typeName": { - "id": 1611, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2210:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - } - }, - "id": 1614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2206:14:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2186:34:2" - }, - { - "assignments": [1617], - "declarations": [ - { - "constant": false, - "id": 1617, - "mutability": "mutable", - "name": "k", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1653, - "src": "2230:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1616, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2230:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1621, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1618, - "name": "len", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1595, - "src": "2239:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2245:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "2239:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2230:16:2" - }, - { - "body": { - "id": 1646, - "nodeType": "Block", - "src": "2272:84:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1625, - "name": "bstr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "2286:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1628, - "indexExpression": { - "argumentTypes": null, - "id": 1627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "2291:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1626, - "name": "k", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1617, - "src": "2291:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2286:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3438", - "id": 1633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2309:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_48_by_1", - "typeString": "int_const 48" - }, - "value": "48" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1634, - "name": "_i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2314:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2319:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "2314:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2309:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1632, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2303:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint8_$", - "typeString": "type(uint8)" - }, - "typeName": { - "id": 1631, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2303:5:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2303:19:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2298:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes1_$", - "typeString": "type(bytes1)" - }, - "typeName": { - "id": 1629, - "name": "byte", - "nodeType": "ElementaryTypeName", - "src": "2298:4:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2298:25:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "src": "2286:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "id": 1641, - "nodeType": "ExpressionStatement", - "src": "2286:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1642, - "name": "_i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2337:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "/=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1643, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2343:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "2337:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1645, - "nodeType": "ExpressionStatement", - "src": "2337:8:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1622, - "name": "_i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2263:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2269:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2263:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1647, - "nodeType": "WhileStatement", - "src": "2256:100:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1650, - "name": "bstr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "2379:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1649, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2372:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_string_storage_ptr_$", - "typeString": "type(string storage pointer)" - }, - "typeName": { - "id": 1648, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2372:6:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2372:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 1582, - "id": 1652, - "nodeType": "Return", - "src": "2365:19:2" - } - ] - }, - "documentation": null, - "id": 1654, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uintToString", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1578, - "mutability": "mutable", - "name": "_i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1654, - "src": "1944:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1577, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1944:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1943:9:2" - }, - "returnParameters": { - "id": 1582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1581, - "mutability": "mutable", - "name": "_uintAsString", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1654, - "src": "1976:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1580, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1976:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1975:29:2" - }, - "scope": 2147, - "src": "1922:469:2", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1739, - "nodeType": "Block", - "src": "2514:373:2", - "statements": [ - { - "assignments": [1660], - "declarations": [ - { - "constant": false, - "id": 1660, - "mutability": "mutable", - "name": "alphabet", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1739, - "src": "2524:21:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1659, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2524:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1662, - "initialValue": { - "argumentTypes": null, - "hexValue": "30313233343536373839616263646566", - "id": 1661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2548:18:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f", - "typeString": "literal_string \"0123456789abcdef\"" - }, - "value": "0123456789abcdef" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2524:42:2" - }, - { - "assignments": [1664], - "declarations": [ - { - "constant": false, - "id": 1664, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1739, - "src": "2576:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1663, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2576:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1666, - "initialValue": { - "argumentTypes": null, - "id": 1665, - "name": "assetAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "2591:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2576:27:2" - }, - { - "assignments": [1668], - "declarations": [ - { - "constant": false, - "id": 1668, - "mutability": "mutable", - "name": "str", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1739, - "src": "2614:16:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1667, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2614:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1678, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2643:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1672, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "2647:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2647:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2661:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2647:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2643:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2633:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (uint256) pure returns (bytes memory)" - }, - "typeName": { - "id": 1669, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2637:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - } - }, - "id": 1677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2633:30:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2614:49:2" - }, - { - "body": { - "id": 1732, - "nodeType": "Block", - "src": "2712:141:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1690, - "name": "str", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1668, - "src": "2726:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1694, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1691, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2730:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2734:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2730:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2726:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1695, - "name": "alphabet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1660, - "src": "2739:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1707, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - }, - "id": 1704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1700, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "2759:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1702, - "indexExpression": { - "argumentTypes": null, - "id": 1701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2764:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2759:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "hexValue": "34", - "id": 1703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2770:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "src": "2759:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - ], - "id": 1699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2753:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint8_$", - "typeString": "type(uint8)" - }, - "typeName": { - "id": 1698, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2753:5:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2753:19:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1697, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2748:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1696, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2748:4:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2748:25:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2739:35:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "src": "2726:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "id": 1709, - "nodeType": "ExpressionStatement", - "src": "2726:48:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1710, - "name": "str", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1668, - "src": "2788:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1716, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2792:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2796:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2800:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2796:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2792:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2788:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1717, - "name": "alphabet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1660, - "src": "2805:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1729, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - }, - "id": 1726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1722, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "2825:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1724, - "indexExpression": { - "argumentTypes": null, - "id": 1723, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2830:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2825:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "nodeType": "BinaryOperation", - "operator": "&", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30783066", - "id": 1725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2835:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "0x0f" - }, - "src": "2825:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - ], - "id": 1721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2819:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint8_$", - "typeString": "type(uint8)" - }, - "typeName": { - "id": 1720, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2819:5:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2819:21:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 1719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2814:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 1718, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2814:4:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2814:27:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2805:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "src": "2788:54:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - }, - "id": 1731, - "nodeType": "ExpressionStatement", - "src": "2788:54:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1683, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2690:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1684, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1664, - "src": "2694:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2694:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2690:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1733, - "initializationExpression": { - "assignments": [1680], - "declarations": [ - { - "constant": false, - "id": 1680, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1733, - "src": "2678:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1679, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2678:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1682, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1681, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2687:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2678:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2707:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1687, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1680, - "src": "2707:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1689, - "nodeType": "ExpressionStatement", - "src": "2707:3:2" - }, - "nodeType": "ForStatement", - "src": "2673:180:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1736, - "name": "str", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1668, - "src": "2876:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2869:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_string_storage_ptr_$", - "typeString": "type(string storage pointer)" - }, - "typeName": { - "id": 1734, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2869:6:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2869:11:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 1658, - "id": 1738, - "nodeType": "Return", - "src": "2862:18:2" - } - ] - }, - "documentation": null, - "id": 1740, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "assetAddressString", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1655, - "nodeType": "ParameterList", - "parameters": [], - "src": "2474:2:2" - }, - "returnParameters": { - "id": 1658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1657, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1740, - "src": "2499:13:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1656, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2499:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2498:15:2" - }, - "scope": 2147, - "src": "2447:440:2", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1748, - "nodeType": "Block", - "src": "3054:31:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1746, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1552, - "src": "3071:7:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 1745, - "id": 1747, - "nodeType": "Return", - "src": "3064:14:2" - } - ] - }, - "documentation": { - "id": 1741, - "nodeType": "StructuredDocumentation", - "src": "2893:102:2", - "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." - }, - "functionSelector": "95d89b41", - "id": 1749, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "symbol", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1742, - "nodeType": "ParameterList", - "parameters": [], - "src": "3015:2:2" - }, - "returnParameters": { - "id": 1745, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1744, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1749, - "src": "3039:13:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1743, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3039:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3038:15:2" - }, - "scope": 2147, - "src": "3000:85:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1757, - "nodeType": "Block", - "src": "3756:33:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1755, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1555, - "src": "3773:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "functionReturnParameters": 1754, - "id": 1756, - "nodeType": "Return", - "src": "3766:16:2" - } - ] - }, - "documentation": { - "id": 1750, - "nodeType": "StructuredDocumentation", - "src": "3091:612:2", - "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." - }, - "functionSelector": "313ce567", - "id": 1758, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decimals", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1751, - "nodeType": "ParameterList", - "parameters": [], - "src": "3725:2:2" - }, - "returnParameters": { - "id": 1754, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1753, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1758, - "src": "3749:5:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 1752, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "3749:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3748:7:2" - }, - "scope": 2147, - "src": "3708:81:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3017], - "body": { - "id": 1767, - "nodeType": "Block", - "src": "3911:36:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1765, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1550, - "src": "3928:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1764, - "id": 1766, - "nodeType": "Return", - "src": "3921:19:2" - } - ] - }, - "documentation": { - "id": 1759, - "nodeType": "StructuredDocumentation", - "src": "3795:49:2", - "text": " @dev See {IERC20-totalSupply}." - }, - "functionSelector": "18160ddd", - "id": 1768, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1761, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3884:8:2" - }, - "parameters": { - "id": 1760, - "nodeType": "ParameterList", - "parameters": [], - "src": "3869:2:2" - }, - "returnParameters": { - "id": 1764, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1763, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1768, - "src": "3902:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1762, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3902:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3901:9:2" - }, - "scope": 2147, - "src": "3849:98:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3025], - "body": { - "id": 1781, - "nodeType": "Block", - "src": "4080:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1777, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "4097:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1779, - "indexExpression": { - "argumentTypes": null, - "id": 1778, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "4107:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4097:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1776, - "id": 1780, - "nodeType": "Return", - "src": "4090:25:2" - } - ] - }, - "documentation": { - "id": 1769, - "nodeType": "StructuredDocumentation", - "src": "3953:47:2", - "text": " @dev See {IERC20-balanceOf}." - }, - "functionSelector": "70a08231", - "id": 1782, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1773, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4053:8:2" - }, - "parameters": { - "id": 1772, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1771, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1782, - "src": "4024:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1770, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4024:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4023:17:2" - }, - "returnParameters": { - "id": 1776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1775, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1782, - "src": "4071:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4071:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4070:9:2" - }, - "scope": 2147, - "src": "4005:117:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3035], - "body": { - "id": 1802, - "nodeType": "Block", - "src": "4409:80:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1794, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "4429:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4429:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1796, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1785, - "src": "4443:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1797, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1787, - "src": "4454:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1793, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "4419:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4419:42:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1799, - "nodeType": "ExpressionStatement", - "src": "4419:42:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4478:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1792, - "id": 1801, - "nodeType": "Return", - "src": "4471:11:2" - } - ] - }, - "documentation": { - "id": 1783, - "nodeType": "StructuredDocumentation", - "src": "4128:192:2", - "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`." - }, - "functionSelector": "a9059cbb", - "id": 1803, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1789, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4385:8:2" - }, - "parameters": { - "id": 1788, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1785, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1803, - "src": "4343:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4343:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1787, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1803, - "src": "4362:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1786, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4342:35:2" - }, - "returnParameters": { - "id": 1792, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1791, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1803, - "src": "4403:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1790, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4403:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4402:6:2" - }, - "scope": 2147, - "src": "4325:164:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3045], - "body": { - "id": 1820, - "nodeType": "Block", - "src": "4637:51:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1814, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1548, - "src": "4654:11:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 1816, - "indexExpression": { - "argumentTypes": null, - "id": 1815, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1806, - "src": "4666:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4654:18:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1818, - "indexExpression": { - "argumentTypes": null, - "id": 1817, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1808, - "src": "4673:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4654:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1813, - "id": 1819, - "nodeType": "Return", - "src": "4647:34:2" - } - ] - }, - "documentation": { - "id": 1804, - "nodeType": "StructuredDocumentation", - "src": "4495:47:2", - "text": " @dev See {IERC20-allowance}." - }, - "functionSelector": "dd62ed3e", - "id": 1821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1810, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4610:8:2" - }, - "parameters": { - "id": 1809, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1806, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1821, - "src": "4566:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1805, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4566:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1808, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1821, - "src": "4581:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1807, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4581:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4565:32:2" - }, - "returnParameters": { - "id": 1813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1812, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1821, - "src": "4628:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4628:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4627:9:2" - }, - "scope": 2147, - "src": "4547:141:2", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3055], - "body": { - "id": 1841, - "nodeType": "Block", - "src": "4907:77:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1833, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "4926:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1834, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4926:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1835, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1824, - "src": "4940:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1836, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1826, - "src": "4949:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1832, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2135, - "src": "4917:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4917:39:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1838, - "nodeType": "ExpressionStatement", - "src": "4917:39:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4973:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1831, - "id": 1840, - "nodeType": "Return", - "src": "4966:11:2" - } - ] - }, - "documentation": { - "id": 1822, - "nodeType": "StructuredDocumentation", - "src": "4694:127:2", - "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address." - }, - "functionSelector": "095ea7b3", - "id": 1842, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1828, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4883:8:2" - }, - "parameters": { - "id": 1827, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1824, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1842, - "src": "4843:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1823, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4843:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1826, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1842, - "src": "4860:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1825, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4860:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4842:33:2" - }, - "returnParameters": { - "id": 1831, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1830, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1842, - "src": "4901:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1829, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4901:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4900:6:2" - }, - "scope": 2147, - "src": "4826:158:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [3067], - "body": { - "id": 1879, - "nodeType": "Block", - "src": "5548:205:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1856, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "5568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1857, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1847, - "src": "5576:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1858, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1849, - "src": "5587:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1855, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "5558:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5558:36:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1860, - "nodeType": "ExpressionStatement", - "src": "5558:36:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1862, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "5613:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1863, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5621:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5621:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1872, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1849, - "src": "5673:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", - "id": 1873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5681:42:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - }, - "value": "ERC20: transfer amount exceeds allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1865, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1548, - "src": "5635:11:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 1867, - "indexExpression": { - "argumentTypes": null, - "id": 1866, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "5647:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5635:19:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1870, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1868, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "5655:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5655:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5635:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "5635:37:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5635:89:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1861, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2135, - "src": "5604:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5604:121:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1876, - "nodeType": "ExpressionStatement", - "src": "5604:121:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1877, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5742:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1854, - "id": 1878, - "nodeType": "Return", - "src": "5735:11:2" - } - ] - }, - "documentation": { - "id": 1843, - "nodeType": "StructuredDocumentation", - "src": "4990:449:2", - "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20};\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`." - }, - "functionSelector": "23b872dd", - "id": 1880, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1851, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "5524:8:2" - }, - "parameters": { - "id": 1850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1845, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1880, - "src": "5466:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1844, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5466:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1847, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1880, - "src": "5482:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1846, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5482:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1849, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1880, - "src": "5501:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5501:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5465:51:2" - }, - "returnParameters": { - "id": 1854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1853, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1880, - "src": "5542:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1852, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5542:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5541:6:2" - }, - "scope": 2147, - "src": "5444:309:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1907, - "nodeType": "Block", - "src": "6234:121:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1891, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6253:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6253:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1893, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1883, - "src": "6267:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1901, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1885, - "src": "6315:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1894, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1548, - "src": "6276:11:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 1897, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1895, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6288:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6288:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6276:25:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1899, - "indexExpression": { - "argumentTypes": null, - "id": 1898, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1883, - "src": "6302:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6276:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "6276:38:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6276:50:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1890, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2135, - "src": "6244:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6244:83:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1904, - "nodeType": "ExpressionStatement", - "src": "6244:83:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6344:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1889, - "id": 1906, - "nodeType": "Return", - "src": "6337:11:2" - } - ] - }, - "documentation": { - "id": 1881, - "nodeType": "StructuredDocumentation", - "src": "5759:384:2", - "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address." - }, - "functionSelector": "39509351", - "id": 1908, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1886, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1883, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1908, - "src": "6175:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6175:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1885, - "mutability": "mutable", - "name": "addedValue", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1908, - "src": "6192:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1884, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6192:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6174:37:2" - }, - "returnParameters": { - "id": 1889, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1888, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1908, - "src": "6228:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1887, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6228:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6227:6:2" - }, - "scope": 2147, - "src": "6148:207:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1936, - "nodeType": "Block", - "src": "6933:167:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1919, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6952:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1921, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1911, - "src": "6966:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1929, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1913, - "src": "7014:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 1930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7031:39:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - }, - "value": "ERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1922, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1548, - "src": "6975:11:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 1925, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1923, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3606, - "src": "6987:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6987:12:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6975:25:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1927, - "indexExpression": { - "argumentTypes": null, - "id": 1926, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1911, - "src": "7001:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6975:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "6975:38:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6975:96:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1918, - "name": "_approve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2135, - "src": "6943:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6943:129:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1933, - "nodeType": "ExpressionStatement", - "src": "6943:129:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7089:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1917, - "id": 1935, - "nodeType": "Return", - "src": "7082:11:2" - } - ] - }, - "documentation": { - "id": 1909, - "nodeType": "StructuredDocumentation", - "src": "6361:476:2", - "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`." - }, - "functionSelector": "a457c2d7", - "id": 1937, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1911, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1937, - "src": "6869:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1910, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6869:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1913, - "mutability": "mutable", - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1937, - "src": "6886:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1912, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6886:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:42:2" - }, - "returnParameters": { - "id": 1917, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1916, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1937, - "src": "6927:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1915, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6927:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6926:6:2" - }, - "scope": 2147, - "src": "6842:258:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1996, - "nodeType": "Block", - "src": "7653:385:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1948, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "7671:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7689:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7681:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7681:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7681:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7671:20:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", - "id": 1954, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7693:39:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - }, - "value": "ERC20: transfer from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - } - ], - "id": 1947, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7663:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7663:70:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1956, - "nodeType": "ExpressionStatement", - "src": "7663:70:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1958, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "7751:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7772:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1959, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7764:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7764:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7751:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", - "id": 1964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7776:37:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - }, - "value": "ERC20: transfer to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - } - ], - "id": 1957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7743:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7743:71:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1966, - "nodeType": "ExpressionStatement", - "src": "7743:71:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1967, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "7825:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1969, - "indexExpression": { - "argumentTypes": null, - "id": 1968, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "7835:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7825:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1974, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1944, - "src": "7867:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", - "id": 1975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7875:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - }, - "value": "ERC20: transfer amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1970, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "7845:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1972, - "indexExpression": { - "argumentTypes": null, - "id": 1971, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "7855:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7845:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "7845:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7845:71:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7825:91:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1978, - "nodeType": "ExpressionStatement", - "src": "7825:91:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1979, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "7926:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1981, - "indexExpression": { - "argumentTypes": null, - "id": 1980, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "7936:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7926:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1986, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1944, - "src": "7974:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1982, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "7949:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1984, - "indexExpression": { - "argumentTypes": null, - "id": 1983, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "7959:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7949:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "7949:24:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7949:32:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7926:55:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1989, - "nodeType": "ExpressionStatement", - "src": "7926:55:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1991, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "8005:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1992, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1942, - "src": "8013:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1993, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1944, - "src": "8024:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1990, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "7996:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 1994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7996:35:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1995, - "nodeType": "EmitStatement", - "src": "7991:40:2" - } - ] - }, - "documentation": { - "id": 1938, - "nodeType": "StructuredDocumentation", - "src": "7106:463:2", - "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`." - }, - "id": 1997, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1945, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1940, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "7593:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1939, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7593:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1942, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "7609:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1941, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7609:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1944, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "7628:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7628:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:51:2" - }, - "returnParameters": { - "id": 1946, - "nodeType": "ParameterList", - "parameters": [], - "src": "7653:0:2" - }, - "scope": 2147, - "src": "7574:464:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2042, - "nodeType": "Block", - "src": "8365:245:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2006, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2000, - "src": "8383:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8394:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8394:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2010, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8394:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8383:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", - "id": 2012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8406:33:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - }, - "value": "ERC20: mint to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - } - ], - "id": 2005, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "8375:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8375:65:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2014, - "nodeType": "ExpressionStatement", - "src": "8375:65:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2015, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1550, - "src": "8451:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2018, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2002, - "src": "8483:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2016, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1550, - "src": "8466:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "8466:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8466:24:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8451:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2021, - "nodeType": "ExpressionStatement", - "src": "8451:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2022, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "8500:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2024, - "indexExpression": { - "argumentTypes": null, - "id": 2023, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2000, - "src": "8510:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8500:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2029, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2002, - "src": "8544:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2025, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "8521:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2027, - "indexExpression": { - "argumentTypes": null, - "id": 2026, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2000, - "src": "8531:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8521:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "8521:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8521:30:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8500:51:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2032, - "nodeType": "ExpressionStatement", - "src": "8500:51:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8583:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8575:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8575:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8575:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2038, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2000, - "src": "8587:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2039, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2002, - "src": "8596:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2033, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "8566:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8566:37:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2041, - "nodeType": "EmitStatement", - "src": "8561:42:2" - } - ] - }, - "documentation": { - "id": 1998, - "nodeType": "StructuredDocumentation", - "src": "8044:259:2", - "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements\n - `to` cannot be the zero address." - }, - "id": 2043, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2003, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2000, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2043, - "src": "8323:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1999, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8323:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2002, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2043, - "src": "8340:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2001, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8340:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8322:33:2" - }, - "returnParameters": { - "id": 2004, - "nodeType": "ParameterList", - "parameters": [], - "src": "8365:0:2" - }, - "scope": 2147, - "src": "8308:302:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2089, - "nodeType": "Block", - "src": "8986:285:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2052, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2046, - "src": "9004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9023:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9015:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2053, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9015:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9015:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9004:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", - "id": 2058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9027:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - }, - "value": "ERC20: burn from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - } - ], - "id": 2051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "8996:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8996:67:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2060, - "nodeType": "ExpressionStatement", - "src": "8996:67:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2061, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "9074:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2063, - "indexExpression": { - "argumentTypes": null, - "id": 2062, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2046, - "src": "9084:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9074:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2068, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2048, - "src": "9118:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9126:36:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - }, - "value": "ERC20: burn amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2064, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1542, - "src": "9095:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2066, - "indexExpression": { - "argumentTypes": null, - "id": 2065, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2046, - "src": "9105:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9095:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2456, - "src": "9095:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9095:68:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9074:89:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2072, - "nodeType": "ExpressionStatement", - "src": "9074:89:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2073, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1550, - "src": "9173:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2076, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2048, - "src": "9205:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2074, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1550, - "src": "9188:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2354, - "src": "9188:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9188:24:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9173:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2079, - "nodeType": "ExpressionStatement", - "src": "9173:39:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2081, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2046, - "src": "9236:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2084, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9253:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9245:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2082, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9245:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9245:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2086, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2048, - "src": "9257:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2080, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3076, - "src": "9227:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9227:37:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2088, - "nodeType": "EmitStatement", - "src": "9222:42:2" - } - ] - }, - "documentation": { - "id": 2044, - "nodeType": "StructuredDocumentation", - "src": "8616:308:2", - "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens." - }, - "id": 2090, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2049, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2046, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2090, - "src": "8944:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2045, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8944:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2048, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2090, - "src": "8961:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2047, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8961:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8943:33:2" - }, - "returnParameters": { - "id": 2050, - "nodeType": "ParameterList", - "parameters": [], - "src": "8986:0:2" - }, - "scope": 2147, - "src": "8929:342:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2134, - "nodeType": "Block", - "src": "9771:257:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2101, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2093, - "src": "9789:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9806:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2103, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9798:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9798:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9798:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9789:19:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", - "id": 2107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9810:38:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - }, - "value": "ERC20: approve from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - } - ], - "id": 2100, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9781:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:68:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2109, - "nodeType": "ExpressionStatement", - "src": "9781:68:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2111, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2095, - "src": "9867:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9886:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2113, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9878:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9878:7:2", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9878:10:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9867:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", - "id": 2117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9890:36:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - }, - "value": "ERC20: approve to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - } - ], - "id": 2110, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "9859:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9859:68:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2119, - "nodeType": "ExpressionStatement", - "src": "9859:68:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2120, - "name": "_allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1548, - "src": "9938:11:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 2123, - "indexExpression": { - "argumentTypes": null, - "id": 2121, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2093, - "src": "9950:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9938:18:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2124, - "indexExpression": { - "argumentTypes": null, - "id": 2122, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2095, - "src": "9957:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9938:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2125, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2097, - "src": "9968:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9938:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2127, - "nodeType": "ExpressionStatement", - "src": "9938:36:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2129, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2093, - "src": "9998:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2130, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2095, - "src": "10005:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2131, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2097, - "src": "10014:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2128, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3085, - "src": "9989:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9989:32:2", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2133, - "nodeType": "EmitStatement", - "src": "9984:37:2" - } - ] - }, - "documentation": { - "id": 2091, - "nodeType": "StructuredDocumentation", - "src": "9277:414:2", - "text": " @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n This is internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address." - }, - "id": 2135, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_approve", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2093, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2135, - "src": "9714:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2092, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9714:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2095, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2135, - "src": "9729:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9729:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2097, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2135, - "src": "9746:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9746:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9713:48:2" - }, - "returnParameters": { - "id": 2099, - "nodeType": "ParameterList", - "parameters": [], - "src": "9771:0:2" - }, - "scope": 2147, - "src": "9696:332:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2145, - "nodeType": "Block", - "src": "10401:38:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2141, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1555, - "src": "10411:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2142, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2138, - "src": "10423:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "10411:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 2144, - "nodeType": "ExpressionStatement", - "src": "10411:21:2" - } - ] - }, - "documentation": { - "id": 2136, - "nodeType": "StructuredDocumentation", - "src": "10034:312:2", - "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does." - }, - "id": 2146, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setupDecimals", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2139, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2138, - "mutability": "mutable", - "name": "decimals_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2146, - "src": "10375:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2137, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10375:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10374:17:2" - }, - "returnParameters": { - "id": 2140, - "nodeType": "ParameterList", - "parameters": [], - "src": "10401:0:2" - }, - "scope": 2147, - "src": "10351:88:2", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 2148, - "src": "304:10137:2" - } - ], - "src": "67:10375:2" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/bartosz.lipinski/Workspace/wormhole/ethereum/contracts/WrappedAsset.sol", - "exportedSymbols": { - "WrappedAsset": [2147] - }, - "license": "Apache 2" - }, - "children": [ - { - "attributes": { - "literals": ["solidity", "^", "0.6", ".0"] - }, - "id": 1433, - "name": "PragmaDirective", - "src": "67:23:2" - }, - { - "attributes": { - "SourceUnit": 3087, - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "scope": 2148, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 1434, - "name": "ImportDirective", - "src": "92:56:2" - }, - { - "attributes": { - "SourceUnit": 2506, - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "scope": 2148, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 1435, - "name": "ImportDirective", - "src": "149:51:2" - }, - { - "attributes": { - "SourceUnit": 3596, - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "file": "@openzeppelin/contracts/utils/Address.sol", - "scope": 2148, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 1436, - "name": "ImportDirective", - "src": "201:51:2" - }, - { - "attributes": { - "SourceUnit": 2151, - "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", - "file": "@openzeppelin/contracts/GSN/Context.sol", - "scope": 2148, - "symbolAliases": [null], - "unitAlias": "" - }, - "id": 1437, - "name": "ImportDirective", - "src": "253:49:2" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [3086, 3618], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [2147, 3618, 3086], - "name": "WrappedAsset", - "scope": 2148 - }, - "children": [ - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "IERC20", - "referencedDeclaration": 3086, - "type": "contract IERC20" - }, - "id": 1438, - "name": "UserDefinedTypeName", - "src": "329:6:2" - } - ], - "id": 1439, - "name": "InheritanceSpecifier", - "src": "329:6:2" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Context", - "referencedDeclaration": 3618, - "type": "contract Context" - }, - "id": 1440, - "name": "UserDefinedTypeName", - "src": "337:7:2" - } - ], - "id": 1441, - "name": "InheritanceSpecifier", - "src": "337:7:2" - }, - { - "attributes": { - "constant": false, - "functionSelector": "026b0539", - "mutability": "mutable", - "name": "assetChain", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1442, - "name": "ElementaryTypeName", - "src": "351:5:2" - } - ], - "id": 1443, - "name": "VariableDeclaration", - "src": "351:23:2" - }, - { - "attributes": { - "constant": false, - "functionSelector": "1ba46cfd", - "mutability": "mutable", - "name": "assetAddress", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1444, - "name": "ElementaryTypeName", - "src": "380:7:2" - } - ], - "id": 1445, - "name": "VariableDeclaration", - "src": "380:27:2" - }, - { - "attributes": { - "constant": false, - "functionSelector": "158ef93e", - "mutability": "mutable", - "name": "initialized", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1446, - "name": "ElementaryTypeName", - "src": "413:4:2" - } - ], - "id": 1447, - "name": "VariableDeclaration", - "src": "413:23:2" - }, - { - "attributes": { - "constant": false, - "functionSelector": "e78cea92", - "mutability": "mutable", - "name": "bridge", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1448, - "name": "ElementaryTypeName", - "src": "442:7:2" - } - ], - "id": 1449, - "name": "VariableDeclaration", - "src": "442:21:2" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "a7a2d3fb", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "initialize", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_assetChain", - "overrides": null, - "scope": 1490, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1450, - "name": "ElementaryTypeName", - "src": "490:5:2" - } - ], - "id": 1451, - "name": "VariableDeclaration", - "src": "490:17:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_assetAddress", - "overrides": null, - "scope": 1490, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1452, - "name": "ElementaryTypeName", - "src": "509:7:2" - } - ], - "id": 1453, - "name": "VariableDeclaration", - "src": "509:21:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals", - "overrides": null, - "scope": 1490, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1454, - "name": "ElementaryTypeName", - "src": "532:5:2" - } - ], - "id": 1455, - "name": "VariableDeclaration", - "src": "532:14:2" - } - ], - "id": 1456, - "name": "ParameterList", - "src": "489:58:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1457, - "name": "ParameterList", - "src": "555:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1458, - "name": "Identifier", - "src": "565:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1447, - "type": "bool", - "value": "initialized" - }, - "id": 1459, - "name": "Identifier", - "src": "574:11:2" - } - ], - "id": 1460, - "name": "UnaryOperation", - "src": "573:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "616c726561647920696e697469616c697a6564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"already initialized\"", - "value": "already initialized" - }, - "id": 1461, - "name": "Literal", - "src": "587:21:2" - } - ], - "id": 1462, - "name": "FunctionCall", - "src": "565:44:2" - } - ], - "id": 1463, - "name": "ExpressionStatement", - "src": "565:44:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1443, - "type": "uint8", - "value": "assetChain" - }, - "id": 1464, - "name": "Identifier", - "src": "647:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1451, - "type": "uint8", - "value": "_assetChain" - }, - "id": 1465, - "name": "Identifier", - "src": "660:11:2" - } - ], - "id": 1466, - "name": "Assignment", - "src": "647:24:2" - } - ], - "id": 1467, - "name": "ExpressionStatement", - "src": "647:24:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1445, - "type": "bytes32", - "value": "assetAddress" - }, - "id": 1468, - "name": "Identifier", - "src": "681:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1453, - "type": "bytes32", - "value": "_assetAddress" - }, - "id": 1469, - "name": "Identifier", - "src": "696:13:2" - } - ], - "id": 1470, - "name": "Assignment", - "src": "681:28:2" - } - ], - "id": 1471, - "name": "ExpressionStatement", - "src": "681:28:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1449, - "type": "address", - "value": "bridge" - }, - "id": 1472, - "name": "Identifier", - "src": "719:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1473, - "name": "Identifier", - "src": "728:3:2" - } - ], - "id": 1474, - "name": "MemberAccess", - "src": "728:10:2" - } - ], - "id": 1475, - "name": "Assignment", - "src": "719:19:2" - } - ], - "id": 1476, - "name": "ExpressionStatement", - "src": "719:19:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1447, - "type": "bool", - "value": "initialized" - }, - "id": 1477, - "name": "Identifier", - "src": "748:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1478, - "name": "Literal", - "src": "762:4:2" - } - ], - "id": 1479, - "name": "Assignment", - "src": "748:18:2" - } - ], - "id": 1480, - "name": "ExpressionStatement", - "src": "748:18:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "string storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1552, - "type": "string storage ref", - "value": "_symbol" - }, - "id": 1481, - "name": "Identifier", - "src": "777:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "575754", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"WWT\"", - "value": "WWT" - }, - "id": 1482, - "name": "Literal", - "src": "787:5:2" - } - ], - "id": 1483, - "name": "Assignment", - "src": "777:15:2" - } - ], - "id": 1484, - "name": "ExpressionStatement", - "src": "777:15:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1555, - "type": "uint8", - "value": "_decimals" - }, - "id": 1485, - "name": "Identifier", - "src": "802:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1455, - "type": "uint8", - "value": "decimals" - }, - "id": 1486, - "name": "Identifier", - "src": "814:8:2" - } - ], - "id": 1487, - "name": "Assignment", - "src": "802:20:2" - } - ], - "id": 1488, - "name": "ExpressionStatement", - "src": "802:20:2" - } - ], - "id": 1489, - "name": "Block", - "src": "555:274:2" - } - ], - "id": 1490, - "name": "FunctionDefinition", - "src": "470:359:2" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "40c10f19", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "mint", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 1511, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1491, - "name": "ElementaryTypeName", - "src": "849:7:2" - } - ], - "id": 1492, - "name": "VariableDeclaration", - "src": "849:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1511, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1493, - "name": "ElementaryTypeName", - "src": "866:7:2" - } - ], - "id": 1494, - "name": "VariableDeclaration", - "src": "866:14:2" - } - ], - "id": 1495, - "name": "ParameterList", - "src": "848:33:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1496, - "name": "ParameterList", - "src": "891:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e7702acf154d2f82cc8c1dd52813f94b0a08ea733aaf89d0cac26f6b55722c5a", - "typeString": "literal_string \"mint can only be called by the bridge\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1497, - "name": "Identifier", - "src": "901:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1498, - "name": "Identifier", - "src": "909:3:2" - } - ], - "id": 1499, - "name": "MemberAccess", - "src": "909:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1449, - "type": "address", - "value": "bridge" - }, - "id": 1500, - "name": "Identifier", - "src": "923:6:2" - } - ], - "id": 1501, - "name": "BinaryOperation", - "src": "909:20:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6d696e742063616e206f6e6c792062652063616c6c65642062792074686520627269646765", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"mint can only be called by the bridge\"", - "value": "mint can only be called by the bridge" - }, - "id": 1502, - "name": "Literal", - "src": "931:39:2" - } - ], - "id": 1503, - "name": "FunctionCall", - "src": "901:70:2" - } - ], - "id": 1504, - "name": "ExpressionStatement", - "src": "901:70:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2043, - "type": "function (address,uint256)", - "value": "_mint" - }, - "id": 1505, - "name": "Identifier", - "src": "982:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1492, - "type": "address", - "value": "account" - }, - "id": 1506, - "name": "Identifier", - "src": "988:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1494, - "type": "uint256", - "value": "amount" - }, - "id": 1507, - "name": "Identifier", - "src": "997:6:2" - } - ], - "id": 1508, - "name": "FunctionCall", - "src": "982:22:2" - } - ], - "id": 1509, - "name": "ExpressionStatement", - "src": "982:22:2" - } - ], - "id": 1510, - "name": "Block", - "src": "891:120:2" - } - ], - "id": 1511, - "name": "FunctionDefinition", - "src": "835:176:2" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "9dc29fac", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "burn", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 1532, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1512, - "name": "ElementaryTypeName", - "src": "1031:7:2" - } - ], - "id": 1513, - "name": "VariableDeclaration", - "src": "1031:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1532, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1514, - "name": "ElementaryTypeName", - "src": "1048:7:2" - } - ], - "id": 1515, - "name": "VariableDeclaration", - "src": "1048:14:2" - } - ], - "id": 1516, - "name": "ParameterList", - "src": "1030:33:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1517, - "name": "ParameterList", - "src": "1073:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c31242aa9df4d29364b074986b1202ec8729deca727157a31be5e2473387893b", - "typeString": "literal_string \"burn can only be called by the bridge\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1518, - "name": "Identifier", - "src": "1083:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address payable" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -15, - "type": "msg", - "value": "msg" - }, - "id": 1519, - "name": "Identifier", - "src": "1091:3:2" - } - ], - "id": 1520, - "name": "MemberAccess", - "src": "1091:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1449, - "type": "address", - "value": "bridge" - }, - "id": 1521, - "name": "Identifier", - "src": "1105:6:2" - } - ], - "id": 1522, - "name": "BinaryOperation", - "src": "1091:20:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "6275726e2063616e206f6e6c792062652063616c6c65642062792074686520627269646765", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"burn can only be called by the bridge\"", - "value": "burn can only be called by the bridge" - }, - "id": 1523, - "name": "Literal", - "src": "1113:39:2" - } - ], - "id": 1524, - "name": "FunctionCall", - "src": "1083:70:2" - } - ], - "id": 1525, - "name": "ExpressionStatement", - "src": "1083:70:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2090, - "type": "function (address,uint256)", - "value": "_burn" - }, - "id": 1526, - "name": "Identifier", - "src": "1164:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1513, - "type": "address", - "value": "account" - }, - "id": 1527, - "name": "Identifier", - "src": "1170:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1515, - "type": "uint256", - "value": "amount" - }, - "id": 1528, - "name": "Identifier", - "src": "1179:6:2" - } - ], - "id": 1529, - "name": "FunctionCall", - "src": "1164:22:2" - } - ], - "id": 1530, - "name": "ExpressionStatement", - "src": "1164:22:2" - } - ], - "id": 1531, - "name": "Block", - "src": "1073:120:2" - } - ], - "id": 1532, - "name": "FunctionDefinition", - "src": "1017:176:2" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "SafeMath", - "referencedDeclaration": 2505, - "type": "library SafeMath" - }, - "id": 1533, - "name": "UserDefinedTypeName", - "src": "1349:8:2" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1534, - "name": "ElementaryTypeName", - "src": "1362:7:2" - } - ], - "id": 1535, - "name": "UsingForDirective", - "src": "1343:27:2" - }, - { - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Address", - "referencedDeclaration": 3595, - "type": "library Address" - }, - "id": 1536, - "name": "UserDefinedTypeName", - "src": "1381:7:2" - }, - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1537, - "name": "ElementaryTypeName", - "src": "1393:7:2" - } - ], - "id": 1538, - "name": "UsingForDirective", - "src": "1375:26:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_balances", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => uint256)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 1539, - "name": "ElementaryTypeName", - "src": "1415:7:2" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1540, - "name": "ElementaryTypeName", - "src": "1426:7:2" - } - ], - "id": 1541, - "name": "Mapping", - "src": "1407:27:2" - } - ], - "id": 1542, - "name": "VariableDeclaration", - "src": "1407:45:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_allowances", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(address => mapping(address => uint256))", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 1543, - "name": "ElementaryTypeName", - "src": "1467:7:2" - }, - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 1544, - "name": "ElementaryTypeName", - "src": "1486:7:2" - }, - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1545, - "name": "ElementaryTypeName", - "src": "1497:7:2" - } - ], - "id": 1546, - "name": "Mapping", - "src": "1478:27:2" - } - ], - "id": 1547, - "name": "Mapping", - "src": "1459:47:2" - } - ], - "id": 1548, - "name": "VariableDeclaration", - "src": "1459:67:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_totalSupply", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1549, - "name": "ElementaryTypeName", - "src": "1533:7:2" - } - ], - "id": 1550, - "name": "VariableDeclaration", - "src": "1533:28:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_symbol", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "string", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1551, - "name": "ElementaryTypeName", - "src": "1568:6:2" - } - ], - "id": 1552, - "name": "VariableDeclaration", - "src": "1568:22:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_decimals", - "overrides": null, - "scope": 2147, - "stateVariable": true, - "storageLocation": "default", - "type": "uint8", - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1553, - "name": "ElementaryTypeName", - "src": "1596:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3138", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 18", - "value": "18" - }, - "id": 1554, - "name": "Literal", - "src": "1622:2:2" - } - ], - "id": 1555, - "name": "VariableDeclaration", - "src": "1596:28:2" - }, - { - "attributes": { - "functionSelector": "06fdde03", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "name", - "overrides": null, - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the name of the token." - }, - "id": 1556, - "name": "StructuredDocumentation", - "src": "1631:54:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1557, - "name": "ParameterList", - "src": "1703:2:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1576, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1558, - "name": "ElementaryTypeName", - "src": "1727:6:2" - } - ], - "id": 1559, - "name": "VariableDeclaration", - "src": "1727:13:2" - } - ], - "id": 1560, - "name": "ParameterList", - "src": "1726:15:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1560 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "string memory", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(string storage pointer)" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": null - }, - "id": 1561, - "name": "ElementaryTypeName", - "src": "1759:6:2" - } - ], - "id": 1562, - "name": "ElementaryTypeNameExpression", - "src": "1759:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_5cf7e3c6b428de30b95e99bd5727c04cd18c12b66cf3176e2f95b4ceb77530a8", - "typeString": "literal_string \"Wormhole Wrapped - \"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", - "typeString": "literal_string \"-\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "member_name": "encodePacked", - "referencedDeclaration": null, - "type": "function () pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": -1, - "type": "abi", - "value": "abi" - }, - "id": 1563, - "name": "Identifier", - "src": "1766:3:2" - } - ], - "id": 1564, - "name": "MemberAccess", - "src": "1766:16:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "576f726d686f6c652057726170706564202d20", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Wormhole Wrapped - \"", - "value": "Wormhole Wrapped - " - }, - "id": 1565, - "name": "Literal", - "src": "1783:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "string memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1654, - "type": "function (uint256) pure returns (string memory)", - "value": "uintToString" - }, - "id": 1566, - "name": "Identifier", - "src": "1806:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1443, - "type": "uint8", - "value": "assetChain" - }, - "id": 1567, - "name": "Identifier", - "src": "1819:10:2" - } - ], - "id": 1568, - "name": "FunctionCall", - "src": "1806:24:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "2d", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"-\"", - "value": "-" - }, - "id": 1569, - "name": "Literal", - "src": "1832:3:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "string memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 1740, - "type": "function () view returns (string memory)", - "value": "assetAddressString" - }, - "id": 1570, - "name": "Identifier", - "src": "1837:18:2" - } - ], - "id": 1571, - "name": "FunctionCall", - "src": "1837:20:2" - } - ], - "id": 1572, - "name": "FunctionCall", - "src": "1766:92:2" - } - ], - "id": 1573, - "name": "FunctionCall", - "src": "1759:100:2" - } - ], - "id": 1574, - "name": "Return", - "src": "1752:107:2" - } - ], - "id": 1575, - "name": "Block", - "src": "1742:124:2" - } - ], - "id": 1576, - "name": "FunctionDefinition", - "src": "1690:176:2" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "uintToString", - "overrides": null, - "scope": 2147, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_i", - "overrides": null, - "scope": 1654, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 1577, - "name": "ElementaryTypeName", - "src": "1944:4:2" - } - ], - "id": 1578, - "name": "VariableDeclaration", - "src": "1944:7:2" - } - ], - "id": 1579, - "name": "ParameterList", - "src": "1943:9:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_uintAsString", - "overrides": null, - "scope": 1654, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1580, - "name": "ElementaryTypeName", - "src": "1976:6:2" - } - ], - "id": 1581, - "name": "VariableDeclaration", - "src": "1976:27:2" - } - ], - "id": 1582, - "name": "ParameterList", - "src": "1975:29:2" - }, - { - "children": [ - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1578, - "type": "uint256", - "value": "_i" - }, - "id": 1583, - "name": "Identifier", - "src": "2019:2:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1584, - "name": "Literal", - "src": "2025:1:2" - } - ], - "id": 1585, - "name": "BinaryOperation", - "src": "2019:7:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1582 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"0\"", - "value": "0" - }, - "id": 1586, - "name": "Literal", - "src": "2049:3:2" - } - ], - "id": 1587, - "name": "Return", - "src": "2042:10:2" - } - ], - "id": 1588, - "name": "Block", - "src": "2028:35:2" - } - ], - "id": 1589, - "name": "IfStatement", - "src": "2015:48:2" - }, - { - "attributes": { - "assignments": [1591] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "j", - "overrides": null, - "scope": 1653, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 1590, - "name": "ElementaryTypeName", - "src": "2072:4:2" - } - ], - "id": 1591, - "name": "VariableDeclaration", - "src": "2072:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1578, - "type": "uint256", - "value": "_i" - }, - "id": 1592, - "name": "Identifier", - "src": "2081:2:2" - } - ], - "id": 1593, - "name": "VariableDeclarationStatement", - "src": "2072:11:2" - }, - { - "attributes": { - "assignments": [1595], - "initialValue": null - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "len", - "overrides": null, - "scope": 1653, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 1594, - "name": "ElementaryTypeName", - "src": "2093:4:2" - } - ], - "id": 1595, - "name": "VariableDeclaration", - "src": "2093:8:2" - } - ], - "id": 1596, - "name": "VariableDeclarationStatement", - "src": "2093:8:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1591, - "type": "uint256", - "value": "j" - }, - "id": 1597, - "name": "Identifier", - "src": "2118:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1598, - "name": "Literal", - "src": "2123:1:2" - } - ], - "id": 1599, - "name": "BinaryOperation", - "src": "2118:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1595, - "type": "uint256", - "value": "len" - }, - "id": 1600, - "name": "Identifier", - "src": "2140:3:2" - } - ], - "id": 1601, - "name": "UnaryOperation", - "src": "2140:5:2" - } - ], - "id": 1602, - "name": "ExpressionStatement", - "src": "2140:5:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1591, - "type": "uint256", - "value": "j" - }, - "id": 1603, - "name": "Identifier", - "src": "2159:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1604, - "name": "Literal", - "src": "2164:2:2" - } - ], - "id": 1605, - "name": "Assignment", - "src": "2159:7:2" - } - ], - "id": 1606, - "name": "ExpressionStatement", - "src": "2159:7:2" - } - ], - "id": 1607, - "name": "Block", - "src": "2126:51:2" - } - ], - "id": 1608, - "name": "WhileStatement", - "src": "2111:66:2" - }, - { - "attributes": { - "assignments": [1610] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "bstr", - "overrides": null, - "scope": 1653, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 1609, - "name": "ElementaryTypeName", - "src": "2186:5:2" - } - ], - "id": 1610, - "name": "VariableDeclaration", - "src": "2186:17:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "function (uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 1611, - "name": "ElementaryTypeName", - "src": "2210:5:2" - } - ], - "id": 1612, - "name": "NewExpression", - "src": "2206:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1595, - "type": "uint256", - "value": "len" - }, - "id": 1613, - "name": "Identifier", - "src": "2216:3:2" - } - ], - "id": 1614, - "name": "FunctionCall", - "src": "2206:14:2" - } - ], - "id": 1615, - "name": "VariableDeclarationStatement", - "src": "2186:34:2" - }, - { - "attributes": { - "assignments": [1617] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "k", - "overrides": null, - "scope": 1653, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 1616, - "name": "ElementaryTypeName", - "src": "2230:4:2" - } - ], - "id": 1617, - "name": "VariableDeclaration", - "src": "2230:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "-", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1595, - "type": "uint256", - "value": "len" - }, - "id": 1618, - "name": "Identifier", - "src": "2239:3:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 1619, - "name": "Literal", - "src": "2245:1:2" - } - ], - "id": 1620, - "name": "BinaryOperation", - "src": "2239:7:2" - } - ], - "id": 1621, - "name": "VariableDeclarationStatement", - "src": "2230:16:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1578, - "type": "uint256", - "value": "_i" - }, - "id": 1622, - "name": "Identifier", - "src": "2263:2:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1623, - "name": "Literal", - "src": "2269:1:2" - } - ], - "id": 1624, - "name": "BinaryOperation", - "src": "2263:7:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1610, - "type": "bytes memory", - "value": "bstr" - }, - "id": 1625, - "name": "Identifier", - "src": "2286:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "--", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1617, - "type": "uint256", - "value": "k" - }, - "id": 1626, - "name": "Identifier", - "src": "2291:1:2" - } - ], - "id": 1627, - "name": "UnaryOperation", - "src": "2291:3:2" - } - ], - "id": 1628, - "name": "IndexAccess", - "src": "2286:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes1", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes1)" - }, - "children": [ - { - "attributes": { - "name": "byte", - "type": null - }, - "id": 1629, - "name": "ElementaryTypeName", - "src": "2298:4:2" - } - ], - "id": 1630, - "name": "ElementaryTypeNameExpression", - "src": "2298:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint8)" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": null - }, - "id": 1631, - "name": "ElementaryTypeName", - "src": "2303:5:2" - } - ], - "id": 1632, - "name": "ElementaryTypeNameExpression", - "src": "2303:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3438", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 48", - "value": "48" - }, - "id": 1633, - "name": "Literal", - "src": "2309:2:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "%", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1578, - "type": "uint256", - "value": "_i" - }, - "id": 1634, - "name": "Identifier", - "src": "2314:2:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1635, - "name": "Literal", - "src": "2319:2:2" - } - ], - "id": 1636, - "name": "BinaryOperation", - "src": "2314:7:2" - } - ], - "id": 1637, - "name": "BinaryOperation", - "src": "2309:12:2" - } - ], - "id": 1638, - "name": "FunctionCall", - "src": "2303:19:2" - } - ], - "id": 1639, - "name": "FunctionCall", - "src": "2298:25:2" - } - ], - "id": 1640, - "name": "Assignment", - "src": "2286:37:2" - } - ], - "id": 1641, - "name": "ExpressionStatement", - "src": "2286:37:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "/=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1578, - "type": "uint256", - "value": "_i" - }, - "id": 1642, - "name": "Identifier", - "src": "2337:2:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "3130", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 10", - "value": "10" - }, - "id": 1643, - "name": "Literal", - "src": "2343:2:2" - } - ], - "id": 1644, - "name": "Assignment", - "src": "2337:8:2" - } - ], - "id": 1645, - "name": "ExpressionStatement", - "src": "2337:8:2" - } - ], - "id": 1646, - "name": "Block", - "src": "2272:84:2" - } - ], - "id": 1647, - "name": "WhileStatement", - "src": "2256:100:2" - }, - { - "attributes": { - "functionReturnParameters": 1582 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "string memory", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(string storage pointer)" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": null - }, - "id": 1648, - "name": "ElementaryTypeName", - "src": "2372:6:2" - } - ], - "id": 1649, - "name": "ElementaryTypeNameExpression", - "src": "2372:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1610, - "type": "bytes memory", - "value": "bstr" - }, - "id": 1650, - "name": "Identifier", - "src": "2379:4:2" - } - ], - "id": 1651, - "name": "FunctionCall", - "src": "2372:12:2" - } - ], - "id": 1652, - "name": "Return", - "src": "2365:19:2" - } - ], - "id": 1653, - "name": "Block", - "src": "2005:386:2" - } - ], - "id": 1654, - "name": "FunctionDefinition", - "src": "1922:469:2" - }, - { - "attributes": { - "documentation": null, - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "assetAddressString", - "overrides": null, - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1655, - "name": "ParameterList", - "src": "2474:2:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1740, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1656, - "name": "ElementaryTypeName", - "src": "2499:6:2" - } - ], - "id": 1657, - "name": "VariableDeclaration", - "src": "2499:13:2" - } - ], - "id": 1658, - "name": "ParameterList", - "src": "2498:15:2" - }, - { - "children": [ - { - "attributes": { - "assignments": [1660] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "alphabet", - "overrides": null, - "scope": 1739, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 1659, - "name": "ElementaryTypeName", - "src": "2524:5:2" - } - ], - "id": 1660, - "name": "VariableDeclaration", - "src": "2524:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30313233343536373839616263646566", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"0123456789abcdef\"", - "value": "0123456789abcdef" - }, - "id": 1661, - "name": "Literal", - "src": "2548:18:2" - } - ], - "id": 1662, - "name": "VariableDeclarationStatement", - "src": "2524:42:2" - }, - { - "attributes": { - "assignments": [1664] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "data", - "overrides": null, - "scope": 1739, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1663, - "name": "ElementaryTypeName", - "src": "2576:7:2" - } - ], - "id": 1664, - "name": "VariableDeclaration", - "src": "2576:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1445, - "type": "bytes32", - "value": "assetAddress" - }, - "id": 1665, - "name": "Identifier", - "src": "2591:12:2" - } - ], - "id": 1666, - "name": "VariableDeclarationStatement", - "src": "2576:27:2" - }, - { - "attributes": { - "assignments": [1668] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "str", - "overrides": null, - "scope": 1739, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 1667, - "name": "ElementaryTypeName", - "src": "2614:5:2" - } - ], - "id": 1668, - "name": "VariableDeclaration", - "src": "2614:16:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "bytes memory", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "function (uint256) pure returns (bytes memory)" - }, - "children": [ - { - "attributes": { - "name": "bytes", - "type": "bytes" - }, - "id": 1669, - "name": "ElementaryTypeName", - "src": "2637:5:2" - } - ], - "id": 1670, - "name": "NewExpression", - "src": "2633:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 1671, - "name": "Literal", - "src": "2643:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1664, - "type": "bytes32", - "value": "data" - }, - "id": 1672, - "name": "Identifier", - "src": "2647:4:2" - } - ], - "id": 1673, - "name": "MemberAccess", - "src": "2647:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 1674, - "name": "Literal", - "src": "2661:1:2" - } - ], - "id": 1675, - "name": "BinaryOperation", - "src": "2647:15:2" - } - ], - "id": 1676, - "name": "BinaryOperation", - "src": "2643:19:2" - } - ], - "id": 1677, - "name": "FunctionCall", - "src": "2633:30:2" - } - ], - "id": 1678, - "name": "VariableDeclarationStatement", - "src": "2614:49:2" - }, - { - "children": [ - { - "attributes": { - "assignments": [1680] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "i", - "overrides": null, - "scope": 1733, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 1679, - "name": "ElementaryTypeName", - "src": "2678:4:2" - } - ], - "id": 1680, - "name": "VariableDeclaration", - "src": "2678:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1681, - "name": "Literal", - "src": "2687:1:2" - } - ], - "id": 1682, - "name": "VariableDeclarationStatement", - "src": "2678:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1683, - "name": "Identifier", - "src": "2690:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1664, - "type": "bytes32", - "value": "data" - }, - "id": 1684, - "name": "Identifier", - "src": "2694:4:2" - } - ], - "id": 1685, - "name": "MemberAccess", - "src": "2694:11:2" - } - ], - "id": 1686, - "name": "BinaryOperation", - "src": "2690:15:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1687, - "name": "Identifier", - "src": "2707:1:2" - } - ], - "id": 1688, - "name": "UnaryOperation", - "src": "2707:3:2" - } - ], - "id": 1689, - "name": "ExpressionStatement", - "src": "2707:3:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1668, - "type": "bytes memory", - "value": "str" - }, - "id": 1690, - "name": "Identifier", - "src": "2726:3:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1691, - "name": "Identifier", - "src": "2730:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 1692, - "name": "Literal", - "src": "2734:1:2" - } - ], - "id": 1693, - "name": "BinaryOperation", - "src": "2730:5:2" - } - ], - "id": 1694, - "name": "IndexAccess", - "src": "2726:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1660, - "type": "bytes memory", - "value": "alphabet" - }, - "id": 1695, - "name": "Identifier", - "src": "2739:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": null - }, - "id": 1696, - "name": "ElementaryTypeName", - "src": "2748:4:2" - } - ], - "id": 1697, - "name": "ElementaryTypeNameExpression", - "src": "2748:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint8)" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": null - }, - "id": 1698, - "name": "ElementaryTypeName", - "src": "2753:5:2" - } - ], - "id": 1699, - "name": "ElementaryTypeNameExpression", - "src": "2753:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">>", - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1664, - "type": "bytes32", - "value": "data" - }, - "id": 1700, - "name": "Identifier", - "src": "2759:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1701, - "name": "Identifier", - "src": "2764:1:2" - } - ], - "id": 1702, - "name": "IndexAccess", - "src": "2759:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "34", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 4", - "value": "4" - }, - "id": 1703, - "name": "Literal", - "src": "2770:1:2" - } - ], - "id": 1704, - "name": "BinaryOperation", - "src": "2759:12:2" - } - ], - "id": 1705, - "name": "FunctionCall", - "src": "2753:19:2" - } - ], - "id": 1706, - "name": "FunctionCall", - "src": "2748:25:2" - } - ], - "id": 1707, - "name": "IndexAccess", - "src": "2739:35:2" - } - ], - "id": 1708, - "name": "Assignment", - "src": "2726:48:2" - } - ], - "id": 1709, - "name": "ExpressionStatement", - "src": "2726:48:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1668, - "type": "bytes memory", - "value": "str" - }, - "id": 1710, - "name": "Identifier", - "src": "2788:3:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 1711, - "name": "Literal", - "src": "2792:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "*", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1712, - "name": "Identifier", - "src": "2796:1:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "32", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 2", - "value": "2" - }, - "id": 1713, - "name": "Literal", - "src": "2800:1:2" - } - ], - "id": 1714, - "name": "BinaryOperation", - "src": "2796:5:2" - } - ], - "id": 1715, - "name": "BinaryOperation", - "src": "2792:9:2" - } - ], - "id": 1716, - "name": "IndexAccess", - "src": "2788:14:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1660, - "type": "bytes memory", - "value": "alphabet" - }, - "id": 1717, - "name": "Identifier", - "src": "2805:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint256)" - }, - "children": [ - { - "attributes": { - "name": "uint", - "type": null - }, - "id": 1718, - "name": "ElementaryTypeName", - "src": "2814:4:2" - } - ], - "id": 1719, - "name": "ElementaryTypeNameExpression", - "src": "2814:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint8", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(uint8)" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": null - }, - "id": 1720, - "name": "ElementaryTypeName", - "src": "2819:5:2" - } - ], - "id": 1721, - "name": "ElementaryTypeNameExpression", - "src": "2819:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes1", - "typeString": "bytes1" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&", - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "type": "bytes1" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1664, - "type": "bytes32", - "value": "data" - }, - "id": 1722, - "name": "Identifier", - "src": "2825:4:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1680, - "type": "uint256", - "value": "i" - }, - "id": 1723, - "name": "Identifier", - "src": "2830:1:2" - } - ], - "id": 1724, - "name": "IndexAccess", - "src": "2825:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30783066", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 15", - "value": "0x0f" - }, - "id": 1725, - "name": "Literal", - "src": "2835:4:2" - } - ], - "id": 1726, - "name": "BinaryOperation", - "src": "2825:14:2" - } - ], - "id": 1727, - "name": "FunctionCall", - "src": "2819:21:2" - } - ], - "id": 1728, - "name": "FunctionCall", - "src": "2814:27:2" - } - ], - "id": 1729, - "name": "IndexAccess", - "src": "2805:37:2" - } - ], - "id": 1730, - "name": "Assignment", - "src": "2788:54:2" - } - ], - "id": 1731, - "name": "ExpressionStatement", - "src": "2788:54:2" - } - ], - "id": 1732, - "name": "Block", - "src": "2712:141:2" - } - ], - "id": 1733, - "name": "ForStatement", - "src": "2673:180:2" - }, - { - "attributes": { - "functionReturnParameters": 1658 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "string memory", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(string storage pointer)" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": null - }, - "id": 1734, - "name": "ElementaryTypeName", - "src": "2869:6:2" - } - ], - "id": 1735, - "name": "ElementaryTypeNameExpression", - "src": "2869:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1668, - "type": "bytes memory", - "value": "str" - }, - "id": 1736, - "name": "Identifier", - "src": "2876:3:2" - } - ], - "id": 1737, - "name": "FunctionCall", - "src": "2869:11:2" - } - ], - "id": 1738, - "name": "Return", - "src": "2862:18:2" - } - ], - "id": 1739, - "name": "Block", - "src": "2514:373:2" - } - ], - "id": 1740, - "name": "FunctionDefinition", - "src": "2447:440:2" - }, - { - "attributes": { - "functionSelector": "95d89b41", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "symbol", - "overrides": null, - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." - }, - "id": 1741, - "name": "StructuredDocumentation", - "src": "2893:102:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1742, - "name": "ParameterList", - "src": "3015:2:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1749, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1743, - "name": "ElementaryTypeName", - "src": "3039:6:2" - } - ], - "id": 1744, - "name": "VariableDeclaration", - "src": "3039:13:2" - } - ], - "id": 1745, - "name": "ParameterList", - "src": "3038:15:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1745 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1552, - "type": "string storage ref", - "value": "_symbol" - }, - "id": 1746, - "name": "Identifier", - "src": "3071:7:2" - } - ], - "id": 1747, - "name": "Return", - "src": "3064:14:2" - } - ], - "id": 1748, - "name": "Block", - "src": "3054:31:2" - } - ], - "id": 1749, - "name": "FunctionDefinition", - "src": "3000:85:2" - }, - { - "attributes": { - "functionSelector": "313ce567", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "decimals", - "overrides": null, - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." - }, - "id": 1750, - "name": "StructuredDocumentation", - "src": "3091:612:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1751, - "name": "ParameterList", - "src": "3725:2:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1758, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 1752, - "name": "ElementaryTypeName", - "src": "3749:5:2" - } - ], - "id": 1753, - "name": "VariableDeclaration", - "src": "3749:5:2" - } - ], - "id": 1754, - "name": "ParameterList", - "src": "3748:7:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1754 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1555, - "type": "uint8", - "value": "_decimals" - }, - "id": 1755, - "name": "Identifier", - "src": "3773:9:2" - } - ], - "id": 1756, - "name": "Return", - "src": "3766:16:2" - } - ], - "id": 1757, - "name": "Block", - "src": "3756:33:2" - } - ], - "id": 1758, - "name": "FunctionDefinition", - "src": "3708:81:2" - }, - { - "attributes": { - "baseFunctions": [3017], - "functionSelector": "18160ddd", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "totalSupply", - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-totalSupply}." - }, - "id": 1759, - "name": "StructuredDocumentation", - "src": "3795:49:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1761, - "name": "OverrideSpecifier", - "src": "3884:8:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1760, - "name": "ParameterList", - "src": "3869:2:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1768, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1762, - "name": "ElementaryTypeName", - "src": "3902:7:2" - } - ], - "id": 1763, - "name": "VariableDeclaration", - "src": "3902:7:2" - } - ], - "id": 1764, - "name": "ParameterList", - "src": "3901:9:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1764 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1550, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 1765, - "name": "Identifier", - "src": "3928:12:2" - } - ], - "id": 1766, - "name": "Return", - "src": "3921:19:2" - } - ], - "id": 1767, - "name": "Block", - "src": "3911:36:2" - } - ], - "id": 1768, - "name": "FunctionDefinition", - "src": "3849:98:2" - }, - { - "attributes": { - "baseFunctions": [3025], - "functionSelector": "70a08231", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "balanceOf", - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-balanceOf}." - }, - "id": 1769, - "name": "StructuredDocumentation", - "src": "3953:47:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1773, - "name": "OverrideSpecifier", - "src": "4053:8:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 1782, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1770, - "name": "ElementaryTypeName", - "src": "4024:7:2" - } - ], - "id": 1771, - "name": "VariableDeclaration", - "src": "4024:15:2" - } - ], - "id": 1772, - "name": "ParameterList", - "src": "4023:17:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1782, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1774, - "name": "ElementaryTypeName", - "src": "4071:7:2" - } - ], - "id": 1775, - "name": "VariableDeclaration", - "src": "4071:7:2" - } - ], - "id": 1776, - "name": "ParameterList", - "src": "4070:9:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1776 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 1777, - "name": "Identifier", - "src": "4097:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1771, - "type": "address", - "value": "account" - }, - "id": 1778, - "name": "Identifier", - "src": "4107:7:2" - } - ], - "id": 1779, - "name": "IndexAccess", - "src": "4097:18:2" - } - ], - "id": 1780, - "name": "Return", - "src": "4090:25:2" - } - ], - "id": 1781, - "name": "Block", - "src": "4080:42:2" - } - ], - "id": 1782, - "name": "FunctionDefinition", - "src": "4005:117:2" - }, - { - "attributes": { - "baseFunctions": [3035], - "functionSelector": "a9059cbb", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transfer", - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`." - }, - "id": 1783, - "name": "StructuredDocumentation", - "src": "4128:192:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1789, - "name": "OverrideSpecifier", - "src": "4385:8:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1803, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1784, - "name": "ElementaryTypeName", - "src": "4343:7:2" - } - ], - "id": 1785, - "name": "VariableDeclaration", - "src": "4343:17:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1803, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1786, - "name": "ElementaryTypeName", - "src": "4362:7:2" - } - ], - "id": 1787, - "name": "VariableDeclaration", - "src": "4362:14:2" - } - ], - "id": 1788, - "name": "ParameterList", - "src": "4342:35:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1803, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1790, - "name": "ElementaryTypeName", - "src": "4403:4:2" - } - ], - "id": 1791, - "name": "VariableDeclaration", - "src": "4403:4:2" - } - ], - "id": 1792, - "name": "ParameterList", - "src": "4402:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1997, - "type": "function (address,address,uint256)", - "value": "_transfer" - }, - "id": 1793, - "name": "Identifier", - "src": "4419:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1794, - "name": "Identifier", - "src": "4429:10:2" - } - ], - "id": 1795, - "name": "FunctionCall", - "src": "4429:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1785, - "type": "address", - "value": "recipient" - }, - "id": 1796, - "name": "Identifier", - "src": "4443:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1787, - "type": "uint256", - "value": "amount" - }, - "id": 1797, - "name": "Identifier", - "src": "4454:6:2" - } - ], - "id": 1798, - "name": "FunctionCall", - "src": "4419:42:2" - } - ], - "id": 1799, - "name": "ExpressionStatement", - "src": "4419:42:2" - }, - { - "attributes": { - "functionReturnParameters": 1792 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1800, - "name": "Literal", - "src": "4478:4:2" - } - ], - "id": 1801, - "name": "Return", - "src": "4471:11:2" - } - ], - "id": 1802, - "name": "Block", - "src": "4409:80:2" - } - ], - "id": 1803, - "name": "FunctionDefinition", - "src": "4325:164:2" - }, - { - "attributes": { - "baseFunctions": [3045], - "functionSelector": "dd62ed3e", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "allowance", - "scope": 2147, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-allowance}." - }, - "id": 1804, - "name": "StructuredDocumentation", - "src": "4495:47:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1810, - "name": "OverrideSpecifier", - "src": "4610:8:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 1821, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1805, - "name": "ElementaryTypeName", - "src": "4566:7:2" - } - ], - "id": 1806, - "name": "VariableDeclaration", - "src": "4566:13:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 1821, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1807, - "name": "ElementaryTypeName", - "src": "4581:7:2" - } - ], - "id": 1808, - "name": "VariableDeclaration", - "src": "4581:15:2" - } - ], - "id": 1809, - "name": "ParameterList", - "src": "4565:32:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1821, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1811, - "name": "ElementaryTypeName", - "src": "4628:7:2" - } - ], - "id": 1812, - "name": "VariableDeclaration", - "src": "4628:7:2" - } - ], - "id": 1813, - "name": "ParameterList", - "src": "4627:9:2" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1813 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1548, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 1814, - "name": "Identifier", - "src": "4654:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1806, - "type": "address", - "value": "owner" - }, - "id": 1815, - "name": "Identifier", - "src": "4666:5:2" - } - ], - "id": 1816, - "name": "IndexAccess", - "src": "4654:18:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1808, - "type": "address", - "value": "spender" - }, - "id": 1817, - "name": "Identifier", - "src": "4673:7:2" - } - ], - "id": 1818, - "name": "IndexAccess", - "src": "4654:27:2" - } - ], - "id": 1819, - "name": "Return", - "src": "4647:34:2" - } - ], - "id": 1820, - "name": "Block", - "src": "4637:51:2" - } - ], - "id": 1821, - "name": "FunctionDefinition", - "src": "4547:141:2" - }, - { - "attributes": { - "baseFunctions": [3055], - "functionSelector": "095ea7b3", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "approve", - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address." - }, - "id": 1822, - "name": "StructuredDocumentation", - "src": "4694:127:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1828, - "name": "OverrideSpecifier", - "src": "4883:8:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 1842, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1823, - "name": "ElementaryTypeName", - "src": "4843:7:2" - } - ], - "id": 1824, - "name": "VariableDeclaration", - "src": "4843:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1842, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1825, - "name": "ElementaryTypeName", - "src": "4860:7:2" - } - ], - "id": 1826, - "name": "VariableDeclaration", - "src": "4860:14:2" - } - ], - "id": 1827, - "name": "ParameterList", - "src": "4842:33:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1842, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1829, - "name": "ElementaryTypeName", - "src": "4901:4:2" - } - ], - "id": 1830, - "name": "VariableDeclaration", - "src": "4901:4:2" - } - ], - "id": 1831, - "name": "ParameterList", - "src": "4900:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2135, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 1832, - "name": "Identifier", - "src": "4917:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1833, - "name": "Identifier", - "src": "4926:10:2" - } - ], - "id": 1834, - "name": "FunctionCall", - "src": "4926:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1824, - "type": "address", - "value": "spender" - }, - "id": 1835, - "name": "Identifier", - "src": "4940:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1826, - "type": "uint256", - "value": "amount" - }, - "id": 1836, - "name": "Identifier", - "src": "4949:6:2" - } - ], - "id": 1837, - "name": "FunctionCall", - "src": "4917:39:2" - } - ], - "id": 1838, - "name": "ExpressionStatement", - "src": "4917:39:2" - }, - { - "attributes": { - "functionReturnParameters": 1831 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1839, - "name": "Literal", - "src": "4973:4:2" - } - ], - "id": 1840, - "name": "Return", - "src": "4966:11:2" - } - ], - "id": 1841, - "name": "Block", - "src": "4907:77:2" - } - ], - "id": 1842, - "name": "FunctionDefinition", - "src": "4826:158:2" - }, - { - "attributes": { - "baseFunctions": [3067], - "functionSelector": "23b872dd", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "transferFrom", - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20};\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`." - }, - "id": 1843, - "name": "StructuredDocumentation", - "src": "4990:449:2" - }, - { - "attributes": { - "overrides": [null] - }, - "id": 1851, - "name": "OverrideSpecifier", - "src": "5524:8:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 1880, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1844, - "name": "ElementaryTypeName", - "src": "5466:7:2" - } - ], - "id": 1845, - "name": "VariableDeclaration", - "src": "5466:14:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1880, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1846, - "name": "ElementaryTypeName", - "src": "5482:7:2" - } - ], - "id": 1847, - "name": "VariableDeclaration", - "src": "5482:17:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1880, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1848, - "name": "ElementaryTypeName", - "src": "5501:7:2" - } - ], - "id": 1849, - "name": "VariableDeclaration", - "src": "5501:14:2" - } - ], - "id": 1850, - "name": "ParameterList", - "src": "5465:51:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1880, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1852, - "name": "ElementaryTypeName", - "src": "5542:4:2" - } - ], - "id": 1853, - "name": "VariableDeclaration", - "src": "5542:4:2" - } - ], - "id": 1854, - "name": "ParameterList", - "src": "5541:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 1997, - "type": "function (address,address,uint256)", - "value": "_transfer" - }, - "id": 1855, - "name": "Identifier", - "src": "5558:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1845, - "type": "address", - "value": "sender" - }, - "id": 1856, - "name": "Identifier", - "src": "5568:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1847, - "type": "address", - "value": "recipient" - }, - "id": 1857, - "name": "Identifier", - "src": "5576:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1849, - "type": "uint256", - "value": "amount" - }, - "id": 1858, - "name": "Identifier", - "src": "5587:6:2" - } - ], - "id": 1859, - "name": "FunctionCall", - "src": "5558:36:2" - } - ], - "id": 1860, - "name": "ExpressionStatement", - "src": "5558:36:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2135, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 1861, - "name": "Identifier", - "src": "5604:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1845, - "type": "address", - "value": "sender" - }, - "id": 1862, - "name": "Identifier", - "src": "5613:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1863, - "name": "Identifier", - "src": "5621:10:2" - } - ], - "id": 1864, - "name": "FunctionCall", - "src": "5621:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1548, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 1865, - "name": "Identifier", - "src": "5635:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1845, - "type": "address", - "value": "sender" - }, - "id": 1866, - "name": "Identifier", - "src": "5647:6:2" - } - ], - "id": 1867, - "name": "IndexAccess", - "src": "5635:19:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1868, - "name": "Identifier", - "src": "5655:10:2" - } - ], - "id": 1869, - "name": "FunctionCall", - "src": "5655:12:2" - } - ], - "id": 1870, - "name": "IndexAccess", - "src": "5635:33:2" - } - ], - "id": 1871, - "name": "MemberAccess", - "src": "5635:37:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1849, - "type": "uint256", - "value": "amount" - }, - "id": 1872, - "name": "Identifier", - "src": "5673:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer amount exceeds allowance\"", - "value": "ERC20: transfer amount exceeds allowance" - }, - "id": 1873, - "name": "Literal", - "src": "5681:42:2" - } - ], - "id": 1874, - "name": "FunctionCall", - "src": "5635:89:2" - } - ], - "id": 1875, - "name": "FunctionCall", - "src": "5604:121:2" - } - ], - "id": 1876, - "name": "ExpressionStatement", - "src": "5604:121:2" - }, - { - "attributes": { - "functionReturnParameters": 1854 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1877, - "name": "Literal", - "src": "5742:4:2" - } - ], - "id": 1878, - "name": "Return", - "src": "5735:11:2" - } - ], - "id": 1879, - "name": "Block", - "src": "5548:205:2" - } - ], - "id": 1880, - "name": "FunctionDefinition", - "src": "5444:309:2" - }, - { - "attributes": { - "functionSelector": "39509351", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "increaseAllowance", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address." - }, - "id": 1881, - "name": "StructuredDocumentation", - "src": "5759:384:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 1908, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1882, - "name": "ElementaryTypeName", - "src": "6175:7:2" - } - ], - "id": 1883, - "name": "VariableDeclaration", - "src": "6175:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "addedValue", - "overrides": null, - "scope": 1908, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1884, - "name": "ElementaryTypeName", - "src": "6192:7:2" - } - ], - "id": 1885, - "name": "VariableDeclaration", - "src": "6192:18:2" - } - ], - "id": 1886, - "name": "ParameterList", - "src": "6174:37:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1908, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1887, - "name": "ElementaryTypeName", - "src": "6228:4:2" - } - ], - "id": 1888, - "name": "VariableDeclaration", - "src": "6228:4:2" - } - ], - "id": 1889, - "name": "ParameterList", - "src": "6227:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2135, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 1890, - "name": "Identifier", - "src": "6244:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1891, - "name": "Identifier", - "src": "6253:10:2" - } - ], - "id": 1892, - "name": "FunctionCall", - "src": "6253:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1883, - "type": "address", - "value": "spender" - }, - "id": 1893, - "name": "Identifier", - "src": "6267:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1548, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 1894, - "name": "Identifier", - "src": "6276:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1895, - "name": "Identifier", - "src": "6288:10:2" - } - ], - "id": 1896, - "name": "FunctionCall", - "src": "6288:12:2" - } - ], - "id": 1897, - "name": "IndexAccess", - "src": "6276:25:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1883, - "type": "address", - "value": "spender" - }, - "id": 1898, - "name": "Identifier", - "src": "6302:7:2" - } - ], - "id": 1899, - "name": "IndexAccess", - "src": "6276:34:2" - } - ], - "id": 1900, - "name": "MemberAccess", - "src": "6276:38:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1885, - "type": "uint256", - "value": "addedValue" - }, - "id": 1901, - "name": "Identifier", - "src": "6315:10:2" - } - ], - "id": 1902, - "name": "FunctionCall", - "src": "6276:50:2" - } - ], - "id": 1903, - "name": "FunctionCall", - "src": "6244:83:2" - } - ], - "id": 1904, - "name": "ExpressionStatement", - "src": "6244:83:2" - }, - { - "attributes": { - "functionReturnParameters": 1889 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1905, - "name": "Literal", - "src": "6344:4:2" - } - ], - "id": 1906, - "name": "Return", - "src": "6337:11:2" - } - ], - "id": 1907, - "name": "Block", - "src": "6234:121:2" - } - ], - "id": 1908, - "name": "FunctionDefinition", - "src": "6148:207:2" - }, - { - "attributes": { - "functionSelector": "a457c2d7", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "decreaseAllowance", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`." - }, - "id": 1909, - "name": "StructuredDocumentation", - "src": "6361:476:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 1937, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1910, - "name": "ElementaryTypeName", - "src": "6869:7:2" - } - ], - "id": 1911, - "name": "VariableDeclaration", - "src": "6869:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "subtractedValue", - "overrides": null, - "scope": 1937, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1912, - "name": "ElementaryTypeName", - "src": "6886:7:2" - } - ], - "id": 1913, - "name": "VariableDeclaration", - "src": "6886:23:2" - } - ], - "id": 1914, - "name": "ParameterList", - "src": "6868:42:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1937, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1915, - "name": "ElementaryTypeName", - "src": "6927:4:2" - } - ], - "id": 1916, - "name": "VariableDeclaration", - "src": "6927:4:2" - } - ], - "id": 1917, - "name": "ParameterList", - "src": "6926:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 2135, - "type": "function (address,address,uint256)", - "value": "_approve" - }, - "id": 1918, - "name": "Identifier", - "src": "6943:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [null], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1919, - "name": "Identifier", - "src": "6952:10:2" - } - ], - "id": 1920, - "name": "FunctionCall", - "src": "6952:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1911, - "type": "address", - "value": "spender" - }, - "id": 1921, - "name": "Identifier", - "src": "6966:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "typeString": "literal_string \"ERC20: decreased allowance below zero\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1548, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 1922, - "name": "Identifier", - "src": "6975:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [null], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [null], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 3606, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 1923, - "name": "Identifier", - "src": "6987:10:2" - } - ], - "id": 1924, - "name": "FunctionCall", - "src": "6987:12:2" - } - ], - "id": 1925, - "name": "IndexAccess", - "src": "6975:25:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1911, - "type": "address", - "value": "spender" - }, - "id": 1926, - "name": "Identifier", - "src": "7001:7:2" - } - ], - "id": 1927, - "name": "IndexAccess", - "src": "6975:34:2" - } - ], - "id": 1928, - "name": "MemberAccess", - "src": "6975:38:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1913, - "type": "uint256", - "value": "subtractedValue" - }, - "id": 1929, - "name": "Identifier", - "src": "7014:15:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: decreased allowance below zero\"", - "value": "ERC20: decreased allowance below zero" - }, - "id": 1930, - "name": "Literal", - "src": "7031:39:2" - } - ], - "id": 1931, - "name": "FunctionCall", - "src": "6975:96:2" - } - ], - "id": 1932, - "name": "FunctionCall", - "src": "6943:129:2" - } - ], - "id": 1933, - "name": "ExpressionStatement", - "src": "6943:129:2" - }, - { - "attributes": { - "functionReturnParameters": 1917 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 1934, - "name": "Literal", - "src": "7089:4:2" - } - ], - "id": 1935, - "name": "Return", - "src": "7082:11:2" - } - ], - "id": 1936, - "name": "Block", - "src": "6933:167:2" - } - ], - "id": 1937, - "name": "FunctionDefinition", - "src": "6842:258:2" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_transfer", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`." - }, - "id": 1938, - "name": "StructuredDocumentation", - "src": "7106:463:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "sender", - "overrides": null, - "scope": 1997, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1939, - "name": "ElementaryTypeName", - "src": "7593:7:2" - } - ], - "id": 1940, - "name": "VariableDeclaration", - "src": "7593:14:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "recipient", - "overrides": null, - "scope": 1997, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1941, - "name": "ElementaryTypeName", - "src": "7609:7:2" - } - ], - "id": 1942, - "name": "VariableDeclaration", - "src": "7609:17:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 1997, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 1943, - "name": "ElementaryTypeName", - "src": "7628:7:2" - } - ], - "id": 1944, - "name": "VariableDeclaration", - "src": "7628:14:2" - } - ], - "id": 1945, - "name": "ParameterList", - "src": "7592:51:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 1946, - "name": "ParameterList", - "src": "7653:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "typeString": "literal_string \"ERC20: transfer from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1947, - "name": "Identifier", - "src": "7663:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1940, - "type": "address", - "value": "sender" - }, - "id": 1948, - "name": "Identifier", - "src": "7671:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1949, - "name": "ElementaryTypeName", - "src": "7681:7:2" - } - ], - "id": 1950, - "name": "ElementaryTypeNameExpression", - "src": "7681:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1951, - "name": "Literal", - "src": "7689:1:2" - } - ], - "id": 1952, - "name": "FunctionCall", - "src": "7681:10:2" - } - ], - "id": 1953, - "name": "BinaryOperation", - "src": "7671:20:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer from the zero address\"", - "value": "ERC20: transfer from the zero address" - }, - "id": 1954, - "name": "Literal", - "src": "7693:39:2" - } - ], - "id": 1955, - "name": "FunctionCall", - "src": "7663:70:2" - } - ], - "id": 1956, - "name": "ExpressionStatement", - "src": "7663:70:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", - "typeString": "literal_string \"ERC20: transfer to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 1957, - "name": "Identifier", - "src": "7743:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1942, - "type": "address", - "value": "recipient" - }, - "id": 1958, - "name": "Identifier", - "src": "7751:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 1959, - "name": "ElementaryTypeName", - "src": "7764:7:2" - } - ], - "id": 1960, - "name": "ElementaryTypeNameExpression", - "src": "7764:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 1961, - "name": "Literal", - "src": "7772:1:2" - } - ], - "id": 1962, - "name": "FunctionCall", - "src": "7764:10:2" - } - ], - "id": 1963, - "name": "BinaryOperation", - "src": "7751:23:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer to the zero address\"", - "value": "ERC20: transfer to the zero address" - }, - "id": 1964, - "name": "Literal", - "src": "7776:37:2" - } - ], - "id": 1965, - "name": "FunctionCall", - "src": "7743:71:2" - } - ], - "id": 1966, - "name": "ExpressionStatement", - "src": "7743:71:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 1967, - "name": "Identifier", - "src": "7825:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1940, - "type": "address", - "value": "sender" - }, - "id": 1968, - "name": "Identifier", - "src": "7835:6:2" - } - ], - "id": 1969, - "name": "IndexAccess", - "src": "7825:17:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", - "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 1970, - "name": "Identifier", - "src": "7845:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1940, - "type": "address", - "value": "sender" - }, - "id": 1971, - "name": "Identifier", - "src": "7855:6:2" - } - ], - "id": 1972, - "name": "IndexAccess", - "src": "7845:17:2" - } - ], - "id": 1973, - "name": "MemberAccess", - "src": "7845:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1944, - "type": "uint256", - "value": "amount" - }, - "id": 1974, - "name": "Identifier", - "src": "7867:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: transfer amount exceeds balance\"", - "value": "ERC20: transfer amount exceeds balance" - }, - "id": 1975, - "name": "Literal", - "src": "7875:40:2" - } - ], - "id": 1976, - "name": "FunctionCall", - "src": "7845:71:2" - } - ], - "id": 1977, - "name": "Assignment", - "src": "7825:91:2" - } - ], - "id": 1978, - "name": "ExpressionStatement", - "src": "7825:91:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 1979, - "name": "Identifier", - "src": "7926:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1942, - "type": "address", - "value": "recipient" - }, - "id": 1980, - "name": "Identifier", - "src": "7936:9:2" - } - ], - "id": 1981, - "name": "IndexAccess", - "src": "7926:20:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 1982, - "name": "Identifier", - "src": "7949:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1942, - "type": "address", - "value": "recipient" - }, - "id": 1983, - "name": "Identifier", - "src": "7959:9:2" - } - ], - "id": 1984, - "name": "IndexAccess", - "src": "7949:20:2" - } - ], - "id": 1985, - "name": "MemberAccess", - "src": "7949:24:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1944, - "type": "uint256", - "value": "amount" - }, - "id": 1986, - "name": "Identifier", - "src": "7974:6:2" - } - ], - "id": 1987, - "name": "FunctionCall", - "src": "7949:32:2" - } - ], - "id": 1988, - "name": "Assignment", - "src": "7926:55:2" - } - ], - "id": 1989, - "name": "ExpressionStatement", - "src": "7926:55:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 1990, - "name": "Identifier", - "src": "7996:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1940, - "type": "address", - "value": "sender" - }, - "id": 1991, - "name": "Identifier", - "src": "8005:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1942, - "type": "address", - "value": "recipient" - }, - "id": 1992, - "name": "Identifier", - "src": "8013:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1944, - "type": "uint256", - "value": "amount" - }, - "id": 1993, - "name": "Identifier", - "src": "8024:6:2" - } - ], - "id": 1994, - "name": "FunctionCall", - "src": "7996:35:2" - } - ], - "id": 1995, - "name": "EmitStatement", - "src": "7991:40:2" - } - ], - "id": 1996, - "name": "Block", - "src": "7653:385:2" - } - ], - "id": 1997, - "name": "FunctionDefinition", - "src": "7574:464:2" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_mint", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements\n - `to` cannot be the zero address." - }, - "id": 1998, - "name": "StructuredDocumentation", - "src": "8044:259:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 2043, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 1999, - "name": "ElementaryTypeName", - "src": "8323:7:2" - } - ], - "id": 2000, - "name": "VariableDeclaration", - "src": "8323:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2043, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2001, - "name": "ElementaryTypeName", - "src": "8340:7:2" - } - ], - "id": 2002, - "name": "VariableDeclaration", - "src": "8340:14:2" - } - ], - "id": 2003, - "name": "ParameterList", - "src": "8322:33:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2004, - "name": "ParameterList", - "src": "8365:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "typeString": "literal_string \"ERC20: mint to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2005, - "name": "Identifier", - "src": "8375:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2000, - "type": "address", - "value": "account" - }, - "id": 2006, - "name": "Identifier", - "src": "8383:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2007, - "name": "ElementaryTypeName", - "src": "8394:7:2" - } - ], - "id": 2008, - "name": "ElementaryTypeNameExpression", - "src": "8394:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2009, - "name": "Literal", - "src": "8402:1:2" - } - ], - "id": 2010, - "name": "FunctionCall", - "src": "8394:10:2" - } - ], - "id": 2011, - "name": "BinaryOperation", - "src": "8383:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: mint to the zero address\"", - "value": "ERC20: mint to the zero address" - }, - "id": 2012, - "name": "Literal", - "src": "8406:33:2" - } - ], - "id": 2013, - "name": "FunctionCall", - "src": "8375:65:2" - } - ], - "id": 2014, - "name": "ExpressionStatement", - "src": "8375:65:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1550, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2015, - "name": "Identifier", - "src": "8451:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1550, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2016, - "name": "Identifier", - "src": "8466:12:2" - } - ], - "id": 2017, - "name": "MemberAccess", - "src": "8466:16:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2002, - "type": "uint256", - "value": "amount" - }, - "id": 2018, - "name": "Identifier", - "src": "8483:6:2" - } - ], - "id": 2019, - "name": "FunctionCall", - "src": "8466:24:2" - } - ], - "id": 2020, - "name": "Assignment", - "src": "8451:39:2" - } - ], - "id": 2021, - "name": "ExpressionStatement", - "src": "8451:39:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2022, - "name": "Identifier", - "src": "8500:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2000, - "type": "address", - "value": "account" - }, - "id": 2023, - "name": "Identifier", - "src": "8510:7:2" - } - ], - "id": 2024, - "name": "IndexAccess", - "src": "8500:18:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "add", - "referencedDeclaration": 2332, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2025, - "name": "Identifier", - "src": "8521:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2000, - "type": "address", - "value": "account" - }, - "id": 2026, - "name": "Identifier", - "src": "8531:7:2" - } - ], - "id": 2027, - "name": "IndexAccess", - "src": "8521:18:2" - } - ], - "id": 2028, - "name": "MemberAccess", - "src": "8521:22:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2002, - "type": "uint256", - "value": "amount" - }, - "id": 2029, - "name": "Identifier", - "src": "8544:6:2" - } - ], - "id": 2030, - "name": "FunctionCall", - "src": "8521:30:2" - } - ], - "id": 2031, - "name": "Assignment", - "src": "8500:51:2" - } - ], - "id": 2032, - "name": "ExpressionStatement", - "src": "8500:51:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 2033, - "name": "Identifier", - "src": "8566:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2034, - "name": "ElementaryTypeName", - "src": "8575:7:2" - } - ], - "id": 2035, - "name": "ElementaryTypeNameExpression", - "src": "8575:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2036, - "name": "Literal", - "src": "8583:1:2" - } - ], - "id": 2037, - "name": "FunctionCall", - "src": "8575:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2000, - "type": "address", - "value": "account" - }, - "id": 2038, - "name": "Identifier", - "src": "8587:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2002, - "type": "uint256", - "value": "amount" - }, - "id": 2039, - "name": "Identifier", - "src": "8596:6:2" - } - ], - "id": 2040, - "name": "FunctionCall", - "src": "8566:37:2" - } - ], - "id": 2041, - "name": "EmitStatement", - "src": "8561:42:2" - } - ], - "id": 2042, - "name": "Block", - "src": "8365:245:2" - } - ], - "id": 2043, - "name": "FunctionDefinition", - "src": "8308:302:2" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_burn", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens." - }, - "id": 2044, - "name": "StructuredDocumentation", - "src": "8616:308:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "account", - "overrides": null, - "scope": 2090, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2045, - "name": "ElementaryTypeName", - "src": "8944:7:2" - } - ], - "id": 2046, - "name": "VariableDeclaration", - "src": "8944:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2090, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2047, - "name": "ElementaryTypeName", - "src": "8961:7:2" - } - ], - "id": 2048, - "name": "VariableDeclaration", - "src": "8961:14:2" - } - ], - "id": 2049, - "name": "ParameterList", - "src": "8943:33:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2050, - "name": "ParameterList", - "src": "8986:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", - "typeString": "literal_string \"ERC20: burn from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2051, - "name": "Identifier", - "src": "8996:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2046, - "type": "address", - "value": "account" - }, - "id": 2052, - "name": "Identifier", - "src": "9004:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2053, - "name": "ElementaryTypeName", - "src": "9015:7:2" - } - ], - "id": 2054, - "name": "ElementaryTypeNameExpression", - "src": "9015:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2055, - "name": "Literal", - "src": "9023:1:2" - } - ], - "id": 2056, - "name": "FunctionCall", - "src": "9015:10:2" - } - ], - "id": 2057, - "name": "BinaryOperation", - "src": "9004:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: burn from the zero address\"", - "value": "ERC20: burn from the zero address" - }, - "id": 2058, - "name": "Literal", - "src": "9027:35:2" - } - ], - "id": 2059, - "name": "FunctionCall", - "src": "8996:67:2" - } - ], - "id": 2060, - "name": "ExpressionStatement", - "src": "8996:67:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2061, - "name": "Identifier", - "src": "9074:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2046, - "type": "address", - "value": "account" - }, - "id": 2062, - "name": "Identifier", - "src": "9084:7:2" - } - ], - "id": 2063, - "name": "IndexAccess", - "src": "9074:18:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", - "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2456, - "type": "function (uint256,uint256,string memory) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1542, - "type": "mapping(address => uint256)", - "value": "_balances" - }, - "id": 2064, - "name": "Identifier", - "src": "9095:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2046, - "type": "address", - "value": "account" - }, - "id": 2065, - "name": "Identifier", - "src": "9105:7:2" - } - ], - "id": 2066, - "name": "IndexAccess", - "src": "9095:18:2" - } - ], - "id": 2067, - "name": "MemberAccess", - "src": "9095:22:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2048, - "type": "uint256", - "value": "amount" - }, - "id": 2068, - "name": "Identifier", - "src": "9118:6:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: burn amount exceeds balance\"", - "value": "ERC20: burn amount exceeds balance" - }, - "id": 2069, - "name": "Literal", - "src": "9126:36:2" - } - ], - "id": 2070, - "name": "FunctionCall", - "src": "9095:68:2" - } - ], - "id": 2071, - "name": "Assignment", - "src": "9074:89:2" - } - ], - "id": 2072, - "name": "ExpressionStatement", - "src": "9074:89:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1550, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2073, - "name": "Identifier", - "src": "9173:12:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "uint256", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sub", - "referencedDeclaration": 2354, - "type": "function (uint256,uint256) pure returns (uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1550, - "type": "uint256", - "value": "_totalSupply" - }, - "id": 2074, - "name": "Identifier", - "src": "9188:12:2" - } - ], - "id": 2075, - "name": "MemberAccess", - "src": "9188:16:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2048, - "type": "uint256", - "value": "amount" - }, - "id": 2076, - "name": "Identifier", - "src": "9205:6:2" - } - ], - "id": 2077, - "name": "FunctionCall", - "src": "9188:24:2" - } - ], - "id": 2078, - "name": "Assignment", - "src": "9173:39:2" - } - ], - "id": 2079, - "name": "ExpressionStatement", - "src": "9173:39:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3076, - "type": "function (address,address,uint256)", - "value": "Transfer" - }, - "id": 2080, - "name": "Identifier", - "src": "9227:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2046, - "type": "address", - "value": "account" - }, - "id": 2081, - "name": "Identifier", - "src": "9236:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2082, - "name": "ElementaryTypeName", - "src": "9245:7:2" - } - ], - "id": 2083, - "name": "ElementaryTypeNameExpression", - "src": "9245:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2084, - "name": "Literal", - "src": "9253:1:2" - } - ], - "id": 2085, - "name": "FunctionCall", - "src": "9245:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2048, - "type": "uint256", - "value": "amount" - }, - "id": 2086, - "name": "Identifier", - "src": "9257:6:2" - } - ], - "id": 2087, - "name": "FunctionCall", - "src": "9227:37:2" - } - ], - "id": 2088, - "name": "EmitStatement", - "src": "9222:42:2" - } - ], - "id": 2089, - "name": "Block", - "src": "8986:285:2" - } - ], - "id": 2090, - "name": "FunctionDefinition", - "src": "8929:342:2" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_approve", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n This is internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address." - }, - "id": 2091, - "name": "StructuredDocumentation", - "src": "9277:414:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 2135, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2092, - "name": "ElementaryTypeName", - "src": "9714:7:2" - } - ], - "id": 2093, - "name": "VariableDeclaration", - "src": "9714:13:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "spender", - "overrides": null, - "scope": 2135, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 2094, - "name": "ElementaryTypeName", - "src": "9729:7:2" - } - ], - "id": 2095, - "name": "VariableDeclaration", - "src": "9729:15:2" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "amount", - "overrides": null, - "scope": 2135, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 2096, - "name": "ElementaryTypeName", - "src": "9746:7:2" - } - ], - "id": 2097, - "name": "VariableDeclaration", - "src": "9746:14:2" - } - ], - "id": 2098, - "name": "ParameterList", - "src": "9713:48:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2099, - "name": "ParameterList", - "src": "9771:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "typeString": "literal_string \"ERC20: approve from the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2100, - "name": "Identifier", - "src": "9781:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2093, - "type": "address", - "value": "owner" - }, - "id": 2101, - "name": "Identifier", - "src": "9789:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2102, - "name": "ElementaryTypeName", - "src": "9798:7:2" - } - ], - "id": 2103, - "name": "ElementaryTypeNameExpression", - "src": "9798:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2104, - "name": "Literal", - "src": "9806:1:2" - } - ], - "id": 2105, - "name": "FunctionCall", - "src": "9798:10:2" - } - ], - "id": 2106, - "name": "BinaryOperation", - "src": "9789:19:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: approve from the zero address\"", - "value": "ERC20: approve from the zero address" - }, - "id": 2107, - "name": "Literal", - "src": "9810:38:2" - } - ], - "id": 2108, - "name": "FunctionCall", - "src": "9781:68:2" - } - ], - "id": 2109, - "name": "ExpressionStatement", - "src": "9781:68:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "typeString": "literal_string \"ERC20: approve to the zero address\"" - } - ], - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 2110, - "name": "Identifier", - "src": "9859:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2095, - "type": "address", - "value": "spender" - }, - "id": 2111, - "name": "Identifier", - "src": "9867:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 2112, - "name": "ElementaryTypeName", - "src": "9878:7:2" - } - ], - "id": 2113, - "name": "ElementaryTypeNameExpression", - "src": "9878:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 2114, - "name": "Literal", - "src": "9886:1:2" - } - ], - "id": 2115, - "name": "FunctionCall", - "src": "9878:10:2" - } - ], - "id": 2116, - "name": "BinaryOperation", - "src": "9867:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"ERC20: approve to the zero address\"", - "value": "ERC20: approve to the zero address" - }, - "id": 2117, - "name": "Literal", - "src": "9890:36:2" - } - ], - "id": 2118, - "name": "FunctionCall", - "src": "9859:68:2" - } - ], - "id": 2119, - "name": "ExpressionStatement", - "src": "9859:68:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1548, - "type": "mapping(address => mapping(address => uint256))", - "value": "_allowances" - }, - "id": 2120, - "name": "Identifier", - "src": "9938:11:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2093, - "type": "address", - "value": "owner" - }, - "id": 2121, - "name": "Identifier", - "src": "9950:5:2" - } - ], - "id": 2123, - "name": "IndexAccess", - "src": "9938:18:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2095, - "type": "address", - "value": "spender" - }, - "id": 2122, - "name": "Identifier", - "src": "9957:7:2" - } - ], - "id": 2124, - "name": "IndexAccess", - "src": "9938:27:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2097, - "type": "uint256", - "value": "amount" - }, - "id": 2125, - "name": "Identifier", - "src": "9968:6:2" - } - ], - "id": 2126, - "name": "Assignment", - "src": "9938:36:2" - } - ], - "id": 2127, - "name": "ExpressionStatement", - "src": "9938:36:2" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [null], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "overloadedDeclarations": [null], - "referencedDeclaration": 3085, - "type": "function (address,address,uint256)", - "value": "Approval" - }, - "id": 2128, - "name": "Identifier", - "src": "9989:8:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2093, - "type": "address", - "value": "owner" - }, - "id": 2129, - "name": "Identifier", - "src": "9998:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2095, - "type": "address", - "value": "spender" - }, - "id": 2130, - "name": "Identifier", - "src": "10005:7:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2097, - "type": "uint256", - "value": "amount" - }, - "id": 2131, - "name": "Identifier", - "src": "10014:6:2" - } - ], - "id": 2132, - "name": "FunctionCall", - "src": "9989:32:2" - } - ], - "id": 2133, - "name": "EmitStatement", - "src": "9984:37:2" - } - ], - "id": 2134, - "name": "Block", - "src": "9771:257:2" - } - ], - "id": 2135, - "name": "FunctionDefinition", - "src": "9696:332:2" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [null], - "name": "_setupDecimals", - "overrides": null, - "scope": 2147, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does." - }, - "id": 2136, - "name": "StructuredDocumentation", - "src": "10034:312:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "decimals_", - "overrides": null, - "scope": 2146, - "stateVariable": false, - "storageLocation": "default", - "type": "uint8", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint8", - "type": "uint8" - }, - "id": 2137, - "name": "ElementaryTypeName", - "src": "10375:5:2" - } - ], - "id": 2138, - "name": "VariableDeclaration", - "src": "10375:15:2" - } - ], - "id": 2139, - "name": "ParameterList", - "src": "10374:17:2" - }, - { - "attributes": { - "parameters": [null] - }, - "children": [], - "id": 2140, - "name": "ParameterList", - "src": "10401:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint8" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 1555, - "type": "uint8", - "value": "_decimals" - }, - "id": 2141, - "name": "Identifier", - "src": "10411:9:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [null], - "referencedDeclaration": 2138, - "type": "uint8", - "value": "decimals_" - }, - "id": 2142, - "name": "Identifier", - "src": "10423:9:2" - } - ], - "id": 2143, - "name": "Assignment", - "src": "10411:21:2" - } - ], - "id": 2144, - "name": "ExpressionStatement", - "src": "10411:21:2" - } - ], - "id": 2145, - "name": "Block", - "src": "10401:38:2" - } - ], - "id": 2146, - "name": "FunctionDefinition", - "src": "10351:88:2" - } - ], - "id": 2147, - "name": "ContractDefinition", - "src": "304:10137:2" - } - ], - "id": 2148, - "name": "SourceUnit", - "src": "67:10375:2" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.4", - "updatedAt": "2021-04-12T21:53:29.906Z", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/packages/bridge-sdk/package.json b/packages/bridge-sdk/package.json deleted file mode 100644 index 0ab1069..0000000 --- a/packages/bridge-sdk/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@solana/bridge-sdk", - "version": "0.0.1", - "description": "Bridge common sdk utilities", - "main": "dist/lib/index.js", - "types": "dist/lib/index.d.ts", - "exports": { - ".": "./dist/lib/" - }, - "license": "Apache-2.0", - "publishConfig": { - "access": "public" - }, - "engines": { - "node": ">=10" - }, - "dependencies": { - "@babel/preset-typescript": "^7.13.0", - "@oyster/common": "0.0.2", - "@solana/spl-token": "0.1.3", - "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1", - "bignumber.js": "^9.0.1", - "bn.js": "^5.1.3", - "bs58": "^4.0.1", - "buffer-layout": "1.2.0", - "ethers": "^4.0.48", - "eventemitter3": "^4.0.7", - "lodash": "^4.17.20", - "typescript": "^4.1.3", - "web3": "^1.3.0" - }, - "scripts": { - "build": "tsc", - "start": "npm-run-all --parallel watch watch-css watch-css-src", - "watch-css": "less-watch-compiler src/ dist/lib/", - "watch-css-src": "less-watch-compiler src/ src/", - "watch": "tsc --watch", - "test": "jest test", - "clean": "rm -rf dist", - "prepare": "run-s clean build", - "format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"", - "ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'" - }, - "files": [ - "dist" - ], - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/solana-labs/oyster" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - }, - "resolutions": { - "react": "16.13.1", - "react-dom": "16.13.1" - }, - "homepage": ".", - "devDependencies": { - "@typechain/ethers-v4": "^1.0.0", - "@types/bn.js": "^5.1.0", - "@types/bs58": "^4.0.1", - "@types/node": "^12.12.62", - "arweave-deploy": "^1.9.1", - "gh-pages": "^3.1.0", - "jest": "^27.4.7", - "prettier": "^2.1.2" - } -} \ No newline at end of file diff --git a/packages/bridge-sdk/src/bridge/claim.ts b/packages/bridge-sdk/src/bridge/claim.ts deleted file mode 100644 index 254afd4..0000000 --- a/packages/bridge-sdk/src/bridge/claim.ts +++ /dev/null @@ -1,21 +0,0 @@ -// 40 - ExecutedVAA (claim) -import { publicKey } from '@oyster/common/dist/lib/utils/layout'; -import * as BufferLayout from 'buffer-layout'; - -export const ClaimedVAA = BufferLayout.struct([ - BufferLayout.blob(32, 'hash'), - BufferLayout.u32('vaaTime'), - BufferLayout.u8('initialized'), - //BufferLayout.seq(BufferLayout.u8(), 3), -]); - -/* -pub struct ClaimedVAA { - /// hash of the vaa - pub hash: [u8; 32], - /// time the vaa was submitted - pub vaa_time: u32, - /// Is `true` if this structure has been initialized. - pub is_initialized: bool, -} -*/ diff --git a/packages/bridge-sdk/src/bridge/config.ts b/packages/bridge-sdk/src/bridge/config.ts deleted file mode 100644 index 0d79716..0000000 --- a/packages/bridge-sdk/src/bridge/config.ts +++ /dev/null @@ -1,10 +0,0 @@ -// 44 - bridge config -import { publicKey } from '@oyster/common/dist/lib/utils/layout'; -import * as BufferLayout from 'buffer-layout'; - -export const BridgeLayout = BufferLayout.struct([ - BufferLayout.u32('guardianSetIndex'), - BufferLayout.u8('guardianSetExpirationTime'), - publicKey('tokenProgram'), - BufferLayout.u8('isInitialized'), -]); diff --git a/packages/bridge-sdk/src/bridge/constants.ts b/packages/bridge-sdk/src/bridge/constants.ts deleted file mode 100644 index 643e4ef..0000000 --- a/packages/bridge-sdk/src/bridge/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum ASSET_CHAIN { - Solana = 1, - Ethereum = 2, -} diff --git a/packages/bridge-sdk/src/bridge/custody.ts b/packages/bridge-sdk/src/bridge/custody.ts deleted file mode 100644 index 24b94c5..0000000 --- a/packages/bridge-sdk/src/bridge/custody.ts +++ /dev/null @@ -1,4 +0,0 @@ -// 34 - custody account -import * as BufferLayout from 'buffer-layout'; - -/// ForeignAddress u8 - 32 diff --git a/packages/bridge-sdk/src/bridge/guardianSet.ts b/packages/bridge-sdk/src/bridge/guardianSet.ts deleted file mode 100644 index bfc9623..0000000 --- a/packages/bridge-sdk/src/bridge/guardianSet.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as BufferLayout from 'buffer-layout'; - -// 420 -export const GuardianSetLayout: typeof BufferLayout.Structure = BufferLayout.struct( - [ - BufferLayout.u32('index'), - BufferLayout.u8('keysLength'), - - // TODO: decode keys - BufferLayout.blob(406, 'keys'), - - BufferLayout.u32('creationTime'), - BufferLayout.u32('expirationTime'), - BufferLayout.u8('isInitialized'), - ], -); diff --git a/packages/bridge-sdk/src/bridge/helpers.ts b/packages/bridge-sdk/src/bridge/helpers.ts deleted file mode 100644 index 6987e46..0000000 --- a/packages/bridge-sdk/src/bridge/helpers.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { AssetMeta } from './meta'; - -export const bridgeAuthorityKey = async (bridgeId: PublicKey) => { - // @ts-ignore - return ( - await PublicKey.findProgramAddress([Buffer.from('bridge')], bridgeId) - )[0]; -}; -export const wrappedAssetMintKey = async ( - bridgeId: PublicKey, - authority: PublicKey, - asset: AssetMeta, -) => { - if (asset.chain === 1) { - return new PublicKey(asset.address); - } - - let seeds: Array = [ - Buffer.from('wrapped'), - authority.toBuffer(), - Buffer.of(asset.chain), - Buffer.of(asset.decimals), - padBuffer(asset.address, 32), - ]; - // @ts-ignore - return (await PublicKey.findProgramAddress(seeds, bridgeId))[0]; -}; - -export const wrappedAssetMetaKey = async ( - bridgeId: PublicKey, - authority: PublicKey, - mint: PublicKey, -) => { - let seeds: Array = [ - Buffer.from('meta'), - authority.toBuffer(), - mint.toBuffer(), - ]; - // @ts-ignore - return (await PublicKey.findProgramAddress(seeds, bridgeId))[0]; -}; - -export function padBuffer(b: Buffer, len: number): Buffer { - const zeroPad = Buffer.alloc(len); - b.copy(zeroPad, len - b.length); - return zeroPad; -} diff --git a/packages/bridge-sdk/src/bridge/index.ts b/packages/bridge-sdk/src/bridge/index.ts deleted file mode 100644 index 1265027..0000000 --- a/packages/bridge-sdk/src/bridge/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './config'; -export * from './guardianSet'; -export * from './meta'; -export * from './transferOutProposal'; -export * from './transfer'; -export * from './helpers'; diff --git a/packages/bridge-sdk/src/bridge/lock.ts b/packages/bridge-sdk/src/bridge/lock.ts deleted file mode 100644 index dbec1c6..0000000 --- a/packages/bridge-sdk/src/bridge/lock.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { programIds } from '@oyster/common'; -import { - PublicKey, - SystemProgram, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_INSTRUCTIONS_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import BN from 'bn.js'; -import * as BufferLayout from 'buffer-layout'; -import { padBuffer } from './helpers'; -import { AssetMeta } from './meta'; -import { ASSET_CHAIN } from './constants'; - -export const createLockAssetInstruction = async ( - authorityKey: PublicKey, - payer: PublicKey, - tokenAccount: PublicKey, - mint: PublicKey, - amount: BN, - targetChain: number, - targetAddress: Buffer, - asset: AssetMeta, - nonce: number, -) => { - const programId = programIds().wormhole.pubkey; - const dataLayout = BufferLayout.struct([ - BufferLayout.u8('instruction'), - // uint256 - BufferLayout.blob(32, 'amount'), - BufferLayout.u8('targetChain'), - BufferLayout.blob(32, 'assetAddress'), - BufferLayout.u8('assetChain'), - BufferLayout.u8('assetDecimals'), - BufferLayout.blob(32, 'targetAddress'), - BufferLayout.seq(BufferLayout.u8(), 1), - BufferLayout.u32('nonce'), - ]); - - let nonceBuffer = Buffer.alloc(4); - nonceBuffer.writeUInt32LE(nonce, 0); - - // @ts-ignore - let seeds: Array = [ - Buffer.from('transfer'), - authorityKey.toBuffer(), - Buffer.from([asset.chain]), - padBuffer(asset.address, 32), - Buffer.from([targetChain]), - padBuffer(targetAddress, 32), - tokenAccount.toBuffer(), - nonceBuffer, - ]; - // @ts-ignore - let transferKey = (await PublicKey.findProgramAddress(seeds, programId))[0]; - - const data = Buffer.alloc(dataLayout.span); - dataLayout.encode( - { - instruction: 1, // TransferOut instruction - amount: padBuffer(Buffer.from(amount.toArray()), 32), - targetChain: targetChain, - assetAddress: padBuffer(asset.address, 32), - assetChain: asset.chain, - assetDecimals: asset.decimals, - targetAddress: padBuffer(targetAddress, 32), - nonce: nonce, - }, - data, - ); - - const keys = [ - { pubkey: programId, isSigner: false, isWritable: false }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { pubkey: programIds().token, isSigner: false, isWritable: false }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_INSTRUCTIONS_PUBKEY, - isSigner: false, - isWritable: false, - }, - { pubkey: tokenAccount, isSigner: false, isWritable: true }, - { pubkey: authorityKey, isSigner: false, isWritable: false }, - - { pubkey: transferKey, isSigner: false, isWritable: true }, - { pubkey: mint, isSigner: false, isWritable: true }, - { pubkey: payer, isSigner: true, isWritable: true }, - ]; - - if (asset.chain === ASSET_CHAIN.Solana) { - // @ts-ignore - let custodyKey = ( - await PublicKey.findProgramAddress( - [Buffer.from('custody'), authorityKey.toBuffer(), mint.toBuffer()], - programId, - ) - )[0]; - keys.push({ pubkey: custodyKey, isSigner: false, isWritable: true }); - } - - return { - ix: new TransactionInstruction({ - keys, - programId: programId, - data, - }), - transferKey: transferKey, - }; -}; diff --git a/packages/bridge-sdk/src/bridge/meta.ts b/packages/bridge-sdk/src/bridge/meta.ts deleted file mode 100644 index 3681b79..0000000 --- a/packages/bridge-sdk/src/bridge/meta.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { programIds } from '@oyster/common'; -import { - PublicKey, - SystemProgram, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import * as BufferLayout from 'buffer-layout'; -import { padBuffer, wrappedAssetMetaKey } from './helpers'; - -export interface AssetMeta { - chain: number; - decimals: number; - address: Buffer; -} - -export const WrappedMetaLayout: typeof BufferLayout.Structure = BufferLayout.struct( - [ - BufferLayout.u8('chain'), - BufferLayout.blob(32, 'address'), - BufferLayout.u8('isInitialized'), - ], -); - -export const createWrappedLayout = BufferLayout.struct([ - BufferLayout.u8('instruction'), - BufferLayout.blob(32, 'assetAddress'), - BufferLayout.u8('chain'), - BufferLayout.u8('decimals'), -]); - -export const createWrappedAssetInstruction = async ( - meta: AssetMeta, - bridgeId: PublicKey, - authorityKey: PublicKey, - mintKey: PublicKey, - payer: PublicKey, -) => { - let metaKey = await wrappedAssetMetaKey(bridgeId, authorityKey, mintKey); - const wa_keys = [ - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: authorityKey, - isSigner: false, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: true, - }, - { - pubkey: mintKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: metaKey, - isSigner: false, - isWritable: true, - }, - ]; - - const wrappedData = Buffer.alloc(createWrappedLayout.span); - createWrappedLayout.encode( - { - instruction: 7, // CreateWrapped instruction - assetAddress: padBuffer(meta.address, 32), - chain: meta.chain, - decimals: meta.decimals, - }, - wrappedData, - ); - - return new TransactionInstruction({ - keys: wa_keys, - programId: bridgeId, - data: wrappedData, - }); -}; diff --git a/packages/bridge-sdk/src/bridge/signatureState.ts b/packages/bridge-sdk/src/bridge/signatureState.ts deleted file mode 100644 index 4d6bece..0000000 --- a/packages/bridge-sdk/src/bridge/signatureState.ts +++ /dev/null @@ -1,12 +0,0 @@ -// 1340 - SigState - (VerifySignatures - parameter 4) -// export const NOP = 0; - -import * as BufferLayout from 'buffer-layout'; - -// 1184 TransferOutProposal -export const SignatureLayout = BufferLayout.struct([ - BufferLayout.blob(64 * 1000, 'signatures'), - BufferLayout.blob(32, 'hash'), - BufferLayout.u32('guardianSetIndex'), - BufferLayout.u8('initialized'), -]); diff --git a/packages/bridge-sdk/src/bridge/transfer/fromSolana.ts b/packages/bridge-sdk/src/bridge/transfer/fromSolana.ts deleted file mode 100644 index a932089..0000000 --- a/packages/bridge-sdk/src/bridge/transfer/fromSolana.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { - programIds, - sendTransactionWithRetry, - sleep, - WalletSigner, -} from '@oyster/common'; -import { ethers } from 'ethers'; -import { WormholeFactory } from '../../contracts/WormholeFactory'; -import { bridgeAuthorityKey } from './../helpers'; -import { Connection, PublicKey, SystemProgram } from '@solana/web3.js'; -import { Token, u64 } from '@solana/spl-token'; -import { ProgressUpdate, TransferRequest } from './interface'; -import BN from 'bn.js'; -import { createLockAssetInstruction } from '../lock'; -import { TransferOutProposalLayout } from '../transferOutProposal'; -import { SolanaBridge } from '../../core'; - -export const fromSolana = async ( - connection: Connection, - wallet: WalletSigner, - request: TransferRequest, - provider: ethers.providers.Web3Provider, - setProgress: (update: ProgressUpdate) => void, - bridge?: SolanaBridge, -) => { - if ( - !request.asset || - !request.amount || - !request.to || - !request.info || - !bridge - ) { - return; - } - const signer = provider?.getSigner(); - request.recipient = Buffer.from((await signer.getAddress()).slice(2), 'hex'); - const nonce = await provider.getTransactionCount( - signer.getAddress(), - 'pending', - ); - - let counter = 0; - // check difference between lock/approve (invoke lock if allowance < amount) - const steps = { - transfer: async (request: TransferRequest) => { - if (!request.info) { - throw new Error('Missing info'); - } - - if (!request.amount) { - throw new Error('Missing amount'); - } - - return steps.lock(request); - }, - - // locks assets in the bridge - lock: async (request: TransferRequest) => { - if ( - !request.amount || - !request.recipient || - !request.to || - !request.info || - !wallet.publicKey - ) { - return; - } - - const amountBN = ethers.utils.parseUnits( - request.amount.toString(), - request.info.decimals || 0, - ); - const amountBI = BigInt(amountBN.toString()) - - let group = 'Initiate transfer'; - const programs = programIds(); - const bridgeId = programs.wormhole.pubkey; - const authorityKey = await bridgeAuthorityKey(bridgeId); - - let { ix: lock_ix, transferKey } = await createLockAssetInstruction( - authorityKey, - wallet.publicKey, - new PublicKey(request.info.address), - new PublicKey(request.info.mint), - new BN(amountBN.toString()), - request.to, - request.recipient, - { - chain: request.info.chainID, - address: request.info.assetAddress, - decimals: request.info.decimals, - }, - // TODO: should this is use durable nonce account? - Math.random() * 100000, - ); - - let ix = Token.createApproveInstruction( - programs.token, - new PublicKey(request.info.address), - authorityKey, - wallet.publicKey, - [], - new u64(amountBI.toString(16), 16), - ); - - setProgress({ - message: 'Waiting for Solana approval...', - type: 'user', - group, - step: counter++, - }); - let fee_ix = SystemProgram.transfer({ - fromPubkey: wallet.publicKey, - toPubkey: authorityKey, - lamports: await getTransferFee(connection), - }); - - const { slot } = await sendTransactionWithRetry( - connection, - wallet, - [ix, fee_ix, lock_ix], - [], - undefined, - false, - undefined, - () => { - setProgress({ - message: 'Executing Solana Transaction', - type: 'wait', - group, - step: counter++, - }); - }, - ); - - return steps.wait(request, transferKey, slot); - }, - wait: async ( - request: TransferRequest, - proposalKey: PublicKey, - slot: number, - ) => { - return new Promise((resolve, reject) => { - let completed = false; - let unsubscribed = false; - let startSlot = slot; - - let group = 'Lock assets'; - const solConfirmationMessage = (current: number) => - `Awaiting Solana confirmations: ${current} out of 32`; - let replaceMessage = false; - let slotUpdateListener = connection.onSlotChange(slot => { - if (unsubscribed) { - return; - } - - const passedSlots = Math.min(Math.max(slot.slot - startSlot, 0), 32); - const isLast = passedSlots - 1 === 31; - if (passedSlots <= 32) { - setProgress({ - message: solConfirmationMessage(passedSlots), - type: isLast ? 'done' : 'wait', - step: counter++, - group, - replace: replaceMessage, - }); - replaceMessage = true; - } - - if (completed || isLast) { - unsubscribed = true; - setProgress({ - message: 'Awaiting guardian confirmation. (Up to few min.)', - type: 'wait', - step: counter++, - group, - }); - } - }); - - let accountChangeListener = connection.onAccountChange( - proposalKey, - async a => { - if (completed) return; - - let lockup = TransferOutProposalLayout.decode(a.data); - let vaa = lockup.vaa; - - for (let i = vaa.length; i > 0; i--) { - if (vaa[i] == 0xff) { - vaa = vaa.slice(0, i); - break; - } - } - - // Probably a poke - if (vaa.filter((v: number) => v !== 0).length == 0) { - return; - } - - completed = true; - connection.removeAccountChangeListener(accountChangeListener); - connection.removeSlotChangeListener(slotUpdateListener); - let signatures; - - while (!signatures) { - try { - signatures = await bridge.fetchSignatureStatus( - lockup.signatureAccount, - ); - break; - } catch { - await sleep(500); - } - } - - let sigData = Buffer.of( - ...signatures.reduce((previousValue, currentValue) => { - previousValue.push(currentValue.index); - previousValue.push(...currentValue.signature); - - return previousValue; - }, new Array()), - ); - - vaa = Buffer.concat([ - vaa.slice(0, 5), - Buffer.of(signatures.length), - sigData, - vaa.slice(6), - ]); - - try { - await steps.postVAA(request, vaa); - resolve(); - } catch { - reject(); - } - }, - 'single', - ); - }); - }, - postVAA: async (request: TransferRequest, vaa: any) => { - let wh = WormholeFactory.connect(programIds().wormhole.bridge, signer); - let group = 'Finalizing transfer'; - setProgress({ - message: 'Sign the claim...', - type: 'wait', - group, - step: counter++, - }); - let tx = await wh.submitVAA(vaa); - setProgress({ - message: 'Waiting for tokens unlock to be mined... (Up to few min.)', - type: 'wait', - group, - step: counter++, - }); - await tx.wait(1); - setProgress({ - message: 'Execution of VAA succeeded', - type: 'done', - group, - step: counter++, - }); - //message.success({content: "", key: "eth_tx"}) - }, - }; - - return steps.transfer(request); -}; - -const getTransferFee = async (connection: Connection) => { - // claim + signature - // Reference processor.rs::Bridge::transfer_fee - return ( - (await connection.getMinimumBalanceForRentExemption((40 + 1340) * 2)) + - 18 * 10000 * 2 - ); -}; diff --git a/packages/bridge-sdk/src/bridge/transfer/index.ts b/packages/bridge-sdk/src/bridge/transfer/index.ts deleted file mode 100644 index f0fec90..0000000 --- a/packages/bridge-sdk/src/bridge/transfer/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './toSolana'; -export * from './fromSolana'; -export * from './interface'; diff --git a/packages/bridge-sdk/src/bridge/transfer/interface.ts b/packages/bridge-sdk/src/bridge/transfer/interface.ts deleted file mode 100644 index 3eb4b85..0000000 --- a/packages/bridge-sdk/src/bridge/transfer/interface.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { BigNumber } from 'bignumber.js'; -import { ethers } from 'ethers'; -import { ASSET_CHAIN } from '../constants'; - -export interface ProgressUpdate { - message: string; - type: string; - step: number; - group: string; - replace?: boolean; -} - -export interface TransferRequestInfo { - address: string; - name: string; - balance: BigNumber; - decimals: number; - allowance: ethers.utils.BigNumber; - isWrapped: boolean; - chainID: number; - assetAddress: Buffer; - mint: string; -} - -export interface TransferRequest { - amount?: number; - - info?: TransferRequestInfo; - - from?: ASSET_CHAIN; - asset?: string; - - to?: ASSET_CHAIN; - recipient?: Buffer; -} - -export const displayBalance = (info?: TransferRequestInfo) => { - try { - const balance = info?.balance || new BigNumber(0); - const precision = new BigNumber(10).pow(info?.decimals || new BigNumber(0)); - return balance.div(precision).toNumber(); - } catch (e) { - return 0; - } -}; diff --git a/packages/bridge-sdk/src/bridge/transfer/toSolana.ts b/packages/bridge-sdk/src/bridge/transfer/toSolana.ts deleted file mode 100644 index e48430f..0000000 --- a/packages/bridge-sdk/src/bridge/transfer/toSolana.ts +++ /dev/null @@ -1,356 +0,0 @@ -import { - programIds, - getMultipleAccounts, - sendTransactionWithRetry, - cache, - TokenAccountParser, - ParsedAccount, - createAssociatedTokenAccountInstruction, - WalletSigner, -} from '@oyster/common'; -import { ethers } from 'ethers'; -import { ERC20Factory } from '../../contracts/ERC20Factory'; -import { WormholeFactory } from '../../contracts/WormholeFactory'; -import { AssetMeta, createWrappedAssetInstruction } from './../meta'; -import { bridgeAuthorityKey, wrappedAssetMintKey } from './../helpers'; -import { - Account, - Connection, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; -import { AccountInfo } from '@solana/spl-token'; -import { TransferRequest, ProgressUpdate } from './interface'; -import { BigNumber } from 'bignumber.js'; - -export const toSolana = async ( - connection: Connection, - wallet: WalletSigner, - request: TransferRequest, - provider: ethers.providers.Web3Provider, - setProgress: (update: ProgressUpdate) => void, -) => { - if ( - !request.asset || - !request.amount || - !request.info || - !request.info.address - ) { - return; - } - const walletName = 'MetaMask'; - const signer = provider?.getSigner(); - - const nonce = await provider.getTransactionCount( - signer.getAddress(), - 'pending', - ); - const amountBigNumber = new BigNumber(request.amount.toString()).toFormat( - request.info.decimals, - ); - - const amountBN = ethers.utils.parseUnits( - request.amount.toString(), - request.info.decimals, - ); - - let counter = 0; - // check difference between lock/approve (invoke lock if allowance < amount) - const steps = { - transfer: async (request: TransferRequest) => { - if (!request.info || !request.amount) { - return; - } - - return steps.prepare(request); - }, - - // creates wrapped account on solana - prepare: async (request: TransferRequest) => { - if (!request.info || !request.from || !wallet.publicKey) { - return; - } - - const group = 'Initiate transfer'; - try { - let mintKey: PublicKey; - - const bridgeId = programIds().wormhole.pubkey; - const authority = await bridgeAuthorityKey(bridgeId); - const meta: AssetMeta = { - decimals: Math.min(request.info?.decimals, 9), - address: request.info?.assetAddress, - chain: request.from, - }; - if (request.info.mint) { - mintKey = new PublicKey(request.info.mint); - } else { - mintKey = await wrappedAssetMintKey(bridgeId, authority, meta); - } - - const recipientKey = - cache - .byParser(TokenAccountParser) - .map(key => { - let account = cache.get(key) as ParsedAccount; - if ( - account?.info.mint.toBase58() === mintKey.toBase58() && - account?.info.owner.toBase58() === wallet?.publicKey?.toBase58() - ) { - return key; - } - - return; - }) - .find(_ => _) || ''; - const recipient: PublicKey = recipientKey - ? new PublicKey(recipientKey) - : ( - await PublicKey.findProgramAddress( - [ - wallet.publicKey.toBuffer(), - programIds().token.toBuffer(), - mintKey.toBuffer(), - ], - programIds().associatedToken, - ) - )[0]; - - request.recipient = recipient.toBuffer(); - - const accounts = await getMultipleAccounts( - connection, - [mintKey.toBase58(), recipient.toBase58()], - 'single', - ); - const instructions: TransactionInstruction[] = []; - const signers: Account[] = []; - - if (!accounts.array[0]) { - // create mint using wormhole instruction - - instructions.push( - await createWrappedAssetInstruction( - meta, - bridgeId, - authority, - mintKey, - wallet.publicKey, - ), - ); - } - - if (!accounts.array[1]) { - createAssociatedTokenAccountInstruction( - instructions, - recipient, - wallet.publicKey, - wallet.publicKey, - mintKey, - ); - } - - if (instructions.length > 0) { - setProgress({ - message: 'Waiting for Solana approval...', - type: 'user', - group, - step: counter++, - }); - - await sendTransactionWithRetry( - connection, - wallet, - instructions, - signers, - ); - } - } catch (err) { - setProgress({ - message: `Couldn't create Solana account!`, - type: 'error', - group, - step: counter++, - }); - throw err; - } - - return steps.approve(request); - }, - // approves assets for transfer - approve: async (request: TransferRequest) => { - if (!request.info?.address) { - return; - } - - const group = 'Approve assets'; - try { - if (request.info?.allowance.lt(amountBN)) { - let e = ERC20Factory.connect(request.info.address, signer); - setProgress({ - message: `Waiting for ${walletName} approval`, - type: 'user', - group, - step: counter++, - }); - let res = await e.approve(programIds().wormhole.bridge, amountBN); - setProgress({ - message: - 'Waiting for ETH transaction to be mined... (Up to few min.)', - type: 'wait', - group, - step: counter++, - }); - await res.wait(1); - setProgress({ - message: 'Approval on ETH succeeded!', - type: 'done', - group, - step: counter++, - }); - } else { - setProgress({ - message: 'Already approved on ETH!', - type: 'done', - group, - step: counter++, - }); - } - } catch (err) { - setProgress({ - message: 'Approval failed!', - type: 'error', - group, - step: counter++, - }); - throw err; - } - - return steps.lock(request); - }, - // locks assets in the bridge - lock: async (request: TransferRequest) => { - if ( - !amountBN || - !request.info?.address || - !request.recipient || - !request.to || - !request.info - ) { - return; - } - - let group = 'Lock assets'; - - try { - let wh = WormholeFactory.connect(programIds().wormhole.bridge, signer); - setProgress({ - message: `Waiting for ${walletName} transfer approval`, - type: 'user', - group, - step: counter++, - }); - let res = await wh.lockAssets( - request.info.address, - amountBN, - request.recipient, - request.to, - nonce, - false, - ); - setProgress({ - message: - 'Waiting for ETH transaction to be mined... (Up to few min.)', - type: 'wait', - group, - step: counter++, - }); - await res.wait(1); - setProgress({ - message: 'Transfer on ETH succeeded!', - type: 'done', - group, - step: counter++, - }); - } catch (err) { - setProgress({ - message: 'Transfer failed!', - type: 'error', - group, - step: counter++, - }); - throw err; - } - - return steps.wait(request); - }, - wait: async (request: TransferRequest) => { - let startBlock = provider.blockNumber; - let completed = false; - let group = 'Finalizing transfer'; - - const ethConfirmationMessage = (current: number) => - `Awaiting ETH confirmations: ${current} out of 15`; - - setProgress({ - message: ethConfirmationMessage(0), - type: 'wait', - step: counter++, - group, - }); - - let blockHandler = (blockNumber: number) => { - let passedBlocks = blockNumber - startBlock; - const isLast = passedBlocks === 14; - if (passedBlocks < 15) { - setProgress({ - message: ethConfirmationMessage(passedBlocks), - type: isLast ? 'done' : 'wait', - step: counter++, - group, - replace: passedBlocks > 0, - }); - - if (isLast) { - setProgress({ - message: 'Awaiting completion on Solana...', - type: 'wait', - group, - step: counter++, - }); - } - } else if (!completed) { - provider.removeListener('block', blockHandler); - } - }; - provider.on('block', blockHandler); - - return new Promise((resolve, reject) => { - if (!request.recipient) { - return; - } - - let accountChangeListener = connection.onAccountChange( - new PublicKey(request.recipient), - () => { - if (completed) return; - - completed = true; - provider.removeListener('block', blockHandler); - connection.removeAccountChangeListener(accountChangeListener); - setProgress({ - message: 'Transfer completed on Solana', - type: 'info', - group, - step: counter++, - }); - resolve(); - }, - 'single', - ); - }); - }, - }; - - return steps.transfer(request); -}; diff --git a/packages/bridge-sdk/src/bridge/transferOutProposal.ts b/packages/bridge-sdk/src/bridge/transferOutProposal.ts deleted file mode 100644 index 1cac47f..0000000 --- a/packages/bridge-sdk/src/bridge/transferOutProposal.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { publicKey } from '@oyster/common/dist/lib/utils/layout'; -import * as BufferLayout from 'buffer-layout'; - -// 1184 TransferOutProposal -export const TransferOutProposalLayout = BufferLayout.struct([ - BufferLayout.blob(32, 'amount'), - BufferLayout.u8('toChain'), - publicKey('sourceAddress'), - BufferLayout.blob(32, 'targetAddress'), - BufferLayout.blob(32, 'assetAddress'), - BufferLayout.u8('assetChain'), - BufferLayout.u8('assetDecimals'), - BufferLayout.seq(BufferLayout.u8(), 1), // 4 byte alignment because a u32 is following - BufferLayout.u32('nonce'), - BufferLayout.blob(1001, 'vaa'), - BufferLayout.seq(BufferLayout.u8(), 3), // 4 byte alignment because a u32 is following - BufferLayout.u32('vaaTime'), - BufferLayout.u32('lockupTime'), - BufferLayout.u8('pokeCounter'), - publicKey('signatureAccount'), - BufferLayout.u8('initialized'), - BufferLayout.seq(BufferLayout.u8(), 2), // 2 byte alignment -]); diff --git a/packages/bridge-sdk/src/contracts/ERC20.d.ts b/packages/bridge-sdk/src/contracts/ERC20.d.ts deleted file mode 100644 index 471736c..0000000 --- a/packages/bridge-sdk/src/contracts/ERC20.d.ts +++ /dev/null @@ -1,600 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers'; -import { Listener, Provider } from 'ethers/providers'; -import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils'; -import { - TransactionOverrides, - TypedEventDescription, - TypedFunctionDescription, -} from '.'; - -interface ERC20Interface extends Interface { - functions: { - name: TypedFunctionDescription<{ encode([]: []): string }>; - - symbol: TypedFunctionDescription<{ encode([]: []): string }>; - - decimals: TypedFunctionDescription<{ encode([]: []): string }>; - - totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; - - balanceOf: TypedFunctionDescription<{ - encode([account]: [string]): string; - }>; - - transfer: TypedFunctionDescription<{ - encode([recipient, amount]: [string, BigNumberish]): string; - }>; - - allowance: TypedFunctionDescription<{ - encode([owner, spender]: [string, string]): string; - }>; - - approve: TypedFunctionDescription<{ - encode([spender, amount]: [string, BigNumberish]): string; - }>; - - transferFrom: TypedFunctionDescription<{ - encode([sender, recipient, amount]: [ - string, - string, - BigNumberish, - ]): string; - }>; - - increaseAllowance: TypedFunctionDescription<{ - encode([spender, addedValue]: [string, BigNumberish]): string; - }>; - - decreaseAllowance: TypedFunctionDescription<{ - encode([spender, subtractedValue]: [string, BigNumberish]): string; - }>; - }; - - events: { - Approval: TypedEventDescription<{ - encodeTopics([owner, spender, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - - Transfer: TypedEventDescription<{ - encodeTopics([from, to, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - }; -} - -export class ERC20 extends Contract { - connect(signerOrProvider: Signer | Provider | string): ERC20; - attach(addressOrName: string): ERC20; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): ERC20; - once(event: EventFilter | string, listener: Listener): ERC20; - addListener(eventName: EventFilter | string, listener: Listener): ERC20; - removeAllListeners(eventName: EventFilter | string): ERC20; - removeListener(eventName: any, listener: Listener): ERC20; - - interface: ERC20Interface; - - functions: { - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; - - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - filters: { - Approval( - owner: string | null, - spender: string | null, - value: null, - ): EventFilter; - - Transfer(from: string | null, to: string | null, value: null): EventFilter; - }; - - estimate: { - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; -} diff --git a/packages/bridge-sdk/src/contracts/ERC20Factory.ts b/packages/bridge-sdk/src/contracts/ERC20Factory.ts deleted file mode 100644 index 3777a42..0000000 --- a/packages/bridge-sdk/src/contracts/ERC20Factory.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractFactory, Signer } from 'ethers'; -import { Provider } from 'ethers/providers'; -import { UnsignedTransaction } from 'ethers/utils/transaction'; - -import { TransactionOverrides } from '.'; -import { ERC20 } from './ERC20'; - -export class ERC20Factory extends ContractFactory { - constructor(signer?: Signer) { - super(_abi, _bytecode, signer); - } - - deploy( - name_: string, - symbol_: string, - overrides?: TransactionOverrides, - ): Promise { - return super.deploy(name_, symbol_, overrides) as Promise; - } - getDeployTransaction( - name_: string, - symbol_: string, - overrides?: TransactionOverrides, - ): UnsignedTransaction { - return super.getDeployTransaction(name_, symbol_, overrides); - } - attach(address: string): ERC20 { - return super.attach(address) as ERC20; - } - connect(signer: Signer): ERC20Factory { - return super.connect(signer) as ERC20Factory; - } - static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { - return new Contract(address, _abi, signerOrProvider) as ERC20; - } -} - -const _abi = [ - { - inputs: [ - { - internalType: 'string', - name: 'name_', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol_', - type: 'string', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -]; - -const _bytecode = - '0x60806040523480156200001157600080fd5b506040516200139f3803806200139f833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040525050508160039080519060200190620001cd9291906200020b565b508060049080519060200190620001e69291906200020b565b506012600560006101000a81548160ff021916908360ff1602179055505050620002b1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200024e57805160ff19168380011785556200027f565b828001600101855582156200027f579182015b828111156200027e57825182559160200191906001019062000261565b5b5090506200028e919062000292565b5090565b5b80821115620002ad57600081600090555060010162000293565b5090565b6110de80620002c16000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461025857806370a08231146102bc57806395d89b4114610314578063a457c2d714610397578063a9059cbb146103fb578063dd62ed3e1461045f576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b66104d7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610579565b60405180821515815260200191505060405180910390f35b61019d610597565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105a1565b60405180821515815260200191505060405180910390f35b61023f61067a565b604051808260ff16815260200191505060405180910390f35b6102a46004803603604081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610691565b60405180821515815260200191505060405180910390f35b6102fe600480360360208110156102d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610744565b6040518082815260200191505060405180910390f35b61031c61078c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035c578082015181840152602081019050610341565b50505050905090810190601f1680156103895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103e3600480360360408110156103ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061082e565b60405180821515815260200191505060405180910390f35b6104476004803603604081101561041157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108fb565b60405180821515815260200191505060405180910390f35b6104c16004803603604081101561047557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610919565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561056f5780601f106105445761010080835404028352916020019161056f565b820191906000526020600020905b81548152906001019060200180831161055257829003601f168201915b5050505050905090565b600061058d6105866109a0565b84846109a8565b6001905092915050565b6000600254905090565b60006105ae848484610b9f565b61066f846105ba6109a0565b61066a8560405180606001604052806028815260200161101360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106206109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b600190509392505050565b6000600560009054906101000a900460ff16905090565b600061073a61069e6109a0565b8461073585600160006106af6109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6109a8565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108245780601f106107f957610100808354040283529160200191610824565b820191906000526020600020905b81548152906001019060200180831161080757829003601f168201915b5050505050905090565b60006108f161083b6109a0565b846108ec8560405180606001604052806025815260200161108460259139600160006108656109a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6109a8565b6001905092915050565b600061090f6109086109a0565b8484610b9f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806110606024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ab4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610fcb6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061103b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610fa86023913960400191505060405180910390fd5b610cb6838383610fa2565b610d2181604051806060016040528060268152602001610fed602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e609092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610db4816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f1a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610f0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ed2578082015181840152602081019050610eb7565b50505050905090810190601f168015610eff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015610f98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bd3f1ebbd37f184285799523b3026426208876513625827f88611ecf03a6e1e864736f6c634300060c0033'; diff --git a/packages/bridge-sdk/src/contracts/IERC20.d.ts b/packages/bridge-sdk/src/contracts/IERC20.d.ts deleted file mode 100644 index bdb82de..0000000 --- a/packages/bridge-sdk/src/contracts/IERC20.d.ts +++ /dev/null @@ -1,388 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers'; -import { Listener, Provider } from 'ethers/providers'; -import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils'; -import { - TransactionOverrides, - TypedEventDescription, - TypedFunctionDescription, -} from '.'; - -interface IERC20Interface extends Interface { - functions: { - totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; - - balanceOf: TypedFunctionDescription<{ - encode([account]: [string]): string; - }>; - - transfer: TypedFunctionDescription<{ - encode([recipient, amount]: [string, BigNumberish]): string; - }>; - - allowance: TypedFunctionDescription<{ - encode([owner, spender]: [string, string]): string; - }>; - - approve: TypedFunctionDescription<{ - encode([spender, amount]: [string, BigNumberish]): string; - }>; - - transferFrom: TypedFunctionDescription<{ - encode([sender, recipient, amount]: [ - string, - string, - BigNumberish, - ]): string; - }>; - }; - - events: { - Approval: TypedEventDescription<{ - encodeTopics([owner, spender, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - - Transfer: TypedEventDescription<{ - encodeTopics([from, to, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - }; -} - -export class IERC20 extends Contract { - connect(signerOrProvider: Signer | Provider | string): IERC20; - attach(addressOrName: string): IERC20; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): IERC20; - once(event: EventFilter | string, listener: Listener): IERC20; - addListener(eventName: EventFilter | string, listener: Listener): IERC20; - removeAllListeners(eventName: EventFilter | string): IERC20; - removeListener(eventName: any, listener: Listener): IERC20; - - interface: IERC20Interface; - - functions: { - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; - - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - filters: { - Approval( - owner: string | null, - spender: string | null, - value: null, - ): EventFilter; - - Transfer(from: string | null, to: string | null, value: null): EventFilter; - }; - - estimate: { - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; -} diff --git a/packages/bridge-sdk/src/contracts/IERC20Factory.ts b/packages/bridge-sdk/src/contracts/IERC20Factory.ts deleted file mode 100644 index d243672..0000000 --- a/packages/bridge-sdk/src/contracts/IERC20Factory.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer } from 'ethers'; -import { Provider } from 'ethers/providers'; - -import { IERC20 } from './IERC20'; - -export class IERC20Factory { - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; - } -} - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -]; diff --git a/packages/bridge-sdk/src/contracts/WETH.d.ts b/packages/bridge-sdk/src/contracts/WETH.d.ts deleted file mode 100644 index f37b134..0000000 --- a/packages/bridge-sdk/src/contracts/WETH.d.ts +++ /dev/null @@ -1,436 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers'; -import { Listener, Provider } from 'ethers/providers'; -import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils'; -import { - TransactionOverrides, - TypedEventDescription, - TypedFunctionDescription, -} from '.'; - -interface WETHInterface extends Interface { - functions: { - allowance: TypedFunctionDescription<{ - encode([owner, spender]: [string, string]): string; - }>; - - approve: TypedFunctionDescription<{ - encode([spender, amount]: [string, BigNumberish]): string; - }>; - - balanceOf: TypedFunctionDescription<{ - encode([account]: [string]): string; - }>; - - totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; - - transfer: TypedFunctionDescription<{ - encode([recipient, amount]: [string, BigNumberish]): string; - }>; - - transferFrom: TypedFunctionDescription<{ - encode([sender, recipient, amount]: [ - string, - string, - BigNumberish, - ]): string; - }>; - - deposit: TypedFunctionDescription<{ encode([]: []): string }>; - - withdraw: TypedFunctionDescription<{ - encode([amount]: [BigNumberish]): string; - }>; - }; - - events: { - Approval: TypedEventDescription<{ - encodeTopics([owner, spender, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - - Transfer: TypedEventDescription<{ - encodeTopics([from, to, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - }; -} - -export class WETH extends Contract { - connect(signerOrProvider: Signer | Provider | string): WETH; - attach(addressOrName: string): WETH; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): WETH; - once(event: EventFilter | string, listener: Listener): WETH; - addListener(eventName: EventFilter | string, listener: Listener): WETH; - removeAllListeners(eventName: EventFilter | string): WETH; - removeListener(eventName: any, listener: Listener): WETH; - - interface: WETHInterface; - - functions: { - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - deposit(overrides?: TransactionOverrides): Promise; - - 'deposit()'(overrides?: TransactionOverrides): Promise; - - withdraw( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'withdraw(uint256)'( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - deposit(overrides?: TransactionOverrides): Promise; - - 'deposit()'(overrides?: TransactionOverrides): Promise; - - withdraw( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'withdraw(uint256)'( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - filters: { - Approval( - owner: string | null, - spender: string | null, - value: null, - ): EventFilter; - - Transfer(from: string | null, to: string | null, value: null): EventFilter; - }; - - estimate: { - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens owned by `account`. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the amount of tokens in existence. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * Returns the amount of tokens in existence. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - deposit(overrides?: TransactionOverrides): Promise; - - 'deposit()'(overrides?: TransactionOverrides): Promise; - - withdraw( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'withdraw(uint256)'( - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; -} diff --git a/packages/bridge-sdk/src/contracts/WETHFactory.ts b/packages/bridge-sdk/src/contracts/WETHFactory.ts deleted file mode 100644 index 62578ce..0000000 --- a/packages/bridge-sdk/src/contracts/WETHFactory.ts +++ /dev/null @@ -1,220 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer } from 'ethers'; -import { Provider } from 'ethers/providers'; - -import { WETH } from './WETH'; - -export class WETHFactory { - static connect(address: string, signerOrProvider: Signer | Provider): WETH { - return new Contract(address, _abi, signerOrProvider) as WETH; - } -} - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -]; diff --git a/packages/bridge-sdk/src/contracts/Wormhole.d.ts b/packages/bridge-sdk/src/contracts/Wormhole.d.ts deleted file mode 100644 index 0334b15..0000000 --- a/packages/bridge-sdk/src/contracts/Wormhole.d.ts +++ /dev/null @@ -1,556 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers'; -import { Listener, Provider } from 'ethers/providers'; -import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils'; -import { - TransactionOverrides, - TypedEventDescription, - TypedFunctionDescription, -} from '.'; - -interface WormholeInterface extends Interface { - functions: { - consumedVAAs: TypedFunctionDescription<{ encode([]: [Arrayish]): string }>; - - guardian_set_expirity: TypedFunctionDescription<{ encode([]: []): string }>; - - guardian_set_index: TypedFunctionDescription<{ encode([]: []): string }>; - - guardian_sets: TypedFunctionDescription<{ - encode([]: [BigNumberish]): string; - }>; - - isWrappedAsset: TypedFunctionDescription<{ encode([]: [string]): string }>; - - wrappedAssetMaster: TypedFunctionDescription<{ encode([]: []): string }>; - - wrappedAssets: TypedFunctionDescription<{ encode([]: [Arrayish]): string }>; - - getGuardianSet: TypedFunctionDescription<{ - encode([idx]: [BigNumberish]): string; - }>; - - submitVAA: TypedFunctionDescription<{ encode([vaa]: [Arrayish]): string }>; - - parseAndVerifyVAA: TypedFunctionDescription<{ - encode([vaa]: [Arrayish]): string; - }>; - - lockAssets: TypedFunctionDescription<{ - encode([asset, amount, recipient, target_chain, nonce, refund_dust]: [ - string, - BigNumberish, - Arrayish, - BigNumberish, - BigNumberish, - boolean, - ]): string; - }>; - - lockETH: TypedFunctionDescription<{ - encode([recipient, target_chain, nonce]: [ - Arrayish, - BigNumberish, - BigNumberish, - ]): string; - }>; - }; - - events: { - LogGuardianSetChanged: TypedEventDescription<{ - encodeTopics([oldGuardianIndex, newGuardianIndex]: [ - null, - null, - ]): string[]; - }>; - - LogTokensLocked: TypedEventDescription<{ - encodeTopics([ - target_chain, - token_chain, - token_decimals, - token, - sender, - recipient, - amount, - nonce, - ]: [ - null, - null, - null, - Arrayish | null, - Arrayish | null, - null, - null, - null, - ]): string[]; - }>; - }; -} - -export class Wormhole extends Contract { - connect(signerOrProvider: Signer | Provider | string): Wormhole; - attach(addressOrName: string): Wormhole; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): Wormhole; - once(event: EventFilter | string, listener: Listener): Wormhole; - addListener(eventName: EventFilter | string, listener: Listener): Wormhole; - removeAllListeners(eventName: EventFilter | string): Wormhole; - removeListener(eventName: any, listener: Listener): Wormhole; - - interface: WormholeInterface; - - functions: { - consumedVAAs( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'consumedVAAs(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - guardian_set_expirity(overrides?: TransactionOverrides): Promise; - - 'guardian_set_expirity()'( - overrides?: TransactionOverrides, - ): Promise; - - guardian_set_index(overrides?: TransactionOverrides): Promise; - - 'guardian_set_index()'(overrides?: TransactionOverrides): Promise; - - guardian_sets( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'guardian_sets(uint32)'( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - isWrappedAsset( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - 'isWrappedAsset(address)'( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - wrappedAssetMaster(overrides?: TransactionOverrides): Promise; - - 'wrappedAssetMaster()'(overrides?: TransactionOverrides): Promise; - - wrappedAssets( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'wrappedAssets(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - getGuardianSet( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise<{ - keys: string[]; - expiration_time: number; - 0: string[]; - 1: number; - }>; - - 'getGuardianSet(uint32)'( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise<{ - keys: string[]; - expiration_time: number; - 0: string[]; - 1: number; - }>; - - submitVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'submitVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - parseAndVerifyVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise<{ - version: number; - hash: string; - guardian_set_index: number; - timestamp: number; - action: number; - payload: string; - 0: number; - 1: string; - 2: number; - 3: number; - 4: number; - 5: string; - }>; - - 'parseAndVerifyVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise<{ - version: number; - hash: string; - guardian_set_index: number; - timestamp: number; - action: number; - payload: string; - 0: number; - 1: string; - 2: number; - 3: number; - 4: number; - 5: string; - }>; - - lockAssets( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - 'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - lockETH( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'lockETH(bytes32,uint8,uint32)'( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; - - consumedVAAs( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'consumedVAAs(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - guardian_set_expirity(overrides?: TransactionOverrides): Promise; - - 'guardian_set_expirity()'(overrides?: TransactionOverrides): Promise; - - guardian_set_index(overrides?: TransactionOverrides): Promise; - - 'guardian_set_index()'(overrides?: TransactionOverrides): Promise; - - guardian_sets( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'guardian_sets(uint32)'( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - isWrappedAsset( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - 'isWrappedAsset(address)'( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - wrappedAssetMaster(overrides?: TransactionOverrides): Promise; - - 'wrappedAssetMaster()'(overrides?: TransactionOverrides): Promise; - - wrappedAssets( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'wrappedAssets(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - getGuardianSet( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise<{ - keys: string[]; - expiration_time: number; - 0: string[]; - 1: number; - }>; - - 'getGuardianSet(uint32)'( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise<{ - keys: string[]; - expiration_time: number; - 0: string[]; - 1: number; - }>; - - submitVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'submitVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - parseAndVerifyVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise<{ - version: number; - hash: string; - guardian_set_index: number; - timestamp: number; - action: number; - payload: string; - 0: number; - 1: string; - 2: number; - 3: number; - 4: number; - 5: string; - }>; - - 'parseAndVerifyVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise<{ - version: number; - hash: string; - guardian_set_index: number; - timestamp: number; - action: number; - payload: string; - 0: number; - 1: string; - 2: number; - 3: number; - 4: number; - 5: string; - }>; - - lockAssets( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - 'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - lockETH( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'lockETH(bytes32,uint8,uint32)'( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - filters: { - LogGuardianSetChanged( - oldGuardianIndex: null, - newGuardianIndex: null, - ): EventFilter; - - LogTokensLocked( - target_chain: null, - token_chain: null, - token_decimals: null, - token: Arrayish | null, - sender: Arrayish | null, - recipient: null, - amount: null, - nonce: null, - ): EventFilter; - }; - - estimate: { - consumedVAAs( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'consumedVAAs(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - guardian_set_expirity(overrides?: TransactionOverrides): Promise; - - 'guardian_set_expirity()'( - overrides?: TransactionOverrides, - ): Promise; - - guardian_set_index(overrides?: TransactionOverrides): Promise; - - 'guardian_set_index()'( - overrides?: TransactionOverrides, - ): Promise; - - guardian_sets( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'guardian_sets(uint32)'( - arg0: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - isWrappedAsset( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - 'isWrappedAsset(address)'( - arg0: string, - overrides?: TransactionOverrides, - ): Promise; - - wrappedAssetMaster(overrides?: TransactionOverrides): Promise; - - 'wrappedAssetMaster()'( - overrides?: TransactionOverrides, - ): Promise; - - wrappedAssets( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'wrappedAssets(bytes32)'( - arg0: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - getGuardianSet( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'getGuardianSet(uint32)'( - idx: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - submitVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'submitVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - parseAndVerifyVAA( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - 'parseAndVerifyVAA(bytes)'( - vaa: Arrayish, - overrides?: TransactionOverrides, - ): Promise; - - lockAssets( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - 'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'( - asset: string, - amount: BigNumberish, - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - refund_dust: boolean, - overrides?: TransactionOverrides, - ): Promise; - - lockETH( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'lockETH(bytes32,uint8,uint32)'( - recipient: Arrayish, - target_chain: BigNumberish, - nonce: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; -} diff --git a/packages/bridge-sdk/src/contracts/WormholeFactory.ts b/packages/bridge-sdk/src/contracts/WormholeFactory.ts deleted file mode 100644 index 2bef261..0000000 --- a/packages/bridge-sdk/src/contracts/WormholeFactory.ts +++ /dev/null @@ -1,448 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractFactory, Signer } from 'ethers'; -import { Provider } from 'ethers/providers'; -import { UnsignedTransaction } from 'ethers/utils/transaction'; -import { BigNumberish } from 'ethers/utils'; - -import { TransactionOverrides } from '.'; -import { Wormhole } from './Wormhole'; - -export class WormholeFactory extends ContractFactory { - constructor(signer?: Signer) { - super(_abi, _bytecode, signer); - } - - deploy( - initial_guardian_set: { keys: string[]; expiration_time: BigNumberish }, - wrapped_asset_master: string, - _guardian_set_expirity: BigNumberish, - overrides?: TransactionOverrides, - ): Promise { - return super.deploy( - initial_guardian_set, - wrapped_asset_master, - _guardian_set_expirity, - overrides, - ) as Promise; - } - getDeployTransaction( - initial_guardian_set: { keys: string[]; expiration_time: BigNumberish }, - wrapped_asset_master: string, - _guardian_set_expirity: BigNumberish, - overrides?: TransactionOverrides, - ): UnsignedTransaction { - return super.getDeployTransaction( - initial_guardian_set, - wrapped_asset_master, - _guardian_set_expirity, - overrides, - ); - } - attach(address: string): Wormhole { - return super.attach(address) as Wormhole; - } - connect(signer: Signer): WormholeFactory { - return super.connect(signer) as WormholeFactory; - } - static connect( - address: string, - signerOrProvider: Signer | Provider, - ): Wormhole { - return new Contract(address, _abi, signerOrProvider) as Wormhole; - } -} - -const _abi = [ - { - inputs: [ - { - components: [ - { - internalType: 'address[]', - name: 'keys', - type: 'address[]', - }, - { - internalType: 'uint32', - name: 'expiration_time', - type: 'uint32', - }, - ], - internalType: 'struct Wormhole.GuardianSet', - name: 'initial_guardian_set', - type: 'tuple', - }, - { - internalType: 'address', - name: 'wrapped_asset_master', - type: 'address', - }, - { - internalType: 'uint32', - name: '_guardian_set_expirity', - type: 'uint32', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint32', - name: 'oldGuardianIndex', - type: 'uint32', - }, - { - indexed: false, - internalType: 'uint32', - name: 'newGuardianIndex', - type: 'uint32', - }, - ], - name: 'LogGuardianSetChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'target_chain', - type: 'uint8', - }, - { - indexed: false, - internalType: 'uint8', - name: 'token_chain', - type: 'uint8', - }, - { - indexed: false, - internalType: 'uint8', - name: 'token_decimals', - type: 'uint8', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'token', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'sender', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'recipient', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint32', - name: 'nonce', - type: 'uint32', - }, - ], - name: 'LogTokensLocked', - type: 'event', - }, - { - stateMutability: 'payable', - type: 'fallback', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'consumedVAAs', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'guardian_set_expirity', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'guardian_set_index', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - name: 'guardian_sets', - outputs: [ - { - internalType: 'uint32', - name: 'expiration_time', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'isWrappedAsset', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'wrappedAssetMaster', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'wrappedAssets', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, - { - inputs: [ - { - internalType: 'uint32', - name: 'idx', - type: 'uint32', - }, - ], - name: 'getGuardianSet', - outputs: [ - { - components: [ - { - internalType: 'address[]', - name: 'keys', - type: 'address[]', - }, - { - internalType: 'uint32', - name: 'expiration_time', - type: 'uint32', - }, - ], - internalType: 'struct Wormhole.GuardianSet', - name: 'gs', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes', - name: 'vaa', - type: 'bytes', - }, - ], - name: 'submitVAA', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes', - name: 'vaa', - type: 'bytes', - }, - ], - name: 'parseAndVerifyVAA', - outputs: [ - { - components: [ - { - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'hash', - type: 'bytes32', - }, - { - internalType: 'uint32', - name: 'guardian_set_index', - type: 'uint32', - }, - { - internalType: 'uint32', - name: 'timestamp', - type: 'uint32', - }, - { - internalType: 'uint8', - name: 'action', - type: 'uint8', - }, - { - internalType: 'bytes', - name: 'payload', - type: 'bytes', - }, - ], - internalType: 'struct Wormhole.ParsedVAA', - name: 'parsed_vaa', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes32', - name: 'recipient', - type: 'bytes32', - }, - { - internalType: 'uint8', - name: 'target_chain', - type: 'uint8', - }, - { - internalType: 'uint32', - name: 'nonce', - type: 'uint32', - }, - { - internalType: 'bool', - name: 'refund_dust', - type: 'bool', - }, - ], - name: 'lockAssets', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'recipient', - type: 'bytes32', - }, - { - internalType: 'uint8', - name: 'target_chain', - type: 'uint8', - }, - { - internalType: 'uint32', - name: 'nonce', - type: 'uint32', - }, - ], - name: 'lockETH', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, -]; - -const _bytecode = - '0x60806040526002600160146101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b50604051620044543803806200445483398181016040528101906200005391906200033e565b600160008190555082600260008063ffffffff1681526020019081526020016000206000820151816000019080519060200190620000939291906200014b565b5060208201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055509050506000600360006101000a81548163ffffffff021916908363ffffffff16021790555080600360046101000a81548163ffffffff021916908363ffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200047c565b828054828255906000526020600020908101928215620001c7579160200282015b82811115620001c65782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906200016c565b5b509050620001d69190620001da565b5090565b5b808211156200021357600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101620001db565b5090565b600081519050620002288162000448565b92915050565b600082601f8301126200024057600080fd5b8151620002576200025182620003db565b620003ad565b915081818352602084019350602081019050838560208402820111156200027d57600080fd5b60005b83811015620002b1578162000296888262000217565b84526020840193506020830192505060018101905062000280565b5050505092915050565b600060408284031215620002ce57600080fd5b620002da6040620003ad565b9050600082015167ffffffffffffffff811115620002f757600080fd5b62000305848285016200022e565b60008301525060206200031b8482850162000327565b60208301525092915050565b600081519050620003388162000462565b92915050565b6000806000606084860312156200035457600080fd5b600084015167ffffffffffffffff8111156200036f57600080fd5b6200037d86828701620002bb565b9350506020620003908682870162000217565b9250506040620003a38682870162000327565b9150509250925092565b6000604051905081810181811067ffffffffffffffff82111715620003d157600080fd5b8060405250919050565b600067ffffffffffffffff821115620003f357600080fd5b602082029050602081019050919050565b6000620004118262000418565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b620004538162000404565b81146200045f57600080fd5b50565b6200046d8162000438565b81146200047957600080fd5b50565b613fc8806200048c6000396000f3fe6080604052600436106100ab5760003560e01c80637071396011610064578063707139601461024d578063822d82b31461027657806399da1d3c146102a1578063a31fe409146102cc578063b6694c2a14610309578063f951975a14610346576100eb565b80631a2be4da146101265780633bc0aee61461016357806342b0aefa1461018c5780634db47840146101c957806358d62e46146101f4578063600b9aa614610210576100eb565b366100eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100e290613927565b60405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011d90613927565b60405180910390fd5b34801561013257600080fd5b5061014d60048036038101906101489190612a8a565b610383565b60405161015a9190613845565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190612c06565b6103a3565b005b34801561019857600080fd5b506101b360048036038101906101ae9190612c74565b610526565b6040516101c09190613c2b565b60405180910390f35b3480156101d557600080fd5b506101de610554565b6040516101eb9190613c2b565b60405180910390f35b61020e60048036038101906102099190612bb7565b61056a565b005b34801561021c57600080fd5b5061023760048036038101906102329190612c06565b6107f0565b6040516102449190613c09565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190612ab3565b611094565b005b34801561028257600080fd5b5061028b61172a565b6040516102989190613c2b565b60405180910390f35b3480156102ad57600080fd5b506102b6611740565b6040516102c39190613786565b60405180910390f35b3480156102d857600080fd5b506102f360048036038101906102ee9190612b65565b611766565b6040516103009190613845565b60405180910390f35b34801561031557600080fd5b50610330600480360381019061032b9190612b65565b611786565b60405161033d9190613786565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190612c74565b6117b9565b60405161037a9190613be7565b60405180910390f35b60066020528060005260406000206000915054906101000a900460ff1681565b600260005414156103e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e090613ba7565b60405180910390fd5b60026000819055506103f961283e565b61040383836107f0565b90506001816080015160ff16141561048b57600360009054906101000a900463ffffffff1663ffffffff16816040015163ffffffff1614610479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047090613987565b60405180910390fd5b6104868160a001516118a6565b6104e9565b6010816080015160ff1614156104ad576104a88160a00151611b87565b6104e8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df906138e7565b60405180910390fd5b5b6001600460008360200151815260200190815260200160002060006101000a81548160ff0219169083151502179055505060016000819055505050565b60026020528060005260406000206000915090508060010160009054906101000a900463ffffffff16905081565b600360049054906101000a900463ffffffff1681565b600260005414156105b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a790613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168260ff161415610610576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060790613a27565b60405180910390fd5b6000610629633b9aca0034611f0590919063ffffffff16565b90506000610644633b9aca0034611f5b90919063ffffffff16565b9050600081141561068a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068190613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156106d0573d6000803e3d6000fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db08334036040518263ffffffff1660e01b81526004016000604051808303818588803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b50505050503373ffffffffffffffffffffffffffffffffffffffff1660001b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1660001b7f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab886600160149054906101000a900460ff1660098a878a6040516107d996959493929190613ca6565b60405180910390a350506001600081905550505050565b6107f861283e565b610850600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b816000019060ff16908160ff16815250506001816000015160ff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a2906139e7565b60405180910390fd5b610903600184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b816040019063ffffffff16908163ffffffff16815250506000610974600585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b60ff16905060008160420260060190506109db8186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061200f90919063ffffffff16565b836060019063ffffffff16908163ffffffff1681525050610a508182878790500387878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b80519060200120836020018181525050600460008460200151815260200190815260200160002060009054906101000a900460ff1615610ac5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abc90613907565b60405180910390fd5b610acd612889565b60026000856040015163ffffffff1663ffffffff16815260200190815260200160002060405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b36575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600081600001515111610bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf090613bc7565b60405180910390fd5b6000816020015163ffffffff161480610c1b575042816020015163ffffffff16115b610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613b07565b60405180910390fd5b826001600a60026003600a8660000151510281610c7357fe5b040281610c7c57fe5b04011115610cbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb690613ac7565b60405180910390fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b84811015610fb2576000610d4e604283026006018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b90508260010b8160ff1613610d98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8f90613b47565b60405180910390fd5b8060ff1692506000610dfd604284026007018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610e5e604285026027018c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061212f90919063ffffffff16565b90506000610ebf604286026047018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b9050601b8101905086600001518460ff1681518110610eda57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1660018b6020015183868660405160008152602001604052604051610f1f9493929190613860565b6020604051602081039080840390855afa158015610f41573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614610fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9890613a47565b60405180910390fd5b505050508080600101915050610ce7565b5061100d6004840188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611fb190919063ffffffff16565b856080019060ff16908160ff16815250506110826005840160058501898990500389898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061206d9092919063ffffffff16565b8560a001819052505050505092915050565b600260005414156110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d190613ba7565b60405180910390fd5b6002600081905550600160149054906101000a900460ff1660ff168360ff16141561113a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113190613a27565b60405180910390fd5b6000600160149054906101000a900460ff1690506000808873ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561119757600080fd5b505afa1580156111ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cf9190612c9d565b9050600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611395578873ffffffffffffffffffffffffffffffffffffffff16639dc29fac338a6040518363ffffffff1660e01b815260040161125e9291906137bc565b600060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b505050508873ffffffffffffffffffffffffffffffffffffffff1663026b05396040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d657600080fd5b505afa1580156112ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130e9190612c9d565b92508873ffffffffffffffffffffffffffffffffffffffff16631ba46cfd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135657600080fd5b505afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e9190612b8e565b9150611677565b60008973ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113d091906137a1565b60206040518083038186803b1580156113e857600080fd5b505afa1580156113fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114209190612c4b565b905061144f33308b8d73ffffffffffffffffffffffffffffffffffffffff1661218d909392919063ffffffff16565b60008a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161148a91906137a1565b60206040518083038186803b1580156114a257600080fd5b505afa1580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612c4b565b90506114ef828261221690919063ffffffff16565b995060098360ff1611156115735760008a905061151e6009850360ff16600a0a8c611f5b90919063ffffffff16565b9a50861561156d5761156c336115466009870360ff16600a0a84611f0590919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b5b60099350505b67ffffffffffffffff801661161760098d73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156115c957600080fd5b505afa1580156115dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116019190612c9d565b0360ff16600a0a83611f5b90919063ffffffff16565b1115611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f906138c7565b60405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff1660001b935050505b60008814156116bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b290613a87565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1660001b827f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab88886858c8e8c60405161170f96959493929190613d07565b60405180910390a35050506001600081905550505050505050565b600360009054906101000a900463ffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117c1612889565b600260008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561187057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611826575b505050505081526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050919050565b60006118bc60008361200f90919063ffffffff16565b90506001600360009054906101000a900463ffffffff160163ffffffff168163ffffffff1614611921576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191890613aa7565b60405180910390fd5b6000611937600484611fb190919063ffffffff16565b905060608160ff1667ffffffffffffffff8111801561195557600080fd5b506040519080825280602002602001820160405280156119845781602001602082028036833780820191505090505b50905060005b8260ff16811015611a075760006119b060148302600501876122ec90919063ffffffff16565b9050808383815181106119bf57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505050808060010191505061198a565b506000600360009054906101000a900463ffffffff16905083600360006101000a81548163ffffffff021916908363ffffffff160217905550611a48612889565b6040518060400160405280848152602001600063ffffffff1681525090508060026000600360009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000206000820151816000019080519060200190611ab49291906128a9565b5060208201518160010160006101000a81548163ffffffff021916908363ffffffff160217905550905050600360049054906101000a900463ffffffff164201600260008463ffffffff1663ffffffff16815260200190815260200160002060010160006101000a81548163ffffffff021916908363ffffffff1602179055507fdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a6282600360009054906101000a900463ffffffff16604051611b77929190613c46565b60405180910390a1505050505050565b6000611b9d600483611fb190919063ffffffff16565b90506000611bb5600584611fb190919063ffffffff16565b90506000611bcd6032856122ec90919063ffffffff16565b90506000611be5604686611fb190919063ffffffff16565b90506000611bfd60688761235990919063ffffffff16565b90508360ff168560ff161415611c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3f90613b87565b60405180910390fd5b600160149054906101000a900460ff1660ff168460ff1614611c9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9690613ae7565b60405180910390fd5b600160149054906101000a900460ff1660ff168260ff1614611e0a576000611cd160478861212f90919063ffffffff16565b905060008382604051602001611ce892919061375a565b60405160208183030381529060405280519060200120905060006005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d95576000611d8360678b611fb190919063ffffffff16565b9050611d91838786846123b7565b9150505b8073ffffffffffffffffffffffffffffffffffffffff166340c10f1987866040518363ffffffff1660e01b8152600401611dd092919061381c565b600060405180830381600087803b158015611dea57600080fd5b505af1158015611dfe573d6000803e3d6000fd5b50505050505050611efd565b6000611e206053886122ec90919063ffffffff16565b905060008173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6a57600080fd5b505afa158015611e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea29190612c9d565b905060098160ff161115611ecf57611ecc6009820360ff16600a0a8461256090919063ffffffff16565b92505b611efa85848473ffffffffffffffffffffffffffffffffffffffff166122669092919063ffffffff16565b50505b505050505050565b6000808211611f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4090613a07565b60405180910390fd5b818381611f5257fe5b06905092915050565b6000808211611f9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f96906139a7565b60405180910390fd5b818381611fa857fe5b04905092915050565b60006001820183511015611ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff1906139c7565b60405180910390fd5b60008260018501015190508091505092915050565b60006004820183511015612058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204f906139c7565b60405180910390fd5b60008260048501015190508091505092915050565b6060818301845110156120b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ac906139c7565b60405180910390fd5b60608215600081146120d257604051915060208201604052612123565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561211057805183526020830192506020810190506120f3565b50868552601f19601f8301166040525050505b50809150509392505050565b60006020820183511015612178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216f906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b612210846323b872dd60e01b8585856040516024016121ae939291906137e5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b50505050565b60008282111561225b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225290613947565b60405180910390fd5b818303905092915050565b6122e78363a9059cbb60e01b848460405160240161228592919061381c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506125d0565b505050565b60006014820183511015612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232c906139c7565b60405180910390fd5b60006c01000000000000000000000000836020860101510490508091505092915050565b600060208201835110156123a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612399906139c7565b60405180910390fd5b60008260208501015190508091505092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660601b90506040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528160148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152866037826000f59250508173ffffffffffffffffffffffffffffffffffffffff1663a7a2d3fb8686866040518463ffffffff1660e01b815260040161247b93929190613c6f565b600060405180830381600087803b15801561249557600080fd5b505af11580156124a9573d6000803e3d6000fd5b50505050816005600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050949350505050565b60008083141561257357600090506125ca565b600082840290508284828161258457fe5b04146125c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125bc90613a67565b60405180910390fd5b809150505b92915050565b6060612632826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126979092919063ffffffff16565b905060008151111561269257808060200190518101906126529190612b3c565b612691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268890613b67565b60405180910390fd5b5b505050565b60606126a684846000856126af565b90509392505050565b6060824710156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb90613967565b60405180910390fd5b6126fd856127c4565b61273c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273390613b27565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516127669190613743565b60006040518083038185875af1925050503d80600081146127a3576040519150601f19603f3d011682016040523d82523d6000602084013e6127a8565b606091505b50915091506127b88282866127d7565b92505050949350505050565b600080823b905060008111915050919050565b606083156127e757829050612837565b6000835111156127fa5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161282e91906138a5565b60405180910390fd5b9392505050565b6040518060c00160405280600060ff16815260200160008019168152602001600063ffffffff168152602001600063ffffffff168152602001600060ff168152602001606081525090565b604051806040016040528060608152602001600063ffffffff1681525090565b828054828255906000526020600020908101928215612922579160200282015b828111156129215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906128c9565b5b50905061292f9190612933565b5090565b5b8082111561296a57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612934565b5090565b60008135905061297d81613f08565b92915050565b60008135905061299281613f1f565b92915050565b6000815190506129a781613f1f565b92915050565b6000813590506129bc81613f36565b92915050565b6000815190506129d181613f36565b92915050565b60008083601f8401126129e957600080fd5b8235905067ffffffffffffffff811115612a0257600080fd5b602083019150836001820283011115612a1a57600080fd5b9250929050565b600081359050612a3081613f4d565b92915050565b600081519050612a4581613f4d565b92915050565b600081359050612a5a81613f64565b92915050565b600081359050612a6f81613f7b565b92915050565b600081519050612a8481613f7b565b92915050565b600060208284031215612a9c57600080fd5b6000612aaa8482850161296e565b91505092915050565b60008060008060008060c08789031215612acc57600080fd5b6000612ada89828a0161296e565b9650506020612aeb89828a01612a21565b9550506040612afc89828a016129ad565b9450506060612b0d89828a01612a60565b9350506080612b1e89828a01612a4b565b92505060a0612b2f89828a01612983565b9150509295509295509295565b600060208284031215612b4e57600080fd5b6000612b5c84828501612998565b91505092915050565b600060208284031215612b7757600080fd5b6000612b85848285016129ad565b91505092915050565b600060208284031215612ba057600080fd5b6000612bae848285016129c2565b91505092915050565b600080600060608486031215612bcc57600080fd5b6000612bda868287016129ad565b9350506020612beb86828701612a60565b9250506040612bfc86828701612a4b565b9150509250925092565b60008060208385031215612c1957600080fd5b600083013567ffffffffffffffff811115612c3357600080fd5b612c3f858286016129d7565b92509250509250929050565b600060208284031215612c5d57600080fd5b6000612c6b84828501612a36565b91505092915050565b600060208284031215612c8657600080fd5b6000612c9484828501612a4b565b91505092915050565b600060208284031215612caf57600080fd5b6000612cbd84828501612a75565b91505092915050565b6000612cd28383612ced565b60208301905092915050565b612ce781613e53565b82525050565b612cf681613de4565b82525050565b612d0581613de4565b82525050565b6000612d1682613d78565b612d208185613da6565b9350612d2b83613d68565b8060005b83811015612d5c578151612d438882612cc6565b9750612d4e83613d99565b925050600181019050612d2f565b5085935050505092915050565b612d7281613df6565b82525050565b612d8181613e02565b82525050565b612d9081613e02565b82525050565b612da7612da282613e02565b613ece565b82525050565b6000612db882613d83565b612dc28185613db7565b9350612dd2818560208601613e9b565b612ddb81613eea565b840191505092915050565b6000612df182613d83565b612dfb8185613dc8565b9350612e0b818560208601613e9b565b80840191505092915050565b612e2081613e65565b82525050565b6000612e3182613d8e565b612e3b8185613dd3565b9350612e4b818560208601613e9b565b612e5481613eea565b840191505092915050565b6000612e6c602383613dd3565b91507f6272696467652062616c616e636520776f756c6420657863656564206d61786960008301527f6d756d00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ed2601283613dd3565b91507f696e76616c69642056414120616374696f6e00000000000000000000000000006000830152602082019050919050565b6000612f12601883613dd3565b91507f5641412077617320616c726561647920657865637574656400000000000000006000830152602082019050919050565b6000612f52602c83613dd3565b91507f706c6561736520757365206c6f636b45544820746f207472616e73666572204560008301527f544820746f20536f6c616e6100000000000000000000000000000000000000006020830152604082019050919050565b6000612fb8601e83613dd3565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b6000612ff8602683613dd3565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061305e603983613dd3565b91507f6f6e6c79207468652063757272656e7420677561726469616e2073657420636160008301527f6e206368616e67652074686520677561726469616e20736574000000000000006020830152604082019050919050565b60006130c4601a83613dd3565b91507f536166654d6174683a206469766973696f6e206279207a65726f0000000000006000830152602082019050919050565b6000613104601283613dd3565b91507f52656164206f7574206f6620626f756e647300000000000000000000000000006000830152602082019050919050565b6000613144601883613dd3565b91507f5641412076657273696f6e20696e636f6d70617469626c6500000000000000006000830152602082019050919050565b6000613184601883613dd3565b91507f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000006000830152602082019050919050565b60006131c4602383613dd3565b91507f6d757374206e6f74207472616e7366657220746f207468652073616d6520636860008301527f61696e00000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061322a601583613dd3565b91507f564141207369676e617475726520696e76616c696400000000000000000000006000830152602082019050919050565b600061326a602183613dd3565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006132d0601e83613dd3565b91507f7472756e636174656420616d6f756e74206d757374206e6f74206265203000006000830152602082019050919050565b6000613310602183613dd3565b91507f696e646578206d75737420696e63726561736520696e207374657073206f662060008301527f31000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613376600983613dd3565b91507f6e6f2071756f72756d00000000000000000000000000000000000000000000006000830152602082019050919050565b60006133b6601983613dd3565b91507f7472616e73666572206d75737420626520696e636f6d696e67000000000000006000830152602082019050919050565b60006133f6601883613dd3565b91507f677561726469616e2073657420686173206578706972656400000000000000006000830152602082019050919050565b6000613436601d83613dd3565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b6000613476602383613dd3565b91507f7369676e617475726520696e6469636573206d75737420626520617363656e6460008301527f696e6700000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006134dc602a83613dd3565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000613542602683613dd3565b91507f73616d6520636861696e207472616e736665727320617265206e6f742073757060008301527f706f7274656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006135a8601f83613dd3565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b60006135e8601483613dd3565b91507f696e76616c696420677561726469616e207365740000000000000000000000006000830152602082019050919050565b600060408301600083015184820360008601526136388282612d0b565b915050602083015161364d60208601826136f0565b508091505092915050565b600060c083016000830151613670600086018261370e565b5060208301516136836020860182612d78565b50604083015161369660408601826136f0565b5060608301516136a960608601826136f0565b5060808301516136bc608086018261370e565b5060a083015184820360a08601526136d48282612dad565b9150508091505092915050565b6136ea81613e2c565b82525050565b6136f981613e36565b82525050565b61370881613e36565b82525050565b61371781613e46565b82525050565b61372681613e46565b82525050565b61373d61373882613e46565b613ed8565b82525050565b600061374f8284612de6565b915081905092915050565b6000613766828561372c565b6001820191506137768284612d96565b6020820191508190509392505050565b600060208201905061379b6000830184612cfc565b92915050565b60006020820190506137b66000830184612cde565b92915050565b60006040820190506137d16000830185612cde565b6137de60208301846136e1565b9392505050565b60006060820190506137fa6000830186612cfc565b6138076020830185612cfc565b61381460408301846136e1565b949350505050565b60006040820190506138316000830185612cfc565b61383e60208301846136e1565b9392505050565b600060208201905061385a6000830184612d69565b92915050565b60006080820190506138756000830187612d87565b613882602083018661371d565b61388f6040830185612d87565b61389c6060830184612d87565b95945050505050565b600060208201905081810360008301526138bf8184612e26565b905092915050565b600060208201905081810360008301526138e081612e5f565b9050919050565b6000602082019050818103600083015261390081612ec5565b9050919050565b6000602082019050818103600083015261392081612f05565b9050919050565b6000602082019050818103600083015261394081612f45565b9050919050565b6000602082019050818103600083015261396081612fab565b9050919050565b6000602082019050818103600083015261398081612feb565b9050919050565b600060208201905081810360008301526139a081613051565b9050919050565b600060208201905081810360008301526139c0816130b7565b9050919050565b600060208201905081810360008301526139e0816130f7565b9050919050565b60006020820190508181036000830152613a0081613137565b9050919050565b60006020820190508181036000830152613a2081613177565b9050919050565b60006020820190508181036000830152613a40816131b7565b9050919050565b60006020820190508181036000830152613a608161321d565b9050919050565b60006020820190508181036000830152613a808161325d565b9050919050565b60006020820190508181036000830152613aa0816132c3565b9050919050565b60006020820190508181036000830152613ac081613303565b9050919050565b60006020820190508181036000830152613ae081613369565b9050919050565b60006020820190508181036000830152613b00816133a9565b9050919050565b60006020820190508181036000830152613b20816133e9565b9050919050565b60006020820190508181036000830152613b4081613429565b9050919050565b60006020820190508181036000830152613b6081613469565b9050919050565b60006020820190508181036000830152613b80816134cf565b9050919050565b60006020820190508181036000830152613ba081613535565b9050919050565b60006020820190508181036000830152613bc08161359b565b9050919050565b60006020820190508181036000830152613be0816135db565b9050919050565b60006020820190508181036000830152613c01818461361b565b905092915050565b60006020820190508181036000830152613c238184613658565b905092915050565b6000602082019050613c4060008301846136ff565b92915050565b6000604082019050613c5b60008301856136ff565b613c6860208301846136ff565b9392505050565b6000606082019050613c84600083018661371d565b613c916020830185612d87565b613c9e604083018461371d565b949350505050565b600060c082019050613cbb600083018961371d565b613cc8602083018861371d565b613cd56040830187612e17565b613ce26060830186612d87565b613cef60808301856136e1565b613cfc60a08301846136ff565b979650505050505050565b600060c082019050613d1c600083018961371d565b613d29602083018861371d565b613d36604083018761371d565b613d436060830186612d87565b613d5060808301856136e1565b613d5d60a08301846136ff565b979650505050505050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000613def82613e0c565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b6000613e5e82613e77565b9050919050565b6000613e7082613e46565b9050919050565b6000613e8282613e89565b9050919050565b6000613e9482613e0c565b9050919050565b60005b83811015613eb9578082015181840152602081019050613e9e565b83811115613ec8576000848401525b50505050565b6000819050919050565b6000613ee382613efb565b9050919050565b6000601f19601f8301169050919050565b60008160f81b9050919050565b613f1181613de4565b8114613f1c57600080fd5b50565b613f2881613df6565b8114613f3357600080fd5b50565b613f3f81613e02565b8114613f4a57600080fd5b50565b613f5681613e2c565b8114613f6157600080fd5b50565b613f6d81613e36565b8114613f7857600080fd5b50565b613f8481613e46565b8114613f8f57600080fd5b5056fea2646970667358221220be6268c55fc12db2a6d48a837359a790ca4e234bc0d1c3c7914a3dcb9598614464736f6c634300060c0033'; diff --git a/packages/bridge-sdk/src/contracts/WrappedAsset.d.ts b/packages/bridge-sdk/src/contracts/WrappedAsset.d.ts deleted file mode 100644 index 636f0e2..0000000 --- a/packages/bridge-sdk/src/contracts/WrappedAsset.d.ts +++ /dev/null @@ -1,789 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers'; -import { Listener, Provider } from 'ethers/providers'; -import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils'; -import { - TransactionOverrides, - TypedEventDescription, - TypedFunctionDescription, -} from '.'; - -interface WrappedAssetInterface extends Interface { - functions: { - assetAddress: TypedFunctionDescription<{ encode([]: []): string }>; - - assetChain: TypedFunctionDescription<{ encode([]: []): string }>; - - bridge: TypedFunctionDescription<{ encode([]: []): string }>; - - initialized: TypedFunctionDescription<{ encode([]: []): string }>; - - initialize: TypedFunctionDescription<{ - encode([_assetChain, _assetAddress, decimals]: [ - BigNumberish, - Arrayish, - BigNumberish, - ]): string; - }>; - - mint: TypedFunctionDescription<{ - encode([account, amount]: [string, BigNumberish]): string; - }>; - - burn: TypedFunctionDescription<{ - encode([account, amount]: [string, BigNumberish]): string; - }>; - - name: TypedFunctionDescription<{ encode([]: []): string }>; - - symbol: TypedFunctionDescription<{ encode([]: []): string }>; - - decimals: TypedFunctionDescription<{ encode([]: []): string }>; - - totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; - - balanceOf: TypedFunctionDescription<{ - encode([account]: [string]): string; - }>; - - transfer: TypedFunctionDescription<{ - encode([recipient, amount]: [string, BigNumberish]): string; - }>; - - allowance: TypedFunctionDescription<{ - encode([owner, spender]: [string, string]): string; - }>; - - approve: TypedFunctionDescription<{ - encode([spender, amount]: [string, BigNumberish]): string; - }>; - - transferFrom: TypedFunctionDescription<{ - encode([sender, recipient, amount]: [ - string, - string, - BigNumberish, - ]): string; - }>; - - increaseAllowance: TypedFunctionDescription<{ - encode([spender, addedValue]: [string, BigNumberish]): string; - }>; - - decreaseAllowance: TypedFunctionDescription<{ - encode([spender, subtractedValue]: [string, BigNumberish]): string; - }>; - }; - - events: { - Approval: TypedEventDescription<{ - encodeTopics([owner, spender, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - - Transfer: TypedEventDescription<{ - encodeTopics([from, to, value]: [ - string | null, - string | null, - null, - ]): string[]; - }>; - }; -} - -export class WrappedAsset extends Contract { - connect(signerOrProvider: Signer | Provider | string): WrappedAsset; - attach(addressOrName: string): WrappedAsset; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): WrappedAsset; - once(event: EventFilter | string, listener: Listener): WrappedAsset; - addListener( - eventName: EventFilter | string, - listener: Listener, - ): WrappedAsset; - removeAllListeners(eventName: EventFilter | string): WrappedAsset; - removeListener(eventName: any, listener: Listener): WrappedAsset; - - interface: WrappedAssetInterface; - - functions: { - assetAddress(overrides?: TransactionOverrides): Promise; - - 'assetAddress()'(overrides?: TransactionOverrides): Promise; - - assetChain(overrides?: TransactionOverrides): Promise; - - 'assetChain()'(overrides?: TransactionOverrides): Promise; - - bridge(overrides?: TransactionOverrides): Promise; - - 'bridge()'(overrides?: TransactionOverrides): Promise; - - initialized(overrides?: TransactionOverrides): Promise; - - 'initialized()'(overrides?: TransactionOverrides): Promise; - - initialize( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'initialize(uint8,bytes32,uint8)'( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - mint( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'mint(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - burn( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'burn(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; - - assetAddress(overrides?: TransactionOverrides): Promise; - - 'assetAddress()'(overrides?: TransactionOverrides): Promise; - - assetChain(overrides?: TransactionOverrides): Promise; - - 'assetChain()'(overrides?: TransactionOverrides): Promise; - - bridge(overrides?: TransactionOverrides): Promise; - - 'bridge()'(overrides?: TransactionOverrides): Promise; - - initialized(overrides?: TransactionOverrides): Promise; - - 'initialized()'(overrides?: TransactionOverrides): Promise; - - initialize( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'initialize(uint8,bytes32,uint8)'( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - mint( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'mint(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - burn( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'burn(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - filters: { - Approval( - owner: string | null, - spender: string | null, - value: null, - ): EventFilter; - - Transfer(from: string | null, to: string | null, value: null): EventFilter; - }; - - estimate: { - assetAddress(overrides?: TransactionOverrides): Promise; - - 'assetAddress()'(overrides?: TransactionOverrides): Promise; - - assetChain(overrides?: TransactionOverrides): Promise; - - 'assetChain()'(overrides?: TransactionOverrides): Promise; - - bridge(overrides?: TransactionOverrides): Promise; - - 'bridge()'(overrides?: TransactionOverrides): Promise; - - initialized(overrides?: TransactionOverrides): Promise; - - 'initialized()'(overrides?: TransactionOverrides): Promise; - - initialize( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'initialize(uint8,bytes32,uint8)'( - _assetChain: BigNumberish, - _assetAddress: Arrayish, - decimals: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - mint( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'mint(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - burn( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - 'burn(address,uint256)'( - account: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Returns the name of the token. - */ - name(overrides?: TransactionOverrides): Promise; - - /** - * Returns the name of the token. - */ - 'name()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - symbol(overrides?: TransactionOverrides): Promise; - - /** - * Returns the symbol of the token, usually a shorter version of the name. - */ - 'symbol()'(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - decimals(overrides?: TransactionOverrides): Promise; - - /** - * Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}. - */ - 'decimals()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - totalSupply(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-totalSupply}. - */ - 'totalSupply()'(overrides?: TransactionOverrides): Promise; - - /** - * See {IERC20-balanceOf}. - */ - balanceOf( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-balanceOf}. - */ - 'balanceOf(address)'( - account: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - transfer( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`. - */ - 'transfer(address,uint256)'( - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - allowance( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-allowance}. - */ - 'allowance(address,address)'( - owner: string, - spender: string, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - approve( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-approve}. Requirements: - `spender` cannot be the zero address. - */ - 'approve(address,uint256)'( - spender: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`. - */ - 'transferFrom(address,address,uint256)'( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - */ - 'increaseAllowance(address,uint256)'( - spender: string, - addedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - - /** - * Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`. - */ - 'decreaseAllowance(address,uint256)'( - spender: string, - subtractedValue: BigNumberish, - overrides?: TransactionOverrides, - ): Promise; - }; -} diff --git a/packages/bridge-sdk/src/contracts/WrappedAssetFactory.ts b/packages/bridge-sdk/src/contracts/WrappedAssetFactory.ts deleted file mode 100644 index 71771b8..0000000 --- a/packages/bridge-sdk/src/contracts/WrappedAssetFactory.ts +++ /dev/null @@ -1,422 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, ContractFactory, Signer } from 'ethers'; -import { Provider } from 'ethers/providers'; -import { UnsignedTransaction } from 'ethers/utils/transaction'; - -import { TransactionOverrides } from '.'; -import { WrappedAsset } from './WrappedAsset'; - -export class WrappedAssetFactory extends ContractFactory { - constructor(signer?: Signer) { - super(_abi, _bytecode, signer); - } - - deploy(overrides?: TransactionOverrides): Promise { - return super.deploy(overrides) as Promise; - } - getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { - return super.getDeployTransaction(overrides); - } - attach(address: string): WrappedAsset { - return super.attach(address) as WrappedAsset; - } - connect(signer: Signer): WrappedAssetFactory { - return super.connect(signer) as WrappedAssetFactory; - } - static connect( - address: string, - signerOrProvider: Signer | Provider, - ): WrappedAsset { - return new Contract(address, _abi, signerOrProvider) as WrappedAsset; - } -} - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'assetAddress', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'assetChain', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bridge', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'initialized', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint8', - name: '_assetChain', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: '_assetAddress', - type: 'bytes32', - }, - { - internalType: 'uint8', - name: 'decimals', - type: 'uint8', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'mint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -]; - -const _bytecode = - '0x60806040526012600760006101000a81548160ff021916908360ff16021790555034801561002c57600080fd5b50611e998061003c6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806340c10f19116100a2578063a457c2d711610071578063a457c2d7146104ff578063a7a2d3fb14610563578063a9059cbb146105ab578063dd62ed3e1461060f578063e78cea921461068757610116565b806340c10f191461038857806370a08231146103d657806395d89b411461042e5780639dc29fac146104b157610116565b806318160ddd116100e957806318160ddd146102435780631ba46cfd1461026157806323b872dd1461027f578063313ce56714610303578063395093511461032457610116565b8063026b05391461011b57806306fdde031461013c578063095ea7b3146101bf578063158ef93e14610223575b600080fd5b6101236106bb565b604051808260ff16815260200191505060405180910390f35b6101446106cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610184578082015181840152602081019050610169565b50505050905090810190601f1680156101b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61020b600480360360408110156101d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610800565b60405180821515815260200191505060405180910390f35b61022b61081e565b60405180821515815260200191505060405180910390f35b61024b610831565b6040518082815260200191505060405180910390f35b61026961083b565b6040518082815260200191505060405180910390f35b6102eb6004803603606081101561029557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610841565b60405180821515815260200191505060405180910390f35b61030b61091a565b604051808260ff16815260200191505060405180910390f35b6103706004803603604081101561033a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610931565b60405180821515815260200191505060405180910390f35b6103d46004803603604081101561039e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109e4565b005b610418600480360360208110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a98565b6040518082815260200191505060405180910390f35b610436610ae1565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561047657808201518184015260208101905061045b565b50505050905090810190601f1680156104a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104fd600480360360408110156104c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61054b6004803603604081101561051557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b60405180821515815260200191505060405180910390f35b6105a96004803603606081101561057957600080fd5b81019080803560ff16906020019092919080359060200190929190803560ff169060200190929190505050610d04565b005b6105f7600480360360408110156105c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e70565b60405180821515815260200191505060405180910390f35b6106716004803603604081101561062557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e8e565b6040518082815260200191505060405180910390f35b61068f610f15565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900460ff1681565b60606106e760008054906101000a900460ff1660ff16610f3b565b6106ef61107f565b60405160200180807f576f726d686f6c652057726170706564202d200000000000000000000000000081525060130183805190602001908083835b6020831061074d578051825260208201915060208101905060208303925061072a565b6001836020036101000a038019825116818451168082178552505050505050905001807f2d0000000000000000000000000000000000000000000000000000000000000081525060010182805190602001908083835b602083106107c657805182526020820191506020810190506020830392506107a3565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905090565b600061081461080d611243565b848461124b565b6001905092915050565b600260009054906101000a900460ff1681565b6000600554905090565b60015481565b600061084e848484611442565b61090f8461085a611243565b61090a85604051806060016040528060288152602001611d6360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108c0611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b600190509392505050565b6000600760009054906101000a900460ff16905090565b60006109da61093e611243565b846109d5856004600061094f611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b61124b565b6001905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611e1a6025913960400191505060405180910390fd5b610a94828261183e565b5050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b795780601f10610b4e57610100808354040283529160200191610b79565b820191906000526020600020905b815481529060010190602001808311610b5c57829003601f168201915b5050505050905090565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dd16025913960400191505060405180910390fd5b610c3382826119fb565b5050565b6000610cfa610c44611243565b84610cf585604051806060016040528060258152602001611e3f6025913960046000610c6e611243565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b61124b565b6001905092915050565b600260009054906101000a900460ff1615610d87576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548160ff021916908360ff1602179055508160018190555033600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260006101000a81548160ff0219169083151502179055506040518060400160405280600381526020017f575754000000000000000000000000000000000000000000000000000000000081525060069080519060200190610e4f929190611c38565b5080600760006101000a81548160ff021916908360ff160217905550505050565b6000610e84610e7d611243565b8484611442565b6001905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000821415610f83576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061107a565b600082905060005b60008214610fad578080600101915050600a8281610fa557fe5b049150610f8b565b60608167ffffffffffffffff81118015610fc657600080fd5b506040519080825280601f01601f191660200182016040528015610ff95781602001600182028036833780820191505090505b50905060006001830390505b6000861461107257600a868161101757fe5b0660300160f81b8282806001900393508151811061103157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a868161106a57fe5b049550611005565b819450505050505b919050565b6060806040518060400160405280601081526020017f30313233343536373839616263646566000000000000000000000000000000008152509050600060015490506060600260200260020160ff1667ffffffffffffffff811180156110e457600080fd5b506040519080825280601f01601f1916602001820160405280156111175781602001600182028036833780820191505090505b50905060005b602060ff168110156112395783600484836020811061113857fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff168151811061117057fe5b602001015160f81c60f81b82600283028151811061118a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083600f60f81b8483602081106111cb57fe5b1a60f81b1660f81c60ff16815181106111e057fe5b602001015160f81c60f81b8260028302600101815181106111fd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061111d565b5080935050505090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611df66024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611357576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d1b6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611dac6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561154e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611cd66023913960400191505060405180910390fd5b6115ba81604051806060016040528060268152602001611d3d60269139600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061164f81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906117a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561176e578082015181840152602081019050611753565b50505050905090810190601f16801561179b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080828401905083811015611834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6118f6816005546117b690919063ffffffff16565b60058190555061194e81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b690919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d8b6021913960400191505060405180910390fd5b611aed81604051806060016040528060228152602001611cf960229139600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116fc9092919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4581600554611bb590919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600082821115611c2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c7957805160ff1916838001178555611ca7565b82800160010185558215611ca7579182015b82811115611ca6578251825591602001919060010190611c8b565b5b509050611cb49190611cb8565b5090565b5b80821115611cd1576000816000905550600101611cb9565b509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f20616464726573736275726e2063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573736d696e742063616e206f6e6c792062652063616c6c6564206279207468652062726964676545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b3a2ff5f0503f2258e143f986f075a1cf9f8ce968a2954f3953e79c45d383ede64736f6c634300060c0033'; diff --git a/packages/bridge-sdk/src/contracts/index.d.ts b/packages/bridge-sdk/src/contracts/index.d.ts deleted file mode 100644 index cb1747e..0000000 --- a/packages/bridge-sdk/src/contracts/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { - BigNumberish, - EventDescription, - FunctionDescription, -} from 'ethers/utils'; - -export interface TransactionOverrides { - gasLimit?: BigNumberish | Promise; - gasPrice?: BigNumberish | Promise; - nonce?: BigNumberish | Promise; - value?: BigNumberish | Promise; - from?: string | Promise; - chainId?: number | Promise; -} - -export interface TypedEventDescription< - T extends Pick -> extends EventDescription { - encodeTopics: T['encodeTopics']; -} - -export interface TypedFunctionDescription< - T extends Pick -> extends FunctionDescription { - encode: T['encode']; -} diff --git a/packages/bridge-sdk/src/core/bridge.ts b/packages/bridge-sdk/src/core/bridge.ts deleted file mode 100644 index a6d943d..0000000 --- a/packages/bridge-sdk/src/core/bridge.ts +++ /dev/null @@ -1,383 +0,0 @@ -import * as solanaWeb3 from '@solana/web3.js'; -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import BN from 'bn.js'; -import assert from 'assert'; -// @ts-ignore -import * as BufferLayout from 'buffer-layout'; -import * as bs58 from 'bs58'; -import { AssetMeta } from '../bridge'; - -export enum LockupStatus { - AWAITING_VAA, - UNCLAIMED_VAA, - COMPLETED, -} - -export interface LockupWithStatus extends Lockup { - status: LockupStatus; -} - -export interface Lockup { - lockupAddress: PublicKey; - amount: BN; - toChain: number; - sourceAddress: PublicKey; - targetAddress: Uint8Array; - assetAddress: Uint8Array; - assetChain: number; - assetDecimals: number; - nonce: number; - vaa: Uint8Array; - vaaTime: number; - pokeCounter: number; - signatureAccount: PublicKey; - initialized: boolean; -} - -export interface Signature { - signature: number[]; - index: number; -} - -export const CHAIN_ID_SOLANA = 1; - -class SolanaBridge { - endpoint: string; - connection: solanaWeb3.Connection; - programID: PublicKey; - tokenProgram: PublicKey; - - constructor( - endpoint: string, - connection: solanaWeb3.Connection, - programID: PublicKey, - tokenProgram: PublicKey, - ) { - this.endpoint = endpoint; - this.programID = programID; - this.tokenProgram = tokenProgram; - this.connection = connection; - } - - createPokeProposalInstruction( - proposalAccount: PublicKey, - ): TransactionInstruction { - const dataLayout = BufferLayout.struct([BufferLayout.u8('instruction')]); - - const data = Buffer.alloc(dataLayout.span); - dataLayout.encode( - { - instruction: 5, // PokeProposal instruction - }, - data, - ); - - const keys = [ - { pubkey: proposalAccount, isSigner: false, isWritable: true }, - ]; - - return new TransactionInstruction({ - keys, - programId: this.programID, - data, - }); - } - // fetchAssetMeta fetches the AssetMeta for an SPL token - async fetchAssetMeta(mint: PublicKey): Promise { - // @ts-ignore - let configKey = await this.getConfigKey(); - let seeds: Array = [ - Buffer.from('meta'), - configKey.toBuffer(), - mint.toBuffer(), - ]; - // @ts-ignore - let metaKey = ( - await solanaWeb3.PublicKey.findProgramAddress(seeds, this.programID) - )[0]; - let metaInfo = await this.connection.getAccountInfo(metaKey); - if (metaInfo == null || metaInfo.lamports == 0) { - return { - address: mint.toBuffer(), - chain: CHAIN_ID_SOLANA, - decimals: 0, - }; - } else { - const dataLayout = BufferLayout.struct([ - BufferLayout.u8('assetChain'), - BufferLayout.blob(32, 'assetAddress'), - ]); - let wrappedMeta = dataLayout.decode(metaInfo?.data); - - return { - address: wrappedMeta.assetAddress, - chain: wrappedMeta.assetChain, - decimals: 0, - }; - } - } - // fetchSignatureStatus fetches the signatures for a VAA - async fetchSignatureStatus(signatureStatus: PublicKey): Promise { - let signatureInfo = await this.connection.getAccountInfo( - signatureStatus, - 'single', - ); - if (signatureInfo == null || signatureInfo.lamports == 0) { - throw new Error('not found'); - } else { - const dataLayout = BufferLayout.struct([ - BufferLayout.blob(20 * 65, 'signaturesRaw'), - ]); - let rawSignatureInfo = dataLayout.decode(signatureInfo?.data); - - let signatures: Signature[] = []; - for (let i = 0; i < 20; i++) { - let data = rawSignatureInfo.signaturesRaw.slice(65 * i, 65 * (i + 1)); - let empty = true; - for (let v of data) { - if (v != 0) { - empty = false; - break; - } - } - if (empty) continue; - - signatures.push({ - signature: data, - index: i, - }); - } - - return signatures; - } - } - - parseLockup(address: PublicKey, data: Buffer): Lockup { - const dataLayout = BufferLayout.struct([ - uint256('amount'), - BufferLayout.u8('toChain'), - BufferLayout.blob(32, 'sourceAddress'), - BufferLayout.blob(32, 'targetAddress'), - BufferLayout.blob(32, 'assetAddress'), - BufferLayout.u8('assetChain'), - BufferLayout.u8('assetDecimals'), - BufferLayout.seq(BufferLayout.u8(), 1), // 4 byte alignment because a u32 is following - BufferLayout.u32('nonce'), - BufferLayout.blob(1001, 'vaa'), - BufferLayout.seq(BufferLayout.u8(), 3), // 4 byte alignment because a u32 is following - BufferLayout.u32('vaaTime'), - BufferLayout.u32('lockupTime'), - BufferLayout.u8('pokeCounter'), - BufferLayout.blob(32, 'signatureAccount'), - BufferLayout.u8('initialized'), - ]); - - let parsedAccount = dataLayout.decode(data); - - return { - lockupAddress: address, - amount: new BN(parsedAccount.amount, 2, 'le'), - assetAddress: parsedAccount.assetAddress, - assetChain: parsedAccount.assetChain, - assetDecimals: parsedAccount.assetDecimals, - initialized: parsedAccount.initialized == 1, - nonce: parsedAccount.nonce, - sourceAddress: new PublicKey(parsedAccount.sourceAddress), - targetAddress: parsedAccount.targetAddress, - toChain: parsedAccount.toChain, - vaa: parsedAccount.vaa, - vaaTime: parsedAccount.vaaTime, - signatureAccount: new PublicKey(parsedAccount.signatureAccount), - pokeCounter: parsedAccount.pokeCounter, - }; - } - - // fetchAssetMeta fetches the AssetMeta for an SPL token - async fetchTransferProposals(tokenAccount: PublicKey): Promise { - let accountRes = await fetch(this.endpoint, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - jsonrpc: '2.0', - id: 1, - method: 'getProgramAccounts', - params: [ - this.programID.toString(), - { - commitment: 'single', - filters: [ - { dataSize: 1184 }, - { - memcmp: { - offset: 33, - bytes: tokenAccount.toString(), - }, - }, - ], - }, - ], - }), - }); - let raw_accounts = (await accountRes.json())['result']; - - let accounts: Lockup[] = []; - for (let acc of raw_accounts) { - let pubkey = new PublicKey(acc.pubkey); - accounts.push(this.parseLockup(pubkey, bs58.decode(acc.account.data))); - } - - return accounts; - } - - AccountLayout = BufferLayout.struct([ - publicKey('mint'), - publicKey('owner'), - uint64('amount'), - BufferLayout.u32('option'), - publicKey('delegate'), - BufferLayout.u8('is_initialized'), - BufferLayout.u8('is_native'), - BufferLayout.u16('padding'), - uint64('delegatedAmount'), - ]); - - async getConfigKey(): Promise { - // @ts-ignore - return ( - await solanaWeb3.PublicKey.findProgramAddress( - [Buffer.from('bridge')], - this.programID, - ) - )[0]; - } -} - -// Taken from https://github.com/solana-labs/solana-program-library -// Licensed under Apache 2.0 - -export class u64 extends BN { - /** - * Convert to Buffer representation - */ - toBuffer(): Buffer { - const a = super.toArray().reverse(); - const b = Buffer.from(a); - if (b.length === 8) { - return b; - } - assert(b.length < 8, 'u64 too large'); - - const zeroPad = Buffer.alloc(8); - b.copy(zeroPad); - return zeroPad; - } - - /** - * Construct a u64 from Buffer representation - */ - static fromBuffer(buffer: Buffer): u64 { - assert(buffer.length === 8, `Invalid buffer length: ${buffer.length}`); - return new BN( - // @ts-ignore - [...buffer] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - } -} - -function padBuffer(b: Buffer, len: number): Buffer { - const zeroPad = Buffer.alloc(len); - b.copy(zeroPad, len - b.length); - return zeroPad; -} - -export class u256 extends BN { - /** - * Convert to Buffer representation - */ - toBuffer(): Buffer { - const a = super.toArray().reverse(); - const b = Buffer.from(a); - if (b.length === 32) { - return b; - } - assert(b.length < 32, 'u256 too large'); - - const zeroPad = Buffer.alloc(32); - b.copy(zeroPad); - return zeroPad; - } - - /** - * Construct a u256 from Buffer representation - */ - static fromBuffer(buffer: number[]): u256 { - assert(buffer.length === 32, `Invalid buffer length: ${buffer.length}`); - return new BN( - // @ts-ignore - [...buffer] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - } -} - -/** - * Layout for a public key - */ -export const publicKey = (property: string = 'publicKey'): Object => { - return BufferLayout.blob(32, property); -}; - -/** - * Layout for a 64bit unsigned value - */ -export const uint64 = (property: string = 'uint64'): Object => { - return BufferLayout.blob(8, property); -}; - -/** - * Layout for a 256-bit unsigned value - */ -export const uint256 = (property: string = 'uint256'): Object => { - return BufferLayout.blob(32, property); -}; - -/** - * Layout for a Rust String type - */ -export const rustString = (property: string = 'string') => { - const rsl = BufferLayout.struct( - [ - BufferLayout.u32('length'), - BufferLayout.u32('lengthPadding'), - BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'), - ], - property, - ); - const _decode = rsl.decode.bind(rsl); - const _encode = rsl.encode.bind(rsl); - - rsl.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return data.chars.toString('utf8'); - }; - - rsl.encode = (str: string, buffer: Buffer, offset: number) => { - const data = { - chars: Buffer.from(str, 'utf8'), - }; - return _encode(data, buffer, offset); - }; - - return rsl; -}; - -export { SolanaBridge }; diff --git a/packages/bridge-sdk/src/core/index.ts b/packages/bridge-sdk/src/core/index.ts deleted file mode 100644 index 89de35e..0000000 --- a/packages/bridge-sdk/src/core/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './bridge'; -export * from './utils'; diff --git a/packages/bridge-sdk/src/core/utils.ts b/packages/bridge-sdk/src/core/utils.ts deleted file mode 100644 index 2ac9e25..0000000 --- a/packages/bridge-sdk/src/core/utils.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { keccak256 } from 'ethers/utils'; -import { utils } from '@oyster/common'; - -export const WRAPPED_MASTER = '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae'; - -// derive the ERC20 address of a Solana SPL asset wrapped on ETH. -export function deriveERC20Address(key: PublicKey) { - const { wormhole } = utils.programIds(); - - let hashData = '0xff' + wormhole.bridge.slice(2); - hashData += keccak256(Buffer.concat([new Buffer([1]), key.toBuffer()])).slice( - 2, - ); // asset_id - hashData += keccak256( - '0x3d602d80600a3d3981f3363d3d373d3d3d363d73' + - WRAPPED_MASTER + - '5af43d82803e903d91602b57fd5bf3', - ).slice(2); // Bytecode - - return keccak256(hashData).slice(26); -} diff --git a/packages/bridge-sdk/src/index.ts b/packages/bridge-sdk/src/index.ts deleted file mode 100644 index ea94e5d..0000000 --- a/packages/bridge-sdk/src/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as bridge from './bridge'; -export * from './bridge'; -export * as core from './core'; -export * from './core'; - -export * from './contracts/ERC20Factory'; -export * from './contracts/IERC20Factory'; -export * from './contracts/WETHFactory'; -export * from './contracts/WormholeFactory'; -export * from './contracts/WrappedAssetFactory'; diff --git a/packages/bridge-sdk/src/types/buffer-layout.d.ts b/packages/bridge-sdk/src/types/buffer-layout.d.ts deleted file mode 100644 index e75a7e2..0000000 --- a/packages/bridge-sdk/src/types/buffer-layout.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'buffer-layout' { - const bl: any; - export = bl; -} diff --git a/packages/bridge-sdk/tsconfig.json b/packages/bridge-sdk/tsconfig.json deleted file mode 100644 index da087cf..0000000 --- a/packages/bridge-sdk/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2019", - "moduleResolution": "node", - "skipLibCheck": true, - "esModuleInterop": true, - "strict": true, - "allowJs": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "jsx": "react", - "typeRoots": ["types", "../../types", "../../node_modules/@types"], - "outDir": "./dist/lib", - "rootDir": "./src", - "composite": true, - "declaration": true, - "declarationMap": true, - "sourceMap": true - }, - "include": ["src/**/*"] -} diff --git a/packages/bridge/.env.production b/packages/bridge/.env.production deleted file mode 100644 index 668046e..0000000 --- a/packages/bridge/.env.production +++ /dev/null @@ -1 +0,0 @@ -GENERATE_SOURCEMAP = false diff --git a/packages/bridge/.gitignore b/packages/bridge/.gitignore deleted file mode 100644 index 4c49bd7..0000000 --- a/packages/bridge/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/packages/bridge/_colors.less b/packages/bridge/_colors.less deleted file mode 100644 index ccef6e6..0000000 --- a/packages/bridge/_colors.less +++ /dev/null @@ -1,8 +0,0 @@ -@surge-20: #00CC82; -@surge-30: #00B372; -@tungsten-100: #06101a; -@tungsten-80: #2F506F; -@tungsten-60: #547595; -@tungsten-50: #0D1B28; -@tungsten-40: #7BA4C7; -@tungsten-0: #193650; diff --git a/packages/bridge/craco.config.js b/packages/bridge/craco.config.js deleted file mode 100644 index 6e6c3cb..0000000 --- a/packages/bridge/craco.config.js +++ /dev/null @@ -1,55 +0,0 @@ -const CracoLessPlugin = require('craco-less'); -const CracoAlias = require('craco-alias'); -const CracoBabelLoader = require('craco-babel-loader'); -const path = require('path'); -const fs = require('fs'); - -//console.log('qualified', pnp.resolveRequest('@babel/preset-typescript'), path.resolve(__dirname, '/') + 'src/'); - -// Handle relative paths to sibling packages -const appDirectory = fs.realpathSync(process.cwd()); -const resolvePackage = relativePath => path.resolve(appDirectory, relativePath); - -module.exports = { - webpack: { - configure: (webpackConfig, { env, paths }) => { - paths.appBuild = webpackConfig.output.path = path.resolve( - './../../build/bridge', - ); - return webpackConfig; - }, - }, - plugins: [ - /*{ - plugin: CracoBabelLoader, - options: { - includes: [ - // No "unexpected token" error importing components from these lerna siblings: - resolvePackage('../packages'), - ], - }, - },*/ - /*{ - plugin: CracoAlias, - options: { - source: 'tsconfig', - // baseUrl SHOULD be specified - // plugin does not take it from tsconfig - baseUrl: '../../', - // tsConfigPath should point to the file where "baseUrl" and "paths" are specified - tsConfigPath: '../../tsconfig.json', - }, - },*/ - { - plugin: CracoLessPlugin, - options: { - lessLoaderOptions: { - lessOptions: { - modifyVars: { '@primary-color': '#2abdd2' }, - javascriptEnabled: true, - }, - }, - }, - }, - ], -}; diff --git a/packages/bridge/package.json b/packages/bridge/package.json deleted file mode 100644 index c2e74b3..0000000 --- a/packages/bridge/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "name": "bridge", - "version": "0.1.0", - "dependencies": { - "@ant-design/icons": "^4.4.0", - "@babel/preset-typescript": "^7.12.13", - "@craco/craco": "^5.7.0", - "@oyster/common": "0.0.2", - "@project-serum/serum": "^0.13.11", - "@react-three/drei": "^3.8.0", - "@solana/bridge-sdk": "0.0.1", - "@solana/spl-token": "0.1.3", - "@solana/spl-token-registry": "^0.2.0", - "@solana/spl-token-swap": "0.1.0", - "@solana/web3.js": "^1", - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.5.0", - "@testing-library/user-event": "^7.2.1", - "@toruslabs/torus-embed": "^1.9.10", - "@types/animejs": "^3.1.3", - "@types/chart.js": "^2.9.29", - "@types/echarts": "^4.9.0", - "@types/react-router-dom": "^5.1.6", - "@types/react-virtualized": "^9.21.11", - "@types/testing-library__react": "^10.2.0", - "@uniswap/token-lists": "^1.0.0-beta.19", - "@walletconnect/client": "^1.3.6", - "@walletconnect/qrcode-modal": "^1.3.6", - "@walletconnect/web3-provider": "^1.4.0", - "@web3-react/core": "^6.0.9", - "@web3-react/fortmatic-connector": "^6.0.9", - "@web3-react/injected-connector": "^6.0.7", - "@web3-react/portis-connector": "^6.0.9", - "@web3-react/walletconnect-connector": "^6.1.1", - "@web3-react/walletlink-connector": "^6.0.9", - "@welldone-software/why-did-you-render": "^6.0.5", - "animejs": "^3.2.1", - "bignumber.js": "^9.0.1", - "bn.js": "^5.1.3", - "bs58": "^4.0.1", - "buffer-layout": "^1.2.0", - "chart.js": "^2.9.4", - "craco-alias": "^2.1.1", - "craco-babel-loader": "^0.1.4", - "craco-less": "^1.17.0", - "ethers": "^4.0.48", - "eventemitter3": "^4.0.7", - "fortmatic": "^2.2.1", - "identicon.js": "^2.3.3", - "javascript-time-ago": "^2.3.4", - "jazzicon": "^1.5.0", - "lodash": "^4.17.20", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-github-btn": "^1.2.0", - "react-intl": "^5.10.2", - "react-router-dom": "^5.2.0", - "react-scripts": "3.4.3", - "react-three-fiber": "^5.3.18", - "react-virtualized": "^9.22.3", - "three": "^0.125.2", - "typescript": "^4.1.3", - "use-wallet": "^0.8.1" - }, - "scripts": { - "prestart": "npm-link-shared ../common/node_modules/ . react", - "start": "craco start --verbose", - "build": "craco build", - "test": "craco test", - "eject": "react-scripts eject", - "deploy": "gh-pages -d ../../build/bridge --repo https://github.com/solana-labs/oyster-bridge", - "deploy:ar": "arweave deploy-dir build --key-file ", - "format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"", - "ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/solana-labs/oyster" - }, - "homepage": ".", - "devDependencies": { - "@typechain/ethers-v4": "^1.0.0", - "@types/bn.js": "^5.1.0", - "@types/bs58": "^4.0.1", - "@types/identicon.js": "^2.3.0", - "@types/javascript-time-ago": "^2.0.2", - "@types/jest": "^24.9.1", - "@types/node": "^12.12.62", - "arweave-deploy": "^1.9.1", - "gh-pages": "^3.1.0", - "jest": "^27.4.7", - "npm-link-shared": "0.5.6", - "prettier": "^2.1.2", - "typechain": "^4.0.3" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - }, - "resolutions": { - "react": "16.13.1", - "react-dom": "16.13.1" - } -} \ No newline at end of file diff --git a/packages/bridge/public/CNAME b/packages/bridge/public/CNAME deleted file mode 100644 index 9703c0d..0000000 --- a/packages/bridge/public/CNAME +++ /dev/null @@ -1 +0,0 @@ -v1.wormholebridge.com diff --git a/packages/bridge/public/android-icon-144x144.png b/packages/bridge/public/android-icon-144x144.png deleted file mode 100644 index a1867131d2401e67de421e7bc53e6c4d32b611f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13104 zcmb7r1yCKq)93PVw-8*CpuyeY;ch{Ly99TKhih;RZo%E%B?NcpVZk-Q?f8FnRrlRh z-Bn#}_jJwluVr?(c59}3B9s-S&{2p`002Ojkrw~*Cgc9YNC1ld9Qt1|$=NBoCjY%R0i>{$wA#6{FRR!)7r=YDFc zZ=Snv*i)zLj>uEXBeg0hW5Y!)42sskYpfPwcc_(Wh$JAZLz9O4|%O_v2pOOQ(g54x)tTu%NI-bn{Nb+~MNzCVFOvCFF z1zLl(cETPyAO=?XUuOlffnya3(}0-DA(_rLQTJlvLZa|)Jm+dcgaNTw|5j84CvP)( zPY`B~*R-Eu5X`?%+%LRk3@nc`U6mBs^gWoc9&B(K=)`O+9(Sp*wIGNi91$#tW#PpB zHv4l#Lu6?i##M&tCmAOl(r2-ao};8u z&AG9D^xZhO0GRj}4|D>;aonirWVnkY6Q9K)^HIAQMlW6NooQQW44QInfEDB;L{wB9 z;mQWm>6gdxf;N{tL}eAEq`ry*H)tv5Z0$EdTud9tbK99aopP|fiC9CLGzq%93k42x zHZP2%^>Rg}}L7hHK&ZhIYw2?0@z++2Ke?4~#W1BFSC5AC+mSI5*-5DX2oH~JR zQi=KkX9LCKiol^1hXe@D23RE0M4}y>V9X#285w^~)@^uUlS^jlK)6CKU2Y~1uyp-= z5G1InogUB)OYZtvvmV|C0XMFaU<}&^3BqGw$lA}P)(Yt<2cMC!4j}wiu@h6r(_wOJ zkQ1v#B7;xPM-n<+VTZ5y!>nu~P)-9Ifv!kwx7V!nh^+q3nm`|uk^{NSkWq*%7gH-+ z`rrV&#xjwkpBLq8VkiP-^2SWIXLo+#t=p8sL7ojVjxEL4KOn!9ikwX>p!1HDd?4S@ z8v7m}q>nP92&dt`mR@81kf%)CXOX)s|0%THgF9lT6t1}vu4IKP-o;dz+pc?8Us|=Y zpCP#ll@O|d4^vvzm5($X5j-_%sx~jFndpYZ6O+KR>RGE)i^{P;-;(YGCu3@g1dPFK ze2z0nuN1o3GeODC@pzPC(GskyR9jXL(8S@9l9rS-pB60n6nX5p6Dk{v!;o(Y;B&0@ zF~(UYrfJV;1gQ}cklSGM-6gc-)I`Xyl$Ke42FsGMs5VkbE31-gXY-`V)^#t#bR;WL zrzw^xN(_1)orWurjIUTXbqJZl#y+J3iyHB_&a)Bf&SNp}1@NDWF$<&zjf-r8M&Pk@ z6?+vS61Hd-3^pGRp==6{D?~ZVgvOHuEx-Sq7`kMKPd3nU@=WU!72n|ZLw-=trtsRu znr6U#O=DB$hX|@{fh0QMzQnwor_raPrq!&O6UptmmGEED#mHo&y|Z?Ofw}>UNXKU= z6=%y2I~w~cFb9L(k47XdzA;W`HpCK4a2MYo`x2@#N8f)KNB@)0G1q`24$`7t9Ki=t z2v>uwa}|!GafCr0@;e?Bc(k+E|4yru!}L0ziHoH^f**DNC3Hm^4_Bk*ix(^9wuZ0C zj?UAz=t1raR!IbURDc7s?q}>ZcTmlB#2$yJ{>MOizG~he3;;i4BbrCcC4QqN{LPC^+%guQjj}_Ih;Hh0Web+$%>oGwb zA*I6@6UyvTmMCfjodys85vp_Q4RpH@pHiHx%Vw%n;`=E@vFxx4me7!D2_^zzNd_^d zqay#iJcmx!cECs@c;pup?$`bu&MIJvkIs=l@=fl$RdtyEb8mcm6gfsNz$r(jAY~_R zU$q(qEduF^I29MVn$?Un^dAl6UsIJ}Ye~8@afvm~qzrtEMhSARaz3CkAv)@I+>GZR zHf&N1@Q(6vJYYg_#|suUKaq8iRcze!ld#BMU}sw~noup8Zw&x{El)j43c2LJ|1oyR z6K9`;8Pi&7~j8;1CE9#Sov6 z-W6nY9ipTq&DpK~F}aXf9^(eP{$_&5A(gJthj9!+YMY(xk-Bx4Kx6>@YY@~c46k}u zu-G<2(qjj7E6cSOq~N~KxZU(tmM3`+Y0>UgSPP9r1w8Ra{$hnEgK8`k4JGxXnm^1_ zH8ZMa5hCHxu;#N)hSEi6zhmVrfhy-xVI6WXM`l3h79&3?_l?~m)A#Pbdms>4j?SGY z{CRE?A{f`8qzpCH=MDd;G)KpO@nI2P7kLG72OTiR=(YP$RTkn7uyx-?lk-wiFWAEB zJuJi)OqkMt_QUBZm(G-ebOk!DQZllti@76gLt_2rVHW@P1RJea^ZsbHPzo~Zuj*Q| zV<6RoD^PzojzQE680aBzE9jdIb$JQ5?};55G)1v>nidA7YofW%SkX@lnG6fB|AqMj zXZPtoDhh9TJaVv8=_${3Yda3-V8-BH4hs*Isr`OU{X;dJBgT?jB0-Bq@R6yr5hL~I z^$BcszCXIo7HLrrLmh=faaqRGA{G-u`{|{!jdVW{HBNDhT(P8$yd`YoS$H~Sl@kiv z20qFzyK zV(kLb>a*@?Bkr58&g>NWRbZun=XRMP989R8jM{|Vg4BZt zH)*|&zOf`3<7IXIOPfr2=nE2ibm_C=ujP+4^a)D~TC4*hxQ}i9IP1wqxvIqIp$$Ji z7d+6c9?fI-l|`k;)U2H+spZ1r+8YMf9(!(A2H)85R(tDoXtT6u?LPh8e}NhWAZm$$ zI{&mOL8G7fFN$`~)-ihJ09}|1-DH%m4ac8U>QPv3FceiW6%F@1b+X|@lq;qTy(J5o zAh+uy6v`4t7s`j%Jpa;1yF&2MR9BT9&@#Bp+#J+S!QA8vIYozAFjPLSa$rf^-ksqS z9HMEH)U|E>V-l{3@{RGL6T3Sya#f@Q=3{$nDN~n*u)`8GqQLyHxcZS&{PUj-Gyc!| zXi(X_%>A2uOD(NP*7pGInUsjC$yvtLohfQ}xSVm@X5UH73+Zzfo7lYBw^;<*DPC+P z8<%76-#I%~-`{h|F$`g~myEgOM-7K+9faOHxRfs+#YK3rJ;x)8En@{>9Z$=kHC%qX zNBILf35D)k>$RHH9`-yrE4>7K0%5XH1-y42sjy*2eSxE>uCn#+16O)A-ode%F4~|y z;Am8;4D4yRMY+l;+OsfKQ;Dm!8_7E$jp3VSd~Vq15=(HP81S`xkDHj~{u%vWg7%j#K*Va*PtcEIW;YjtJ}V+;pfaw)2}hX$yq!;riFnBjJwL8?W9 z?tugG`*Wm(!L^81tg=g0;sigEB_R_DD;EF$&WuPey?{(NmW1PY1(9*^&LtX!baB&e ztgaLvvv`V6E?UqosJy(XWi)c=3XnvXDC)*^L?;s=)b#nlP>4>!IkwRIUU?7vWrx(E zR2iO@ff_IDE(e-B*TFdz)C7b}c66One^b>jr*MxNVTRQ6zt`1!y7-RB<&eb#;ZgQCiAS18O)#Ep1g>ceps4}8s_aVUww{BnFoqva0I|QA)aJSvEa+$stw6v)GZ0 z((Q`^V;`O9!>v&qhhG$2w?23eV}UF7Y~J|@_hi{L9WB-F{}$gz#`Q-tnZ~-F_t~G@ z_MrFz>0}os?6E5Jp>VM;Nnv40k?48)`be5RQdkkw*RsnGW?R6@3X)m)u zUW;*5&6n(oKiV_5vQ$wu{#SCYt!xzKE@z#=28|BO>%bsa-Z*P75~n|Is>*&;oHkc^qy596UbWI} zFGMhDHQYu^UFGOXamqzozrp*ujr=ju7vZP6Mo2^uv zBwFIF^hn}l{n9MXmrG}d4t0oN(f&slZqvvDS>Fy*Th}(A`qp2ypy*fbFfEZmbc2-0 zLCX2d|51E`UZnN|>ks;1%pfOviq|3tdH=6WW+uLx4^UPBMk@rmP9cohy9^mia#E#p zyh1E8W=5qz1L=HMMt@1zLW=%D{KYUqTANjs9gY3B1`dvkH-Tw^G@*Xhp%HQcag^5r z-3`r|j=6!tr;02lGe?=Jpn}sFF9`?DASn`Io7TWNr#H0?X+jfITHbh{6D`5xB zv;>tA6xspSRb3TLjQ~PrYkjs!*?nEO~)oQVax>qIHz%o)#>_nAUO% zH3wBfNozA!v|zvtp`=c0Bp~2Eq^DwhoR5St4d2jAW6YUeLfLvy6b_y~cPs$JAS*Hm z3Y<5B9+_jIIwWcdhKOSus-XU12iQe=NqVRmS^!=|bMbU^s9u_VSpSM91RiEtfFSD~ z#?u~%HZTyhK=?-sEM8O6BN|@!wTME6o+9I&rt{n~^+|QPtJz-?db0pbfxjWdC}b3O z0bBt*&(^VGSu%`}WrooctQ0ixn1(XG7voG1mbs%hO^MjXGR0DZUq)8Zcux9)ASCMD zSkh`eb(w|jdf~7@R5=w4OjUGYaD#x&E0J$sZ=Ot}LF6>2a;vc|l11Dy1$yL7>%3m1 z+qZ=WHJ~bY9K9NLf|--5XyvE8Q?v$>@_W0@B%{dO@Z`aY#@`>hlXzoEtM!!@vAqw9b*TSMgro+?GO8%$}9YqiK&aNR2&VPxEC zWpnl1&lu}1r4>=EBla68;gpuo+9d_PZR+^X+~2=%husMZ3tx(e@-T}+ARd?^v{gRD zOAm4q?$L=Ema#{?z~A5WS=~-K_uUu*9o$7a15c_6N=gL;h#IkInx_(BAA?lLMR;7- zxDgZwEq}NWZJe-{7bMfM&asD@r|Inu99FNm9Xw_z>_m^S%EqJewoyn@XdATaXb3jA zLzOVDUAx#o#o`z|;r}iI|57S)6jgnw9;Kt0__)j9;FyI)F7TRiJFheG8b%DtH8Rm{ zX+?@LfiDf%`l4LeP=lU7cVqt;+s4Y!uTWG0M=yDQ8rgP}@zDOqLZX9V)?S;x_T`B@ zn#&q?1;aL_o~y0=4|5)-wm<55#PifXW6o`{hoAgEyZ~XzO-SfK?2kvp!`B!NmJ8oW|+Za`q#)^x}mxbPZCU0S--#AF>|s0Szo_tz&xYKBelC%U*vC@23Q z#6<*YcVWmwg4@1vKN=UWjxpb~7l_3kM+0QNIKRyhg8!3^kgS7Pel72h_ zq|&qCEJ}r-4H@#H(wpbYj`*%SZ>S?T*G3NGJ0DDX{is%fL{rb+915r^o z+JuPbj&X)41mE*(%Zq6CJf*MQLu2&sLp^i@d2pR;CW`#oMx!Ar?s$P+&FYd>$TN8~ z1BT@ISbJ(!A|bUmQ>CB{iGoQ)N&q~9e>`Jq(c9PU!nd=hvoYKPb}v@xIGo=k5X@j9 zQS#46I+N_}-29i2`m1>Jl7AQuEV+}x{IZ5M)Yfyz;KK`%6Y&&v`^Ss;97z32{2^B2 zb02BMr+p(GA*$gtzEkSVl<8KQQ;!gSY+r##t_lI;_M_cnKlXpfwLb31eI*kbRsUSt z=7kP1JVLOFb)=GVN2XY6DOq{l)%c);iqx^TWyK~fprT?L4=X9O@BWB?%9{!Qwr<>yi`gY!|sAXMd8 z2r>J&dDOo+&90aCZ^;IKmt2LYpzY=NMRbhv#vc@VAx{mFUvjr?`n@B`6W;RuQVJJZ zfVK&~7z6nb4LmFPUH(2Yc-{Y`X_4u5XPxSULB3j#sKkF*ND6;P2c)9bd^$ahHfQ)a zQx7M?&EFRtdHW>Jy0%Yhj@#a(w#O=10XmeaZ@ zrLJ&=syHwB<+t^e)t@0PYYv%zWWZuR^b@?$Yo^hYomUA8JcX1&y5Y+iJFDDcR ztJV9Sfy|&c>VroSmXh>9sN(ejIjmK_^D~BX648jET&NAVrK=iEnC_uRLIwH~TqJn1 z@N_{Tg)Rb@TKdf1;*k=WUqoqlJe&r1rqp|L)snaS1ox_wVpDo63?`kNDcqw3&Axs2 z?;YF3KzfS>VlX~ziyDMRyp~7eLajKu)QY7YCZc|TQbO4_>t7VY4U*~4rnIA|oc0tL zi%(vQKj0jpQqKywC7MB`Sj8GDzOQk|b-!2=%4Q)G=X%DjIDX9GI^ZWZWufrTe}y0N zu7eKZ01(7o_sVfCcGfZTWF00+6YRh`!tOKw0XM;%k)KYsYC;iNe)5_FD~W{yDTpIa z(VMuyfNGCz$ISDU@ez&(-sTW8RUU70kkZ}ekxrBr{VA1XPQ%C7R6i-=2>a!gaNU-D#1r%Dqh;v^Su{SLD!HHQ23 zaU>&bij8!H7ZI|60sRjzY7lGqCoISyc{Qx~F#;CQaf;_Ic7zt3i9yGV=unE39Y-1x z#%5ZKz*=4%-;hRsfZ@_(ww+wV%?Z8OKH1H#y0t3z73< z9d9Z=MiJ7E`BN5GuC7`TdA7_~Fv`Ytz6B{UVD)gVcPpZCbB2|q3ADfs;Ck(6Eu7U? zvWEv4Lfs}BkUEx(GE{KOEKHT)h$G2DjHAU1jclH7C67knS!=Jfi3J{_6TulyGgYkz zNG@i{qh!S*ymo;I@Gle;^dk9ub%iuZfg=+Y1AQL8Y{vK;9*)vS z2WoL4^rXjt;>GT^t>*tEfrA8Wxb?0t)$ORAJg$iGOTWAe{~a>E9Bz3Z=38Ir_0xwY zjpJJ}iR%s?u4H*qeBpt5gmm^`+!onzP4J}K*CeFQ*+kOQEZMJ77>1M~2y`R5_*2Q} zg*wAI;_kYAt6VdjPljB%Rd1 z&mf=zE=O`JLg;vhD@ZnsB?Bw#*2p}v8?kK@=Bq~eZhEc}xsa5T8f2n{q1iCU;3Dg< za*ECR`yw)FsWIqq{(|EBqmgu#(7=d=lgTBs~kxxVes2c z;QQ4saWQXyKb@1%Za0>25Ka~Mv-$LaM1#wA$hhm_u5bA_j4t)SpgTHs9LATHfTZ>Z)b7sVg z&&rB9+Fr35h}MJwdSM@F3nS{_egvIKDO3V9bH*k9Hk1}pYb#|X_7)(^&UPaZNoh9O zlyxJiM{$0c!8o-cRoG`5&9cfheM1MXlrKWG<>h}f{A`v6h0D%|tRE7)Jy7-kjV!gsw`fL=Z)AWz~&h0p@c}w_7hJlGnJ=Q~I7UbH;4) zdZ);7YO#NC8Sx(CkB{b*7B%Jfq|~VLHZ!%~HMAulvmEJ-q?5E0Vm=-d?xeG#Dhn?*8{HWMBBYXz7chUxo2?)yH>%n`jrN1~M!_9;_lPJWcy| z5|t(YW4XS^7PnYFz08FMq6DO<#xzTlv~=d3UZ5C(VKIYR@~*uePBnX?E&WWBb~Ivx z)|WcBLU*CHv_fk=12_qW4%C&9cmDmk>4(%)+u8J#Z2u~GQi%x*eTLuT2A+uE4X$%9 zC0i&4-g)b?sb+FIGc=&FnTNwKco{DfNJT5V3xxDKJoFchmUK*v{y1hG$6aAe$ywmW zyuftPIF~wccShIIWf%3mHFPL87F$;us*7adh7nn_Y=2u3O~ZD=@jQR;dqq{wY!fi~mN!qV_68rW1`sg_l|6-{tr2P4SLmAlbh zEj8#{X$pS#IH%~pRsKoLedJU!#a7i3p%i))}5d(UtQqT?X@-T z7Vt3a2MP~4GDE9(dLLt9H$T(*GX|a`I3mCe4+*H|fmqqr=^E~QcmnC}6 zE(mC9S^p&7rEYMZ)U@Hs+5ECvbd(p{Z(+2$Tj9hUPW*M$z+HDU?ca^wt#M2wp=@ah z4RZ}oG87p^SXC5KP3x0;Oo5F8!w`x-TVknqBB@ql+;4UOTEb|3 zsl3ME{w{5&$$ZV!PdbVB6?8B|Ah~)`ulUb7SE9(Vu{~BIi=5G4JsVv85>nkGs%Pms zPo0NrTa^F4A+dUWkw3E8NWgmWeUzWE(UK?*wm^8~<1uym=EctBvd7zxB1_L81YAQ< zMKJsUMr|o27xlPj8YI2aQ;iAUCLiZVg1kRCXM{_`0j3-*)yH1sv-@Z9t#^DGF4@a{3w2}8W@C?FQ)T`Sg0v@?zknla!4MKAfHWAfHLN+w~QLlX7D1zJkNKEVWx z9dHZ^@=Z1Cx_JLQ2(`E7hC}=6(EWW<`FK_T`V`=D;3fm?p0e9NAacPBk85g3C}#aS zAt`lQ3!I7hg+^X$Hf$MtY`Z!;^b4R>dra~Epz^!#*0rypMzF9cU3GQBA8$S9n_(qr ztLBhrO4OSh7&=~v1z{p$F_xHkR8i2mS{B@GbRZ7)t;j%{>617?wJX_q_Fj?~=)z@F zH}LeK=RH5CFs$-E*tCB$qgc2ZT%lP*eBt!N&#!CT*tQF~wobkZ!8J9@Y3ecp+8)R^ zgUJPs1v>V-5GQ)_eKx7LLqM6xPG;uBQ3@D`hT3sa6b=O;1S5&OMI_NJ#g|u zxO=NX#|^X8Yy@~s3f~jyUqIaip6UJT6B$yGFALzZOCFcsvx`BSMuB6$Vm(1Q#YFQW5|qy!{K|z%?Lq@r8Mkz7LjpB2^(+2(Ux|v)5SCfjP_+}5T`h3 zrhi}?%kxB2)8diT`500oLox^K;#Tc`2LGb@+hx}&TA%OQY4-(ZpvF7dsTguBr`;XYd2Qd zbnk~%c&>~^esAuB{1#?Zc-d1d7#&wjTgbL}+bC~MWW=K3+5{n2*!yLXwY(2Er}Lfx zrs^Fu@Jp>icLC?XNBTCSAr@<$52a<{BB=OW2T(FqNu3nJrIA4p|G|MuK&r?PtR2-g96%MMc z4#XG!VL>?S2VMZE&i-y{EFHwo_hr%XnpfwN-N5TW9!v8}4QijN%kIBVAB$YoU<$Tu zJ~O$d99ZYw4hr!YbA=QAY+yeNm>qX03Ys0mxy6qo2;A2RC^J*vcW5cvoSforEFLm< ztZC&_rHDe-BpowVD!tU+!l_pcyJ`I7Y$k0UxWX~+77cA)a@ec9q;6OFvc}Xl&F!TD87p>+@cA6IaII%0X3^xR;2xJg#4mUre9V!L?ShKEYO8xR9^j2aMf$tOP zePPM%>SNC8grGA@I>_O6?#29Ir&57B+==Bd-D5sW2NiIPkwefi2KWgTK89fwu*U# z?=m<`uuw^meP)DD8P4^1^<;w7tkEjCS@4lnz+TwlIJN1NA&H)%1?a0>F=>{%(tOO< zt0rk$GdHBI4-z5hTH5zCHeS?dNGDpfW|uz=E@6_QOgEpNv>Yn?D!Ecz6FDd1c5YH% z+vm>15WC8urmocw^D9Qo+(Rt165(H{i*eDa@&L3xKqnEti#gPMtzep9(*FI2kSnAf zcaYP%ym<~^&Br>gwG|H@24MX%bNC|j)}N?Z@HoTm%Pt#$k5a=pQC-U{H3Y52i26}$ z&d?rDC{S7hUyrGL)$MY6q_WfWP1X>%VG@HYjsr2@*IzBmeUO=nWtPJmmxwlENt~!{ zWUG&R;P|3`t49p^2;C z*76rKLp+PSB;B#N+J_mHG`TK44^kV!^{JhHgtPq8u+36mx@X@@Skwo{lhQR$q>ey7 zxlJxK`15?d6$3UTdYNstZMvLm>*Bbdj*Cfg@Q*=Lh+VeKM|8WIO_P&(P+1T@mH;Pu zgt%d_5lW~frI*d_13JD{Tw<+Y6E;s7y%y;@aMLI*`?CUp_#|#I`XJu7zba>TLFvae zc0>G?DN?Mp;bNdd)sUF;Y4Fv3;H0GkEF2la9TQ3wvxHD9AFgMA_kGGWcxMWD_-k=8 z*tG1(Q{(Q(1+OVu6V=n?ht7%|UGx5X{n&={_SY1Zy!Ng0h8bkZa(?l?QL4H5=)nyw zMfV+PO^eUOmKqRHDOx&A6j!(-*p(A6fTz{+fJzNcsm+28#5_lT|7@9n#&@oQvVlBu z{pFa3rQoUEzg_5p1P4rhchl)%Xcn^!+Q;%>42S~k%!cp$l9LfMhe$`x*=E`MvFtXD zHEgrAG%^Bb&}A-+e*R`@oD0^;RSm)z)Ne#M(FJ_$&A1E`F7^um=W8ZmggQ`OWxerS$4db;#luj}OEi6$Oqd z-@)*RJtK%B^=Dq#6Fqa3fhNnGb0OWBry;A&`6}{%j3iC%v`2&DgzV1}VJTlvZP{e% zc}iqR*}H{lr_d+@VE;Wa;lZw}d_=whoIXL0;ake9-nAa#=XhyBzv6<)Jx4z+UG3p2 zlW9&e^)0@;_?V!R^>p@H4B*T|WYUn^Ehw|uRZq`(3~{WHuM~#B(lg-}mWp9^_ViI83m ze8y#CCE|n`WA%p?RBBHIkV|`LG}2-~_SD|RFIElbucpN?M84m7k`&7+`4~H~vyaHi z%Q!M|Kf9R9xu6D@==0yFQPpKACK7X+T5D%Wf?m}iTLU=9vxaIrrx5`EIDFQ1^9o%XqCJ!lo=6+gt{@_EGD;e$q zPAkfEM|yOytB3cAU>i)u*U0uNR!kT%r=#4$jBS4RZl5_j@^z@bFktxnWeUP2yYER9mn)|? zSjIo1W?0Jh%5kR0|7gL_mexJTW9soP&K+e>0X3dq6MWxlo#Uehh53Qvec;mj+Cj|o ze5>gu`Xe!JEoDwsS=f)N`s!M_jcoa)wv$G?vy7LX=7ymUa#)Uu0{3Z z&riYf!|ni&LmBi;b&n*k1EEJQgojh&SXCXjufFBfKW=rZGTG<4E1lo`HgfX)IQ~Xs zEf_6T+6Z5p*?8H9z0>92r)gT;)9=C_GmEHRbNT6?1864dnFjLT%2+xS@3D`akSPQF zt*?wdUTc(Jaz(3hQXi0UuG)@c(LEqP`?^~2XzGmd!%<=E8v8wjZr-aO5arEomTkLy zgSpY~Gq56O2sawl`bRvP@uNU=McMjx&+H|+}DvVDQEV}4# zYam|3VN;vxn&HqYH9(rB@3b=}w#p@61$}AEHTtgNXTzOdxvG!E&mmVJ1eTyTcY-S> zxLeCtqJ+MQ7FZ*2FD-J5BFm_S#p>06M_(Nk)~j_hOU%(#a+IHya`DURELkL97&M~r z@ya}XOOe-(TKM@qR?q_t44i+s@CKS9M^ur}vkZtC0o>qS_B55Mr}^(NN&wakt_L^d z75>8UGO1td-@{3&AKe;C8ohJ}Wb!7C8B&r?cGj2nP54eHpU{x7eFz!h7p_HF8d20g zDNdUswj2I&*y`DeE$Yu80oWf-76e6Kbw|U5ByA*wYR;Rj{b6b}!>iBeyvdfoDD{;4 zUw5FxD#2lyDjT_Hj627@)09J0=)w^+O}IAIw$Rfr4&H1f<28+9lX*2Q{aJ+(Hk6$$ zzsh&#%(8*vAS$?Zk=7{xyW#(vUN?(hVW(bhqMnu$!r#s?P`OBGxtJQcnDLo7nY{^s zjfIVsk%gU+l|_w(gO7!UkCT)Btz}`^qk{YXzZuxtn_8KB{@)FfJUUq43?%;(!P(y2 z#ofrs43M!kvM^IHvam9-rr=`YX5wMwrC?)W8;A3WXcXwy9 z`Vabz-_T6%;I!OGUm#nZtI_^+&( z9qcTG>ogSq4?hZOZzzD3i;s> l6LvErP8Locb`EZ)Hw&h>{Ggk>i*FGC83{%4DpAA0{{anj!gT-u diff --git a/packages/bridge/public/android-icon-192x192.png b/packages/bridge/public/android-icon-192x192.png deleted file mode 100644 index fc79585af26185b118a0a60340f590f11207ae71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18703 zcmb??Q+Fi{u|~N1XJXs7ZQHhO+q~cT3HPk?(ABTKx?j4gtHTuK zB@ke7VF3UDf|R7F@_)Jae*zlvKUChdfdT*|m!(97RDtVPU7n3*8fsMU86P|)@@f#E z40k~*n1x5UgM+JmlpyiQ#FY9tRepThH8GLbo=42!5VAqZ%@7zm_vn%08%A&|eHPG= z?yJL($U-=-wICvc$i3tgY};_K;0dbb=a~;z?mwE=({CBpS2g-&Pz58|IAsss9~+)k zZ`saMPpiG~tdmRw|5xA@1Sg#H^HeJl% z8-uLWn;ZsG*0YGz%d&i@2N7=f&9ML!M+%(Ys0qM}&rdI8L}r6=WG7Z3-r7)%8&OWK zg`BIIUmg_cagWmxNC=$_=msp!TyOpuJQJ-x1$-~iu=|~CdEtpi^3?J3D&@|o>_P!} z5qq!IW~jOqs5KTV{x+{H63|LW7qrQ=E%^EqFZYUa(7mj zzWL(K0fMT^=v<`9G>C$?`lAkDelH+g7Cl)kV8Ff&`vK@Rz%3i}GvJ<{Iv96I`Zts5 zv*Z!e1+^*(DapaRR-PX$HJCqf|9&avuYW?|~c)ug|}L$;YVg7HML4(hGc(H zRlAp-gMe0{RwC`d0kQNWEd=XW5aKyHDc!FOW`@Ut+k*LnPnJPbu--q&nUJSDAg`%; zF4FM35cVBa&sA8V#z=k<=$fI-2(UQd*bUdMznFT;`!lwq3Z!<(ZFMW9wIP^NbFD~e zNPoGgu#!+H<`N{aW;d zEby2WQk_htZE#VP{QC=*q06$L8Xw^TxnF+($3i3pj$~MlvVf^Dtof@Ua1Pr*`^V_M zW}3lyg`z~vhf+|ot@K9}@{2Ol3Jkym047JaL&cVWX*!Ppg5X8eek&;@L%EyYKaz^2 zib;%{lh4c#o8`Ig!X}b&dv@eW3q(pyUT{vOJBgDM!@$DYG0?h50U}9h3#9Wp*@o*B ztW_#IjYNxqVsBC60A!4^Ptf6fe9T{yt!fwrFk^p&t&S0?tj)~#aamXWbCZZjg<0xJ8o0i-@6god&H-!OAghT=gvQS~E?}=3_8)MO*o=Lpp5R$jji||H6pTGkFx{ovU8ROh%WAu~wRjMv=;5i#HKTjlmSb z6~&M)_gTy;`ZVC(XjzG?Y&62gAB^qQ3k@grPY9;tKlok3YvL5CT2QO@sR;bB4y2UG z1q6pzJ93ok>w}^~xFAFGP~gPbFqx_p++tg2KpeJx5x3W%V-Z%`ZwT=3t_&?q5DP4J9 zbnwPoWk=8^c7)u!4Xk^EN}{lG_X1*U=%;e)&4Kfh0fAwxCdrTnoKCGHoJj+xS<4d6 zkN1m=WO4b9z@tMhQD`wjvQ?&`?9jS^L9R&)f(o+3MU48Q-kTWg8u!VRmu+8xyVpYO zUZk!g#@bczX4l>M_~+d+fNOJ}A_KZJ=42biEVVqrYp9vt$v^+Pm5nM&S^>9fT#iJRmMHULUknz%P=uh@!qf)HJRFV=SQM;yicufjTPKM2Tx# z@i|BQ>XG>L9g|&>*Gn7GI#fY3twRs{j|H?X+>jkP-u~1F^nSe|p~47Qx|_V7RuHF0 zqzK#dvnzKc=;-tt7hD_98BRJQRZC$U+v35QG;*qN%@DwfaQ&a&FN62f_v@|qU6XIQ z_%j%GKO&!pklH34%z@`?bCJJDesJKL=4wX86rk)Vbk)f67T)^WM$i$ViHv2EWTuLe zcGs*F$&e}KvQ=|h(mZRw7N|j`f{prZ?jl7;EL<;lo#sC0?{d6Ug!UQZx1S(@!bp>be zO$(6m>IIuwgwXd-zx?YHN@o!b{Nw)t3PT#RK>f2*u62|(;gi|1S{wIX$YDn4>q$>6p8XgoWbO`_biZwi zm0=1PyDry8zgnLe zj)+7@J0Z`yfgLb{2vV7mo33MuJ#C#CH-tT-PC;MmB559qJf$gHEzc^b3 z7vnA@(v;DknGui?W~A1I?jkMGakw)nU5^Ec{u@yts9O)rb0eUJ*ciX(vXZzhDxN4RwGnD4w5Go z%@j?N0MclMQ`gi2riwo6Bhg#nF zAX1awMM#mx_}ND4?o?4D73Ad}y_3%t0(S?S{doerSQqD934uJ+jbyYmn>etjbq1!O zaIyA?K5~ zw1eeDZW+_c(eU^rb^9R6%uhTR0d7-txl{qTu2kJO`_ndd8G=;_SkuyjZLfZkAU%7$ zaUXxsT9N7axR|Xx{HchyEJNb^g$jmWqB7p(UumN?_t@~bCmL*b)pIhaQp zBXytSGC9!TzT2B`*{pChz$#U&0ESHu=xVpbAMBr=5kmd9e+Q-jf$xkK5ivLFTX>LX z05ICq4#fbDrEGE?Tl7AhvUbwcgH)}$L>!XAna7B2#jie@>SXbpuLn@FpIQo>FkM}c>8+7~{=3ZPsxIc@0u)5@bv`oahr_&>V z_s0_$QhoF}hiQEIS%a!&Sg#(KKW%J9$y`a?tQaQx>2kqSZKbUf#bKi$CxsKz_x%Gs7$kTcY*=UE(P>FbSRqkr)*EIT@w!KZ9!h?PMhs*=awH!CXX;*=#^MDrnx-6R9wqllsS@j7U zbtKf{vCH@My;PZ^{J`mTdM^U{V_}#X{+{w7H(;ph0MwJXRYEKobl2J7rzTq3_o(!m z5;zyt0tOfcNhv$W089s*%16j|c15*dv{Ohx#(4?%P{g+|bMy>kmd=~&$SHoXUBJQ2 ztM>!>_ecpj&;3=cXE60;4^CRSyXY;8s(k-p1*JC*#k4#f&G7wDzV*)}ewZXxO5ToM z6O8iI#3wz8v?|!W$gTw5K3q_+=sY6pwC3|SI(KHZG|vh_1{uWKni0dR#*=8h$M}Zj#ZSgc+JY*_^8(j$iqWYNAk{ z)p$<*+EFk87xX%SJQ!69>qJ1%m(xdmv6?lV37Wp`DTcPxjUR!e(fBnti<*JX2w`h_ z%d-x>dvOP6w?8peiG8-iGQ*>=C5~|-LZIN{C2~8gz0x=+gj=2}qR%aJz+H6&(uYZW zgS`8fM`0y~XfwVJ_+6mkvx_|pV0>HR84s>U(4{4NhL3$fU+q0TyALl#O;P#URNXKI zzxM-lK4-62^`nXDC~)LeAP9K3_AP|@``3_)t5m|!(6@zK%8E;tw{+A_N*tZ2=xsU_ zZl>lYUsuJKXSZwhAlIzZ*Y0AuzVUg&6bz(4 z#9xEN^St1SX473V>i@AiQi8NzJxYgqlXo_wj0|q4^RVoD?4{@Q@?D1hbv2z_s*8|7q~6wMp)kkH?hgT> z>CiHVquu09h{sS+1?jJ>hxHPG3bS!W;go5b3rn}4qb3l;s_*6y^)RD6s*Y3JE8QQ@ zz8=?hUdN6*5eE<MR`(XmirH+GFUep}34i7z)*S?q7IG}U}>QamTiG5Hj;9%&?xW=5!{G^cZ8*#*V{cGC%#WnDK@*l z{C903Dr*Ix+>0?at?wq9*S+$Q9{l5H2s=|pm82(3C)(Q$6+TnC=c78nLAda9@KDPV64pZE^Pny^ce$|3nRN>xTzBKgIT^uA0n^J~G|3#LL{ zS)oJ86Cs_k>z{p^bqt}9805k5g+QJMxGvdsm1R}RYiI3(leuQC6FH=$ns|qsL*@1L zns6P6feIq#Y}b{Oy0Vstz5=%+=nl^>B`)+pK>*{#n;ST7mC2 z!SSmgq;RG&i|-B-V`{W@BJYKLpNN`5A8r!lLa*6?*X-bQZ(XD(_4xO1z8r z_WKMoTxB)9D`Qw&_RMh^t2=!$GMWcGcYe#48j9p8U@^dLcr0VwOG22qQC2B74(SPb z5oW@4Oc{zU@|RUJswzZuYV&!CpYL(K)0Y@nL!J*Egco)uw2*R?1qudc^|Xk)+sera z)AX7pe#GExMD{F@O){6!kzFwABVd$jm7SHnHZP|Wivkgfu9D)(t9fh6ieW!niQS6^s z&7B2$&3S$_1vIVg4W+?*5_ONTA4ps%PoSUsXFdKEcGc7b*Fbjn@RdA` z*}eiki4QjBMl@o&7Oa#ZN&82{@3Rc?J^^_R&hRaam66A1ogc)Su3Ar3!M+vH>t6y- zXYTFU^yti&zc3tR<>2v#_&smYK`p^AKl)0&U&8Cy-50)s?s6f( zEL8NbbO!lCGX*WeP_aqQWy$(=5_gPceFko?*Hf)LC@m*Hem2!vS16Ls%4L(W*Yi)J zh8^5<^pW5O8X^s7=Q-95Dn=K0FJUP!K`-LJs97qfRn1i5M@ATaWn^^$d4FI$1@B}m zX7la4y9|Vl80^c~!b4*qXuP9vq4>8#f|Gm3AFU9Utw9I`n@mh)!*N$Sv%j0d8O*jm zJyUg2)*=~H&RaQ%F$d;TMDYDq88o5Z;T=tM<0gd!?+@SU32u{);0&o ztL}rFU`}TVHAPmN(F9IZl%p+DIJV0qn%BUma?J8~H_?qBcr3x2+aUSx+5Yzms@le6 z$;a>Pc374y+N;4(&QjH3(GH}QnetJsa1}c$eb26P)Z8LsPVk5DfjABkTObI_dHW5h zBW)Iik5{mjbU;_};WSM0c-Dyv9IgOf6L7+KRIm>q6?qYi%fHc{IX zM)!)16~g$S1*tHM{fJUcFgX3E9wq*pI)!V@fg<{MC5IT#pH!DX=3=%koQx%tP_P+t zJXAL+*eQ5-L-9A>O})g0x~p;r1<=#x@@?{1>pP8uk>(kkM^ichLr6vA`IOvM)BJ_7 zSGBpx@HB?6k#dMZE<3f!hbq(NCFxbo;$XkWDX&U^+`@52X_J~co`k6+CB)#e>x&D= zTEC91K#Ca*O9|&4tCd`pmVUI-^Kn#wASgG@VTeMA!<)x`LB@B z@&Pcb{g`)UawOn;a+w3eg@=}J_D%~pbgTq_7A%w4Qe=T7wR}8XygWoK7q80gYNm{Z zKBmEXNnx-3ZK!plDK=R8s7gNHaE|_jqIPW2@XU=x?92S#bt8Nd0Z_k_gAU>{LxKt} zX*FG+Iv$m+n!7!uD}BLE82~;f(FUKN5;N`l){Y~r@=^C-?(nxSil3O^Na5pYuv>jg zm4i^n5mW0_NN~U_x$p(aY$opH*ifFl#CgR6w&z>a=&BLUA&V~G^#t6ure@m~*j~$c zPd4F#Vy4X!;Jffgh#U;9^XD2R?C*zoe~I-ZeN5x8!CWwGj3)?Iwr62#uMP>-xpcjo z8wwriej36m?=^Q>Zj)P;88IZ-TW+0B;1v?rxh;M*G=#S*X#B@_QO)SL?tIKZOQn^ocEEW z+tP}O^lnpTzYGY$W&5%#7B&>X0*79iOI;M7M^lrUHsk%4l! zfO03TZnc3~E`VmXCYWOA1m)PsUEWC-5z9RL(EC2IYt_vFQI59@-impuQ813#|0m$i z3m;$Tf1lOIYK*LU8oSM%d_QqdL86Uin2!fvc+3dm9a`Wt5>T8>Se|98QSnk|NyOhM zHCjKm7(=_Yd(Ljf{mjE_3+BoI;OLb&J4ZKhTZvx9&S!b~AbM4qp_!Cp8IcvD? zS)1AJy7}BiS`FIG&p%bc*~18j%XqBOC3zdWrVCnhl2v1{@3tp?@t1{n!!84M1-=*c z(S~vTvH;5p?8dC0j8NhAQM<%`RWf#Oe%~z<*^cFo(mJFNy{v#wF24uB zxfLD$gT%uuJR#4IbLG*kATDO9aM0Dh+^oIfnEU|fQ>=NlNBBkjx!=%x+uY+yywYp0 zvC>|#@m`FES9pELri)6zFm2M8^bv8gnDgLC%h$Q#F#CR9P*>E{$S5De_Dbv{(P-(7 z?v5;Q!G6;*4*Co4^;!%kjBrE)guy%{G+6}^8!M7t!jZ7y5)c}>8jE7UTKawKcXtGs z?tDxZ;Cq5(LO)vLqsHu`CNqQnbD7wm_zRjqw>SS8FZ~3P02f3eXZHqL42*{O2}N8o z*nFnm!PUs5<{86KvF9hJhcrRv5Z7ake<}1qT{4V2+WHGNuR^3 z3guVqERrr3i@ztKOZ+3#bxT)s@qj|&WD0FRq2KDrriKZ&z}1E=tW;M038}2NVwg67#Vc zb}#yu9FU}wiBiU(-Hq;(o@_5NO)x(rZUEWv)yG}+(?T8OE`}m+(S7N14BUJXGzz1& zx(^N{LL|7~`WU%#XU834(w!G_Rntw@(u}Ko*SwGnL>WtI!JVC@REAT?o}K`<{J!W? zk1kyZ(I=LwJ5OIC7dTuf+F>gLKYeO#<Wt*F(!1CblOjcV5)`Fr#hZ=loGYykkRu@ypX2)v$TCQt3!2gojNP zc*>5{u+mOPsEnnL$SLPePn{Pak@dG3*UP1sR=n8SkNopGFiuDuU_CVO39_?m-uIS3 z`?b#h>3KbRrRxgs%UH3>m0NlYJDA}o-B`b$0%tcT5)A#=ScHVtVre3VoID$lUQ zuH|Q;@>xNM=hr{wb@8wUx9nFR=p&=w!Zg%HR-}i8%4F3P0rnUT2QdpWHx|ZF#M@>Q z2JI3Rx`7xQ_@daoc?bd)B;O9tOej(4KxEP$xIT7GL&oM@Di(rxH38j^eox2WwIK=qG#3kh0TuXshzcgVto4q%o9CWMxZSbtvcg$izcKJy@F7KVHTu^TU-q zz)JfqDgT1*aIi@7fwx6VRkaA+^EhNsV_1ie0)vLNqEP=u=I-Bkp>vdTbP1Vo<#tyE zp=Nz{F;jFUa*fupe%lO=XhluU*NGgif$CO~DyT+AxC&{UWLew&67ivv?IeGL?y5R@u7VO_j4aGuh$DL;Q6%6Q zu*uiD=@T*hPyT=%mPX)&h6p9%Pkd?gPbybST=tZoqCJsJO(G2RRR$8S$cj}}=ai{d z9(l*eco41uQSF{Qy!nnFnuCH?K`1^FV{1{9eJgAV`-|$Lm{eRu54x5Jxl!@ z^!iDE^i6df&Q$Zl%c}aKeVYz7WfRQgXDQ%Qa zK#?bhEUsOkV3yAhs`4r8JPaxpF+Oe4pVd;pnx#zBrAN7WkFz%X!lK|twx4}WN#@q% zG5acaWMl|)xKXDbScdPN9h>2>dvz&>_WIeXr2myiT_wM!W3tn!W z?^eh(D%{vm$ z=aC)c-BjJ+G3;l;@XHv;ZAAVpp}PpZw_|PsFP2m*0KhJ%z6&E^kndp1-KidIn3j%HOaO+G0(a|Q0vugZet*#s*ezfd73~TYKn)bU7$

DJ=?ThxnbYy67;)RXs4bZ9$?d* zH*&Ysxg5`+5ev2tbb>%e&x?_`2GSwAXb?YKD~z(=S;Ek8u`|^}SSucdZJbl@pI{CC zvf0F~df!~JwOuCvXp3h8)Ja89uM3T(%dj-H=AoIYj*T05^feLyc0{YuJ2(@nrQ zhF_+2AB)_jENv{uUfmP%VVjhuO2Zs)-=f~Z5vGdDPgJ}tjvUR9m0aBTO4(Q`2dFF_ zbv+YL&Gw$w2+h=20-gs8k;HKUcLDktw1o8rpD)<}2Pw8MZe|u%dcMWeC*O>}d=`rh z!<|1_%fcfBw2y+C9l(JKfL}p^p8x_d1&^p|I$DlC0UMwL@KPYqTi&uKiIWdysv6$2 zxCn&YU{lE=C~B?Y1{_)}(Hhc4jv75&mJ^Q0Hf2OztHhL*CRos$nOm-dM=gYpv-_|e z`0-<~c4|a3oIe!kNL|RXJ@vKz<;`f%xy?%@~I^OE^|{v2C)e8HB=JPfZI)vqQD-ZcCM*+>j+ zDo1MbT)&SW z?xt@9ZbJXQv| zQmqro;eboK>$efgHZ8h5jtY1)uD~EL_r2or`9fK5>14;HB}f^_v}@Z$+j>LAvlwgs z)@np4;BhVc6z`e5GZ1sXoxOR7Qurq2I6iV@z+Csz+AB zedqjWzt>2&SgSI{t>uYuZ)g^J?hM`jd|X)~Rlo;l$GC&7dWHSQ`fS0bJYkL}_n;(; zd8n-kZ;BqcMG@*Do_{0RUa@H43=s7DqP@=nX~U$=0ZE>4jkroh@= z6$xI}j9Z_#X~-7ah1IC{T`(BKi3@0L0r}q61&aSUZ$VajYp zGJPHR+*Bh$A>orzb)lx)>g|ZsNR_rX;Y(%PPN_cIRl{0WzOvV1V{Q= zGtAYE^h1uz${U)!l6RZX43IIJwkp_NG`fdfr?nqh+s{R{EQ;7Q+f3s0W#RwQ2tk*b z@`<#~gVkc?u52juI>rD1x7Gq4NV#OeL+^Gd?&+bQ<)NRf zG9l}apu3wje6wXQ`ayTpfA^OskOQb5d{zQRLpnZ!Y$#3&DTr?QZd4LPZL`-syT(SB zuR#nCjyy9$O}`pV7*yD*SIC;?c2k|+F#_yw!#83R9B2~{Eu;Uyuf5we&C!HO*zOeE z)SN!kzjnoGrCz!aiGC9aR*!IPe?=1kwJ(0lSAqa~YkpSwH0|t-y}eidE3SQXUxWC4 zkjbCJZ8DrSYlRGE3)?(!0(K~Dk$OH@@wf42p#NgG7gO;R>h4@X0LQpZuo%_B+|#gdf`_szj!_TuAHlz$ zmXS^=rIFpL>LyZ7dsIY9EQd$SK3R?0CS_HOe;~8KOT4b-_JBQ?&Dnh-5=pmb7K#(X zyt=Q-CZ!B{>I<88Wz38agtXV4va7x!v&>9aC`?DK3C|YT0;v-gEguug4_siDg|4AQ zUc1SbF8w+Th4)%QX}-j`p_F?MA(7^iCj<~PBKkrTxyom`1$O8@oe1S@?r&_FK7y+9 zSff3dqY5Bg4-ob}w#o_$n&3>WclVxk*sg}2?hYo*m#=pJIx%M(q^QP3T8<{lRR49x z`JQ}u*sHAXgXlg|9M=JtsOw86cZ9x3A^(lh&3);W3v+FpJg>d8tFInEQ>hd{rm(Hb zzl4-LV{Uy!xaTjcEI64d!1Eo+(nPwrnCf%Pl}166*O^5Z#7&JqHqRTq&~-!iZTyMF z6CcX5CFk1v&*sai-;D*@*KBvKN#yE%19-y`>`8#{W(_<$0!v58J@&6+X>zyGh)@V0 zf$Wzx11s>PLa4{7ao8cST|-tc=G+#~88O$L_XJ@}yGv|vFqy5M`88A~9`|>1PgJseYJS?`7jm8uR%0UM-d#Ptl{F9E$=0*0bIdSJ5KHa`U(C<`d#SUASG5W((@+LeW1K87I%uH^LyBL9lw(QN&;RQ6$ap zadjY5&U@>+AhA&>>?@FSBvmAS=p=ijZ#;$tiuMCBuA;Mn`fa5McX#lro5-=ZF}IWq z^0A94x9p({`_llvpEqQa4iVHClL#u!=D|DO=JA}8X0LqifJFQu6Vt(=UWa8GWp|eyU{9-6%SX!VApuYsf?ytF2kA=fRGD4#p;J#GF3IK3;%jibTSl!$X%i=_ewFYlR z2>qDtdRtUiw?cG)1(Ng65Z^x+7z~CR<4<797eCq0zGSrn)s72NVhCQ9;|I$Vj_l` zh21HeNwWVc7m$OkdTpx5OTyYG0V?oZTr-rx`1ASf=Y4})ckzQU8dJLO12%2(b(d4RPXk|Kb3<3ERLpWW>#){JxHoCG$;;+co#5i7BH&>8e$4aVmmz zxWxL>^8D%r7^ZK*0Pyr6^$Y2w?1f!Am>l!Qs20gb47-Z+W?FulfX`}Sfu($B={>oW zohTGM)^ zI;w;oLK`G3<~`JuWSJtC_UaT8Qrj$s6Wj{s3#xp1@Iuw;0}t~iZT z&qM+g;zRI^BX?9@5c(fEg$)`1Lm_jS)fCy@#iE-XS-0?#VO+6W?)$)fhq$MGfzfse z?SduqGcw}AxO|ko%3f)Xp-``x%Q+2MId$7@EWK){u03t#ZPPF*^o$4$mJYv4DdfW% zj=z9?Zo_>;EprmZ*suCRUa!A) zNQm530bD;28cS-nwp(zc4Q2WUhto|Qp(LUg!a%t9BSw01L>%AfEL1`Ot0mYs-ggKs zKVMM-j?+eGzbzdeD02F$19n2IB)$eXD-dUh@~{9vc+q8vL6RClelE-N*ix@{+^n6m z?0UYwsOpjD4Uul>09VH(l?_3jUUgo3Z|v&MhAIJ}sBHpb6s>%stll1<1TMn}$Ky~A z_gyB%Y%x(yYu21)OrF8Uys!@;x|;fww$6U5eZOBNBA>eUk>z@-S4b*$uPYC#wmAZR z3>aNty%|{HNZYsbO#UjEAa>u^KVeYMTYU6{O&6qEzrO9EeiBQ?OLSPHWwqN<)~g?BY;#{k z5ZO34pbp115Zi_|4qyq4i6d3wCK4t{+&mcldRlT6!azRfigJed4z~AvJr7$9=xH@d zcjFbcQ&WG}9XjK@R)(~mLeZ8U`4$f3`>cal2diQgQ8Sj}s5$qzcBJa$?Z7~obi1t{ zOZeE6k!!Ro8mpblXcEaV1_hpW#_B3aJnUTJFqCmV&EOv2bo&jK!C95?*OH8wTpJGR zc4oEa`CRu5DSE_=1ezj9-AS5Kxdrl>A3P3_3yv6*;-z=Rk7fDq#`$G(f|`T8np`{= z;`K6MZHElKZ|`L^PkR-Y>*n<~Fw_T$7%RXXgA-Jsh$|(9Wo3CX%o%FpKNBeRJql^| zUS@ZCUN6!|C1%dxxD7QlucC5UDg7t*N?(a-qWn0;phYX)Bv>vwh#nh~jaQU{} z8PpTkZ^bYTeZsS8=L8NB-m>R8cR?95bL`b9dBp5W>w}>jOAs^&E0oSB!VaEFuN^>pTKLMT zoY+>usJ}}md_=BAO91tiq;1dnP+rODs@ePt zn6Wx6nQ2OgtP~He-+F#al}j1F2O(59|H99s!$g91xS+nz@Y^1U;-DJC_XYllz3k<` z`0_mSUsGHh7;|BP=`;F2kZ7`s1w$j$!v;V){UepfJSAQwRYx)R^Tza5e?`dDn#w@_ z^(as&$4ZOZPGiAfNlqk_3f|4Hh*l!EPSWTb2f5;cUo`|_C&fEtc~(#orH?G<#l?gx z3~Ig)!P1jx5j#j!<|N4$Ccpsgv3SkKZyoU0TVJ@ml59?5DD;%Ln-6-F2&7dVf~a%v z&raN8{|C4UB>gq?qV%aQkp`b8P@pBVccVbeC zeuJD_3tL#f5tsR8-|9ZC<7_oh<4K{M9EH^1%8T>ZK1jX?Mjh<^BVL0l7q`M$6C~XTefed$|6+!7eBzI_exTwGQw)N7^2KV<{(@oZ4rzby z31YRlgLLYd>oL_DjMQ^?WbP*P6)5KSV$cXVb zfPsARI+i-s0YZ)Al>PaUFJYHCPa+NclJ^PjY+=aB!xAI4?g)cJ$+FUX@cdMZ z9fb1u?;L!6mTu&KDObjR!OVBCEHhVwzLQi--$N$@SNeNAsPMj=`Yt6?jbX|OF_ewt zL7GkkuUi67H2{^7DKL`2Ip`b{{ieTEL&V_&Pv8Cd(DVg{;J+sPg_u?!MF2arQQO*k zOFwE!PUycsNhe$E-Tl3vKOg3EZdCb9r{?6Pc+$qxly{5e>{-20G^CCjd8s4HRNmhI zrdcz;&)xE6L5+k8P5P;QCej8+%1%q;N<*uOt3CDK_Py?^3QARA$z%^-(-3j^x%THU zi2??<3>B6LdEu2-S8PY$piq4#?1OZ{htR^4O-pM69%}&Br101dyZwIl!GX?r@^NK=Nj5 z!f1Vum4;O4v_T4Ti7aiwKj#mT3D~sCmTscQST>y)1iY!j@k}-qI7Y5f$LHn%4`dW69&_ES?ra; zn)9=?9^W&`5>o5lw9TGd5XPD4XA(W5jD1r&4-5j>HHnG36W? ze-N5H9C^Eyq_q)?;!&-+Pn{<_kw}RGBqUQUM`L8XVSn*BUbW;x&|k;o4$A3?`zpn}Puo8Y@v(ATPl z7w>c$bOH{U2)hd1)@TPJJi$g^y{zEx4}fW?+H76|v`Kx}B=b67n(`A}{j$GBCmE7+ zjSR?1@@u0yMVpC9j4L|2?v-1IeVX1Rne(HfIr!Gv5Y`p!pZCawSL>mYxKVbbm2}4W zQ5%`z474;(5fr|e7Z>2uOp7`pEPq6e4Dlf}2|;6SAqw_un?XLa0UBZF1{cH|EBa~M z!E7)iQ-JLcM#SCT<7lG;6eKSaveMQ#A-nWugDI0To`lv-z6g1@`*(qa zY;RdCeC9H}1_v@5udRD#eS>;3ZQfwXF$ z!?Aoyf$G6+AEF06I*Kw-YDOigJV2M>3Z2>v@M?)*rOn?IEc%%m-u}HsK3~Y;eNT3G zpCRh$plQ8`Fpy83a7>tMkTc92ui{cWD@HP}uk;dKK0dQfsb zawTE$EKGevT`ATVM6eQA z*^ZJp+Q%+YNS1@n0`@3|^{d`U&v zZ7#Wn0(hB?7~dgeY+wo1LCu<56NJ5+s+G_ub!N7kf$|&)wddS8n=M^@%Rdx4|;Gw=_ik0u&$)^dII zzCH@wS)uU4Q8(3OQnHaGJGczE_Jp4zL!$voI~-l z=S6J^Y6>rUe}CRWHx*>#-!3B^9y_afcyElsrg1*=Gz*nS!qTW;3lZC|ZhLbcNx8S? z>7ul)oM6V<_h&~_$@2B_I6f8}|nYHDnS2XeNU{r||6z##2`J@!!#N zvY)9pvyR#bK1lb8`kQ55u{39mbuH;POFc0D#4TO#$6aPY(UM4wgSZ59jh9T`P!*Aa z4I-OPivs<_tEcMpol<;Sw_|G6Y(@4S=KNoBg0m^SR19nfbtwpvDuI~mEDfZjE+vMG z`(lKLFD9*aD1>Lpu)@{&f9mxwHBLRz57+_xpXmm?tS6Hr&=Tk%|Cu*MR{af`$D@S~ zD?#q9LAfP}dG3vwUN_q1MvAR2UEOZFyhb$^dh*UK2+O&Vg2rbToiY@(!D*)uF%8FmNTGofc309&Z`|jvaL4+3`9uOREv_U{GL}c{ju9uCY0z{FGB^3H z9+dqQFKX@wt;TPdEjNelcWKi6R#|K~9g6$avSl46eF=wUBmAVNsEaVSVek-PF8|Ah z2a{`m$N_HX9l-60?Fc41t$rH)s^*oaS|V(6hb)|-JfT^$=5_(Ap$u!FN5Q|4>g6em z8|pjf8X&XoE(%Ni_ghoqzMS1rMS^wxcKgCWRJC3!B$4-3eI&fPNdrtxci#hwdM)2& z2)}39Hb;5Wo#CWdOLJgy7QQo*KSnF;Woy`dV&Tj64{9bsu+A+yc|`I}F!F`8p+@(g zfU141^HR=;U8^J!#{a3*2E6ra6N)6Z$q0X%K-EW#c!!1*ZyGpln{ipkB4V6^UVmbQ zNnsCofH8inuMn@Q84i?wqe5qPQp~|AnrDw8g2e>0shk(5CK^DF%0$zsfIR6c7WKXg z`940&pJY9sxxL*a_P6qACr}s!H@axbxI>f(O;w=mT#%#+G<C0JJ0#;tu zZ1R+k$|37Q?8^W5Vs`v@$Ac@0kCv+t#Op8&3A7~U|5bA4|4cXx9N!$dr!eKp6+)9^ zu2v(NE63L{!U*MzVIjw2bLA*ku3VXOs4Us2IYyFE$Py2cQLdEcCdb$7`3IiY^B;VE z{=DArH{Z%l1DjsvX2qHtuBV$)pE6HBVc|aktx85-1ng+9VVFsU1ahBP!)QRaZH#|+ z0C$-P1k&XPwv!UnJuN}Km%d4qUK{zoP@3^sqS`fxN3?F$(cBe&EKU8k=S@o7=Kawh zG;yVa9h1a=YN<>hx~RhU^2Mg2ZGqqzxCc+yq-<+|WHOBN&8GC>+)?aGQ3so&IPDv@ zVRm5hNG~w3Gy+d-a}-(NBW3hd)i@Hayfil^=QBoUWCedXc(DnP04KnrM8!iT-$Td6TcBF$>o%=oVW6PB|bM~F@PtvqR z&**r+*Wz5$!lBN~xi351!qlc1=iW|^(zk6|4oiYAfkj5XEkR)GX;vVCboo-bdA@Bm zjY4$W69q~CljHl-^$X1-Apuzr(-{);iyJvjgLj0|Z|rjG*0!(jZ8=TqJbp}f?=-RW zt_~{AWwIN1UO?QU7F3q2Zyl2gFl0y``lr+z#kq!?M-bD-|Cn-@0K;|Tnh~lG zb5=J|ug$9qK@yT*xFmx0SOx3*Gp-p}{b(plSve-4ST6KK;Clgk%oFP_6~B%zVh%bV z9?0yl8#Zl@u$6gL?KWjCzLCBWOvEAYT99xuoy9oLq$|^+0f5HO6rGxT5OEgZ9{wv8 z8C#xzbsKK2ah|jay#Sgva6eBhGmvsY8ZwmR$&k1r$<6Dx-MT9ehk3kwL0^a-5$^d#(g%bt_jt) zeJbj^{m>yRU+#X-gk0(zhbkIt;yqJX&#cNMORHt6>MrstcV?#1v$_vX9=%~KpR+a) zei?fwaa~~9c9*^`!HnOBu=OlpPx#LglD%n}aJu$BrEw-NGX(q*$Yp;&NhddrO<(aH zJ8wI9_@~Uy4BZZ!pbZ#DvFqR)!N;bF8prLBv3kHrowrGG>)OaO5f;(9i+Y;dJDu?p ziq7<{eu9u4e8*w=3?#Ga(*`O%37xGKrH5QQ7>KG!6cfYq!iMYh+=B>r;dPMWzIl2T zNDCH<2d#$3Hn7q`bSqeNsm6$M30VQ_I`TW(b*_%bmK-etYpCDv?@_<`9H<7GH1~0d z6T%bW#EKT9O&9*18E_{ClP66)p)OifCYPpU=Gy_&p1F>HzcQtHzvOO_7%<1?&l0 z#`#)Hf8*>Lb|5(KD#8>Q+OCp}H6$D%@poi)`UZmawEG2jT*|Kkzd~rI36Yn}@8tf? zuhy@a&*_(|K6g&@PskLr&P~ndhJFw|3KLo=XGfVt?5zkQhhBs$H1+CTU8Y!2ic`Gy zV*ygP$evYG`QNPh{{&%IxUMNDrY-tN`kPlKdgi5&EclHAI4$0GEBsB@od`XR;PHLs zEbJ1)|60BMGVUKw#w#GUO_#>1z`I&_UZKi5$-xUHkl}ps-?%~^@&2aCwqi650W-m8 zYXKxRnijCl63-{{hH>}iI;UuUP_y^~dH%->(h!os@jYSJoOr_CJy+T92u*(dSl8pi#Zf)O!8t<{@uS0*bWG_mtY@IAN zn$-LS-Ut0^7Ee%giAK#uoebVRyWl!-Ev%KuCfJXonl7$pXdVJ_LmBLpxV16qxHWPa z&M5&6+|dF^bNw;1R4P!#uXoDduaOWcG1KF9DXgfBiC4XDiWAJh$DUlkBnQ1!VTFEMI_34DO09pYQkgJm)#*x#(zbc~JC-C;;G~ zwH3(;&dU2CEC|o<0fz%8ewwMBDFBt(2X@H<@S2C^WN8M&Nwx_C**y4j}=x3sdSFKPkFa35?I>fe42HxfJ-O|^25-KlM>)W)v`HtHl{VJ`9 zSy=w4ys`H4MDWzSeyd<-vQ$%pkgK@boQd1j>=i5mN6pY8~=R0sKi1>`iVgk7qwL?m0j8$@J|lFOAlRVMot2wx(6cS@~kp z^*FO8xjgUt=W7=^UKdCPZqvg&7NdEM%Z5Pj2cWVsg)bKGXFTf##h1Wbx3J)HutNuZ(!56Yt{AhV?D|1 z!?;*4Y+cd(SlY)Oym>iSd?s<|rQgun*(B3cfu3a4S0Nd{WYxN$Z>;1?o7XC8JSzAi zBGrm3nir79ye1j-N08feUw3XjFIt#;I}_wly)Vk25T4iRo~pOqV2#b(JzI)7F=3Fv ze`vXGeZ0ohyTA+IT7gM5|D&QUOYYz>ZO($msr=Tv=0%QkPM1=1dE#C9^sr+~bGSVd z9d^nolPr&ul~p@>w=p#0=*+70Xtnf<%Maa{LyL{4lc`FDjcc>DZ%P+Nba`&N#tr?n zf{DXBZy?Nj9XAlOW}4%pqur-5G5P22>-8^eooLZ8T9jbw_K!4eZJ_UHd*!ajG+I5s zUlvjXm38ntA6(t|{hqwnSqVeSGcuPR$$CJmH9dzFD=v+A_7z7r<+6mq?YixF{lgj( zvZN)%z$I+fhZar(cU}Ef?(>2RZQDa5iffyt8S&(VBTnz$x*Nry7BF=Oo+5p7@G~v0 zstS_?)P;|dZ%?xB@Np25L0{BTpaA2XT$Gy*wtK3xATem9Nb#zApG^p|MiWt-YExg> zvLzbq>UO)9?WuvU>hd<0EK(#f32VH*St>Qy;HKvu)hjU6=q0vXr zj@z`2dk>sq_N~%5Mg|iGTa${%JfFtz^`iZhdQTM%Sg;;=LdQH;9YPF!v~5}132#1? z_%^U5qjIRO9YtM{T83_4;^&PrPyXS~{kIY?@;dorM^c%?uEo7d_fCiWL+^i2DrfM< zQNAkH1*}w#Hf(I#`HV%S=Rat^Gr)?Jt(8uAQS)1c+jrfp=-uj_Qq(Qn$Q726Z(=jg zR6*t;^7bOM6+Ank+rkjMok!p;5PX*&&=5W+ZC`b_CZsLrz%yIoJV#u3(z9iX}n-+MPE4;yJphye#>(htyjtv|=oVN_FUc%oH8i`0&e` z!z&KKVkU7za*r-&KYgUou6#WIJAQl7;b(=HXT=H%SWDg4!(+9VPANE_UoUkC`7=~K zVBYIjff|qY`oP@w{OyaQuF7tk231wZ%TkgjZ6|mtT*cFi+yxhmZFoepN^(qbms>2^ zz-deLwPB~i+UF~sz4{Y_(d^yc4&M;7oy=@%UoiZOs<6#H*a2iVl}L%8!U2XwmH8ab*XS4{H+%R}9 zh1Js!AV9i=K>q;9pQ1l_K z4^Ypwu8Y&WK^|XBvdy>Efpi4!p|{3Utjq7+@)vZW6`aBtK?b>;vnKA>*553A#XGNu zD>35W&xJmK`wza%=FF=2s(tR<-A%#l0EouPOu3tp#@y%BUrp$&I&Iye#riV(de`v% zzTRTXrz6Rh&Li8Hh4?=zO?S&8Ys9>klk%W=S4yo|nQo}GdjqfT zdLX7D05Ub}h3w$ZtZ%F@?V3vVV^}}?JZb(`?entgj@}(xtKo#4l4c%X<f@T&%^3fOQ^}F zKP(;ZT{J|*H^?hHkaKEakK;meO3Z2~vgsX+qQxGK3$vr&hppa=HiW{_r;KK~?(x6a zJwEAqEbpcZWOFmZeXP7X`>U3Xh`4a^a4Ru1gkB9D&5Nr4`2f?=s(13dQwH~ps8%U| z#*S;MU8>n?I_9GeusJ;%(4l8%F+%)0-;hdRn2CmR`k&2*WkbwdgJ1FKB{rJyVg-k0 zWhUbr>m=W$v*(HAN~&*l`?7JTdvB^?Y-|UJZVduI8wReWQz~{451FYDZ)#j_BWAJf?q3=SG*j{yZPmj4+SaXhmX$Y!;up|{0Uy1Ua^82lI z;Jp)!s+~6KXObqI;?_^-Lity?POVhql`>hoQX0+QcvoYJmX|pGa1zb+3{HyveJ~ex z>4;=+YJ4|`(@ZAkASLZ|QsNN3$qZLuk!9_9CTaOcw;`NnskRroZroYcyM9l|u!nVD zJW;!_)|ML1G`e?`k>ANI^ti;y)0B2V`jn5KxTW@-lzB(bZ{lU6zfT8P_SH%R-lhmm z)?+@Qf3%j!&iloFg15=qOE8Y;a>Jl%_EsY{D(wByQNbkLM~C03N?m=iwJWstTIzWS ztl!)|dQX{Crq1wKChHB&mXOzE5h)P3anIzMo@;(OGY9)37IkfMp7`MC16&d1@RvWO zu19$dyEj?GhW*#Y)lLXM53JmXrb6;v+O03y)3@7a1xFo?q~^CdxlBZ|*v2~TlE32g z$=$+E-MGGGgjZuFfoK@(+8+Almk>q9(A~BeJBy@tzBxIG#>G=5 zgMF+<=W8?uY4G+T(P~!d~yMMw*AORL`u0Rdl+$S zT%FA{Eo2905>#I>qB!)-*y^lz;^*UQDeoEfDc8>`*vK4`J<(!5 zNjSq1@Uw3&sjk8=>Fx3D;FXKlo)~FJWX;SG`DA8gQ9*jmvcrDds5?_;Pax8V3W}`_ zR~%%2)Vts8BUG%-`3_9>FEs^E%l5Vw4)A1L)P@$;RPxH^AHL!dZatV5S&0lx6~N5n zuSoPqq?Q3;g-P<&ys6Do3X&@LV`dz%gT7YWbijn)Z9w498!Z=s7E#S8q3!vs043Za z`8izhgAkToyf~A3a(8SIU9~x!BL6gq8&wqIxxpOC5M~lTG9;_1J#*esRqNjCZUd}* z`^Fx!9{u3z%=r(qiO=f9f>u&S?IpdS*Q?K$$!Q2xRtU7ooqWT*cj#!YX{nl>f4Ey; z>F^$mA#ndxu|o}OK)cL2#{Z@*n!QH!p>UVK;Toq$5809~>p`}RtRdOh%aty(wk~n$ zoh|zsdd^lD=oM4fwwtM|F}WJ%xcNe`ZFcT(bAt%8(DqHppRuenb;~juN`IB>JFg5H zJUMpe^$|j`5gSHn`O|IJESD{0R^D~%T4KPw3u{RQx;cbV^f@*hdM-bGO{2Ztp|eohDVU4Fd_Jr4Vb&Ap!`5S*b(@)&t#ITfe^0;wp6K+7Q&pvFigD4EHmW8rX5PfvNuJ`Dy)%hMQ+W1)+n zA#i-(@dnw0dK-(y(Fh(?k}DI7H3Ct00GYSf2>%!JPfskCOrkiFnE+Bn;V{4m0U42B zeE!3jQ;1CRKJunmk{d)${DSCHs3fL0odo=|D>&WNQKQn#;9oxaH$VzNDk0G*MP+3) zS_ZXK03wHf@iC?NkN||1R(z)V0$4KprF7Fo7jU4skig@^sjf^Hnj_o+e}_V#xw^yu zdogeXMwzIBR8(=eO+?-%VDPtj{#kp?-s@Xs&;Do6UU3#?hAe0K&H@0yf-usvqG_W) z!f={4+HU@BNK>cKI;J`RP@By3+l8Js2l-kV>H;<6{Oh!d5X#8P6aa$603ad;0DjSy zBGv$aCsnQbepg_1loGTAW5R>XWV>~w>%m+kQ&(NcRuVaW@xjouqsR%_fhU4Rdk@i`|cRIj5jw!b~Ln_!4T*I!Y?A&Dn2LrtoKaP)4^0vPhe~ zb79%-J;%+*ZQD+HUed`871db^(4TRPtnov?YJi~C(36Dcs%cU--#Enls$sbXX$ia= ziz*YkDQl$45m|6Uo((u8yc;BVDPTNET~udd`0k7#u60>UGkf#YcuU6)kErOCu?zI) z=y2@kb;`a-JhbhW_>x{-VcAB9IUy3~_lEidy~^=1mR z@>y*h_BGQwl~6*By@it~t!R9i+|graWrjD~VaJt?R^Hh%@k1`pPY*QfxL)|HdT&%> zVDw08i^A&C6wIE^qWAk!sCEeK5)Ts$>;7PHbI{1~Pzw^Kf{0i=nhhVQ5^A`|b{Fps zfI^`Z`zNlmsA*wmI>wYDKITNj1#`g|kKgrU7#+Lb;VXfu=~_RVmQJtH?X`Ct^KsH& zx#$?_eItduc=nbezK9RBavV>87v`+?mY(>Z|G47+ui7U0wV15`8QrOYN?%nZ=f)<&i5?n-G%vz zn8Y8pAJ~~@=vpxLv-~k!-U}J#j)5DW{P#vpPve)zafQVl=_5WqN1|W}$^uJNbrxwJh~dPtd2 zk6{mGr1_roOC^mfvkp|e_;sFLBYEUJ_ftB&d2|)eY^vquUwf5H{pZOgqQN5}mU*F8 zCQs}3Z|ip^Op&>_)vPi+AvZmf>w?^QqF_2>=Tpafl+Qya5#+Y1(0DopMs-|m^HTk{ zy0j#%>Lc6$E=gi+2HWJdqKfS|hJ6|=d;L9b+G#?1n7jT}fr@woN?N6}>}~T;Qs=wo z!%wEhR7Pd(n`1AhLhCvewHc99P}wMwoA+2z zr$|y#Q@Je_^kqd1w|y78JiAtL6Kx4}s${mSZQpAQ#TOM}Q|^^^U<1Ri5@6HJ^m<)oHCN#yb%%f*9*Rjc{6 zUi%UAK9(0)7JLn2 z-$cgt`_|-5lqL6f5p3HsGV$WYu8*7knm(ak`Q?whImafn+S|UGzzQSRR>hdmmoD23 z8h2r+_IBY}cf2}+H|OA#gOc0**w*$S)LX%kji5P7h9tJdB(|z(D>`ZE<)V~cQ*?Rz z2jkV6@a5Dz&^t-jr=hmShY{9+RiFWM>%|!gFXZd$Ro5@(y|Gliv;z?HKzsy*%E&=k z4O+H~XzYq56u0UoBtJ@5$(-jE0sXAZF}M1xYd04bZOc)!m9SM6V5`M2(|COBEv&p# zo;jJaYnmj$`>7q8j3RstAm$NcqE(Yz*62E#6q(O=mU?L-;(DIriOJs^q!4v?i|;f;;q-%e8hdKNEK6ki2@WQcGHg&M>#Pu((L=a}(OZ z9B8=tB`H38{1n4-evTQ`2NsKAd5liudv^MJ$U9{u+93`8p3+HFX8u*>=-274U%wvH zwVmqbsaDdVzC%%K^7f8pbU^!jALt866ymlmW!9?KXXCps&nH!PI~O{iWrBGN=W~W%hf(QI<#IdqTbom7w?NG&)##zgqR|DntG7#$ ztFheQcW0%17^u}eOZ00GD*eBv`)@wr@9!lhURO&?_1sZM9!UPSZ@-AY^gD5TH<4*# zwXQV0QDk@^Z^amdHqPjbuss-Os33yD_bVbM54tI#{yD!b?rhj+>^!6Ng_7#8wung; z`EBR=E!%GP{AwJ&Totez#lW(xG|>om76MzH0l%h~C}tm;3wgnQBizma71`S+e=J*IE27`mfQ~mv*M; zwiT2#nLcRQ= z!}9meH6=@O#o4~B7Ob3O=1Tqrg30!SUaikLU7QyP|9PF*!KUFuIURg22g?h|nQ`H8 z;D@X3LrN8mLa%>NVO``4%5vXm&Z`M8Q0Etj^PfDHSzE5#_U2OCNwci2_s^ak&j&D}YP z@vCVYsO?3*zRSH82AZgSyB(l$ZUG5*9C?%)`g4E!&s%1PGSZNlaM0;-D-tEW&-}S+ zs5l}%ERC#S;;MMml6R)6Z(AdHWxj54yGxzXlYZcDpsNw#emvkEo z8Nt=!<~!kvRUg`XBknXLJq*!2ipr?i5f^*)&>uVJ{z`>$A+GAzSv{@Qrdgc|ezGjJ zcrGt0taXK{>5le(#yS26`;oV5h=FOu*2-ocM;FEm z7AH_SM4Ro^jb473Wj3OWI`BBn~Al1B3pu&@g6*<+qTctYv1czqnBc z8_c;|E9Xt{wcCfL2&Kz5+#PxF!uKJCxN_?q{)uuj<%2P;LRz+4-1|}pg2UV1j zQ<8zo3t2*yg**rZJRAb?_xG2@{Gn+=qh)bE=!N^6w15E5pNKXdL@W{x*TbQRST`>M z9Bx5FeF13cNekq^n1APl!#&(EXb%Dag~_u5KCv{0`yX-s!`Ne72_Aot_f?k}XbA5= z5K|1+jSz@;1O8nV1n-5`dSz$!UvW%rXcPcdhAJs2s;Vj}Nh(mwX$b2-;#gyX+yFUU z-6w^b-)JVgf0%5o5P&=8o*QlZ5UdyB9u5t0ck#oZa9+NU|2-IpoQkR|45|ooN4i3h sC>0l^G86?vDY&^P$tkHSD5}WPJY;G0Eib{QX&C^7zL{Q)u5;AC0G_&x4*&oF diff --git a/packages/bridge/public/android-icon-96x96.png b/packages/bridge/public/android-icon-96x96.png deleted file mode 100644 index 7c767b10a641e5cc771555a4fc7947dc2d588514..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6104 zcmZ`-cQl+|w|@05MD&O*`pjUoQKCn5(GqoxVbl>ukKRI*AX=h@D2WmY(Q6Q0h)(n{ zdKV&wE8n_n-QV}!d)K@7+3TGBJkLJo-G7}Eqpzz$Mb1JF005QdeO1HjX!F-eiLb}y z3?J$1KPqXYmS6Dcm>MAvgXPeTo5pknCu#`S~)ao%p03e$I0F3Tg4F+=831V9<4OQUk@0ZtHoN~QF=6?T?Cjbz|{B=B6RQ5HWUQ1I| z$;fwRCp)+VY3kLjxDYrL$QOIe$iOA&Cop8D<*XVT|Ja;XEB`A;Hlw-0vs(~SA}v-2 zqxXXYJi6;2P+g>5HJW9(0@Nr*J(8!$`0Zs0-@_3~SBR2qxN*c=$=-p0)9rD^U-Q`Q zz#)axW@d`Zk;bK=X3wF^j}zw=pMT9eU-?$*ZdLy;JH8Uwh%R6B@(H94ZF1*>5Mo&)WgRjr`wA-S(7V6uIy&`{Y z?HsptJzcxWj+`yA`cR*o&T+9M!@2Oi(;-xkZ0Iv1*9AfDnS=M!?!#sFMs53G;C7oQ zL{uUU@1}tiM0{Y3B0H~4iK&^I(AC49=}WN#UHIouaU}I6jtXNR>|zw0P)?Int87ts zhu0wy_}RAn2*3Vzk5Y+@XY`S1s>It-r!mBZwjlBCTl>R)1eGVX)?aICAJy5@P1B}O zXM7xSw)5bm1`~-KhOgb28Myyv%$b8&=P9-TY~N2q=$a&>b?Dx)cZop4M4ga;O9^Ny z#lPX9UwU<;axLvkm&!QRTKybQQ}B<d9sK>V;QS zLCW`IV@s?GqArj!Y9x31_yym_o~i_WVp#?ioQd@P(sE)R7c0_CsR<|r52p8S@)Y1n zM?NWN*!e)}5J0>bAB+Pn!m^<0w%#ejX*S%9#3r$}XIC8WkA>?>KI-?VCa06l$b&5q zk`t+Ix)G)kszlFn*6?GM;2yCz*^uu?B||tuq6wqZ*7T$qE=d$GUk6l$NG<%PpZX=? zBuS(}G}%{O;H6@njnjEYb<6T}O7D`mZ5OaOWwid+;u69;D^Cof-^x=< z@0I4lln>k5NQ{1;A~?m*dcugH%0${73Nu=g#i;KnQ-v726;HI56*+$=i2ozi9|5A4 z^xmzT+Fxk?NfjCAfaklFtN5%2#sa;T5}vv_!ylO$!}Z2(ReTUE#qiyTv@k6Z%4ko> zrV*f8$}(%!94|m~%VQUX;I~f~*V^F(VRr@6Nl;mF`p)Q@M4e#YVKEQeF$L`7`cFN@ ztrKIlT)-Wdo81YQUT`Cak>Bpofax>ZpL=`0%6u?eoi?{w7WRV5AV5dt{5kEE(7=|zn9Mgv;0SoDGnXbs#7msoSp(WxxZj(UZNhCtC`@$C1t z8kl~j5}Msq*wrp(p%yH2k#c3<`U7SjbgF*0Puu+G{V%v=5va=h2|1?6!t;yYq`b#8 zwCsUAuvd4oRf&);*2zo&CX>}+shR^l_e#0?Wx2xkNd{l7BW%qmUuEN|?fRFI>%4gv z>02h+Be3q5`Kf5`B1kxZ+>@jktyi71YyK@zq_L2A(dX)n^(>q1@#l2jB_ZI||w?mL%6kM-)R!#vsS`0~gHjSkZ+FMuBKnD8H|FqjcPFke;P4VIk zv56XS~$ zYo{PYQtOE0hecx6D4TOV% zJ0~=GN__m#Svj4y;4`_&B9TXySXH=A@yd?j<@4xn`VSF)FXzmS^7zKM70WRY!ZI!au2e#!NvWbkO`f=(C#HKpFB=X`wOmywn z4T={kT)ZY^U^Ld|9jzCmiAaoiYLOkw;%H{i8G47kqf=meo7;M`{Z3g5N>c_EgwK_+ zJ}|2ZN;qe`5|}IrSnR@rE`WO~(b$!nifx``hHY(B3dUx)UVu$Slb>;PR)^S*R39wf zVt~JlNP|T8r$cR-ne@$*en$F4bs?2$H-#9i^DAHGoE)e1-VajvsY#)BXPI9(#Fada zQ7cey3Y&d&<1@u?(A9DzS!*$NuJwur-*4a%B6PlvVWwW1@?=q`a%73oa@ddn8|GV! zqlS?_KJTK0etA`SrvY(Ck0cvjjxX*iAxSbXm&5BJdS)74cxzMN{fX8d;w~CPEeC^- z^s}H~X`+-sQ*;Hb2U}D}H6^WZ%uqBMs?^g$1z_wKWg|LB=p8m98J3zg%viU-fwI!O zTh5ZLn{C=ZjLMe(!*HZ2Zh_q$n0?`n3dwC|N4+Aw*)xj_o&2EEoG#|l?|j0s0)J3j zHpoBLUP3m%T_HsU@X|L+qb5pHg5A{#oIzuX;?JMb<~Tw{3S`5Dg?F6;$2xIZ^=Mh~ z;5}nds|_%NEdJU%AK}aXT@60zl+hJcr~7Q7m<@%yX{3lK|0Y7v#5uM49P4N@^DWUc zFr-?C#;`QdLt*GEj>aOTs?0@~;E7HY)@NPM0ayshI9U8_dW?+}XH+gfsNIS<>P-C7EphRS^TXlkZ`i{}-iB_cSe^MI zWX~*P>6~Ci#5iBFj7gXL{Fn8fD1<9xAM5duksI6|0)7ucwcUPmn(DfWE zXU^}{G@3$TL(S)Bzrz<%YMyCVG`EvC*t3c$RK;vFl$a#HPsDv}14rspeD&Ol*`dti z2^DuXcnGIF78v!7pCOY#=AD{UXs^5BKX8lh+t|%LP-gDdzDx~TI^Lwil7s4D`gUzD)tqhc1=bzA4?XE!6J_$R(S2N!6R;#elrq zr0`67onhB%YhVF4lfJ_Sgv?e1XRtkf+z@Er&?V;cvhl?dN`G!n`$s$Z^PWg8oiooP z@^r!~Q$Vmg)qblM|HXWKy}ZCM0bjG0?y1e%UeKJ@DK*fhajjBly;%L@hOE8&=a`~3 zd~(-EBi0e0QpNnHDaRU4emc||21BZ0sJ*75Uvz`7fV&k>sGHv2erL@(!gLk@98?Vb zkf%QKX}v5AAmK3kQo9dhd}HsRxQ=VvI#2LZSNZjG1$!Qu*}|oGvQ7cU&OP2}?cT#$ zK4yDC&oNM)H1aE?opYffz|xci&TxII`CnkSKU`&V^XPS^OkQmX&jc{>(#Pi}5YtJ~ zpd3r3q0J!?9Til*q#!qm=-#RK2Em^Z(?y&T-JVg^6ZW8uJ%1ei-)427{W59-$y;Wp zqcK`c`6l-=P~&n;#_)J`)3V`8V`csy!?&rXpG?fZH)?%fJm9RyD>1K&cw%Qe1w&!Do`IDRC+c4t!cFuUKb3@PAt* z9EEZ9fnnz73Yw$(y5c+fK|MRfW5y=zJ=28O@Fr#}C(t z`&QPHX~hH%iq>*YI8Z_4ZQ2H-XJeH=ebdi_?b}1#ueR z`tc3VOSf7&9_84ze+{B2Mp+@2mmiZDopg0Y*as0lL``W&KOSQ9WAR-K7Ebl`mTRfv-U%u|ha@u$^j7c0-=yLwjE(3DlG1sLD1RIy(FRJ{#gc)o6~ zJ6bYcv*3talYMH2=h?nZl?eT^zW%B%k3p)}pTuM76^l$%U?H{lKs0kH>%{1n`k)c! z3^|6$8J>NeDZYA4W!$XFDEMK*sNSvs96o>MPH&-8i`NJD^UK|Hvu2KA{@YXoZt^ znFU>VJSn6@Ll4BMq=nV#5G_lDZ~dcgIY@3axv~ct)to>mK19SCzTn;N-*A`>rv&Fl zC}g!z8rQq`El{lv5Q8nqo8a&-skKS-g-7)SO7bZCjS}mr3CBQEP27_o62B>qKCX5C zB9^M%UnjzIzv$arl5JfdbIW`()^4vSy!maTh{BYBbAo+d$X5IbHgN^Fj9~CUfk8#&srqcyFa0*w*I#SPdQ`z=L#>nAKwWa*+7BE1V%~p&}!}lEERB zjd}&qR)D3aB04)3V(;3i78$Y>dSZmC^0#c~Z;;kEx-?hU);QIiqFLGIe!sGgqWw59 zf0{J;8igK<*o%#MxKRowuLU)iOBab^6z7K{C zLbT-ZBgh7agBEw%M<^^;g^XetFeL5|XE$1# zV2J@Lihp9eQSKBs%=2DHiVntL1{^UujnB_~+xIP|4Vgw(hRT_5F{BZsmaF~r>gvz6 zN!8!V>tj+Bcs#hvApd-Nhe@L?+gocTy!AA!8PENypS}B|S;nb(+n|`GERB_?Oe3VS z?}3x9ZQt^kPC35Z(;E-O>Z00_<)Vt+<}Ea-ja9TeSi;(HHaE+Fs8#CV^NRjZc?)yD zD|)?qScWg?&^aEAwYZC9MgP;)=BK9k`}NlT_`~__XaS3RZQ}v4*|8TYmUA1Dsm>0N+N3=R(;-?HHXx{mjtU4 zqot;|C2Bd4aRTl#pZT+1%;x+ z_6xOo2c5e}@s^EW7Q8W=TZ#ipeh~E8`AR#`7V`Eyz%w+6`$Pbm6$rd!%4#6#;fLL= zn|s^AnmvTMxhG$fIA=((ACF@zhf)kPtn;I)_AFANhT~D+Rgdl(!>2R$8%i@g4K_7I zxlO?Sv2P%Cqi@jGh&LQ7L1lS3VfSdbl%$nIQ+vSWetjc3d*1K07V2n*C|7u? zEsPnSX|D}+abiP8o3kpR4&||KU)_q>cLqp3=F=x(CuF|kvMDEF%P11*A7-9k%T|VS zw<~@Nd`|R8%iR>cgoYRJxl$kO9z^>2$ywkkTdo@AADCLMA>)?c_uR_y>KxsD#4}n{ zD>P)CW%`EV)4GHAcg4mK{Z}<3ll^tn@xHoVMT6$b^EndJ*;d}Z@ZIB@E$Oq+W(xMa zz^_AHti&Gx%LnbKhIlZ^+Zr(BHtyTrm<7=t1xEW{ACp257BEPHN8Y=TvP_s}w49(X za}G(%Xqf)Ric0C0tn>HmXC39QMlEXxVd&Y{vjRYyi$)!Yyv1!wuULpX$z5!KDhhT% zpRZkqP<|*UPx)=R>kd~=im2^Mrs8Jsb79Fnl_n9K-@9YRm}mIkD~WCRdKqV2reEFj zn|6L@L;sw^tmN*<_z_piKqq4D42Hf`p^~k7iS-e^cYOhs<{p~6(-L(sc4=h~nL^s} zV{93WA!H55scO4s>6ujMRFf`$GsK8~P0#C~m>{*X*1nEIde8`{;@Fsvzkr5L$wah{ zGTrYuj(W$gsi==iWm))ZW^v^~C!O37Ou-|_%^`cj@&B?7jhB~<3u@YRx~8vYuisjE zF=}QQJ2(a@i|{~R2S5xg1`z>^i$K6eU{(r(t z-zLa4LH%z9PqaP82kwCcG+p5iNFBI?Bf^ - - - - - - - - - diff --git a/packages/bridge/public/apple-icon-114x114.png b/packages/bridge/public/apple-icon-114x114.png deleted file mode 100644 index 1554c0186278229353a9fe0f686a4895fc1afd2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9379 zcmaKy1yCGKl*gCg79hb19taMLFCGXGJh%l2EG#Ur*y8T)?gV#TTtjeo*PscSpuvyt z>Z0|2!#*!RY$&wV7gnye(CYW&Tw=MD|{qnZ)`;LZpD_yz(1x6ebqKLG$IE&$-* z3jiRL3ILGUWwxq{JWrsRD9C;QJpFTh?I=!o9>KKxs0#-GP{aOlB$!3kv!0Gv?!$Wx z*X83ZkI8*auMMNqbC2u}|7D43wurPqWrD3J$*ft@fyQwSn$j=UR)t|F+*yozat+Mi ztFRKAKgnhoqk`4+r4!~!6Z$_FG=|G17{=GVP4oXGrKj~GBCNR=?aFW8t#f}yymS8y zw14e&l?@d>7Zz^2yYuqde{3-tzxkfWHvE6uy%C#GR+hnytvB)t9h)yw!IKicnXfT< z7d;mlhDmx5^TSITZIYgXKQ0RcixZ2ocdNtAEfb&7l|-v2(l=@$xawg1v(<-FFL9?1 zrH(pTEuV7_j#s$81%!RIM|wH}CxM_YF^u`_&)u+hhZ_ ztd}&8l{t6SI9rOF=%%e`+n%Eklo)3Dr=qZCTNouPsZO@S7cG|#dN)LE^q!vc-;=u` zu#yI>-x+?eg5E^zG`AvVdCl_lPSx14OQSc*iga3*LjT1r+7|MLAbbYh*Ibz_)@NV6 zOX+PkLEbUHV`UheC_zzSb<}j5YKM78E{%ZUE%IyC-~#_jhz;uSam58Vc{Ba6IH>%S zKbHb{-gA-V4d){p7g~K`kEU?ei z*!zCClCvRx#&ccmhrga;^gSW>Csm{mORjh#A#b-mDbI|V=*{xJiukU+NlFwc z^sZAQD*bGAv{2LABSk7F%IqC8Q*OwODaqORPHC zJu>i;tnbY(^t0(`;_HF1=}++q%(I;jd$GQiFBAt`C6PYM0###MLdfL{0IYg4t?j=w zuju4`aJL3!3PzpY1Z~}7qpAi*Ap^1Tqmt=hiE-h>LOuDZHe{hW#!%4r_9~arvj7(= z8f&*;!5OktgDCr~$reqt;V`a3@#eXApHgF4K_54B;I z_t}22OcHLk-Xh%FpuhV}Gs+)Jly)OE= zP34T&k6$l}a|H=Fj2kb-ie%AuN)0L7;i&i^5tl3H9H^{ZFrg}cw1goi_l*`?YiSN6 zrT60msSKoC%>n)M?()Y< zp^a2*<)rF8naY&I$&16g3$zAxh|u}hivgL3B5!~F3ADXXCs>{UiT|kplC!0?_~~RS zM-15!&%79rEu=W-zDR)gH;7~YwuibUX09eYj0d>RRxjH>9(?g`?q{;JR`Qf6r?ocWi_abg|x5=G_Rv^WX)p+ ztMjsv^CKflDELTtPCuuT6T!%8o=@bhKM+~Rt6jXvgs{&2A_r1+>H#5&Mnw_pKlhL7 zP0Jd~Ww3M1`*eYdmR8clOSA?0n5)p5vz;Z|)W9hq^I0YJt*CX_@dsz*1;6pE{@Krx zeib6hP8%cdWL3Wgle?o1sVlC86j#Z!d*kr=h$v}?TWIG=&PmtCClHlEE<`glkQ!kFkc>Yl_1>G%;mbbl;gFVKx=!Q+6m;_d^^r~Y}x z%kxolgB`QUMcyZH!^d2=rGqC0PwnE}AR_k|g?V%MhTB@0fi|NWOcZ{8 zW>rQGv{{|c{nAg1x@NgJuz+4E@(9y*sNhB)^tp&b-z;^aYxE*sGTRa=$dVf>bD$ZC zk~A2{j<5MtBvM=dX9|s~1_R%38)v3sqG3U9JmBaKfrm?i z*QX$dL({yj*!}pG`oon$&$JlFdavZG-%KVOzGB8Be+GN@JFc321?A!z3wZp0DFq*Q zTNiv76K+HF%Q{?!)HO#=C3O(7IH`soP>fZ$UIY*~hWCqM@x2>meVqPqIR{HBDZP@* zdwE(@{n93U%0S0sN=0ufj&jQ||ILaiZo32iDRR}Jq7`h>a*MQfR@~H%73i6%G*Knu zxISgJ73}M|&u&Eboh-av*CeJ}c|s^Y#Vk-6g2+{_7wR2|!g0usAH4zu9X;4Puw)R_ z4wux%4BN9f@8iOBb(6wO!L=*(99Z#7mi)8W0cG6!%4`}pNxEOq5~W^%hz|+AA>0NC zOo!j>0u`HHIhrR{-v7z*9Kb{ZPGpLndifed%=Nyc7@zVkwVW?6@s9jl(y3k>6F+Bj z5sLM^f0(TO>jne0^3}sdlS2j(zoY!;*INHPD5E3_+p1fhr=nirzIV|JWqsQIeky8A zLmbY#$N?7Uu`uBUc1O0j(Hc&sV4BVECnbN-&AkGe7{l~yS{=GU$r(dHFrtpQTnKN& zwy-}gUOsVnxkZabh0t7!d5l$czDk8Zx;oZkLhoDRWI`sRp-v}Oe8Gd@+gg>w)t1gB zW%5we*zO}u;>)YJSDHFdobgB|!+1=$$uyL--DrN9>AQBw2$R%E3ZqTxE*SelRTD4Y zrDV~6TgLpWrfJy&aREzut`wkzbjMU+ExoRkwwOf2R{5b4D3IyN**V8%IdCZkv5QFa zqC?Y4UQiLl=fnFbEgJIeJp3RlpfjLnOHtIUR<0_QrhYb2uBcB^q4hfxy;S#YSssZm z`Dpu9>fE)UjAXbqPt(*|f0Tz&X+DjjyRrpQsm@N$He0TABHOh;yl0m!L~@rS-AJiX zO9a(%a&+B%$~#?2;SdKUs7v< z?HmkA;*6J~MTEgP3W-`uQ5~8=@8Y0HzANx^nc5_uEKRjPeFyC_$%2iVgz0V)xznT<4H1?HcH&6`F0{;mWZIsz+SU3dU;U)<9QC1#Pk|m$lF(lH!11 zD}IB_rPw7egmU%$CB3-?@t+xC$vlW~u$Sml? z#0!)Nr?4>*19@W{3#I#Zf3Tx1w7D3+Jvt@}_54xS<*bL4)^s#MW%j5TGC3qrn_%HF zj1YYQN54dZVs5|KTmjXBQO5CHF60N?9q7Qz_U~;1N+~C(%AlV9R`pTd#5FHPY!(Aj z9^0OpU;J(vF?3?_P%ZXc;p@kLX^7(77N&rM4Ra<5%CgCX8f-hWudL8Ghk&~sYu}$@ zrVXy2s4LvEb>t(u!DhD&u-pCfV@44{*$B7^@)n-bD&}p<_iUQczpGZA`-w=P;99yA z8Uxds1_(+szGC=b%t<{~s=L^C22zH^qKo&X+w^ZQ>*Hfe7NpGwJmnsKzN+ze3;g5d zp{{Pt`t|8QQ}CGwk%X!fj%=M|?^rB1^Er}zPbBp=Oyip9 zBr|^nY}~PS-83{f{l%;H*p)-(K6JSToZ|Ke&`O5lTle1n@xf5tK2PQDglA!dGq>Uo z49(x(cnp74_JQZf!v^d%a-u--$2xA2_xdLSF}7gg;r-2n7B`n1BH1syY|dxRs!lf0 zW3xva&NFhj*R+UKqSfI_N{66+T$4o&HPHU*jIsH?YD2_LqVvHSsRFo70<`%w8<4w_ zi4`dFt3Aw;zk_X*T~7Wsvu( z{n`*$cqqC>)bsOM6*k)9OPCM2mT!{tjGH{{=vw{AZ+aN)Swyf+_*Z?nPaQJ+ln`4s zS|VUqkM%JLdqy57x-V+rL`XVxxHaQLIWuaJssz9MrltCofcIW!$g&C?j6T1YLo6)= z;pPjEQFqV_s>;Y|n&>l5IFUHQi|YY&-3q8gj`3SwJ~oMrLT1ido2PqY$lAY%(MQUC zp)^1q!?wD!h=d4z;~Q#!P39__m9p{|7a$VGrM?U!>)GRUPM=XMMm!W%xef^%HQ3&v zO?!8vn|X?&{4G2c_Wr`pzrFwRX#XswL$oSQlvgSS%aCRJ=!#I2+hQz-=;)=Nex-Jd zwhP2gEzeRMX0%%!VH0EL;Pg;2>Qg&}x3*aacuw1#sN3{1&#xKk^Q)B@nfD}#$PT?JnwYsH)X$-oS$#iw94>-Xy_r&- ziZatrm^Om_bY>=^Vm{z2`qmL+CL(CO${dL=B#DSegR5Pn_T`2ZM0SpN?KJ6?1=CoL zQ*VRiIGuav+=a+SkPgN}siH-h-D5HTV@5CH-P<^gX z&v#WQvxH)>4s!nf2pF_p!q5f?P_)_^=GyD5h-Z9F2fcHq?<(Q0)*RtEoIF0CGr^aVc(ZM_?H6ejMH!MHz5s$Rs`k`;CD zbo!;@204!81K!6kDf(xawSHqo+kI8H^PiJ~&UQ5U6E&rmmU3=y z-M-W@ShFaHE=%=kS&1>*XKRkV4-=-~9KBG%<*)#{>&e(Kf%j@^^M|X}3$#L& z;DJlzI->{v=+?W+mv`=wuybmhAQo6}6jzPxxp%qY z<=~6*_qVtphE<~?hW5wSrQRSjZc6;3rO=I7Zyw(6@EEDEp<`@`eWiflq~Ol#jx$#wgxN#acqj%k{ zBEg$&5Q@HjTPN&`$8r!>L-_aN`Y9;^`RzBAlSi!H<~QG`t>V_L>ag2KQ%zbl!N+Dl zWg54qc7DnnwIK+guwIdBD6tTyfCs3VHjn=!9+ru=C;!v)a^6SdN zLP#|%yxjBl^x^V#mj?c(w$CZQp~s(?{_ZVm6vvPK3Z~C*yz*~6%60PhRBCtK?}oWY z94+J;MDJ>&M`RqYei3?PHK`cr>+z4RE+;M)zUGADHYl!qtqQ@^Pmsy?>^y(J8$UPdk3QZYMyH_Cn?5RMQ4YXL4Zgk$(pk&)}g0F^9H`cMPvkWL~2o%^ZBy+M_K2K&dRsu0&DT$jTv#u zXbZdV8<>->OzPi>61`1^u$c1>nXmTok{k-9Mi)2$_cjPT=5_ zlRj~MJ>}K0sR{^%zSnvvOB`z=o}<*#vlK9t(a(QOr1yZD!=G+mh40XC&A6gW%IuVA z_v&?D##4ULB~XvL-ACj+%EYu+rQ);3=)ZYYs_b|^^f8p>+ZXRlPwrNl(yksRb8b?I zh~I^@qRNcTN@-Heu~48+mUOc72SGg7>>)xP1`VL}w#HSHW#G*xlJ$N?G{;dd#pd1E zOiA@5R_>s;-TZ^9s$}I2+j)1H4dx1QXL(*lZu?HVwGU)UBd~W3bApBf`E`eqkqffu4Qp$#k}TNm8ofv#99vtXl9WM-v1J`Rl5slxkIJ1=cj+^Bb<@w-V1!42q`8chF3EklE7%I7*b$wuY5Nzy`_i< z1?s4byexqN+fQ{{5!CZ-ox~Qyai^FJYKr8vDn(5B2>UMRD(|$PPEY>`iro>{x7am! zw_XDMO2&%p&c%iy=pYpSMIuX(O9YH3t^7^dBo#xKzdCxF=NYHRfr z2*Hz})zYIt!Q|JmlIb3b@Q)^m7~*$D^F0Wrh`N8-*^>?EcyC~!+BFbn&uXIaN49Mk zBxAs@t2)_ZK`L8#7&8;(MVwigl1?I(#{Wun46R4<%~&e0p&?We@*-CVvwd5@B){Vz zi=;)%SqsIyafcFzKb`8=wF7RvuvhviDY*lSJkY96j_)mxDeuT|Cecj#3sosHUT*vz z@~15rr+A0&eUJjRF|;wNvN26OO%x$r1Er)N?cD^F#){IIPC%A*=!0WL$dQs7SZ#5$%+^ELI*t{RP^kS(dm!uNn zVz!ZX6ur$}#u8xjpnnXl5N`vC?CTz3+*P;yy=WIdL!>+c^&uOh>h4<;qLkTQm#;jV zsFyDqF=!Qp0#y_k7q#vwBqW8(=^801QVu$@3eJ=$VpLf z*34SOMj?pSfwDI=rUI6oZx-7K$VB;hWH^=WtSBi#TA6pWZEJS#j|or821rV)y6yWg zjU+GI>OAeDl5)JNDxZ)tcUBH=^Ne{^eucp?eo$jqy?7M)s+-rc$}0+p%v?f3dF-RqdKe*A`>?7i(@XtOH`RT5{R%cnGA$kdidaSV*y09~YPxiG^V zS*N3!gd0fw9+!>0;^{Mxjn|x+#;*du+3>7D@;>kDo)F?emq3Kl-ZPe+W;(k~q;Q(=>+D5M79j!*eX>@)bICm}hTSHwKgkQ4AM#}AFagMs{u@NwD zdQY1ulk`aINc>5tx0VVcx{F?m!wNYK2VpX5QE{GUdt2KG-yWdq0Q!?oe@#Ks>u>4V z$_@S1@zBp??46r=(_e2%D*M^)SnEf^te^OiS*CxO#DxV=)>sJWO;!(R+yx@tSXEQi zG!z53qC>BS7jYXqGC>O1Ocfz4whmtxcZ{61n6+=RM#flaS!&4nkH-SO`!lhvby3m? z?vy#PWK^vBU(Iz4lf86PpAkCCc(uBJRnjKBe8Sv>wapt7{^oHUDW}5_Nx5}Gl!~jF zHr3163lS{5?hLf^w{?8ja-lT78YQrvu}1%C@U`4*xk^Z24=%C>PodvFB;M`aZ*{)R zSob_JKN*{YtE`WzU^~BPYz2b1?d+#`AC&2CL}D z>pe^Ebiydcl-aB}rpDykgwL0588ilW*YG7S%;goBuE>o>qJO9thvl6Y3w4tq-~GCy zhrd+l&%;?a@-4%j^`K@CFXorj%_n_uE+Iy%hssmEANo1uu9mvOK?akCHl_GgScN;_8^EYIM>& z4^xkA>Y=GDCW+ztsy_`QuT$-t#;jeRvfXID|EZZL5^U$o*t4yxwSG~1%ri#!rRc%$!cXCAw>^#EN0|w(xD@Z& z!5E>%Pq7X$_E0*K%(Um7=W~Nf(d94-k0WR&g6}eT7#D3j?0aH@z)tho!RZtOV_g&x z5cbPODac_*+7x06)VN&p^yGK8OV2)Lglx)tX zWW$v#lRozHqub2I;%VFbIDU^Wp&qXoyu~=6uBS>HL$$+it>%UqwVEot4o4TQep&`p zO20-i7j7UmP-c9$-?Tu5eK-8gLC?Sos5pO8K|Y&yNr*e4264Z1H^rUwkWXwdb_2K9 z?LI$v{?$&z$SR`u498(Vn`q>E2C>zi+xK{!MX=sT=@Zd?^1dCtdBs0C!?yKzs>G;; zT6mVNCvyd&@r?`V(fiM^8n5i6;o1OuseG_4{SWJ}SxPl+hS(KHoY3;g$X#6nxL&v$ zdut0QuyNz&=8~;yyluR}<7DBDo>E(#MUz0*;Lj6{W`W_W^evJQvO|I6w#{Z=jOYe2 zJL4T7U10O;8N=MQug7HT$FyT^m28NriaW(xCSUiGdN`J2jt6CR&D>*4Lqo9+VxiJUC+CE#Z!8gqA`Ga%rL{(VYy@1f2D9Gt`0*Y$6LEFmWJ$^BeaJfBtY?RXDY3mXwjF(eb)bJpuFjZ&s*y3=p^kms>?Z66@o_WLYwK@`Rg7JqSf<)Xl7c|cO(t=f)}u(*A3D2Sze}+BqIBvaFCc5v!>$Q@ zD-uH!O@1&Mpfp_{jTjZi6Q^u6q~<^L{M;RSvC&pR?txp(+k5oM1 z#Bl%mHRYhH?LoC5TRKUKTEpNgKvn2g)*A-bBf`e-LE-b6S4FrzWIw6s*9%C+C+dO^ zz3(|QdGWDnh?YJOa4KK99VxR7eR$p5(C(LpN*wN(syiC03=0V+awpb8pk;!|s_V?P zbbG+C(DLkYwsG70r;s`KEy642>! zm4Ju`97zQJpmfO;!auh;FSHfl?|}rc2W!3?`;0>4bDBq-b%#Ag$*J%wMx8^@{Jiug z+t0x08>q-ygIK%Y4qnn|HXPw}9WD@upTnuoRO52)#19rb*>4HD6K}oo$XL*D@QC_$ zFn*WQb(Tazy_24EA3gJ;S28YRU}B=E>t!#6U+3NG9G`NH#rCPQ$VAMg{!?3#<)Z0Y z)coRt__`bU??Hu^4r3uI)c7Q3s>J_~?Or54A=C1as!Uwx9zFjy!r&;a<7jH^XeI=9 zFnbOFZZ2*hI~NZ-kV}J$SBQ&Ch>wr;x#i;8Wk8Ag9|D-IDHP)Ne+v>_+kwvlnSUz4 zZ6S^>#tvoxIhe7znUb+N6l_Jq&mq7e$PS|6<^uAvbMdhQxoK2^{4^Ghj&?$voGvad z9MFI0XMd(SY#q#3gO8sR0!aVKsA1s*GZ7N{U<-DFnb|lB34MA-;Q(OqQyb_1V*azH zkdTEL)ZD@m00eR40UUy!8IphH`7cHrYU*h54>D6hi}8$*{R>fo!pt1q?92fFxhhUO z8*}kGE#?1}M@i$E0s#4ed_25@f_!|;JP)PM2;RT)s6*Y&09=xiiFsoG?10w4rZm;$ z01&9P+4Jpl!fYI^ZOu6$#?DZ%tqq*>zc+@HOF+;R1mp!lOiY0$U;$$jejpeG<}owo hSRB2$NBh z0RU>^u^-G)U;0RJEk#*CS}g2DiRyO*J$T>t>V2LSAu0RW=u z006m5cFSAw7YCY!ilRK=`9E7;dr9)k2&RjYAshfejrxxwIojsD#4~Lw%gg9^Egky% zSDWY~){h&%%)v#UwOT5=g4xBFi0(Zj0h z=a+Vj{m(UaoMMZ7j~D6peXHuPBz;jn{b2il%ldjx?dor%fNRNLHnKz@U;==h$r=lY z?BZ42iT(9~wu@47|NJ)u1LLD;@AJ|1nd$)5m-~+4W3~5l4Kvywtk&mxcLzWT%aTK$ zKri$*q^1VcxS+CLk>+EPAb}gd_UQOye6um(mdjiuz~?a*_`1&yIfDxF#UoLq8p^i; z@+#RLO{;?M8^G|A$!(os*V*4dFBj8_-}9UGb0ymK$f~_N(0{Np>bS>_az~&0MQayU z%36d-eBWP!hav(oP#&_3%%m3h#!%pg3-ty7_GxHBkkRSV*m};1Bcpu%cfJeWe(w!2 zqA2EyRgGcd=e7kzPdNUU4iliSA+4WE-v{?3)(%u7aY7tK z^H2WB09|i9y<6%zgO|aQROGZEdoYV zEOvB#eoFIFSkXlV)!5LRS)X9(=!;}go@q=JR?YWw|$pi6z#H$%p%-ARC~VLn)8_o`}w&|tp1pg9Pv5pAaSw$c;g3^QnEHxo(00#BdsWyOCu+2?3r2^)D+x6 zDGkG0d4tN(clC)!tw{EklfZCYu`U_x)CHEJ=&ERxgmzq;9N$<&bz8HLwF~AkS<(u6 zuAn#~GcxH8uAb}bslce=(7@#!Jox(MVg#s`(k;zH%L*UJ2^_C@Cq^({fHo^S>tNo^ z)JHO>7g#t$spwerEaaEQ@8sy{AG7ZkRNAF{JrIophYm)^ml5AH@1DZfO+HDZ{9LNk zI~a~vj1LWMPY*>$T6wj5Z2hK|X*uBc1%+S#u^;8*B#z-5F?KiZAkrW)Wb>~f&Q=K+ zrha6E(M83?PV*7fqTs0nRT}dJqGr;>JHs4iVy>M>^eG?3IqdxIsmOxfRZuEhw6;V1 zVfzGQ9Ge$GUn~gErXbL1fS1Cnq;JDB@DD))Ms*7pIpGiLkZZsKp+GMU_AHTbtYfgd zLki|k3)QyI1lcN)Z{&HsP9dzX-TXgAlzcSo2%ncOc}x7vXi(G;+vEHg<-CYRsoMn! z3qH*gpHdaFvZvxa8D!v4Zg9nwpQ|FK9EgAS^dt` z16wT#i|^L;+v&3aqtF|Z8 zcHj9G^o4WaGOg0^iL2varhEot8R>b|0^4xWaTABU*ufZ%7@X)`^sl@u)o(#ToBZU$ zaZyicogNq}%@OWx30cSc34#5cz{K41B!VAQYp6?&@ zvcIYF-|W5jr2r-pkF#3yTBXC^hH>A-JFQ)G)(5c5tu|CtMnTIFvJ?FM*t#kQe65XN z>i8EOe6n>zPki#zBh@5O(7A*|8e{E3nMBT}n8aDqL%pB)yRwot*0Lw05Q9+}VuKqJ zop(|-NW;4sysxU!yRd?2Ezx`JbzcGBx1Rc`W=Ld{(;etQrt^XxQC4D zCmw}r9-q%P!|7%-tIPy=@x75{QAI3qsRW82!Nxu6KM>nvGOzEjGT5_kgF4`H|Cjg2 z%ddV6;jKtdL_vp^qxJ;37fP4;(ug8;s`= zTg)GOpB(9X*)(twz1Af3%>KmqaZ!$7Egd$DUbAwo(e?mS&uk9vo`2jQ;2SRcMa!$& zvkLH#srGk>DUeUXTlhFRVCjT|GDD2}b3IWwbFs9!6*|E5Q#hG|&u*zNg(-yc@}I1p ze)}Hcmw{b-q^0qhR$vk3C&48-;5FihU$w@R)M?|I`}+96AS3?yMm_}JC>J)ucO&p$cWy@p0m-=wE_;ZP2XCA#7Umnj`35LDUi z%1#Y!R~9EX zl&ky`SNStuCGYj^>9kcP*r3`kfaoAGh72(5LThs};o#)7V)(VU z%xMgrA_JxY!u+``tK$lb3-kk_!jHdXeQ~lRaZP8pmcZfcP$vU&L7N&7BO(s}HzDv6s zuT|8zc=R}pszQU4IJqQhee#cO84#5|Y~%HX8=tfEbE^LPfY&1xIAnC@Kfi1AqZXhP zzh%P3wiCO&>{k{yYh^q$nAVb?02c15&I)t#U<2nH-vjk!EkM@Q6!a*lV^<|DtfM$Acx7!*9o_!EnjD`S;bYh$Kz4>iu^ z1&0gH>xb0U$}$1eavb=$>`ONJ=H(x~5catJ%(4*@dUv0evA3_^W$Y3S0KEico zI-=$HD*zoU=*ihy`~@Sat?DxXb-~*6EA) z2LQSthED{e#j!AGIF{*X@q1g-Jlh0PDr${>zzmLwk!pTm?U2F=xKQtw!1uEc-3q8} zLfDU+jh7ESAXRs{GkI}>tZ%u?<)Jw0y3$-IHvYQ}+!>(nfT-Y`8g+9Ts-LMI&~;Nv zns{evITVR#*?qm=GvW>U2}lhGbGMwK=hdg~2;wmj4;;ml+hJa@dz_~esKx>4gf93Y zMOrYvNE^EJl@1&7HM@$?BO}tX!C#T-uc;V8z12m#1ZQE4iCIC6fCfQ@;>?Bzj>$i} zfifJ9jPd;UCX8{LyBV+2QJyKjbej^5W1l7fIiv-%luD!Jnpk|$T0puO6QntP2+$t&V;zdr&^vsAHR1rijFy{pPFLAMY{Ow z-WP1pgEqHQPSFU9A+uXR042o14^4w%(*r|lbcCrp+lzQltzz13`y1sTq!&AsH3&xc zdi!mRa4~nR$JPy(S~sXy9d|shYvv$BJqznyGL>pz+$Qt05v1Ooo4YMf%zpFkh^+~S zv5|i;o&ntc4@Y3pI1c~$jMzXD%jIVpL6d2uC)O#lL|W;kprWZ;WNMbE9gW+~35;g5 zrAF&Qawo!kuYyb{5-tv3*T4LQYg4wbURMi~-ern7ab8Gew1&f1djybnFl^96FT-*E z1Tb7#tv_toL{%rU9Dh`Z@{B;23EvJ!ygy@v`98Zr|HAQsj$D zD1R?|%f?6UZ%~B0IvUJkxuD>`M$kM33qoCqQPm12Kv-0-Z$4po(??N<-%P6~NO?x9 z(zRz@G|V6V6fwCz`2OoT&x{jT#aPqbS#MUo>)fKNm@DE0p$XLiJj&mGXngm|!GY!OdzE@uPhuCN^%d~aY`zaz@2wD+^ADc6Q1QYE0KAC_3)(YNmR4*sS! zv>A@>{NXWi&aC5W`txd*g;b^Lhn9hBh~{p76Zb6gm1(RGOd7kn%%M$@iNA9m7JUx)NSoW!ru7>hh;q}J7J zZ(g|;LWG>ZWQ*D?2<}q*IfRM*Sr&CaU)*84!HRm16G%3al~-+EZ4 zm@aa`5G5581V(2%o3}oPFxhsB2y2De-yGU9a@w?QL-(FMa8=oIkLY2L0;~O0;tUo4 zlS73Gk$6vV5K6T8%^ltInFL`IuxnU30A)+N%5OQ=(RrhVT??sBTd)XWhXevA7;#)=zR)qG8M!Bf~n?QFXRhxu2#Ll z($-@e*_;&0=%dfiF>`6V!ffHyvbjA96cwCj9ep9c86xf~CI_thJ`p9&W4eYD7~ynd zqFcnAh@VR&p4ej0kFag0FPC~RR6x)f+~CgCotAMfx^PLbr{#n9l51wXvzV@$NGe_f z110jxt3DKyc)$5^1(sZ*P^1mZ&Km@m<6?AMhX;6&TAEDlOBI+wS(9Ms<4B)Bka%p| zk2`%XDe*j{ri*e~gN+Si@Kfolah)V9pRq3}SALdR}-l3TdQNPY;>%rP;Qx!6)5`Fq{i~S^3C9*wZLM7oLv?UrWYcj!7)%m%i=4 zl`>rS>6XH<6AnDTOV94y;q&P0v+2OkPry&k zY$hJPNgffU!{ILl5}U*DHzWb~UsbMoC9WNw>DOwg8x9OXud2_fD3u6R*Et=~+rZMZ9qnL@e^QsWCaXX1ao6lFUhfOzNd|s?eONe` zKak%hv8$cIb7W^`C$atW9FGt%GE(r|v6jSyRL(Nt1+1cZ#eXU~AGFPq=+@Qni>fdx!pybp}>Pj9?19P0?eHd;U z^P&lZZr;&Y|KsJ+Z`g0mud=a}S;Z{iD>UR+Fwn=ZMj`Zko_`jMnPu+&I^qR4U8*A# zo@{^3`qsmL&v|3X3 zU55E!@9%nFx3f`tR`XIa7I!gJzhrV*jKWTO1M!E55`N@>m9CZ4(oyi z+H<0UcPkNM&F{`^9({(Gaxs?M&SCIF8eXG)=6RbbZ?5yo{qar8>^bvs7}>_#R{S?zxpV5+aqt-cyBI z2lIcV@s2`HPAS*=5#~aMoRhLJ(;pqwK7l(!{>u`FDAr)I0XAH!Sh{SbhAi=e6HeSZ8Do_AN4GMFY$Rm+qO7S+Gs-b5+U z(ReC$)1KOx?T_|clKVvVIju1-8E?GUu#szpj~J;nxZBW~yO=SJAxT;dQe?b`kX88iQ+M2<|D(7b0mV%JXy@wq$q`<@`k{*@D=5k;9sh5yJ+Npm|Jcw zVrblI-}=rhGT%hM6-Z4JbI+`u)wYJ@!Cu2R3=DEdnMak1WEe=DhSPdY(^2>m=Kgk| zn}bAg*oVjd=8>+HmudoXY!)A=TnMcQo3g(Z(znW($tNt3{*yUsx_v9tvD55yTNPC6 zf+7s?dy06*pL?HP%~K|}z}ueO*9!1P4Vq~#`&*RVY2OO9`n7Qf|B~u(RW`wsG!~Yl zC1z06!{CY@T4-Eeo>~`uoE7rwQU@7Q)uXhMY5rP`a_VwNy1~BN{IUmL>inRubdkaI za@}!8ionW`Kw|Uy(LgQfmnPkqaz75(9mfiV@vZ<|9DP|;^rOspgRtGbeU+LD*Z#zs zi;Ny`Q|$Hc&+lK_))A)4N96IzBLk8SmkH5}wQYy~*NGhXE zp)ka-<-t?;2fMYK`WtIMwWE$va{5Ll8fW=Q$nG-0%t0t)GUsNlAMuG_~@NY!! z&-dB2VF41(y;_Y)krE=CAy-Ft7U((hWuxaw5s~Fg9bm0Q=zc|U;`d)I7ut6PFV9qu z(1<8W#0`LSzd0!#q0a*)FXjpeTMvA46Qu{Df2@eriXwt!*=|koMLV78 zv@yRj4tnG6jO_GSevZ1L4FeW8@gKFyC1-|FOQkag1}WZzrx*(HUNncj`SFZIPRuh& z!Y}BkeB`-taf8i1dC2U)bSow{k4A@QZWAg>CGmrWM>yoC-_A*WNYS!3yW`Ivy}@`bjdC~F|*?KdScMWra`b297l#2&XF9YpHA z8GDzRw`cIGtdiHBCq1h`OR9wx4$ItG0TskvDkeANu;YCVwFMeOvQHq%(y6ULDR~g+ zg5j@vF^%naPqXxXFD|(&mCvm;VYBf^0kNn1DU>UR;>gM?ade!Zb(IZ21O z$YAHmS1k(@BPp3j#v}Rmur+nJZESv`SC)7x2YXJDrFg{O_0oUpqASr#+8pZxoUpD_|AIh6Qq#Zcvlipq~al|nymO-h#ygu7u!w%+&6#KQ4sQmA#JD)A7bgamStrPFCLhmJSRn)|&^%)y6NKDk-$gG#eE#0<|_& ztD5%k@nQ?3A^RPmiMJJ2Umshmyp}@}nl>L*&%C&XS&3Y&--X>4%D03Q;iCE;gSBT> z?n7L=NaM{|2`JkoFSCbW-zJte$4j`R{9Ve@9Q~rLX^Vn%xiYCOV>OoYh|28#pBx|R z!XEbtGBu_~%Nv&wI~U5o)fi4F-qK0sk6HVHE^{b0nz%{l2rwBZUg%(E;-VdwlR6^c;Fw8hgYGAy zWR5khZwdtPzL~*Tx{euP^17JpCe-LX-1(+evDBxt%I?Thu(af>gjOH7OZ}_I)lH6_ z6_FeKv1fRj?SSA`m?OzcannL_3Jul2Z#R_ePmDqW&?*tB!X2iEt9Sg1r|{COtb+_+ zjzgO0r8NI|Uj4>v`UrcARoJtvS2pYKz1tcl+H(5SCOsMRPq7Qn5lDUnT{*Jl0Vmt~ zzvaWv>BP@6b!iH-$)re$|#QM|FV3!jPcsIq`L2jL(r@Hwo97)Gxv~h>) z&qKugo=M&Kk2y?A!z#OCi*Yfe3BKWO!7v^y8IC`r%WkL}2kFIO3ZO5`U+L2i2;+fO zI7!?0z+i#_d}ksGys0i>mb<8Uv*;Kc%NE3m50x~evQUvAfLeo&c<4!$CLu*%%4K;F zOrD+|DrC+yC%im&X-s(H4;VZ5yjaTK7}w-EkN+ZEGNusnSILp5UaM_Gp8TTB#Q<%< zx@84gQ9qu(QY|vcD%-|tG~chXrY{i~t1!DvzLU)$>>+rKJ}?SaN<;D&H=a;itIc)k z($P#};YXvOJMK0DG*kDngN68R_N$1?CDJD04HBbM(EwkiY}T-fUZ0Y|9mQE!WoF}q zSAx!77B{F!q$Ih)SfwI}FBec{QnskLh>ve19Zs*&r@gm0%q05_%un-asA)(qYfjjo zz>0^me9T{rXtiwg#(kaYPAG`3SpVQ>SR)YLM=?GYXjP90G_eDvq{^W#I%Kgj8{rPcvw=H`SM6%WGFH7WPgUimkCBmI?de`%*81vC0k zJ%iBe&R{q{K)jWn?XsP0o#5>oM@)hYXt3B)vbS6b?wL1(UX@GwoQmAEuaf7|g?3&E zL2PmyLN_=e}8tKegnhi);OeG$h2o<;T8DE(j$jLn0Iw&5F<3j34d@D+?%LbS4M_mLo}nn1arI)L3pjTPl0#b zw%&Y}iEK}0xjyl@@T}KQbq6B8Y03vQJAvgskg6ipb!K`>!(ai?>Ixu8oa+~T(Uw?Z z(_Ph(S3l*;+vSlMxQs(ZLyrjk_N_=V#v>gqc4ufQqc$!5U75G62m1$|vJZPEMwN@i zlihYMNS8mHE%gp{sW>;{SrqA1?j%?~-`5B5Q}XIk`P$(}ON_aVi}EYe z3xjn**V#XtjRI(4AjBP`RKM;61ot>owPZA63(>t5%$R=_*Y8RCCzMn;7t7dk|MFE;oJ>`G zvk5=LOK>*#!|6q>YkMh-|4u*rn#AnOx4<9$8eIE!k0eICLj_#_Kk>^Qen!d3ds2Em zjH3VY4-m7vf`Pl0xx2NfrJMDO0r2zjgSq)2++aQ(J^@iaK2a!?^QGnE`^yZB{a*qc zovrL_y#Mb3DPC>hmw?y*$pCk@arZQLvj!+Tn!~Ks%wcwx_8>tXAs%6F5fDEgSb&=k z$_?fRy#)(`Y~9^mM0t5VJw18s{)2we7c`Hv8*Js{;R_*v;y;W!wg^WHQBiqkON67f zle?&><_i=K0GB+s^8Rm_|DID+)YjS#X6p_Bi}2$E+`?Zl@&mU?@aDSQrXrhdh?PK=A(y zkG7qUHGof6Hl;xF;Kil)UtGFc$^aWX2kV#J=XG>)cW{RB+L(LTSvotxdH-i&c=?2c ztwg{AA~qIQU<*qja|=PRrHCcO+8oLU6@~~1@w`Ovyv%Q7U1a_x13+0pUA|J*Eabld DwLxLR diff --git a/packages/bridge/public/apple-icon-144x144.png b/packages/bridge/public/apple-icon-144x144.png deleted file mode 100644 index a1867131d2401e67de421e7bc53e6c4d32b611f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13104 zcmb7r1yCKq)93PVw-8*CpuyeY;ch{Ly99TKhih;RZo%E%B?NcpVZk-Q?f8FnRrlRh z-Bn#}_jJwluVr?(c59}3B9s-S&{2p`002Ojkrw~*Cgc9YNC1ld9Qt1|$=NBoCjY%R0i>{$wA#6{FRR!)7r=YDFc zZ=Snv*i)zLj>uEXBeg0hW5Y!)42sskYpfPwcc_(Wh$JAZLz9O4|%O_v2pOOQ(g54x)tTu%NI-bn{Nb+~MNzCVFOvCFF z1zLl(cETPyAO=?XUuOlffnya3(}0-DA(_rLQTJlvLZa|)Jm+dcgaNTw|5j84CvP)( zPY`B~*R-Eu5X`?%+%LRk3@nc`U6mBs^gWoc9&B(K=)`O+9(Sp*wIGNi91$#tW#PpB zHv4l#Lu6?i##M&tCmAOl(r2-ao};8u z&AG9D^xZhO0GRj}4|D>;aonirWVnkY6Q9K)^HIAQMlW6NooQQW44QInfEDB;L{wB9 z;mQWm>6gdxf;N{tL}eAEq`ry*H)tv5Z0$EdTud9tbK99aopP|fiC9CLGzq%93k42x zHZP2%^>Rg}}L7hHK&ZhIYw2?0@z++2Ke?4~#W1BFSC5AC+mSI5*-5DX2oH~JR zQi=KkX9LCKiol^1hXe@D23RE0M4}y>V9X#285w^~)@^uUlS^jlK)6CKU2Y~1uyp-= z5G1InogUB)OYZtvvmV|C0XMFaU<}&^3BqGw$lA}P)(Yt<2cMC!4j}wiu@h6r(_wOJ zkQ1v#B7;xPM-n<+VTZ5y!>nu~P)-9Ifv!kwx7V!nh^+q3nm`|uk^{NSkWq*%7gH-+ z`rrV&#xjwkpBLq8VkiP-^2SWIXLo+#t=p8sL7ojVjxEL4KOn!9ikwX>p!1HDd?4S@ z8v7m}q>nP92&dt`mR@81kf%)CXOX)s|0%THgF9lT6t1}vu4IKP-o;dz+pc?8Us|=Y zpCP#ll@O|d4^vvzm5($X5j-_%sx~jFndpYZ6O+KR>RGE)i^{P;-;(YGCu3@g1dPFK ze2z0nuN1o3GeODC@pzPC(GskyR9jXL(8S@9l9rS-pB60n6nX5p6Dk{v!;o(Y;B&0@ zF~(UYrfJV;1gQ}cklSGM-6gc-)I`Xyl$Ke42FsGMs5VkbE31-gXY-`V)^#t#bR;WL zrzw^xN(_1)orWurjIUTXbqJZl#y+J3iyHB_&a)Bf&SNp}1@NDWF$<&zjf-r8M&Pk@ z6?+vS61Hd-3^pGRp==6{D?~ZVgvOHuEx-Sq7`kMKPd3nU@=WU!72n|ZLw-=trtsRu znr6U#O=DB$hX|@{fh0QMzQnwor_raPrq!&O6UptmmGEED#mHo&y|Z?Ofw}>UNXKU= z6=%y2I~w~cFb9L(k47XdzA;W`HpCK4a2MYo`x2@#N8f)KNB@)0G1q`24$`7t9Ki=t z2v>uwa}|!GafCr0@;e?Bc(k+E|4yru!}L0ziHoH^f**DNC3Hm^4_Bk*ix(^9wuZ0C zj?UAz=t1raR!IbURDc7s?q}>ZcTmlB#2$yJ{>MOizG~he3;;i4BbrCcC4QqN{LPC^+%guQjj}_Ih;Hh0Web+$%>oGwb zA*I6@6UyvTmMCfjodys85vp_Q4RpH@pHiHx%Vw%n;`=E@vFxx4me7!D2_^zzNd_^d zqay#iJcmx!cECs@c;pup?$`bu&MIJvkIs=l@=fl$RdtyEb8mcm6gfsNz$r(jAY~_R zU$q(qEduF^I29MVn$?Un^dAl6UsIJ}Ye~8@afvm~qzrtEMhSARaz3CkAv)@I+>GZR zHf&N1@Q(6vJYYg_#|suUKaq8iRcze!ld#BMU}sw~noup8Zw&x{El)j43c2LJ|1oyR z6K9`;8Pi&7~j8;1CE9#Sov6 z-W6nY9ipTq&DpK~F}aXf9^(eP{$_&5A(gJthj9!+YMY(xk-Bx4Kx6>@YY@~c46k}u zu-G<2(qjj7E6cSOq~N~KxZU(tmM3`+Y0>UgSPP9r1w8Ra{$hnEgK8`k4JGxXnm^1_ zH8ZMa5hCHxu;#N)hSEi6zhmVrfhy-xVI6WXM`l3h79&3?_l?~m)A#Pbdms>4j?SGY z{CRE?A{f`8qzpCH=MDd;G)KpO@nI2P7kLG72OTiR=(YP$RTkn7uyx-?lk-wiFWAEB zJuJi)OqkMt_QUBZm(G-ebOk!DQZllti@76gLt_2rVHW@P1RJea^ZsbHPzo~Zuj*Q| zV<6RoD^PzojzQE680aBzE9jdIb$JQ5?};55G)1v>nidA7YofW%SkX@lnG6fB|AqMj zXZPtoDhh9TJaVv8=_${3Yda3-V8-BH4hs*Isr`OU{X;dJBgT?jB0-Bq@R6yr5hL~I z^$BcszCXIo7HLrrLmh=faaqRGA{G-u`{|{!jdVW{HBNDhT(P8$yd`YoS$H~Sl@kiv z20qFzyK zV(kLb>a*@?Bkr58&g>NWRbZun=XRMP989R8jM{|Vg4BZt zH)*|&zOf`3<7IXIOPfr2=nE2ibm_C=ujP+4^a)D~TC4*hxQ}i9IP1wqxvIqIp$$Ji z7d+6c9?fI-l|`k;)U2H+spZ1r+8YMf9(!(A2H)85R(tDoXtT6u?LPh8e}NhWAZm$$ zI{&mOL8G7fFN$`~)-ihJ09}|1-DH%m4ac8U>QPv3FceiW6%F@1b+X|@lq;qTy(J5o zAh+uy6v`4t7s`j%Jpa;1yF&2MR9BT9&@#Bp+#J+S!QA8vIYozAFjPLSa$rf^-ksqS z9HMEH)U|E>V-l{3@{RGL6T3Sya#f@Q=3{$nDN~n*u)`8GqQLyHxcZS&{PUj-Gyc!| zXi(X_%>A2uOD(NP*7pGInUsjC$yvtLohfQ}xSVm@X5UH73+Zzfo7lYBw^;<*DPC+P z8<%76-#I%~-`{h|F$`g~myEgOM-7K+9faOHxRfs+#YK3rJ;x)8En@{>9Z$=kHC%qX zNBILf35D)k>$RHH9`-yrE4>7K0%5XH1-y42sjy*2eSxE>uCn#+16O)A-ode%F4~|y z;Am8;4D4yRMY+l;+OsfKQ;Dm!8_7E$jp3VSd~Vq15=(HP81S`xkDHj~{u%vWg7%j#K*Va*PtcEIW;YjtJ}V+;pfaw)2}hX$yq!;riFnBjJwL8?W9 z?tugG`*Wm(!L^81tg=g0;sigEB_R_DD;EF$&WuPey?{(NmW1PY1(9*^&LtX!baB&e ztgaLvvv`V6E?UqosJy(XWi)c=3XnvXDC)*^L?;s=)b#nlP>4>!IkwRIUU?7vWrx(E zR2iO@ff_IDE(e-B*TFdz)C7b}c66One^b>jr*MxNVTRQ6zt`1!y7-RB<&eb#;ZgQCiAS18O)#Ep1g>ceps4}8s_aVUww{BnFoqva0I|QA)aJSvEa+$stw6v)GZ0 z((Q`^V;`O9!>v&qhhG$2w?23eV}UF7Y~J|@_hi{L9WB-F{}$gz#`Q-tnZ~-F_t~G@ z_MrFz>0}os?6E5Jp>VM;Nnv40k?48)`be5RQdkkw*RsnGW?R6@3X)m)u zUW;*5&6n(oKiV_5vQ$wu{#SCYt!xzKE@z#=28|BO>%bsa-Z*P75~n|Is>*&;oHkc^qy596UbWI} zFGMhDHQYu^UFGOXamqzozrp*ujr=ju7vZP6Mo2^uv zBwFIF^hn}l{n9MXmrG}d4t0oN(f&slZqvvDS>Fy*Th}(A`qp2ypy*fbFfEZmbc2-0 zLCX2d|51E`UZnN|>ks;1%pfOviq|3tdH=6WW+uLx4^UPBMk@rmP9cohy9^mia#E#p zyh1E8W=5qz1L=HMMt@1zLW=%D{KYUqTANjs9gY3B1`dvkH-Tw^G@*Xhp%HQcag^5r z-3`r|j=6!tr;02lGe?=Jpn}sFF9`?DASn`Io7TWNr#H0?X+jfITHbh{6D`5xB zv;>tA6xspSRb3TLjQ~PrYkjs!*?nEO~)oQVax>qIHz%o)#>_nAUO% zH3wBfNozA!v|zvtp`=c0Bp~2Eq^DwhoR5St4d2jAW6YUeLfLvy6b_y~cPs$JAS*Hm z3Y<5B9+_jIIwWcdhKOSus-XU12iQe=NqVRmS^!=|bMbU^s9u_VSpSM91RiEtfFSD~ z#?u~%HZTyhK=?-sEM8O6BN|@!wTME6o+9I&rt{n~^+|QPtJz-?db0pbfxjWdC}b3O z0bBt*&(^VGSu%`}WrooctQ0ixn1(XG7voG1mbs%hO^MjXGR0DZUq)8Zcux9)ASCMD zSkh`eb(w|jdf~7@R5=w4OjUGYaD#x&E0J$sZ=Ot}LF6>2a;vc|l11Dy1$yL7>%3m1 z+qZ=WHJ~bY9K9NLf|--5XyvE8Q?v$>@_W0@B%{dO@Z`aY#@`>hlXzoEtM!!@vAqw9b*TSMgro+?GO8%$}9YqiK&aNR2&VPxEC zWpnl1&lu}1r4>=EBla68;gpuo+9d_PZR+^X+~2=%husMZ3tx(e@-T}+ARd?^v{gRD zOAm4q?$L=Ema#{?z~A5WS=~-K_uUu*9o$7a15c_6N=gL;h#IkInx_(BAA?lLMR;7- zxDgZwEq}NWZJe-{7bMfM&asD@r|Inu99FNm9Xw_z>_m^S%EqJewoyn@XdATaXb3jA zLzOVDUAx#o#o`z|;r}iI|57S)6jgnw9;Kt0__)j9;FyI)F7TRiJFheG8b%DtH8Rm{ zX+?@LfiDf%`l4LeP=lU7cVqt;+s4Y!uTWG0M=yDQ8rgP}@zDOqLZX9V)?S;x_T`B@ zn#&q?1;aL_o~y0=4|5)-wm<55#PifXW6o`{hoAgEyZ~XzO-SfK?2kvp!`B!NmJ8oW|+Za`q#)^x}mxbPZCU0S--#AF>|s0Szo_tz&xYKBelC%U*vC@23Q z#6<*YcVWmwg4@1vKN=UWjxpb~7l_3kM+0QNIKRyhg8!3^kgS7Pel72h_ zq|&qCEJ}r-4H@#H(wpbYj`*%SZ>S?T*G3NGJ0DDX{is%fL{rb+915r^o z+JuPbj&X)41mE*(%Zq6CJf*MQLu2&sLp^i@d2pR;CW`#oMx!Ar?s$P+&FYd>$TN8~ z1BT@ISbJ(!A|bUmQ>CB{iGoQ)N&q~9e>`Jq(c9PU!nd=hvoYKPb}v@xIGo=k5X@j9 zQS#46I+N_}-29i2`m1>Jl7AQuEV+}x{IZ5M)Yfyz;KK`%6Y&&v`^Ss;97z32{2^B2 zb02BMr+p(GA*$gtzEkSVl<8KQQ;!gSY+r##t_lI;_M_cnKlXpfwLb31eI*kbRsUSt z=7kP1JVLOFb)=GVN2XY6DOq{l)%c);iqx^TWyK~fprT?L4=X9O@BWB?%9{!Qwr<>yi`gY!|sAXMd8 z2r>J&dDOo+&90aCZ^;IKmt2LYpzY=NMRbhv#vc@VAx{mFUvjr?`n@B`6W;RuQVJJZ zfVK&~7z6nb4LmFPUH(2Yc-{Y`X_4u5XPxSULB3j#sKkF*ND6;P2c)9bd^$ahHfQ)a zQx7M?&EFRtdHW>Jy0%Yhj@#a(w#O=10XmeaZ@ zrLJ&=syHwB<+t^e)t@0PYYv%zWWZuR^b@?$Yo^hYomUA8JcX1&y5Y+iJFDDcR ztJV9Sfy|&c>VroSmXh>9sN(ejIjmK_^D~BX648jET&NAVrK=iEnC_uRLIwH~TqJn1 z@N_{Tg)Rb@TKdf1;*k=WUqoqlJe&r1rqp|L)snaS1ox_wVpDo63?`kNDcqw3&Axs2 z?;YF3KzfS>VlX~ziyDMRyp~7eLajKu)QY7YCZc|TQbO4_>t7VY4U*~4rnIA|oc0tL zi%(vQKj0jpQqKywC7MB`Sj8GDzOQk|b-!2=%4Q)G=X%DjIDX9GI^ZWZWufrTe}y0N zu7eKZ01(7o_sVfCcGfZTWF00+6YRh`!tOKw0XM;%k)KYsYC;iNe)5_FD~W{yDTpIa z(VMuyfNGCz$ISDU@ez&(-sTW8RUU70kkZ}ekxrBr{VA1XPQ%C7R6i-=2>a!gaNU-D#1r%Dqh;v^Su{SLD!HHQ23 zaU>&bij8!H7ZI|60sRjzY7lGqCoISyc{Qx~F#;CQaf;_Ic7zt3i9yGV=unE39Y-1x z#%5ZKz*=4%-;hRsfZ@_(ww+wV%?Z8OKH1H#y0t3z73< z9d9Z=MiJ7E`BN5GuC7`TdA7_~Fv`Ytz6B{UVD)gVcPpZCbB2|q3ADfs;Ck(6Eu7U? zvWEv4Lfs}BkUEx(GE{KOEKHT)h$G2DjHAU1jclH7C67knS!=Jfi3J{_6TulyGgYkz zNG@i{qh!S*ymo;I@Gle;^dk9ub%iuZfg=+Y1AQL8Y{vK;9*)vS z2WoL4^rXjt;>GT^t>*tEfrA8Wxb?0t)$ORAJg$iGOTWAe{~a>E9Bz3Z=38Ir_0xwY zjpJJ}iR%s?u4H*qeBpt5gmm^`+!onzP4J}K*CeFQ*+kOQEZMJ77>1M~2y`R5_*2Q} zg*wAI;_kYAt6VdjPljB%Rd1 z&mf=zE=O`JLg;vhD@ZnsB?Bw#*2p}v8?kK@=Bq~eZhEc}xsa5T8f2n{q1iCU;3Dg< za*ECR`yw)FsWIqq{(|EBqmgu#(7=d=lgTBs~kxxVes2c z;QQ4saWQXyKb@1%Za0>25Ka~Mv-$LaM1#wA$hhm_u5bA_j4t)SpgTHs9LATHfTZ>Z)b7sVg z&&rB9+Fr35h}MJwdSM@F3nS{_egvIKDO3V9bH*k9Hk1}pYb#|X_7)(^&UPaZNoh9O zlyxJiM{$0c!8o-cRoG`5&9cfheM1MXlrKWG<>h}f{A`v6h0D%|tRE7)Jy7-kjV!gsw`fL=Z)AWz~&h0p@c}w_7hJlGnJ=Q~I7UbH;4) zdZ);7YO#NC8Sx(CkB{b*7B%Jfq|~VLHZ!%~HMAulvmEJ-q?5E0Vm=-d?xeG#Dhn?*8{HWMBBYXz7chUxo2?)yH>%n`jrN1~M!_9;_lPJWcy| z5|t(YW4XS^7PnYFz08FMq6DO<#xzTlv~=d3UZ5C(VKIYR@~*uePBnX?E&WWBb~Ivx z)|WcBLU*CHv_fk=12_qW4%C&9cmDmk>4(%)+u8J#Z2u~GQi%x*eTLuT2A+uE4X$%9 zC0i&4-g)b?sb+FIGc=&FnTNwKco{DfNJT5V3xxDKJoFchmUK*v{y1hG$6aAe$ywmW zyuftPIF~wccShIIWf%3mHFPL87F$;us*7adh7nn_Y=2u3O~ZD=@jQR;dqq{wY!fi~mN!qV_68rW1`sg_l|6-{tr2P4SLmAlbh zEj8#{X$pS#IH%~pRsKoLedJU!#a7i3p%i))}5d(UtQqT?X@-T z7Vt3a2MP~4GDE9(dLLt9H$T(*GX|a`I3mCe4+*H|fmqqr=^E~QcmnC}6 zE(mC9S^p&7rEYMZ)U@Hs+5ECvbd(p{Z(+2$Tj9hUPW*M$z+HDU?ca^wt#M2wp=@ah z4RZ}oG87p^SXC5KP3x0;Oo5F8!w`x-TVknqBB@ql+;4UOTEb|3 zsl3ME{w{5&$$ZV!PdbVB6?8B|Ah~)`ulUb7SE9(Vu{~BIi=5G4JsVv85>nkGs%Pms zPo0NrTa^F4A+dUWkw3E8NWgmWeUzWE(UK?*wm^8~<1uym=EctBvd7zxB1_L81YAQ< zMKJsUMr|o27xlPj8YI2aQ;iAUCLiZVg1kRCXM{_`0j3-*)yH1sv-@Z9t#^DGF4@a{3w2}8W@C?FQ)T`Sg0v@?zknla!4MKAfHWAfHLN+w~QLlX7D1zJkNKEVWx z9dHZ^@=Z1Cx_JLQ2(`E7hC}=6(EWW<`FK_T`V`=D;3fm?p0e9NAacPBk85g3C}#aS zAt`lQ3!I7hg+^X$Hf$MtY`Z!;^b4R>dra~Epz^!#*0rypMzF9cU3GQBA8$S9n_(qr ztLBhrO4OSh7&=~v1z{p$F_xHkR8i2mS{B@GbRZ7)t;j%{>617?wJX_q_Fj?~=)z@F zH}LeK=RH5CFs$-E*tCB$qgc2ZT%lP*eBt!N&#!CT*tQF~wobkZ!8J9@Y3ecp+8)R^ zgUJPs1v>V-5GQ)_eKx7LLqM6xPG;uBQ3@D`hT3sa6b=O;1S5&OMI_NJ#g|u zxO=NX#|^X8Yy@~s3f~jyUqIaip6UJT6B$yGFALzZOCFcsvx`BSMuB6$Vm(1Q#YFQW5|qy!{K|z%?Lq@r8Mkz7LjpB2^(+2(Ux|v)5SCfjP_+}5T`h3 zrhi}?%kxB2)8diT`500oLox^K;#Tc`2LGb@+hx}&TA%OQY4-(ZpvF7dsTguBr`;XYd2Qd zbnk~%c&>~^esAuB{1#?Zc-d1d7#&wjTgbL}+bC~MWW=K3+5{n2*!yLXwY(2Er}Lfx zrs^Fu@Jp>icLC?XNBTCSAr@<$52a<{BB=OW2T(FqNu3nJrIA4p|G|MuK&r?PtR2-g96%MMc z4#XG!VL>?S2VMZE&i-y{EFHwo_hr%XnpfwN-N5TW9!v8}4QijN%kIBVAB$YoU<$Tu zJ~O$d99ZYw4hr!YbA=QAY+yeNm>qX03Ys0mxy6qo2;A2RC^J*vcW5cvoSforEFLm< ztZC&_rHDe-BpowVD!tU+!l_pcyJ`I7Y$k0UxWX~+77cA)a@ec9q;6OFvc}Xl&F!TD87p>+@cA6IaII%0X3^xR;2xJg#4mUre9V!L?ShKEYO8xR9^j2aMf$tOP zePPM%>SNC8grGA@I>_O6?#29Ir&57B+==Bd-D5sW2NiIPkwefi2KWgTK89fwu*U# z?=m<`uuw^meP)DD8P4^1^<;w7tkEjCS@4lnz+TwlIJN1NA&H)%1?a0>F=>{%(tOO< zt0rk$GdHBI4-z5hTH5zCHeS?dNGDpfW|uz=E@6_QOgEpNv>Yn?D!Ecz6FDd1c5YH% z+vm>15WC8urmocw^D9Qo+(Rt165(H{i*eDa@&L3xKqnEti#gPMtzep9(*FI2kSnAf zcaYP%ym<~^&Br>gwG|H@24MX%bNC|j)}N?Z@HoTm%Pt#$k5a=pQC-U{H3Y52i26}$ z&d?rDC{S7hUyrGL)$MY6q_WfWP1X>%VG@HYjsr2@*IzBmeUO=nWtPJmmxwlENt~!{ zWUG&R;P|3`t49p^2;C z*76rKLp+PSB;B#N+J_mHG`TK44^kV!^{JhHgtPq8u+36mx@X@@Skwo{lhQR$q>ey7 zxlJxK`15?d6$3UTdYNstZMvLm>*Bbdj*Cfg@Q*=Lh+VeKM|8WIO_P&(P+1T@mH;Pu zgt%d_5lW~frI*d_13JD{Tw<+Y6E;s7y%y;@aMLI*`?CUp_#|#I`XJu7zba>TLFvae zc0>G?DN?Mp;bNdd)sUF;Y4Fv3;H0GkEF2la9TQ3wvxHD9AFgMA_kGGWcxMWD_-k=8 z*tG1(Q{(Q(1+OVu6V=n?ht7%|UGx5X{n&={_SY1Zy!Ng0h8bkZa(?l?QL4H5=)nyw zMfV+PO^eUOmKqRHDOx&A6j!(-*p(A6fTz{+fJzNcsm+28#5_lT|7@9n#&@oQvVlBu z{pFa3rQoUEzg_5p1P4rhchl)%Xcn^!+Q;%>42S~k%!cp$l9LfMhe$`x*=E`MvFtXD zHEgrAG%^Bb&}A-+e*R`@oD0^;RSm)z)Ne#M(FJ_$&A1E`F7^um=W8ZmggQ`OWxerS$4db;#luj}OEi6$Oqd z-@)*RJtK%B^=Dq#6Fqa3fhNnGb0OWBry;A&`6}{%j3iC%v`2&DgzV1}VJTlvZP{e% zc}iqR*}H{lr_d+@VE;Wa;lZw}d_=whoIXL0;ake9-nAa#=XhyBzv6<)Jx4z+UG3p2 zlW9&e^)0@;_?V!R^>p@H4B*T|WYUn^Ehw|uRZq`(3~{WHuM~#B(lg-}mWp9^_ViI83m ze8y#CCE|n`WA%p?RBBHIkV|`LG}2-~_SD|RFIElbucpN?M84m7k`&7+`4~H~vyaHi z%Q!M|Kf9R9xu6D@==0yFQPpKACK7X+T5D%Wf?m}iTLU=9vxaIrrx5`EIDFQ1^9o%XqCJ!lo=6+gt{@_EGD;e$q zPAkfEM|yOytB3cAU>i)u*U0uNR!kT%r=#4$jBS4RZl5_j@^z@bFktxnWeUP2yYER9mn)|? zSjIo1W?0Jh%5kR0|7gL_mexJTW9soP&K+e>0X3dq6MWxlo#Uehh53Qvec;mj+Cj|o ze5>gu`Xe!JEoDwsS=f)N`s!M_jcoa)wv$G?vy7LX=7ymUa#)Uu0{3Z z&riYf!|ni&LmBi;b&n*k1EEJQgojh&SXCXjufFBfKW=rZGTG<4E1lo`HgfX)IQ~Xs zEf_6T+6Z5p*?8H9z0>92r)gT;)9=C_GmEHRbNT6?1864dnFjLT%2+xS@3D`akSPQF zt*?wdUTc(Jaz(3hQXi0UuG)@c(LEqP`?^~2XzGmd!%<=E8v8wjZr-aO5arEomTkLy zgSpY~Gq56O2sawl`bRvP@uNU=McMjx&+H|+}DvVDQEV}4# zYam|3VN;vxn&HqYH9(rB@3b=}w#p@61$}AEHTtgNXTzOdxvG!E&mmVJ1eTyTcY-S> zxLeCtqJ+MQ7FZ*2FD-J5BFm_S#p>06M_(Nk)~j_hOU%(#a+IHya`DURELkL97&M~r z@ya}XOOe-(TKM@qR?q_t44i+s@CKS9M^ur}vkZtC0o>qS_B55Mr}^(NN&wakt_L^d z75>8UGO1td-@{3&AKe;C8ohJ}Wb!7C8B&r?cGj2nP54eHpU{x7eFz!h7p_HF8d20g zDNdUswj2I&*y`DeE$Yu80oWf-76e6Kbw|U5ByA*wYR;Rj{b6b}!>iBeyvdfoDD{;4 zUw5FxD#2lyDjT_Hj627@)09J0=)w^+O}IAIw$Rfr4&H1f<28+9lX*2Q{aJ+(Hk6$$ zzsh&#%(8*vAS$?Zk=7{xyW#(vUN?(hVW(bhqMnu$!r#s?P`OBGxtJQcnDLo7nY{^s zjfIVsk%gU+l|_w(gO7!UkCT)Btz}`^qk{YXzZuxtn_8KB{@)FfJUUq43?%;(!P(y2 z#ofrs43M!kvM^IHvam9-rr=`YX5wMwrC?)W8;A3WXcXwy9 z`Vabz-_T6%;I!OGUm#nZtI_^+&( z9qcTG>ogSq4?hZOZzzD3i;s> l6LvErP8Locb`EZ)Hw&h>{Ggk>i*FGC83{%4DpAA0{{anj!gT-u diff --git a/packages/bridge/public/apple-icon-152x152.png b/packages/bridge/public/apple-icon-152x152.png deleted file mode 100644 index fda24bae54d3a31dec3d7318ac53be8dd875c27d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14195 zcmb8W1yCJ97cMxsOK^8W2<{e~;2tcvyX(a-8r&^7A-D(kiv)LfcXtT-_+M?+{`;zS z_r03x?&&_?`A$zy&2-P{IpNBRQfSCT$N&JK$w*76zL#nLNr>?8IYBoC<$D2ZA*vt> z05!2F&qi?Xbto5ADKVgOjO6gWLSZ7UssI399{~Uy3;>VsP2d9naAO64BSQe-e`mvY z%xqEl@-BckmXneI-u`pswihM7w;(x6e|G@@xbXiZC_BrncYV%183|D}(9)@|ceS~u z`u=%i=lNPj;dB<}2OM*f5gWu`f%)(OUm%}R2tJ5a|ISZ|Qa9N&L8W9V|4CFYf*LOZ zipu4(&MZ}7!=%KFr$?%iB_ff;f}aYLMv(d{PI0K{(eku*zHIZl;9b!^C$xXZuv%k& zbW-~J++$40yQ=-pp=w_LiNx^px1U35h3v^C@@D^=r&n*{oB6Yok#7&!5Ry39useAQ z7z(HW3TyzDg5s8F;L)Mt{L>f?aR7k%VmFQmd+M2|wO-?Ar*z!xt>T`TDze>Zd}4=edUnN^X8{ zJ|hAVhNoQ!mykq1bbwWO5z=xanA44gGT_Vy(?kk!2N>vD*Zt?Hc+Uz1eAHs9@)UH0 zt(cI&KcIYG0_gmnTJ*mh0@#dDhRO7TxN&lnP0C^Yzbd81(NC*hgC1R!mQm`yaU2Dn zfDFe-s_u_~^}%y9RHCNyemaQ8bqn1DK=oY8kyaR62O|}<1Uq%RB}}reLLNGvQ7-P^ z!vJs~8q_)5F1ZpBg!$<_r<>g=MS>Y?g9sRhsxAz2bJ2KnEz=Stmv&<@(w$AVZ0h>h z5G)Rr2$N7NoUUw`Pbsh0N(b*)rTBc)^|1h42GSxu%f&XkOR^Cz?niGDqfj6GrL?=0 z%1pAGGf91hfxFo}tH4O1VO6@|kbpjma4&ueQhuU?8ibA`hW5dU%g~s=_dER!*!GkA z5e*C{*Cj==J2Hi#0F`KS>bWaWWwMx*#|N2E<-@ZTg<8M5L3S!&Fv1-WS?Xi4j<3(Y6N3} zI<{5YL@iS?9^jt~)LQkxzr;v8CDrZyUZ|6P|F`LZUStSL{PipibFSm4ngRkUM-mtM zwyTfBejJg&AE;=GS;FE{Xvwy^fKz)^_d4|_mT*}4^xwrI*BjFf2}|toP&i7Mz_->j z_2}-xT6kFj9Oa;pPcI+MinjYF@=5tW=_hl4TU#zO*+|{XRb%BTK?Ah#w|a1NS#-}b zN1GPh-}ZC)uRg$>(AhucNXr=_mH$R-1|YKlOXxtUrnqPb)Tmy{M?RYHMe)(N5`UZE zdLaq+2Er3g3ZCPUMV&3!tReE=)9&K*6SF>)}ivhgf>A6gjtuC6kxxXk|Fo zXh4PH&V~a*uD-I@zp1{%naeO7_iLN$tf1sY&&k!RYNw{Pzwk3hWz?H!QwP!Ao?%X1 z-?V-`1fm7_z{VLM;Cnz{|LvG&A>J^#lZM<*cV1gDT4)7r@ZmJ$K`^i~pVCq^|Gips z$hsYRxeP8-9A%fx=AtzaPJuh8=vSV`GeW znrIfrpXV&9EQ+aTf)9XsceD#{x5Jf-8yox>j7N zo*28zDLzLq{P9t}0I?u=zIRbKNTmFHzDzUyi8{u;{%gKKkw0}*d-d0do0`gs z$-MMR{`THl_!&tZP5(KqEI6A2sEV0*acG}R$niHJkOdawefDGQLODri1dT@gzf7Wi zFEZFN3H5-r?oBc;PUf^_A95Ko|A=gt$)X z5Z%Fa7eVz?GoQ>}8-B(KX0QjvW_^;lKtSC?D;?VGFP8ptD*wGkA(%i0=w?i+d65U* zz%pyh^W@MY1`YTFH`<*5S$D(=xQsuSHWCbdH_xs9k0(Zu7esHd8_;dh-}m0vUS2A#-j z1nVj6eCpdnFS#(4evC}u%Zb2wH@gw7MROXVWRr1y$)P_P}T2D+fJ-4 zU<|R53i+82zcAi@YL93d66wPRE)&s5G#oulf~R&`%dL~KJ}M~r8hp%OQi_~z{XzN` zb@Qa`moaaX{<2dI4f$zIWbXA4yt@q8pm~ijipW~}#8`(KVrhhp-{BbAiO|T*`nNb8 z*Okn0p?21(XHm&WlpCyrLfNZ2Q|=iXGJ%Fk4u28K*{_HhStWFtkRLKSSu&90KfDTw z;)u{yo1tQ+ag1P(_sf=#ceU;b9blbQh>rIBssOFZq^mB1jyUNOQ5qT3w@~ygYAe~a zNLj5NxkZQsc&?>^FLl{j5?RHXH2Bb8l$$`99lf>@NA|72+^?R^3qx1k+?JRa)`8AZ z538Aay!zp&kwma52HCLlVXw7DJ`KAG5yJAJDXgK9;MOA;A<$cq9Qpzq>!f0>1bu{k zmEBq?>I1@ugNU>`{p?%7lWh=`JlGL((%t8(8@B?1%|l9bP=6rVWe%tIaL%} zi^^nI{D@Y2R^??Ls1e=w#|#f*j&tQ+4(mIObGuKQGf;AhV=)1R73S>rFwd0!n`w3o^x-L=KQ=!ai8UK3|pux z8x>wux?mpoQ=gkr(vpuzPu^xvegN6$56kAzc^TzvI*7bh@bzZupbG(^o46|hv?Q-S z$b9Kt@^bN2wOg~PULS)V!d25o~s!AQ^&rL1^}Vl{V!N1~&>`rA*D)Bdu2NmzjVtkB+UmyAlIrW1ZcAbByxy?& zZGKuI_mp^F5uKzT3t>QMa$Lb-dUC;z!`NhU(1vzCy(rS@gUkRBak-&%N#i-={U|sJjCE?9q>A z9%upi*&02~6XmUYJ{TqjM4gd~MB*(O?Zo}#3AmR|&{cZN(gLX*-+eYqSa^*#pyj^~ zWe(trIii74D0Q#Bgz~-~CL1~#>r*cx(;(@a*H%QhD>L+Z>OfzM{Uth_Df6^t=78*$ z@WeLES&Tm4PzJ`amnOHa>p8l(;8y4`m$Wn?>i?V%?#Rlsn*(ho+2k2yRvkhQ|Fw5% zn=i-Rw`!#PTaKq*MfC@2!#%JwTf&`8H~DYh(F7_VC18>*NG9VKwNVTA$2`$oqB(rV z6`u=dRdAf!KP|6u5+DR?m}r@EbOp_1EWv%UCjahUTvjF7grE|XurTsNya0xxfmNiF zWpT@}Udcmof&?o1M~w^#xyJN2WyI$X2=WdE88Y+el@I~3x#DZ*mn*Vhd2YnlX2i-= zMuBT&yfR|Qe&=+cTDy5W|4r%k`*Y~L< zTZi(erWm48ds%G_^T^X+wY`Hz(d+6VtNghD1R{QtJv>$%yP)AH#d^pBFP&b(ga59pyDx5b{>;F``L}Q&x$%Pf?>)K7JR9$kdVg^ zE-Ut?l(&dVQyKS%yGCfp+6FYM)y#Lz4bjC2lC2hDmj8*F-SU@JMzrPb=xRez4(I_5 zYF0(jfnfJge3hU_Ytph0`KMN@`c?YgEDb8>xd&l4M#Mz|$HjWqq0yDuT$XJG9l;V6 zKHRkibmfTr$Q1WM&H~_deddcn&i<{lbAd}$8=$&>zy$py^~E3BIH>y^YX*imu$n(T z@>rspy+pFkMSi7LW;VG@9vN#YZP<8RZQIJQ|A8QmAFYzMAa+SJOztaf-k!AF=A^dD z8t*mBnojrkjjX{w=PGHNq6C|^&(ap*H;~86g!)ybEh;<-B$ZFX#Y;wUFjToGloy^6 zK0ZP^YpwFN&p*!voYuCCpxnU-ag_eTsW5G$%QZ~XA7H2OP_$m=|GMWBn&;4 z*%bN&${^Jh$76A)T3qMFD~^7#XaqL#U@MB2YB>2P0+yqbOVp`uOg$2>aE!xk6_72x*iR%GrXePXJnsO2p9N_Z)H4Cgq6|kA_zptlK!&taDEtY`yy1KyMZ|A?U zOz@;a1k;eC`6NYTt4g5c(c&h1(bA{oV-tJ8+|BC{rO(I;DsA$)d8s>2uC z3#=$Q={a5Z9n6O=|NrsET)m0apoR13T_*ogp>ms7YUDi9&rl-7>-;I(=%&Wg8iKVJ zP_-279fb`^bH1qQCZDi$npFyJ@La^QM8l@Eihi4A^XTNpLxEk2YO?=(wV!#$1=yd+u z4m3k|nLybdUn$4b^!h%VSeKM7*KZ{sG2)byZWJSh^`%9Zz@w+gGUQIXCC2-$#4Iu_>VEEO&G<1< zZsqEyLwsh8V``nXOv<*Fxm-45(ka|U3E`f95~atOBoXmHp=%F*o^d{rw z*usaxQt9UV?{;1veS~r$+5Fy%`m%F!@=SkxaZNnuq*Xkfc1SjWmZ-%e8H(*(AA7`@ z*~n*@E72DtucN!&Y;5_BDRClT$f$C~{Y&otl@$@%vd557uYF z#&@!JBOE^bT;@P@{hmb_GH%#c_Q~h6Z|G#khjlxo@$?Hlkbw^#y87?tcil(O${lWq)5<>!XG$p3=jmrcWC-egKoD(bBqJZ6TJ%231$mDi^Jxc8sA9t6o^`*bbW_@Vtm|RJw{bK zYOXscgcPATdTJxH?dKRaFL+D=De*N6k$McvPT~a@v_OM57yX%fY*&NIWrb|l8p>z; zsYhzF2(Wo47u>;2h}-}?CBR>6wcQzV@>yjK_ipedBVCH+2iHu-EDnA7N6zSH1TpYIElvy;8X1L zF)aKz#Kx z62*K+tw7>L=eE&NjRa+<9~3Jt768!n!0QqL|Oz-T?EnsxqL082Y&#M zpf>$5oqa+K6fj065EpVEX&+FquzymB1DLW%+lv z&4?bx8p-dga*V`Yr&^81OJ2G^4)wP?o?8Y^F?+VW?f;ly$3ib`pidMbefVz|_hf7k zUiZsF|2Ntdo{R#foo|S`43GjbUK#EN*&ByWOd(0~f0H*>g2%WvkUA z(&F`aZiJ({MC})@>UO=N=$iZ*|KW*Gg4rzWYjX<(zE7(!)G~FGe3b0q@xUf@h#k&} z91>_9gS?Yw+ni_ZW@vQ*?8q?fiKCklkQx9QF;6r|6C4B1f1{n$#C(7OZVX91%`G{& zdR8rg54Po9Yg=Iz_y@f5>n}7hrE&iRD?zDf(6r-x$w%b`) z*fu)vzycAwo1l-te$j-?i(IHuDz5qz#CRHK$%<4JPL#wHYjBS?U8qjo#<$nyxhzP{ zTJ6)?t9JTe&Jyk%SRK%K(M4~89-p?i$w0ng3H^OpUiwn|rUxTY(l)5SFT^0NaUg2A zbC~M$Ieg(KSeWt@k2YtXuuOLIeNhk^SPpi9ySkudaBalC<|$v~SWsB_V!_=Z@+&c` zqHD&(9x1xo(!%@DmT`CGz3AV17)FRh9uW~RR~i~`uy#%>N8gjZEiB_aeN``Ew4=?p zfZAflbbtae(42>iI3ClE^Va|j6i@7*eiB|6iGpw;se!!p?P99@eLSJE0~XFAgv2*# z3Wc5OEuTJR&Yhm7Q21sB(}Wrl1WSH_NCmLN`qwec+8=d8L5gpnK6HB7h}bq*)LE_4 zWq7k5fpopMIVA^)xFYAMMZQBn$YDC*ZhBLClJ7Az-AZM9sx`?-siQ!~JFevs&AaQK zNhlm(FUSz@{`#^l2z}3MUPmYs;4pSE8(-)sm>aFAXc+Hn=-<109!Z(@w)bc5I=@zL zfwdb~dUjYsp)NL*G_7#^)a^Z;SA;=H$)henpH_WohJcgC#%g(BaH8H6%Ke*RR!UK(P!@Hc4^q z+!Xkutf*2JQqi&bIog+0vf#l&@^#MZ60WBvR%n60u9avsBiessl(bKg6lKHsBzy69 z)@s8dNMPEOaclja@R1e|`XA!}53-|;*wWjYT+GRLG7bo^k=5CR;@QwucV1T%ejy9I z55F71zL=qD)C4s^UmX2Gom2TomNs!;zH6{E0V{c4m7<;| z37jSsCA7i!76cMS?KasrLM*}@x)AmbYZHsZN1E(4d4zw0LR+zC z@B3Xk=LC+%Ub*bXlSl%Y=qSSkWunuxBP?ILU{iQk-%ojqP{Srrz@Fh<@q@|1jQ4aS zj>84pQzuQr$o|Vk>k;^Z*Rlg$w@-XIFSuPC(%CSEaLnD)j&qV$+~0mUzJEV0U~epQ z5O;kI(C((bN=>1{+Th3`gOJ~L-bM0o!3dD2Gj=|vJV>1<-_ z<0;1!A*lGkXkC0eRYPVd5Ua-%TF%{eRb#8KQusAXC6lBPcKT|}--AWMRI<=Tv?Fw< zfTH2)IIA?q?4>ahFWPz@h z(B97q#V8XKj2pL#^1af9TX^>im7b36pY)?`+Hry)FY0B2N$3Q!wD^)9#9KqI$EOT} z{mHYi>}A%Dxf79E+C*aU`NH+@1c6^oyt8TpnkXKnUvgQh=p~O3{NTJN1dCSwgs{BR zWV^#(5&{nJ4;_quSaR6=pZs>7puRv8m$Njkx>4&tJ5+W*Zb4pZ>#j6m$>la|ku}_4 zw@dhB-R>JZJl1BpZMsj&Ly@sDjm|6PT!ufLM5ik>4f`%OKP^;W-O8Qol{H9z`mXf0vUP!0nCWz{vLgryFK#19>hAdbfRbPB8U$S-Vp&g;2 z;DPPfk^*Y z0m2?`q96ppr`)2ditXdR4@G=LVU!jqv`l)3sFMEsOK74|@o)EIy>S@a*=rZ%`9A|V z+(>{(jEhkqTYf_b)1YO4wX@OoC41w_!0)I^6l~)&G7alY3rehK;=$s)zUx&r8}MV9nTgDE}Mf0 zG>OB{^P=&6eIe-Qs3VwnCd3?HfjmYE5DQJ`-l{{gMSH;1y9BL2@ zSmzU{m}J{|8GB;(`<#TBb3f!+rS6Y$_a&=Ue+xx*MS({D>TzX=9Vw)~;E?B3_`uCW zcf278tk4&DkNxNkYk;NZpXcaQrw2FqLmnYEu+9i`z%n;kW5!%)h{YuPX6~(DsnV*Ny2Z^^TZ3&0xoLlf4?hQVtqq? zUC)4?0j#s!3kN|ny87os2H1Ne&7p<63Lxiaz%}559oAeh2l;`)f8Jjv98_=*8!m)g znR0Lt@S#dJ5!Nv#%x62l_!BJrk$BE9L8+0&XEart$5r(FakVr}nWfa_2ytSQmCy(~ zG=;?Y0pF)R6$>(6FR9sIqsvq<{%BX@ud@aF{{J59*Hrk!cMCOrkO*x+7Zc332Hr<0 zsJ1d9Lj!jO$O<}nNQt_g8u7q)<3VUv$<&FCrLLbs$z7Z0aJn zksR1vmX-!vn5KjF^%_X=u!Oyg$yF|l8$!)`WoCPGAuc7bmnf7+COeN_P=?=y;Kap5 zo~)5%TjKP%pP*$Gja1}oecJBKV??e0y?Gt}VH z%*L&WaSb0&3(N00t45|b9_ktSzC^E!#D_k5W=McyzP^@T?k>?#H2dCt%;$QR68;C% z5iV8qJfolls%uFf5|)ZTTmS#`XN1$oE@^xKp4a3$0xO1@(kP9>qvWXy{+z}m<@8!* zR58IA9iEw)VyX&jPRG>doe+-=eOvAOv3v)(X3*Lmg`TFM(sWHt@9_Njwy6C_;ovtP zk$tV?{YkEOSs-IrPN)-y(Xzx@voaQ=Mcx(5A($|w)K@3;FG)A8xC#n>;%Olb(4OC+QsS`VYl`b=5uL~W_!$ZoQvzP#;J4ue?Woy_FF^$y8~F(g7p7N9>f%b5z#GdNNWnhA>KI zLDhwJf5vJH6~DiJ{~jIg)~A;qxm$z;X0(g3KI+;Cjx~=Efn1dyuxEcRgSWeVI4-5MDkQ}AV z2wr%R51YyM9op8p+pE%Nh`sl#@Mf1Qq7L?WANva|eJah?vIHxg)gatZF}tB$00Uw2 zkXC9ifx!-`@Hdm6kuy@gY^4DhFB}sd_wy`iGd~g@1}FCHB-Mnh$xMG6M7A$wX{_%v zT0`fy&v!Q1HtRFbSG9|E#8(i)mrpZa7aigV-k95X^lN0 z`dp_lcA^=s%fKxlQk+k(gD2oc!__W<%GilBKXS>c1fvUZ{5srvyHb?G5CFPX>}KiDrQ zfgE8g;At9#96%>C)E3+(Nl1+}L;z0{hr21K8y45E^Smkizs7D}%d?o||s3a}*-J1!xSmC#v`vK*~Hj?(Hm z*j>r#%(z4gf=@K<=)J9&FE+jz{4TKTfhvU&IvJ-8LvyMc5y}G+9i9xDUPfviKUr+C z>5To_Kn7TT3>@0ID#8)Q-Y%Q?i5ao4?Z+)2EPhn$GOxPVs5j5aqF>DTiuQ}B#r94! z88G_%Cmi!3WD?9IO3S@u$sOm5Is!G{kvW$`2rNrY9zCFT-a1yY1~ytjInBfVsw~bI z*5R3g75;*8ta-WM>r~J{-a++C>iDLBA!H2>tOwm3l2nz61NPk+sjX&WX=Z!3*PD#f zj0$n5)u2<75J6!(XhPwMlr()?oIp$kzc$j3$N%wL$vV^Of_remZ-n zt`ess=M}htWzjY0fmdww>RA0}fUMOCxUaD1ON6Ln>cTq;OsL@(1fvhYntqscDSX8S zdpT0}_%@8?5-u`vjW(n6bEO1NeT14cCs^RIyIOXsEIrPGrl2(??2G)QKs7B_N<)2` zv1sda721KIpE$ESJ?mO!L+6DfkbHWoDK6u}EXzesTn2W7Ty0e^x=5}H;&`HfGhDXT zLQwj$;u2TM+d-rpC)*v1DYe0E$Qx!rLw+Dc=hN8+ex3zf5U)d(exSeP(y9i^oxfSv zg_e)E0?>*#QiJG`j%Ha@xwus4E$Veg*Yxz($o;~VzevgwLAUUd_5oz+e_u4b+O)BR ze)EC!?^#FhaXms`;?58XG}XPxg}G_7nWyzqk6E9C{_BlBYAmeoxDZf2mbN?b6S`R& zoQmS8?agHJE$GzX4KKans4q4uy0fjf(V{`--njJ=13jq-p(wq?eOWr|0-FDPq{R>3 zRe)}Eb^3ByZhHlF=K`zQzAdJ(rUNoiCMiDtwz(X&6{*U-`S+pSJNT-P@n1^Skk2@I z`Zmlz6Z2#x=W7CBD0EZE)kRP-~Yt6u8HK8*1@(`yP6{F*EP(>uv*vZ5NB0v51>Ztu*CMu4IdtMvrV+xG!>NRY6?EB9( z>N`KOn`3^EWnU&G2kj?-xB!j=?_c@Qk;pXgjP0LN^Nv1Hbwp2;z(3`x744NfNvi*T z!^(RL=*F%BX)mk9I|cjo&Lg2}dzc4AHSXsiyOuO>kmMGgk$RW~&u>QmXm_T)iH=p2 z4th-Kn+nBTfZHTS@*J1kT2r^(=(EZ3+XC(kSa29k`}(WM_*0WKp%z3ptpvSoDX_YB z>6ql@#wk$!dxW<|IGgt0oU;ojCzr8B4op_?uGE?hMBgxM0;4ek=GI<`!GeKH*XXWy z72yPdFiS+1bxH&Z8CtdM8@X$PH11F!>~I}Ch6MrfKD2qi`$8=~b6n5fvF)u|A)ZndZk$!} zCerG(HoQFt)gYBjcN+#tdfPUk7_}vp+nqotX8ZjxXKk;Q-0zdt@=p_JAT1s()XgP&wygp2OGNhuUPjOSF+B!anW%L#Xj*x^_AqcEJMi1&|{+ zJ}S?0qWl5(tTBG`cmK6qai;(JFPZ;lo*!vrIjJkT@UsBMEKOj}vFv^>8iiLMDz$xu zEODpW>kakIF@z?Xf|0%HAKCTC(>FcWKG0s@u1_|_3$(D*UOX*qb7Wkj=moRPpZk_K zS5rr*eu^%4zj3Gm4d-K_Y_tt^fEoLW6D6i4*{W>hYqMLM9ZDfb<}nwFI5>U#07KJ$?hH#W zbPcJzD{5sTy9svJ=qkRF<0Cplihd&U|7;nLf4gwUJYPy1zjK%8x8?hc)Np->0ETte z8~b%3i|8&gwDzkpCp4jVkzI0n;_=8t`qXXDF5zU&=*d)Tu-%2N?lAKPd%dtID{r-C zUocBFyM+miR^e~mV%r}lQLN2*!eYk zRf|HFbhm9;pY%vexU+N3?n_5-siqhIcF|Y2OB7i|YU3EEhP5Ssw@)FwYda$V7wlGJ zop6lvg8ikBzc7uD(|DqVq}JHKEm#xiEmkBoAKL!$qHd#8IF6~G{+ik@2(#?aZMojD znul7(-ro*N_3QT1E|vMFdz%79SRm@{{z+7?J^vXU#Bv*|;$6Fr;8SY>-FZ~Iia_+m zE~IP$ZbK4kO~HA*s^hNB1Rmd!0O>Au+y~M5NF1~^-;g8IH4Au{4sg@l6GM~`%ld79op6Fw{gXUO6aDb4J$vYUvLx9>Ao8?#DmoFRR^?a z8uTs6tM%us7FUCdL~{*rU!YuP9zdE?k^-%?QPbzAKUeV%-4LU)iM72|{3J4_r3#~# zYP7OzTfaEBF&zpT&CQ9r)!slYB;7R{P_b6Q?{@C zV4b4eYc&aq5mBD%qoazjCUwOb%i3fx@x3wk$}(Jp^)dNeWZ@^AmqkfJCr;;9n_CT2 zh(ON!yU4>>m%-_BDqtqy-3hlI8X80r1{3{4f{sV#4%HOU>wRbI-<@55>-(^4;6LOP z^uEcir!=aiutRmN3uppu<`bUKU8&7A84?ynRvF!kmY`oEkrPR?_x0ND)Qsd^*n6RF)!BKU}$ly38k7 zcO*v`um{WDLTke->+7}Kz7Ulo9C-B_wab>F`PESfpLVPshLP`vd!Skh_iM{{h*zx9 zBhf17wa8yDulleO5ptm6h z7yy@dj91Li-c`QS;qlrqV8Ob;3Pw7AcM(u}HaHMEWC$h;)72@}xwk~G>Vr%-w>EWk z_vb(RCnMz4jz2_V|NbCj#FI_w!Km2WTRQ$`E<8&pgO*mX+|-3V0`o*5VP~MUVmYx$ z{<#F>)`Uu`!RZDZ#(6m15jMfZY9!b?;di`m2*k+!g&vcS*UN2F|KvZycW=LOAbjID z0t{2d=5JU5jr0}tnar1$H~QKX=!G#H5e^NB)2GHi4I^6wlHBA`@fsY&KYYuvDH=aG z`sc2VLKdfO4Vr-A$l zl>4lQ;=r1M8=@^t+b{ejrVJ@BNncA$)G5aj)!nq7$_;IQXpp{qbb67Iz(`gMtcJ;2 zDpL-~}xCOqYp5 zAG7MkM-LIi1()$@j5QfLW=?ZIVSoB-;HAe{!bQzg3YJ?MzpU|FIk+ zaza4Ip?aweMtr>kSU|a8fxSY26=Dwec3Mhv6+{9|E9C4jAODgu zqPyk!{!O-NT0SHQF3bUOwmQ_8HJPLe}X@6|% zWLz@R1%pPA=zrvtXvb838$B}>*75ZpRQyNYA-HRR?UXSW8Pjic^l?9wtn#2pKh)g$ zpA=S#?$*`%mupKt!T*Ekp#O>_a&{hmgOlzG@u44^`S%_MMeF)i%hlA#)r{Z7+3dXl z*jd@xm{>WO*jUwAIr&*x`MJ0l-g8#gU0T@a|A&H|gQ=Cd=l{Dx5~z*sT|x3c7F-<6 zT|JDP%>WrYBMUPHBMU1N8wze_9%f!9J_>eLHclp1E+#g13KceP3QJd4M}8I-4-XG! ztN)t2k!P#OZ^z@w&AovfXnx&haF+abAgNd7+nY}ANzw$fO1z;hTT=X0-CGQZ7|Kj;(RzkC)udskZr3l?)DcPkSIdl#1f`^K=a^6;ASv2pU58=JBjoA4MJbF-Q7 mnQ)jHaj|moa&Yo6ziTkR_itmJZ~ol^AoEpGqEgH-@P7aj&>6V^ diff --git a/packages/bridge/public/apple-icon-180x180.png b/packages/bridge/public/apple-icon-180x180.png deleted file mode 100644 index 23e0e6705b042788b5a0eb685aeea6ede291e4de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18411 zcmbq)18*+Q)An8W)V6Kg?Wt}1SKG$j_SCkmQ`@#}+qT>H{J+7IyxGibW;dH`Hj~-C zX08oal$U^q!GQq)0Ps?hqRRjJ#{UU4KQPe5!fvj43Y)0YwzR`poF>hfHyR&%9%-8k{R=|vL; zX+xR-%APCFjjNiLC!8-zTa)A9ks^VMf!MN3t!+s??M5VDyF8VbV^yFaD}uA_BcV;P zNSRkjkBrw>Ce?u#hK1>xKqtbXgz);@GH~FyQRa&w!u*l za2?&1r%Mov(K>hjZrPET=lw(;Hu=Kx>W!H#gY7P3T)1L0PbmKHgfFoJItZj{PS^`M zHk4YDQ7>ueSN)2C0Q$Jk`;tK*M&Io$Lec<-Eo3c(P@f8W?{o1==_Gh1R6C)}Pm5$t zVN*$O3@+lwQPaUAjnFjU7LDq$qUL)B30l2kD{_c9GY0(j1>NHpuoP@{Fl9J?#VUCW zG8p^X=*wW4v4hjKauR5>CA4gj?L|^=UTLapZeOM%Y3*@ifwU%3oRjBXPH0B@qlftF zt|X=2Ug*AAXsp;*1@yTqk`VZgF5M~Ry|x#`R}A*MD(!*Os;X_Kf(^@p-fdFsL7p zu|+j2T3^E|rAMk^j7&!88nX`;{r)=?ap?k32?VpvhcaxU69XpZdnAIIi#TLaF^d-= zkHL^LXi`qXCuVTrpe~`yLOcnMMReo@J2EGzmOCvYx|S%~ci>c`1af|M5?I9jIj=R8 zy{*2y5~dPeF1n@Gl1ie2jz*Q7gb|=3qs>CR;-J!f<7Dby z{;>%XllV=N7^fz&7159Y^I#d#gVSj7A*Y+ZVOZLS^op!8mIi*2L7vJ79;8nMPdy-| zqsF2MA3jB*Tp12lGF$U=XkfI;odt9HM&dyaJlH%Zcb%2zBE}daw}fo|@wT245H{6B zt$z34PX42vp@vrRd!fd}R7%=pd6hRi?V{;p$_w)$G+iXo%C?9G{v5EBg}ked>$qij zAqd4?e$~bns8(Ng)u)tNl4j%I;D}@!6P$;W7bh1HC8D2AX*WErW3C~2jeOdYZ_NwW z1XeI>-+Erd1eie|f&g}ktHrXX)a|PUB%f;oKi39d$zm=m!;yFgZe&@0u?C1p?=PqN z?kz(hX7##A3-_~^SA%F7xvOZK51DLNW}qj|{(b>W)_1@PtJf~Au(`b>50a8{cUMmu zzYY9qJ6wY<^P6cfwr!7uK!zy7g0LmBQru(E_*{uTcld&1gs?+8O`hFr@A=5j)n}c2 z?hwg+gYqW_bBKWR0s*c7xYR{q6y%s$T^DjO6=CZ8Q{{&1Gy4m#pwsH%Q#aclr({J9 zp!HEJ5(&AEHrjdW25h8`wj&k*Sn2u*go!!>N-nUqRF`rQ+|=YOR3%Z@ue1paVAt<2uCDu^xBx9p)9YCf>NP*A&8a2>Y3+8DS zh2;0#g0fVZ62UKq&yGE`;ZZP&vpdf1H4*75-Y^>Q9p%%Zpwm*fnvjmv$YcSZ*ENRB zA#vJ=Oo2OezKhw=T4ib)F6?r9h+9aI81%ffa3^23R1y#DojFk0TsLjK+?0W5No!8! z`cGWJNNT#hdAh{7rl_?Zr!4yHr9{<{+d?M-S>ipK1Rd7*DDjcB)AT%<{zE7|4$4CV zFMVK+_$U(%>6gkog|QSSa3UiMg%nK3<%)7mCR8H{5B!w_C`0s`H15DD`WR0-E&bk- z597OhWYBkRWT=@0+9w6fq3p#5;%(fS%d*w?L&N*ll`USNI)h6A%GiyRhGV6YWlbUe zxp38ZTH6)@B;nZ*sOV6*@!8LjIGC1JmfhjDEK z?v@D`@yai5nU(GsN6BlE=MqQ&r-(y%n4dC)dxa1o_kL77f?b+O&)a;B;RE1QSQFX- zCGSM!$p$2*>JdCK!J*?&*tjTeN%lEeE5ITYw5?7JBe_zL^e9tZTsh57=<(`s4P2Cw zRwv07qPR#JE<*OVJ!$@1OPLdj)y^KDntnp^G#gV@e%`UEc|%egx8>7Y`220WtjtF@ z=pls=V?brKNW3@NY-o(fKoNnRq~dGJM9qM-`+uqDD70D7r?_GcZVi*8%Ot;3^{r!4 zLb0_|Z##*KZz=;Jq;mdFqA2XuTOyABTA|kEqeSjG>I@-eAJ++5Cluo%n`c-&zpa*& z#5`5rdd~chd&qcSXPUe8vpQBfc=1oR6A$akL6ic>TW|AnX<`1#U>F-JnUWz}F4l!Q za2tGgKKOjZ4Sn;Y7rEyTe_vwr>`mus#cI5j|LDCU9V&R4Ds{s z#oqhbn?Qpww=vkyg<439K{PZGz>gcj3CbmJQ(>UpRe*er(GqWb@!lLC`dQt%Y&=mA z-{!EZTSJ*Ql9G1k*txlS?_wx(WxKx%0n1Eg-6d=Z2_4?|!pX+tyBC!5(C{#D0VG%r zua|N^1oYQq6;kmlUF}&157LTA!-mDH!fSuFaT~@b3r=T z5V*_e`-<1`X0uQxsLNinRh;#-6fTAuM=VLLV_z^OJg?rFd2n4nv-u;ts~;^JOwy>o zhNy+6K1Q-Jq{{j_PdoxC`Tai@kI=Ha=*Sli9obzr1%~;=5>iDVXaPHFeZ|^`EO~qY zz9M(q$i>Z^-CrGeCkCJFVQBHf3IY35fNAjCfqYmL|IDKaYStVkQyx=HAEb8%&vJYy z!`*jj)8s^Fl|*Ag=(R;cVQIoYPwB7?N&mHs3Q#}&$No+y0wt|NE%+Mv7583E?+@nJ{@OhDvcbkuE2V8>VMV7vlnf(+mQp6;}8=bsa*QB zf+DH_XVI^B?isDrE$CSDyj)a{)TRWCY}zes@BIQiR@>HWQ*LdV6TV;d_~SS8HDmuA zC5Prl2+v^dy2hoLFOP%F{AL>oLxn6rzMFS5t?`!lUCdkj-9k7*ef_aRHtV1p{%m1!?LfFXsv8mD=;yB?JX?UMB} zF<9WD&|qX)0=RU%R94^xf>wj61EP8uAB|PBfNkQQZ;c%v-hP)(daCVSz|X9n*kuS+ zJYavwQ+e<#iIO=*u*Q#lqDM*hOy-aGGCl7sE{roo()F?D%4N-LnanF=(~$Ulf5s{% zxt6`XHNge}|DS-&?L<9|zD9NEt}!5&@0F>n3A`2&#b|&LC61el-6IRr&kN*) zu9eGAV1fFA#3iBN*a-7~iPo#V$K$U-b(Be!`tk}WPR-~&h&b%gCLvO-Fc z4qZc!5qrPQ;o0&x%ohjx+siUt$>A{+Obd6jF*YS*#pX8`ZeodR#Joh~^NhEj3oL$2 zWRra(?7jO@z0Fs&!j?_J=Cl{y6GwvO@aqJ#O->P8V1xwhag(m!k5ZoxQZ^b&&{bY7 zmD1X_IkQhjy%EU-HKGGSrkIDfR`coVbNePkH~ zFjYIWzM+UAO6JNf(oCo=zy31?#b8!hn#Z5}nx3Gh5rP3LxfF;aQL1SOhZN8eU}_<6 z*k3}T5k#vIhs8>!@B-W36#7buC}vS?4yf48OGiog3f6(rZ3 zVSlKXu|CN9qwHKhR=S#OE6G?st_3}@P|1o>*^{tK)(4!Cje(o>Lr^v_U_)Jynv`6v zW+)~PSEwOx7DYsgO^mFlN8bGRAl)K(g1$JK>tYx`^-SYhJ}#YGdf4O$b7^4lX^Wpmx+K7El}3E`u#p9aAd3 zRW6t*Gqj?i?b`;lVfMR(RfNq__gtb><&wU9wwGzWL^>PwlOrcB~l3m&CKoka6&-T6hGqY&9shH*D#gsO3T7JCIYfxcWtO*P@5rgRNx&&w^5Zfp8MyFt<7MVnp1LU3QO&NjatRKsu#J92*Zgl zg9%mgdD$g<*(6UT9JkXyB{Ljlc1%Y>6o`P#mUcq%M0kh8&KsJv!r_f25i?}(vKhM(`q03JEz|T zB%CP~Fbi&X3N-82C?coJe|*oB1cO!Ol8m}ed*YswQ-M?Ikga`qZJang$O!lk8z)NY z!aTz4DrH|aqo@$;MY%(QZ63(napF?E<=5BCf4r04)d~FiK9bIePJ$t&S$^HFW^{_4 z(>85+426V+n%@dDyU}Zbrk^Oc0Jq8F5a}V?Y+lSfg^Et$DStKvXwSF%Q2^gV_Ij{G z1xa3cPkbQTc{C%!=Su#G-T`Ncx0iU+DT0MWFt*Y%b%N1xX6Ph^LK&B~=`ZU^zrlHW z>8)%Y$nxkQgVTyAkaDcL7#r-W`s0=u&9v?de5iNMM^4>8eN3K9+lSET?S6$b+$X%C z9Zu+-o`TUEd;~MvTKXHhhX#s0)mv1|jSW>^sa$SK2Y=%GhkEmjrnQLw;E!bVO!Qle!p&<6nlDNrdK3DX|Y5rMNCiu zoJ|{q2BK)T3K!tBdIKsE;IoQs^vpV`A)IOj)BSL@xJQD`GnJ&P;%QW;wbny+40-Ai zYIxdABJE<=A?XhV!UnF-UxSCUtQB0}g_tU{?QP0sdq5&&TxKg`-uj4NzOU+H_j|s- zzG^0cS{8bACcUhR4y{vLcFcNx>rm>3ggJX)UPOZJ1nf3G9w;sp)msjBu*8<{LF=}> zWmPUZ3CY${6!>&jS7uPoh@Cz|qlG?1H627~u{HFO5F}6d!1+@Ix4To_5icD*r-8|% zI^1|;xv($1!Zjb#sg5@)(!ngw;uEc9GR?*(>XbsHllnGSDSXIGwk1YA<wyJr>s4xf`LJ}K- zn)SY<$SsNy1w07Bx`d=ecuA}vn_w_YDF!83t;1~7VpoRR-`LA*QElaUXug^k(c&6^ z_s?s-Uj5rHBzoQtG&}5Edz04Cy~-lDtlOX20l7$qrJxewc|~e#%!E|@N%So`ixg=L zrt7U_$2;$ayNOF_<*XtUHV9Me(gPFh1)SHu;4>q}HW4v-Oq-?Kwx=Ty^8g8_=y^}k z*6HDI6FWtZIHcS%ee+WZK4~xwWmT4Y0?<@htea8}?*WZy;aZekWHnvNf?TNE;u^u% zpqrlEpEsq=r)>#`j}wE2e3%c9T5zB+q>v*aF!uK$50xKQxlD?c^7wS{ei8~D4}Cp#P5Z9hgK(}&z%$m&rVWWo@hXnFc_Qgr^&r!Xt=bqUpZx^TY+P>;%s zH?IXvZ|li@wf&%x6k$Ze|FX9Yn|}fT__?sxkIgm>4pPtLsLIPk(-icf`-4}j243TYTU-vwf7wgomK zS{Lx(;ZUxy!!T*|&slB7T>p%c)V?z;9)k7+#;DVhSqQa!na3&etWwbp7_6&hrPQhf ze-crN(%JbX*Y8Cp#mGE5_k-IY!rojye;@Xh|8wU3=LcfP>z=pAjn;=Wdblj|lLl%Vpx06)S+{@uOz)43msJ-T0O6F+kxLjS?Z09FfV2AHxmf$jhgYEgtH zXGgcweuSwKT2`PBhUCGcmH^KmF66zDy|Yo@gZS*E$PVkuc%S`&7%6P?E`8dGn-9o+ z7=Sz4B^&3~pA5;m377T;_}%v76sp`-)S?DMKO{Q&41k4ugk&oQjF*_UAH2ASl-rCe zQjM~Lwxo0Hep2*ox;PJ(b#=BLW}o?47L?D7giq`oJsoveIn5(8v>yzWAWg3+=-2SX z_hFAE`#eV>1tu(?$ zQQdo$c6kEd=8>hxF|!#vA&n>f1Z!s~(Y)`Yth+T4YPZZyRRTlph7afwgv=L(@N-x} zXj=dF6nv4^h&*I9OQ&Eo)V3G~AEb0SVLrRe{dm#70X%y2>3SPgA9a6J;C|M+^z*(h zRI3YsM;wSf!a+BKwqo_JgofJheANqn$$XwoAY?V^g9??kEAV=jlcu=3q6v$J8 zkoy{^Xn8i^p%JY+AEIubU7OhP%JX)XZqhxwOsuf%J)64QWYesSzDypW<5exkZEwrNe? zMnL*a8lB)l9qhI`1~0j3wIT4Ihg%=>*0ne$P4OdEW<+|jqWKF+fEzA zGWbolKSF$QAd8`4fAPq{^r<5r^10+7GQZa_zwd=;*_Hua7!inIt@3Cczw1~Qq?L6| z0^o{#!q{`OqKMs*+|SdUSh1qN^lNBd5xbQ8m*^RURth55?K zUcHt`bU$l^_*liyZ~N{$ZTOmd4%8m-Kv+OlNiT)U2j4=OKV89#-W>J<=1^sbj|9F9Lilz|=gXl)s z>XGJ$QSp1x+X%?!5{c-932Xu3f-jK4I89PaRBqk%SfZhY(Ah2mW+Q1isK7nm&>5Nu z@cmLe(RUeN(9y>5dC$3v0{L4etF0wEN#pmlCb>qJwlM%>AYty4;tJ&!iz(i-&@e3t zxYcNlMqAH)32G&L4A*!m8#h;UK!)j#L09+xg#C~xE8VyIybj(VjvElWwF23$4#X68 zNvE?DG`)Yc^H<|FB|17o%fN2VIg(zW(E@W*NQT>Pdi?$+7bthS4v3bn00bzz9zro8lGxF}xa`stkx=@}0Nlj))CP)O z`{bss)`2ck3X@BixlQ-Lah-|E*xXcg`tv_krR;f5I5SB+&vIc$s>*S6||!FzN`TE zcr|4r+s zvq^%qSiF8^dSh4h=Oel%ut=S&|Y4~Lw3gIYXdf?_XA(`WFmv{kS5Ss|35 z8M`4unx8jIy8;nLJZVlr=9u;tj=g->%IJ_jPMdt24h5pV(`Kepvm*>ff2#mko;`!i z5Ei}tzK z8u(CFk2?KRv0lw&ApMs^S)d8l~PMo<6gVhLzoz_#&w`JkzMIJOox6pk5SiA=a5>bQMHgqe$lE~uUAMH4I?f{E9?Cz2s! z`_!`+$HK0a5-2Yp?LvCX0;GbrV)R~9 z7A|^M&8n5P{1=d1S?iHeo`o>V3(~0=U}^?8>mM7Rjy<&u5B*|9!a-zU*hSCg( zuIdfuE32o7B=h1tV)(2>5m!4L+NN{KbPtfw+-P&Dsm{~4p)2=@jhV`ewup%4z>Ixj zwLF@pa$V5f_Vc}S0oo^lTxn{o+U900OdU4?u1b2r1&+op_QxFRekWeKKBjS z+*go0{*Atx;R(9M$&QGYuw4rXzq%$bX4RVC-oN^~dj)hX0IjcAJADQ}d*L2q70qCA z1Nlcwz)tvor|HzWU2~yr@?fn(HsvZ@$iGzeIqv7`rbgjwAlr(O=n9XyFdSZNJreq5 zH1#{V%EW$YUB(W-W`2+J2qUcGB1ur@D>&GFs1Ez@NrmXfFT#C=Rv!Es=|*%&%b5=! z(g3@6gU~k-U?=6% zKEB>U!W`D8B1s34|1bLU*|nr+>?{equdK%}R}y9wK-9*WZ6KgN{EO$g=oS^Mb0&nW z`-}{+!lork@)T{WLt_w~p-f`9mK0(=S!w@E)Ace=dyi|QU5LO{{vj&qg0QW2x| zxGA<~Q9(N&WVZme8LZ>bf$mTZ*a_AfNu&whhjSx;24QHNZ;h}F&*vrFaeo91y+Dux zUO;4oq{=s^n@e6*&NYge?yTrfZIKp#{O8~6bV-G_|a^+E=QT9Dh|nr_0L+XRCx zV%klT-rt~}%>apkouxt8%006?3zYDqh4(GX$|qZ`v=@`vgqEj%nQIm$!Q_j(ydvS` z3Y2MGLj0Ju$W$f7Bo_;|USk*vLK-Basv=T_PuA1e1)*>UKc}O{zl>&=fex!3vLGC z#|peRk~r~*`azH|s-BYQ;G`4ecZo?B^4H?OIcSf)^?B17FYU5M`UY~m>=`HmG;+y~xYl|gCbLGP#Wt??!(2ie#dlEZ0 zZbZEiUJl~OZFGP8r2AQJphduUtq8&HZ!jcq$NxZXwaytHim>s?QtZ$r{+<@;U$hL4 zH96O!tW1SM&X zH4Xgc)g9q_Nm-+6>6K=iq2k6EgXO=_+CIYyGJ|a5b2=WN!m?)_Ps$3)oeW+6JWLSC zD|i8E#fgwX^U5}?drn`8rhf{dWdr!^W?ju@^VY4l|JxNt>F-0mzawp*t_gINImBP8 zOR%FQ6K7Lms4(dyPtb}hu7vGnj0X!>DyOABvZC({7U475ppR@0xt3zJ7f^XFC(!-_ zDiUD4NemBhZ%j?E31E}cLz$D>k9;s1);ze$$=wGpT>t^t-Fc9sb+Nf7!OP9qFQ?G0 zjT$Zj(+LdS+iLS4!`UVF^7otk*6JNE932+V$p364E?c-tyc8vQtOS+h>8bX5AjHTq zDm-|}oZi0w`dj)wsLM7wrS+4}Vdl1db?cuwFoZMu_DE|hR737*DGLS!WhZcEtZevc zx7#*D_-d`=z#J^7>S2G;>%GmnEmjMlNeDagpxM)7>C=&9>ia&WCSKeAMVz_~zSxc} zbk7PJK;ZE@sa_&&0o=Po+`s&3ARPZDZm$%6euFC)q*qP-TAsEyyHT0Mw2@*!K8ICp ze@PtMdG@0vQ4ugPXnEmB^?i>1-1>e&BW4pE7K!K<-5sKJDQU#-qPcjXScWp?_*0w6 z+>&7#KUkBb)gLB^jEK}T2@6gpML{Ki)!P8TD=&91Px98kjbIJA5cDPoe*OLT92r^Z zA{6}ChIQ_7{OmqPI;(${qMK|6x`F>9In}+ zmddk}23H;j?4DGr$;TB7WMP8fYGs@gOg=j5)-RbNH!s%CJ9l#`cVGBBeRDdwU%Q}3 zte|a@Kx?r&3?)y_rBYOcgEEeSJ#jz5D&i!E!+orS_p|K_$rXkU1db>6ig~#isacb$ zHFhbL&hYgT3#1&;LjH+ssSi6!hXh)(UzAZLj#9ploxfg)H&Kqs55^iKZu!tKRqTE( z6u&ulhyN-}6szJ#-lbCdbT4>i*0bBTdUq4L4)9w^o*A%>)sIEw|7t)?DOq$VHY2Pd z6%TK_wl^YU`%n2S7ZHD9)PO++=Gf0#+0ZoCWzvG!6!lTS32r)%*kD9#eCq0V{XYDH zZ*+{VlGd!ytxlm2lYCPEj-Wh2!}*7+z+YK@!Xc_I-8CvEc{%;xxB0h*h}hwO@j#Q! z0sEPk9Qz2TU4aH&_iwMK+%JX|c%Qoi9;fH|6l2pWLk|$I#BPAu6l2@L4+a(kQL8>A zi6Oo_D;*?`mY`b;dT-V`w>9m1w~L47AlZe75K^7{KKGxY?3~2bzV=alSHm$(4KpOG znOr1-b;$5yx~arxUQ+hcnXCyu&~rZ?>?cNBo587ijK05x|FwMJrW_J21gA`6KHHws z?C0pb@d6AX`d+~AZShS?`S}cC-~lpge?o7GIE*}?XJ@F!vq3$RY4ibo!iqM^>k0W+ zf;~$sZG?f+1u1_`2&bUXP4g2(*t4;aBGR;|sB_OHmGaPz3RBu^CHGG4&J@LQT&tnQ znT$jl?_Q`KWy(?EDuX&Tuw0}?k8CSxA5gJ;X6uke9*rQvg{`(`*y(`JwXRuJw={iLCZVHHiQ zuFxtpRSbkBnnwiH)^Rm`0#HOOq9+l^x+n`mU)7-ca`Jrg`>skpZ5BVb8IpD1xu^9S zgc=l&mOmy|ByQ*wNyf7sH^(mL=A8FUHQ11Ck(=#TC zg8Z}}<#pfS0W1aP99IzK@EuoZo=o?8+z8%(bRf+8zX-Hni&~6N6uB&~qiyaSC2;>T z&bA6L!O!?!DlqU67}+8(rW>s0|0(~2aBDL#{6)cGNRN;-Y)mnKmeo$B(-^I=7)D{b zSY%7k+Pwu<`(u!roW@$$MH}z@{n=`-V25@*g+Zk9kf=y`$&(mz0IxX%Z@Jw43Ht(1?&uMEvV7OVV z|DgF(jqtalJ49G1!Z425?nBfc8t9&jZtor3%qwp!p|>5aZa^n+`@H|_Gj!f|gwE%` zvXXjrcL+dzc?T4_WvJfz+LGJNTLX(yh(GFpE~;EbwOk4D4NIl&{5*$qDQZ(4dgFDt zjgF-Z@wZ#63@sFZWR?W0R^)QHc`J|>uD+lA=5uUuP^Ed}+PS6^3TW8YJlGW}F_GWC z37Yph=JO{*-u6Xphwl1>>aWRH&a`gpemci$vwZ%1et7<2T^s)|7tk6m{6Lqldka#& ze9Mu{t}ed^-yK@~%e)4#bjfn&CoOT;kY0n~qqdlb;MKoK>tQ_%AnD&D)EI-m#`@|M zhiWfI=>_Yan|D5N7`#RzSMsj_y~To#@CbsR!J6X>ip`bH)sUXY0DgVNZvs)ys&!~g zV%Vv)^={3LP#N$JSE{-Z?q|uB9Y}nl;^=#`{Lf})v5!x2y#7(g&3W979NCo zI<^Cuppo-7TPIjKE*H$rL5feFibhU2myz^Jn~ls#pNn@`-7h@tjo7G0jZAZF0nLL> z=WV7go@(=YHdy+3liwH_aPs@E$SsFY>Cmbxs*fD#Um*pX9j>!`UpHRAfM7QH{y!(* zD517IAT=NTj;+ThH~cUa_puSXE&xVw2gxlb!beNqsuGv1+6`fO!ZYwpm~3G-@gXGw zUI1l~7CAPxM4c1Eq=fdSICK{|DVbcQB$zes>m%9^;gR2D)l zr&J z3S6;T>Vu02t9vd-B)qh}c|6MJe~&BWpv?6$jsxX+>?zcoxbaRDY3kMV2-mjNT-LEK zkh`)|D{*QfXDe%UHP(pYl!K>799KPr3AQFpm^nQ#7H=E+K2Zgg$z8JO|C%4OB33Rv zmwoF4JTZWYP<^QmMCk9Zj9rLauB<67TP<>~jwvwz?wc_`9g0}_s%4cBJi6k-J4d|q zFdGe2wzJlN{IV>uT(p%{t5j$j#r2);JiP$L(r@bAeu0ak1YCV9kAx0ow6{Op9a7oK z9r6_g(7{9BkSWK?YxI?;@2r^XXyn_Q{a!e%IJ=-@=GW*4z&Lnlkx`qH4La39`6ZcS z!dZl&6KnkT@FS4m?a+dpq_rEEuVQ~6L4=<*Qilsn|65r)40Biq0$}2LapkpI+njVt zXys^80aL@?B#dCjIhk3}8-b64-s>RVO5(1Lw_^=dM)wNpA)Sxogn^_HTRrxfUF4y+>wTjefOa^@uF>+tn*EK412iw%&)*CCkEHeUmdFlL^M=esfx{Cz% z%g$ND|K3)Uq20Rb|ITp0?5ab2OM)9P%z`;Hju?DCetEoCv-{jI`Z=&+a7h4LsBZD< zK2Y?&RwW|1=?+tDWnV)Nb!svp&#NrVxy9D?=%vT8>&fg}%MI+;hI2qRUqZN5ZG3oA zEe~_S$kb7s7h#8Pc&{1D^2=4e8itB;NUe5n>Fd$gmMnwF;o?IDX*^R{FO31lQM`#{ z#IZI`4zzh1AgxY9ZRl9TP#>H)-LI@Kzw_>cC>45Y(~ zaA?Ang!J{gv6w6MFtOZIdFHnq)pP7lE_X&i-Gzse+Zc&Uhyn^Kq8N8YK3hhdvJ|8WC*R?r z*`oYGE|o3C)oXX;u;EIjjT==3_PKZuG0ub+(@UrmaB6<%RY<}DTZp?syG-eUg>4Ja zF8p4Jd@nJrGr9Jpy%)bHv0p)7`%Y95aJ}(hhq?h-h)aabm77h52I+VWqc-4Ug%-qL zA#4xtL;Y6YR+!>R)BdtmzvSXe1_FiE$Xb%_T82qSFlLbQX}#{7$Ch3oV>u?^wBMCO5`AKpd+woEuz|Y9JE-7*<90 zKsXea>&FP&FBil8T(8u#oCt6NzV`_QLW~+<@+4^0?Nx^$U_PP2VbgNSiFeDE8e2g) zGBL$In|Rl4)W+8DS^fd<1K(DmeYwVjkArT|o901Msj`D~2d#qA6?VcPb&hRjKa)Lo)&#GfolO&Hw)b*ss1^R6!h@ty;VZ6+R+01d!bFDXvVUz> zb&PeRkNzVZa}Qu(@2(}JIdakF*Q(|%Y};@-{_ZdL0_b`SBJZq&BYC_;Dmn1kDzlwz zgI!uAZ00@tFs0JeQ?lvJdLXIo$_p_4X>o4kCJEMhZ>Hl9QSDgkPNSJY$(5w!yy$TkP%oDe)nU*G47;hYV24(k+qT)rcjpbe9AT9N;{ zAakSy#)j_>z|wE1Er$rhY`UY zJdSuy?FcFfqht2At*qyq<_R*eH*GfL=@NG7|Eu3928)x=Hhz zPS%N4SLlyK?#q#YmZz=IGiWJe%I%(wC^1#h?kiqU%| zJo<=+{8m6jqL9(_t377g>Wf2OJXj1Br=Jn|Pc%_IVuy0AL|=-Q+u5J^jk;Z!KjBgd zU|M@xgk_CRZNJtjJxHk)FY5uPZ*h0EeL8pX%mU$@x6QoH07sm7Hm2Zf0u>YP5M9sY zdPK5tp8Mw_?PCS#N78nko+{X-o%gA(hji~%>)`JhMlU#8B`r876OieEeGw4(xb|o9 z0*gF~zsyD{!lQwyMR>szD#wMG-dIaT$Nw35TFltSD?h@l?%97!?@5Vi&GCrcyydm| z=TIy6obletwc2Lv=h<#FM7>m)Jj6Y7e=N-X`-bazTm=}^*q(#d+>iFa&6W5>PaU%b zRHK|8O>7NB50n)A+;@H0rNci<=l6W>OEAOH$Y|kd5uHSgLx6G<#IY#j<&Kd|q0Ka? z$+>PtPm^**QcAF^7+dqiqi4nPAK_V@8(?Afldjju>_Tr%F4Opqr?gVDmkF6Gtz>ee zkw)G$`8piuqgnES|46tzHArG5*WIP%m>QQVak?xg+9#yaK8%Pu1RKA`q!iqIRZ&(? z_UcnTJ~8?txg+%E58VF^-j@Sy69OI#apEA8@`N01(j!ZZL!)Xd(>U+f!#}+zB=g=E zX<_S1dBM(jl)%feJ-MqeNWO7V@~P{pyjE)N;iVqdi6EMieUbZSomx1y#F{x^2R)S^@;e1)t=Jw;%^|6|cPcw<>tDF0 zKjY(DOMX+>j|XB9>-xS#0Rualli=*>HwmW$nTCd8r4e5#`=#T+R0009PO&L${6#;uFmvD1q zsuO@m1&loKwTUWTa5@KA+D`RS(TrzOWA)&IHMiZuKD`$+;q;x{v*Oe^G2q-hX3z(8 za~pP?(!$EMA&J#~0L&k-4lg|nPvVvza9d)ZxE!>>$HWNoPZhr3;XY^=k4HOZPm;1$ zFJsuw8vB`MwDX*vqHpHUPC)gcR|IB?)q2g?=Qa}m1`absXcWM-MNnD1qUy=uN_aVUyP`DsJ zY7%VbN(8q6W1x$%os*mO;Kst=B1s_hDcMm~6>|)Q5h#g>1+-%K-Uj_f=>K`zKH!wk zoTGmHx6$)qi6vVhZWYy;pwVzedIxJ$koi;b2+^jHKp0vnykJg{;M>JQ)9uq~HxBKJ zaghMEp7SGtQ;Ylo5e`Cd4(N|7#4LnH$_p)WR6AW5FdTqUc7@jHhkQvNT7@O_&SBE0 zPDy-9rY;@Jnhj@FiLhXae-xR$q8w{koU*kJTfk<1frjuC3;HHq?`_XlMYJ<37T<*9 z!7niNOd=M;Oqyw=Ass*#oTQYLzZ3TBjY+}wg!HFEZ~{xrdMxPOW=Z!lfjKYFl5-^A zxb`0(E(<*Rz(<#N5#i4(6%T#`&ARvC#4=e4d$xz2q**kiqv}kS?@Uj+LCo`H%%-Bk zz6n=N`IL*h6k*^7h!092BJE=b65P-J&LyEKWQK^nV4p#q9~_VsoXdcyG*3^BMf<7v zQye3(@TJ-_ICd~iLE2<*QAyYNEg9F{ zC(N-hTDe2Wt6k9VT<-iSYVFQl*E{w%adHaCZgHEC`TF;ZN`)&?=f&5!6tpwV54y9soA#etDee9Ghplo>k!eu8 zVe##_Gv97IybWLL`nf4v*m?GS7P*yfA#Ar|MfBJd1+L|mG_`$T+$!lJ7_XuGwD!xt zt)d+d&Yb@x`2Uk{V5}7H%q3?o+kH(x`gp?pT%ObOZXVgn{!C_;_M~$SeP0ir+rQ%c zMXnI>-({_JQWyB03m*UfVtxK*F<(J*0w;qt_q2e@i7VzYKR6Pgqi1z4f7kEX&%#_< zUKFjdJ{6+#LW0}D^<|mHBRO`-E|aUzd0f&=7Ti_sh*djM^*z~n?Yg@ME(YCl)c^gr zu4lE~$FnvM-+%fy+hL(r*WK`mefeK4qf2gYtGS)i+0yexai2@m-Z?1?OIgEz z#c^sJNJ+Py^fBOs!m917Uo2nvYhml7+wcFCpTB9)T5A)*bYQ_Q)&s?^g(g0Iaw-Os zmDhVNE>ud(2n!Lao;Ya>Ly$&m1q9)vc22B+)Q~!(Pd4x&ym0HW)x=n?wfyWYX8){Cj~PbdJ1{@uj^VDNBDbv zVmVT@B_U#~t}qAtFTsXu_p_bbjMc4bgVvb6F6*daI*{tElYd8d_xH_Q=@Co~S58kT z*ND}YX)e5U<$$H@JGZ3$PxW%+-zm)Nb`_dos#>?zVH3mTm-_@(Xok%%kEPoeQ`w+pGq0tt!`;O z`&s3r)Wb9%Ue%(@DltOKe|}^9#m*JOchpyV&6n$T1rOF3Kgis@N%+8ZmLL5Adw4FS zr?}4q_Hs8~I`QSMcxNVq;nf}Tc|~Olri$=+T)Ta_H7~L;;Ma`St7cz5@9TKB-Ai~% zzd!$!T}u_@JqqMYZBESUdr_faI9Fh;r}nH;6ArJhNzWd1OJ+Vi_3li9;{nc-e=lWL zoxje1F}{B1qI~ZH=EOFIci%a7hQwS-WP6~v;@*M->8wAT1MjS1ZGN}CdgnFv)6VNz zey}wFr~kwzq-UPCZU23NbD9KWQ1=_TmIpr`70GGqT(9}i)OUNkkzL>foyilEzo;Aw zFH2T4`xUGZ`Fa)q9f^WNkNNj%P44>H)bhFESVdHA%iSZ{!S)ZA$jYrNSQB||W18#q z2{&&vt2w7QyLC>t?D~3tbC1WiE>p&L%@4GhKZLg4TkqO-mFdUx|NnmcU9s!(gBSV# z1&^*;_R&mp!v}AXw_Rtat?l@nDfsqw&=^O-S{?44$JFa64AdT}AvO8MP%^*eWp74NXdnO$5r>*dz;koEh|xSn)f zvHt9YA9sGe&1~DgG?9nn{{zPLE7IgXy+5b?df~&Ar|i=O6`CARZ>auW^!!%Q_b?u# z2Xp0ZKAhsY;Pp`J->oVIGIxZ-VCp{tfegyS#k7 zOgbe7jYc%pu2De=Sa_=f5Cw*BWnXPk6qmbgZgq$HN4S|t~y z0x1R~10zFS17lr7gAfA~D+2>7Q&VjqX<+bFm8BO&LvDUbW?Cg~4O1%i7y>o8fov$w zPb(=;EJ|hY%uP&B^-WCAOwLv?(=*qz(6v-BGB7mJH89mRG*SpOG*ieZDJihh*Do(G z*UJQ{24bLUz5Jr|J8f@)1~N#1Obp2=%}uhha>-9F%}vcKv9byPDlKL(T>gKzKAIY^ zomN&EshQ~+B@Bj^M*Iv#tw1&6NajG*glDFdWPp@hUZcnXR3eF_#5XfHwWP8jl>zK3 z{erx7`%PhfXy*8a097# zg%FXk4JAuR_)Wj_Kj;7b{m%KF&w1{1?tNa*`?>er&pr3^i8V3O<>nCP004knUr*~g z-J|{*8!Np{5R8nXJ7%1Qp#}g{CUgFAV4?RJ2-kHrfpUuIGQ9(G(z|X503>Mu2)hRW zzv)9^O90>p1%MTM06;$k00EzzMpHF0g_sMH{kwzb3_tCQ^002wuUt{oc zeL~OY=+@WLFn66^%l0aExxwEPdgPZI?7c&=RkUbL*R#&NLgir{=HlHwo1s<4CM(Zb zaKS5^LxQspE}`)}$ETf3V(SXeEcBT;DO^yj2@)}JkW7z#Np+$}c+I#th7 z4&t)od9vTTW7uMAj5yLHPJC>nHTs9H-5m)Tc|3n*cvyVyCr@(HDC6$o)2T>w*$nxj*Vf?l_>N3 z$glG(Sj9ZOKezD`q)wdt@qXN;TUK3TNmhSSjgdu9Lc)a244cQEC*dcpaW6$XHRBbV zns1A+HRrnBqIH{gZU#@B>y`}LF(LiYc8TpXj8Q4a97GB6Gnosz@n^%b4wf+F>L3Y! z&T>Sx;RAB1$)Rz-c3Z2Z0O%eSp_$@$W3BHsV)#;vX(gGAckA2$kJZ~iLW=`EHR z|LtnUF6d0k)2SUGN??<@DZGLWVf@ZSe6^akM9JOY9MA1oZv2?t(VchjX?QsNl|B1b zV#+UmjJ!HwOp{N9wpnMqhSG1q^W&?v z&f&!}YB%b}>}-rN46pXPuOt`@GBt&lo?-_Pv)EwlBSuP1`F-JIS8L8&3Z>_Nb|((s z%}QI{Y**IXj~lT#eJl9(BENiV;1}@=Y7DDG_Jx72nG;oN)v)Rr{SvBD7u%q3b&U(& z=g~&kIA5^+is~Q$FFP$nY%4|c2MPip}=)K}qK9A7T$~@K|Bi-AjA_IQ~O)Ewe{46b>56w8i{h?ze zMxuP%erD=n#{Fr3h7bLEl)@OAAsQ@FMRMNglg{XOBGOVf5oVWao~6Yu`mM5=HHAou zKTEs30?kiYHIsl$uQ2oF%6?f%OT3~6h+eQ8*l9bsGb$_D6#8qK2T9?T*NVk7w7aS~ z4)BSn)P}@L+9ur|c>wmrTVVh*GmLyH20+i!PF(oxqx)af^S86+r?c8goPSwp*dP<{#=U?Y%K; z?XVYFlXp7 zElZm{D!$;9#llhL1%txk@1={mw2hF>QtV4Vt^sBB(%-bDY6fds(qN4l#V{fM%mO9q z*mp5jR1=40sC`=o9PQT2@6y}7TfKR2Z)$?Ws6f=S(R5u+a{o13f zvG!6;;zVe7d(xMd<6Q^sxqJNTfyCCY?Om!(AO`&2_}T6%TLyI|;+2@Inht!56Ex4? z*Iwzkzdru~h8a*2$Z-^SF1k=HVJ^=1S!9kiQuTz_yUg)<16r zlw>Bc6&;p*PX%nNW~Xs#Z6~^XJGg2zXsGBN_CCV(149e9>q=#1LzW0f*TwSswR0>^ zb$7Se(<$~g>_a^Q>zzUZxdkM?OC09UreYpfIT~RV?+ZCa*e6_rMo=}iF87)~NMtr) zgY+|7nVclgnW%)vXeN|Bld?y!5x6c;LFYMUWuQA*mv`v5-A0?aQN4Yre_xer5w_V* zUd6K*!MG8hED8~}H1!6|DGi_Vrql+MAD^-=TFr@*rKE06<-m1ihgH>->~No+S{|ZB z)otD`?PmX(Kjh4H_|+#V|FoLg+&Nd}k~60d`3~X~eWT_B&k%TNR{9!WQ1pv!U<&K| zK3CBv^`!Umqd)6hY}OJ5N=DLQ%8^bTL? zvx{OTz1pl+69qx*PrO@e7=qTPoZj_5vsYJA1u&1!h`Fs(@tJet_trHbk&2vuUb&Op;>Sh(B};OvjLk2%)wl?Qz2_^p3Y`1n!5KXnAtwC zV$Pq{m2&80X$-;r+#?2e+=u3(b=LM;+6u#UCVkeJq~;yhhV0w{t}IK1&ZQ8C)X4_B z)BEgeGTmJTwx1c;pf)O(3O_vE+DUgA(|!Bv?U6HPB-{8}Nw@{dqyksQEick;>owVo zmE#vG>(Iryq_vd=zSp04HH!o*DS+|!cWq2hhjOECwSG_Jn|7R!J7cjzidYNr@JAPe zvsC*jDie`-?!1fd`%SieOHl(0!B6gD>W=Q%>o@668Ld-I-Hg}vrfEfD?mE6vGKb{% zrp6@M({=iAvj>HPiWMu8=wlJ{^|nl2XL!=Dyo}2?(kYO}di01NEUwM_h6D!cb=1XO zH;!WQ;J@gvQ+!G!@}bZ*>#d4?4R7@!vuX-ClD!mf>-|(WIF=mywUNDBGC_df=5P!A zqKbYGk*py!YMbdH_k(Ws;-fWDUl&e_lb=jP-A zLMR{=RKO?@912qcLzTfWILH)+0J##0K4=IeARs`&?JrF?I<4UCi<^pGqYDCpe-+JL z{k$B}Xf1CiKQCuI5sfyXqXYo<;;0GoU(CO2qS3C-Za7yW07Jn~0KR|!9t8fO^M8z` z8zz{HHMI{v#Wn~$~ zgO_yV#6NV*+(^y@@4$4qv6-6ba0zE^4KEJOss4;p4KwsNPt6bAQ F;$MR|HPrwB diff --git a/packages/bridge/public/apple-icon-60x60.png b/packages/bridge/public/apple-icon-60x60.png deleted file mode 100644 index 1007bb7dd2a9c5856b7cc510e8dd21b716e13c4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3416 zcmZ{m2T)U6x5p1&kfs6(qSQbH0VRYEp_fpEfHdhKLP#Pdkpx3ix%8qSpj<$jAVm?R zmq_t~D7}c%yAbIRxikah3wORZ@4h?p=A508pX`bn^yrjM}0F+X}@MCl-O0H7j~{m_kxK4-vN8tMXNeFDq$3CP{Z5&-}~;s6jD z0RX?~OQA~u;130WmD_ZSGyvemWs)pTTuc zXVLX+-NyPl*68W=44-08TmR3GXb-Yu<%yoY#wPJKU*;Xp8pPXJmJb$6bGLCn(fRs? z177^}OCkO{^zsIRQ|cwCnGxambvOLxFE{A#d{+}hb)SaTRw&$hllt{bVCPLM7K_Ij zJ?f|MPxFUrzaSN{I5yd>*+1>o^0sEgA$Yy!qIXx}-*+N*F!2y&WI14`lr11eRMh+-eJ3O4NWUD?pdH)pN7kkPtFyF36AG|kR8uKI)-or+`p&j zfqgJ*QjApNuDgmi8D-~WGwO_pYy~aOh!~0MY_xG|pReRP^&)~rkL`jnXG4GI#TdYU zy`T>dT#CfWol1t!IxzXD9n|;Ps<8C4OgU2)XvX zz|v8BnVt2!kkT2mKyTBPjfpPCIL21Hu5Ds@*NhowpFS%)&y_4T_PyPQ+Zsy;Fk8Vd zjLdsQ4-Iqn*$`;{U=9^XwGG%%r!1TxSri61MKaFpGYRzq$3TLl`bXJnz#t&2{ zb)o#fv)3h}#^!Ye~w$}Xa zOEt#P(;S!C`l;q^#U`t%ogdSEmEP*s!nV#mr|%8BLDR7U9NvN-!o#c(FCb2b&+8tm z1Tf$}H@SxAJrS7_q24xJEH;DlRlgn@7|z-+J{RN116NfnSc!Nuo;6H#EUEsG2TY4O0mO69^V(?SF8}afLbDL&GeQSGn{6}S%olgzyF_As-mL+wa z0vVMK64wNkQzBs>w++_(#&}7&-V62PXw>5|4X2{pFwyz!2l7o)ACVI)-1Z%ih}5-f zNh(ho-edeJ6(iF<50Oc_G~_+oT-RIE5J@~Aq1JDqRzlpdI4$aRS`?gYlrF^@1C?Y* zV*R7zyY|??wPCKbh3lKFymnEfYPHIC@i5h}1?~uSd6+GYA zy57$;%_lTB6)vDFtKO_8rW80Cy(GLZq%ja(JFt~2oG9su!LVOeF34W)Hw*8w06koa zDuPlDUSLU5t?a3kJF(Pcg7c_ZyRIlGY4a(FzbW=`wm*@Y2M0UqXg8<8m_xUzimG0L z1*cqZTgq7oas4@Px{J>Ru4gDNv?%pa&rz50*tI64gZaF4F9NH7cp0QHhoJoKlW*@y=k#7@P+g z#HJptt%29a+_84?xF9l)8X#9>*{z%rTKH{+Cbu&qd1ETBFhp78;(EP?|4b=5bteRa zJRXw;*DHM3*|s@)$y+cRe*I_{x;%;!vQOL^EaFwC)a=fQ|8@2CH+O`I&RqpJdniIl zi!*m(^p1XUnEqSCymV16WY!?5!Nqh}UR1Zl^~NxBMrxgS%0pU@`j=Dno3(fW^!d{7 z#50e4C~+=xU)j*}1pNgkZ`OVhoYrY4BAQV_LmS3FTmqn-Xh6jKY0u zGzV>X7npY?$YTSKq*^a8)5OR1Bs7Q@max}dwSJ0>9M3ik+2fy_c{pET9t7&h2rL{K zc~(pnk;$nV1s6~&CYZ5J_juew6Ps4mweahE`x`?OEnfTAih8EON-K5`qDVtlX=>lb zQk<@eVj}eYNBZ%-cGdL}^+WS1X}eZ*vF6V$3NagXu)bLy@MjHH`&Z1O>!$f@L!4Pc z8m_e`wy%8q*sqyQS^PXW-}4PNv))66AqWtt@*R(E{^jO-(Cd7WxegN05aP6S`elxA zuoC%bz;yhsid6kLR&fXY7i4nKsl+8^(82oQIz_XNN%=OUlhRw0upfQA-qv{VoLJu8 zpY3(DHgX||iOg$QmZQj@KA}PtQQg76Crb2^+}u7P7MAzB1er$Iq;+z5Y$bC7e!y$% zTjia$Z?vsSYhkaXfZr=S>RXS8^z^xxs*SFC!p#YHhGIWST(Vsa%_u0E*DZAw@_9F? z<$QJqG4>2`K!MoWH~<`zKRwPdsS2JMJo70!INZ%cLBUylq=xGzx9MXavL{q3({w_z zaqyBK?ma1S`T3nkGxK*he5djN!F~IeyKgQ7^sk${c@1pV2tJQZ4sh8;@E09+)K$rA zytg;WGEH8}&+kj5S(kA!A7}^&>Wie&0z&5MTDnC?Wl?>bZ)X1VH9}f%eM9<29&|roX(bD1jb2C9v3xtp5>?A83;aMv*e01`( ztzLn9x8x4XhA@k8+aKEd4!XB67gb^SPXQ>dWi5?A7`EC+9^_P;GDjx=Clevfm;Ll6@7}D({JfE6m&#-JhL)_k`>C=UJ^>R>6yF zK(L&lZP=GY%eG}WBgv82 z{L4NhU7Bz6Mx!IS+$QWx9@+%QJIK#ei61RDDN2TMpjgAtF|1l>Hzsfvo(DGP^4Q|y z(+P1H?M8E=c5Ic~eajO3qkD;5BYV*#AYkoR_flM)=sop;gvB=h00jkab%XV7f8pIp zR6b;zeCBr;E&nfKthdYAqn$qu2gX$FZb?DooUtbuXWcc*?UJTak?%7^~vXIpU}9g zF1+rlet{1oz8zikwLak8c|h_z|Df4md2{Y+P1H=8z^+48qR7l|Ch7vQO@+>xUPC+^ z#{*K8=>@&rmL){v%VQQ{##tM=aXeo4ld08(0;R&E73Laj9F;D4#~7qj&G41dm*J~F zuDi$ae2WTp3GWom4MsG_`a8tYW{LQlK znYn4t#eU0uXVTKCzr3c$TU8RZIwF$+{SjI`Iym-AN~EOdPZYf`QqT&WpdA_DLL%Hy7^ z_d)s+V6dBX6c5N2(ca7ai}|}I42DKxP-p@mt18C<_(jqg-hcS~m$Aio5YQ*c&|47} zI&%3R2m<4SBn0A+z~85m!TF-JDsP$n%LidirvOrUyQ3uQuIet2bW?;Xs>mxSL+Aj{#kp?-s@Xs&;Do6UU3#?hAe0K&H@0yf-usvqG_W) z!f={4+HU@BNK>cKI;J`RP@By3+l8Js2l-kV>H;<6{Oh!d5X#8P6aa$603ad;0DjSy zBGv$aCsnQbepg_1loGTAW5R>XWV>~w>%m+kQ&(NcRuVaW@xjouqsR%_fhU4Rdk@i`|cRIj5jw!b~Ln_!4T*I!Y?A&Dn2LrtoKaP)4^0vPhe~ zb79%-J;%+*ZQD+HUed`871db^(4TRPtnov?YJi~C(36Dcs%cU--#Enls$sbXX$ia= ziz*YkDQl$45m|6Uo((u8yc;BVDPTNET~udd`0k7#u60>UGkf#YcuU6)kErOCu?zI) z=y2@kb;`a-JhbhW_>x{-VcAB9IUy3~_lEidy~^=1mR z@>y*h_BGQwl~6*By@it~t!R9i+|graWrjD~VaJt?R^Hh%@k1`pPY*QfxL)|HdT&%> zVDw08i^A&C6wIE^qWAk!sCEeK5)Ts$>;7PHbI{1~Pzw^Kf{0i=nhhVQ5^A`|b{Fps zfI^`Z`zNlmsA*wmI>wYDKITNj1#`g|kKgrU7#+Lb;VXfu=~_RVmQJtH?X`Ct^KsH& zx#$?_eItduc=nbezK9RBavV>87v`+?mY(>Z|G47+ui7U0wV15`8QrOYN?%nZ=f)<&i5?n-G%vz zn8Y8pAJ~~@=vpxLv-~k!-U}J#j)5DW{P#vpPve)zafQVl=_5WqN1|W}$^uJNbrxwJh~dPtd2 zk6{mGr1_roOC^mfvkp|e_;sFLBYEUJ_ftB&d2|)eY^vquUwf5H{pZOgqQN5}mU*F8 zCQs}3Z|ip^Op&>_)vPi+AvZmf>w?^QqF_2>=Tpafl+Qya5#+Y1(0DopMs-|m^HTk{ zy0j#%>Lc6$E=gi+2HWJdqKfS|hJ6|=d;L9b+G#?1n7jT}fr@woN?N6}>}~T;Qs=wo z!%wEhR7Pd(n`1AhLhCvewHc99P}wMwoA+2z zr$|y#Q@Je_^kqd1w|y78JiAtL6Kx4}s${mSZQpAQ#TOM}Q|^^^U<1Ri5@6HJ^m<)oHCN#yb%%f*9*Rjc{6 zUi%UAK9(0)7JLn2 z-$cgt`_|-5lqL6f5p3HsGV$WYu8*7knm(ak`Q?whImafn+S|UGzzQSRR>hdmmoD23 z8h2r+_IBY}cf2}+H|OA#gOc0**w*$S)LX%kji5P7h9tJdB(|z(D>`ZE<)V~cQ*?Rz z2jkV6@a5Dz&^t-jr=hmShY{9+RiFWM>%|!gFXZd$Ro5@(y|Gliv;z?HKzsy*%E&=k z4O+H~XzYq56u0UoBtJ@5$(-jE0sXAZF}M1xYd04bZOc)!m9SM6V5`M2(|COBEv&p# zo;jJaYnmj$`>7q8j3RstAm$NcqE(Yz*62E#6q(O=mU?L-;(DIriOJs^q!4v?i|;f;;q-%e8hdKNEK6ki2@WQcGHg&M>#Pu((L=a}(OZ z9B8=tB`H38{1n4-evTQ`2NsKAd5liudv^MJ$U9{u+93`8p3+HFX8u*>=-274U%wvH zwVmqbsaDdVzC%%K^7f8pbU^!jALt866ymlmW!9?KXXCps&nH!PI~O{iWrBGN=W~W%hf(QI<#IdqTbom7w?NG&)##zgqR|DntG7#$ ztFheQcW0%17^u}eOZ00GD*eBv`)@wr@9!lhURO&?_1sZM9!UPSZ@-AY^gD5TH<4*# zwXQV0QDk@^Z^amdHqPjbuss-Os33yD_bVbM54tI#{yD!b?rhj+>^!6Ng_7#8wung; z`EBR=E!%GP{AwJ&Totez#lW(xG|>om76MzH0l%h~C}tm;3wgnQBizma71`S+e=J*IE27`mfQ~mv*M; zwiT2#nLcRQ= z!}9meH6=@O#o4~B7Ob3O=1Tqrg30!SUaikLU7QyP|9PF*!KUFuIURg22g?h|nQ`H8 z;D@X3LrN8mLa%>NVO``4%5vXm&Z`M8Q0Etj^PfDHSzE5#_U2OCNwci2_s^ak&j&D}YP z@vCVYsO?3*zRSH82AZgSyB(l$ZUG5*9C?%)`g4E!&s%1PGSZNlaM0;-D-tEW&-}S+ zs5l}%ERC#S;;MMml6R)6Z(AdHWxj54yGxzXlYZcDpsNw#emvkEo z8Nt=!<~!kvRUg`XBknXLJq*!2ipr?i5f^*)&>uVJ{z`>$A+GAzSv{@Qrdgc|ezGjJ zcrGt0taXK{>5le(#yS26`;oV5h=FOu*2-ocM;FEm z7AH_SM4Ro^jb473Wj3OWI`BBn~Al1B3pu&@g6*<+qTctYv1czqnBc z8_c;|E9Xt{wcCfL2&Kz5+#PxF!uKJCxN_?q{)uuj<%2P;LRz+4-1|}pg2UV1j zQ<8zo3t2*yg**rZJRAb?_xG2@{Gn+=qh)bE=!N^6w15E5pNKXdL@W{x*TbQRST`>M z9Bx5FeF13cNekq^n1APl!#&(EXb%Dag~_u5KCv{0`yX-s!`Ne72_Aot_f?k}XbA5= z5K|1+jSz@;1O8nV1n-5`dSz$!UvW%rXcPcdhAJs2s;Vj}Nh(mwX$b2-;#gyX+yFUU z-6w^b-)JVgf0%5o5P&=8o*QlZ5UdyB9u5t0ck#oZa9+NU|2-IpoQkR|45|ooN4i3h sC>0l^G86?vDY&^P$tkHSD5}WPJY;G0Eib{QX&C^7zL{Q)u5;AC0G_&x4*&oF diff --git a/packages/bridge/public/apple-icon-76x76.png b/packages/bridge/public/apple-icon-76x76.png deleted file mode 100644 index 2c46ad883ab875e5d5d621cd8952d36f324c311d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4553 zcmZ{n2{hE-+rYopDce|*v8C*cWyTD~5Ro%B6N9m3-$KZ~??#Jl!VqPtlw^&B zED@D0Yb1p1|LJ$$bKc+kKj%I7Joh>GKA&g#p6@;PJU79_NQaq$hXDWpW<6a^Q;IhD zD`)5_b59-yN>Q{f>W1n7P@l$lgr%dbscxIgug;Xa4n|z zgH`l2)y;z@*KO^{6=N0=_je*(7R?10&Txs!VT!1^8rx&z&eb#`D`_`Da0HtyvJ%On zC>NPJ$&D7~0qNK9AX8$39=%3!b-9-7@!Q}_EFwZ48G_2WnuJ06QdWfb*-Fzb7i4!& zBc?ZsMxahdpZa^1HX`<>TXt;*Z9>-@qnHVg>DrXB@!Dbl<|h(w;>hu3U`-FouUHo@eqN4X@ZQ zM@QT4EB~I_^~^zIi>n3^n6e#^5?zZp11jYp<#-;f-9y{mjLyP zXQ+h5>5K~IrW$;c!IFctWkcw3^8+yJL%xUVv`!!&1CTD@c%RBl0ApYfNxG*J;5vv5 zTHdorC-tv$fE*_VRZp0_ea_B%YmQp8>Cnk^qCz<|<2VzY`r3azMF~@Z9O_e9`|f6I zCD1+<&X`3cnZwAfz^zKC)395wbB1=>HkPl2SL}6`iJmplwlc8s;RakRP9OebAWeli zx&2}b&(KxcGR7=8$-xef>#xS*zIti%OFevsJ+y z_lj3VvTxbiWMXtQ!@{LIB2EVH(}?7+xlx1JQ1sqxkHn0g9^~J;@_U4QvZ_{6YYVTc z&FaB(Bb&undNX$|m~L9ArG1kloW*jrJps?@pN4nA$rim>3D$r{GjIY*bUuAly!s5M zw_w7vl518q8quYrm)L-D=uV~iCGMDu>3vT1n2#m{kFVX_$>?#uqG0YeHR^7T934!@ zLbTSRBZhOENHrorKVt22+GS8+q)=)+nsF;XUY&tIE9Uz1E>!%pb}9=?X${hKoH;?y z+WO5fN$iIDIN0`80Zu#CJ(#UZE~D#dcW_Ri6}k?(T86FP+Y0=a5sY{bn^J^OKXXPg zI4)n0Ei_U=)SmodFyM{+z>&AgDdR6SXrVUd zX%MsND2l`O2<*E=3Zb^%>8e4u9>;V!3+{BX)#&9upFsyLj9*dDnb5;H%0RWxpOSDU z(#7uYEu>Q|lFasfmh*cZ?egT-uc_em*Ixhm+H4$CiJgEkWZSJ*JiEL3*evN_KJ)5? zZjofS|AeW2q(%7XDoA3^?qKNo@aI|b=zTUuDBo367q6w9uhpIzc0Mu%1=uk5QVvRS z?e(AosajcJ<~}%_CG)OO8p{6@u}7E**>p2NKB3om{fu^59nid$C+wo(A76T$xE$%j^j*XD-(z9jcWD7tTI0je=R*a^&N^6Dv1Df zVnq52sYV`SrHwvdtxQK;)jujfc#-yNK$-LG&cx$@+%HPxYDjijqO}c_Si(cH?iBBk zY0L6n|9tYuKb7Wu$91}w{5~t>cTU_hp)j2C$6TMUI$a-he~pe=DVkfo>th&Zzfk{q z$}mNrx;(i11z-Xx=?wPshj4weyA7=mU2)bMkJ#QSyfpD7i#4kFT;fu=wv+a^pLdC9uarD z{$20oZc`qk%J$tK1#|#oqOJE$T&Fmmo2t%0*f^|FxxO8oDPD0RdOo0g)&S=UDNujm za4El>TW^fLDTJBxb=N?03-GIyg$Q>uE}bplmHi+ESb2os4)VV{`G9Pz zi_~7jGoAQoRQokh{FN~Q+L>w4{s?^pCyPqxyfn!1(?56O-|Nvv=cw(nJ@W1wv!SVC zi1W%h@qI+EJ$vESbNNCd%MMA!;%n33OG0R2_SD0G#2>q>O)hwuswONVJa
5u#N zLXs+9`}CKsT^fW(y|BD{1P^)u)77TCLCs_e-i}_MhBW*QZjWw>_Gy z<2&71B&pstK3+BiIp$-I3YApd2a*;wPq>*oASV}yb?_sm&C5EDkOVApbUm)>1ZFw- z!5EMDu9`7j?lZODIW4&jc^Q}$kQI^MO27_GEr&sFjq^tk1e#Sh13}IZzo@p2!gYF}K{b&XYKj(eDB@4t?g+O(MXG-Ds@ zpZ~U*MT`^_B=N-{Tu)Gy=2Xjm)(wP5hkGN25bf@`szWd&OP#dEp~c;=+f)H zM>cP5v|7eK5TsOXEw%I|RW03=G44hDq=M^(Q^|>+*ddEJZT}Doxb<^sKCqmm!1=Hik(U?sGOgf< z+0Q9^G!pIQxbvK~PqClGmp&s;`%QE58RN>B;^`N=AnacK7^SR^jbOI)TIyi>PCG#s z9KOy2$MC6t7Gz=RpR>>&@=7nf`N9#Cwvozdu<@J51G~`gTMm~KLaAO|VNIL%897)h zZcfqh`5b6>!eeL5yXG6M$O@Uvv3@-%l0h3eajiR9SiV4Bd^?I@W`Um%JWu8C>VfqvblaV4l}avFbg-K3_n9hT*2fUsqG^CH%j z`ZK8}OKjPGGdd~IyQOYw+|1`9`JTZN;i(Ur?CY{=@2;AR-?H$}vpMIKi^v-yLiW5PRMe;cyAF=Ypb#vHkhxJl54!v_d2t}q>dy3y1H6kX=T={8Y}`P z*4JcJc{MRydAkR6eJlfYY2TjStLah@w!1WEB=$|jQMs!@6vNn3CR7=e=E9?I`;6p4 zoN@yvwHj`G$!!&m9=p)kUz%2t4R58M+oL@iiQ*scn55sUpYJv^;#2J4H4QMnrlqm2 zUg}I8y*XN`ywHo~eMn?kkW$Yj{}AV|d@}PTw^La&Ar^t^J7WZ0RXOfV7yb%A6fcfD z`;Mi4N9kEbd87-dSs$^MwGqb2^`R|%&2g=j3ablNdGnumJ`FMP~bcq2yJ{(O~d*Cmc zTFE8^MN>IGXvOY}?HzEG=X7tr^h9Mf>W)%1M#2(bBB9^nEb_^E%5XqUtUtHxw%`W8 z%$9w_!jDqUJBLE{cY6Z>6<`w;wSKE-+P*9?z*zw@5$iXZZWx*&*;suyC(B36poG`% z0oy5ws*e-H(l9MTy#x>^+P%NY&+XmWIT&LKT_sFMzE}s)%(JMs>k8lH5WVL(YgE4+ zJjNfdKt11z(APL>w_X|R87`c-k#MJc@IlI)k%nIKl%uNNY)neh_9#2}w0j4zjCp)| z(mn1l$MR@IGo9QzZ!!B_Aq>SaKP*`>PNiC1R+`r?pG+2May0*0UEnT4*g34@TRKCu zdS1-M4=xUIU;Ge*J^e$&86^@;8owIeyMP>WddkC%w`L-(kK zMVk%d9H{)l(bGWnitQSi0=-csV9z6E_sEwKO6h_+_T9B19-wxK%)nCmKQxozYQ;+fqy`k^)-nC{*O}z;U^u5NR z*OvL>L&37^M?db)hu`t$m(gNW_d@m<3N~-=w5%~V&)u}Qy&u#&HddG{ztcoVux=5G zcN4P|Q!EYp*Db$5tS=7GBVb){hFBN8llw&l8ATbCw9-X67#t}Llb43eUBti@F1q^p zd81`z0|NtP@PBEFP-q!1Uzaa&>y&^1(>V8Az)!f^d7&i^pi@y>p(e~}ULr85+S`(KD5o`CZU_QnDK zR3+=}>7w@3(&)e97@AWk0ImR+M<7usd3g!MaU}%-|0|9eJ_HBAG&HhHRM#jb%YT_H zO!a_Ucn=)q^JNL1ejZ*fvbV4ScqcE<+p_=rV`O29C}$-&Qt6hXGu+Wh5$mV`cT#df i;IQ&Ac@zSvC`0j(q0~1stu#)_0O)BMY1V2uME?ga(jdD4 diff --git a/packages/bridge/public/apple-icon-precomposed.png b/packages/bridge/public/apple-icon-precomposed.png deleted file mode 100644 index 2c42f520cd1ad405f7452e5fc77899b7b2919119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19277 zcmb?>V{;{36YYs@+fF9d#I|itY@Rq1+qN~aZQHhO^FHrSxVLWY>ebb~Ygcvc{?b_C zit-W&u(+@Q002QsQdIdr-TOa*hWrneH*KK)Q{d)8azX$=T`b(E5yXEsh_kYUFra!G z|Li}5*hErU4gm0^1OWVl0D$-ZT>hs3fGZOKaBc_y{7wS^upF}5m3aTVfHano5C#1F z@8orrCjRGvagfw<1^^(!|0f`}7TN#3mt2+-6;cJRUv+sknrWy}y=Q*#l*+3?fHK?# zuV5A(;SLV2_ECZ)AQMyS<5chuu4%7T^L<1+Y(^n?n$TQll4|R35pbl*RNCKUK^( zz$Ozbi51#v3b@D>@fuVoHCGY+L>}8en%h3V5bm$7BZ=lq+u~d)m$R_665X`iiV50A zLJE9l+~wa7zpn2VRT3=L{2aGhw%bQMt5X(Q^+Sk;KInrN3ZSt7Uc!5Iz_ICK2j3WE zrQYN)kg}geq+XWgJ3WbTyKjyKpg2C;> ztu_;;9(z{F0}mHF%=@}c<}rQEj2 zm@cSQNk~Z!-nH`mVX46ai2L`;Fn|3O0QPTAnEJK%NKQ%tW1#-Xs0FH%7DjdnM9AzO>QF!xLL(m+yf%cElea$q3 z^9n_&m@lQEWLw#fDC8GqmK7L)2>?uqYKMv|1=DmM0R+Q~sQp$_N`dk)y?-PXOB0hA zHz%K&A2!Q(+l5Uce5hE#!kI5RjL{dAP!e(KC4#=bx)y$V|qRiLq9iibj*lVv9EsNsYl2!xhJp zF85i?D*86y-Dp{ft86sFCLE0I)e8+L_fH6B;6M0Z!fWCbt6EU2_NfT`u@0h?$OD8# zR6BB1=<9=`LbxD9^HAW#+c24`6y9Q6t}(ZRU`lHZ&ovPC_zu)L~UiC%)D_JRBIdcNArKW-&4Bryy)PK zx5|#7P3#DHbQ@Ur2A4)-vxQPP3OKoFDHO z8Oh=c9DzrNT%yoogk-BsLpfn}frDI=76kvu4i_=%i+gWkv1>dgQ(w0I1nypouzQiZ zju>lK!JFN7=M$cH%K>i9`HBqa&X|*J6tmRw1g~LcdMAGa>Q+ADGE`GJ9t4|y7OE{CI9al`gfM$C$+cuP+4llICtU^k0qt)KZCzwWY2edO-_;Ia%~ z^IN>3;~0fQ^>z@J=<CTR*3W5*$3&UU=t;+Z6)L$ z@vBGS(|1gENnS5)#OP23&$JFb>^~OLws1ps0k~#Uz>}#BKgCCYnrPWl~91PqtI0&%Uk&9Ya2mFh9xnUOOlx?O4?ns zQlvnpR>)S(X-V^}{aT;~l?pNHx4DZF9kFn`2@O(Of^_c?ps=O_x40lvnbp3qaYfcZ9nip6{I*2=-ck+tuN+suD|q4Hvjo9j z=Q#bKWk%oEQ}m%vlRMSdn1P%p|2-Dv3T`kppbbuVAB1zDN%+g zWb}DyMsR1Lv|Z19?45s%L4QJYWh_-$pfN;i;@Wq6WU8*5%zs&%YSOhk%XqauGaM0# ziE%=nbq70O^f_bB{rb0X8P{WwUTxCj%9FR{O-ig3_|R6bKU zz2;I!nkrukgaJsS6-`y%`U-wq| zdKaO^8sldhX}eR!jZ~1Ad-P7eTL|18Z1(4g>|$M(rn_u;?^0M!lK36 zBaWw1Qjf=lMsq(R)KM>}E#D>M&7UzaJf0^w^UqNu*XLH8-k&EOqQ8i%FsE;TXJ`k@ ziM(>Am80SDN$U1Nl9`_bFaq4Bm~aLFQn03_2iso#WI=lN1miyb z;I(4Y@o_O*dH7QiA6bT^_X`ya|0HF+Nmps3HIKN6_>_7TsZO`xR72sTYB`uk8Y6Yz z<8nFBkiOfSZ`te!G{7oVoB)PR59n&Q#2@URo)JR*x4#Fb0DRWh_X8OvJ!I{U1ZN~eO$wPNp?$=?HYgQDA1Yh#*4tFFL8@?9YXV-%cQF9Zpab_77%xT={zN}h z8&H6m;W7hU)M!Glc7sTxLkCg`kITDpG`(3U`o11%FiP@F1h@It8}y!u_Ln zCZvl`A64FJ+SfGto3_18yuyQh!iUTQ%(Wah!f98bm-B!Y`?@Te+_qx2hFSFq8+8=a z;<3y3^}STNqWr+=bw)1&`eRYJ8UCK~Ava*C>HyS>xK%&Pj7uwB5x%&YeU z`S(Z(InM)Bt!FUxWe-kTxx45si>v(pVg+Y34#l=S9nJ9lP`>rgBz>49S4!TFUK5P+ z)FdQ7iL@%%y~wTv-9B7Uu;@G@>$Dc|H#&D_w=~ZRK@?;ndvIdDJ3}qsju{Q20{CB^ zcKjASy=75$DSF&OF&cg?IBt^Bo`f5kKiQnCA&y`9k7}vJOe7PWlT}B`30dBJoYifIJvg3hzWf(3jIkeX*J~oe7@4?J0q_)J+(Hq|x{_H;bBy&In;^ddss8 zy?b#7XSY8wRf&DJ!!pC8uqBRhB0`|x;w^GJti94WD1=*)CZf+RbHH771k#5|e1p8} z%A>FnOSG9#2mCJ7@ZH581~9%Y@r;MmBk0nSJ;TR6ps)6xp4~^3p{A;QZK`gVg5UcC zI-hgatNPKzbQC!9{~-wYwDv882L#lRimOz@(9pLZ7X$O*8QW z$Pu|1FOC{-6|LS4Ux8dMW_DmsXreWGeijcVIy@^+4+icw5%vzMD7#eK4p7g0!lpjq zGJq|z-UWb7?J||Z98jx=DjE!27iIK9&XaNF{qp(EGk1B9O?SfwFj zyW*MaJsM&8@~UG#r$a(L+g{dI1P z;X)=*BM}D`aRb?dj(ElX%!g=b{nyuqz4!K9*$p{<9Z2WpJ5Oy_$j~r|F8!Grv{@L|UOGyFhDbNLF;JRa*kl>*&r82+P} z#GD{bU)%P+*9N{zUtV`-BLdz>P%*OreYYC4o!uV-LersT z4ad04n-GtopbFAoSr6+a0u^TCjUp)1H5Zm{K}Ss>hE?CqA?jg9c~l*zwpY48p8Y(p z?Yxg2cOnlULfQRu+rLe)ne8OkI=qUZb5tmD=KU+n#DWI{=%TEYDeq^-97I}300-eB&Vm}+vw5mN z!r&e2Gh4P&1*#5HuBCvzEqvlT9BaZZ#VUv7*C&44 zrB8%(#%_Q1Y1T1>LSvB!BNl>q9^krU*HxBPDX*Qi3s2^nwNB)al4}wiZVr{#*J~nl zAO`*sG3U6goYa-)el?%)>iXOm{sDhI`*#y0>>jc2{Z|)cs8|hAk1K~Ts+q7L=8NW% z@@7TVd3|wMV8fob@1T{~Lt(j-gL{H-`l0I3k<47}-C7UlNV?7X*W;gc9i$cbZWA2; ze}ojyG-e6i;bKgUwoc@|ulN4!r&UV}4y3uk5I@m=Q!v8JomQ&q5U1@s1#!qb_1 zIDsN7sTuI@f;2JdFU)b?okoSV4EW5MUN6 z{#!PKe4&|&7HO#1Bjo903%r-GjF+Gn@o)4jmD8$b8u23|48Jn6x`2EDFoA-1G7hu( z_T57U!bS}CWo+T0F$grlQMgF_TOrZOBlC||D9hF$1cFT#rn2F<8=aZ!rf?>+t#8j% zU9`1GCYAG6E@JF~`4ka+zf~qpn2-4FACy2~)RSuD!Z139X3mvM;Tv3nI^G@kP*Q#K zZi>*6S|rMg_hqG{$1oN+)%pj|%=Z@Kr&^!XGUI|#Cupw+?B(TjcWMdkEcuVhNvi}q zx#uL@Kx@59Y#-XF#Wt2=6+LEC-+l0+zD97qFXcaagc%?S z?n0T`ixq`rK#7`<^UwOIrL-La(J8i+z4fk_=NkvyqAp}ve8^G!yIDE{%!?f0Cg9W> zYhth3aTW!@?>QZ=;Y(a9Xb$s8#k9{0?S>hog%&Uy=cc0%L-Jw#FJoPE^x)Pu7s#vb zi<@XpX9+b$R-4%bPE?$$EmAbL%OslLz^8J|;<}sU&JR46;LU50{QGSGdj(Z(W3u$) zcTPJjOE&G*U>Ika>ab`B(#lN5s8)oE9hJUUR|RTbF)=6jL&QKlhlni@gyp>b2Go%@ zo5I&S#7a7_v6fWcK9NCfv$F8}{+(&FiSHCxkG^Aw05HV|@72P-B@epx4uyaKYW{{?FFNI z#l{L@e9(ea6wZD`sU{eb@l%hI@J*e{HReDO^ShEmjOS09OAvDjTNh5|l1UiY3^^XE zyA-Lkd7Sl~#=%JQ49=q|oq!>vqVarc-l}QALinrN z++;*L!`Da!#2}ZQ+T=r(Y4eiws%A-u|KpT*B|vWBIJ2xt%^Xj{RFV>6aM|s}g=6xl z(39ZbV&hF(0Cz}5jR{*x!dw6Nx&CG{$F*9&j;%nd84OD)>8RAdtt$DJ;Fx=N`pM@o z<=a{9zi1uoZau;0V8y>n0*Yz3DP zL-dlvU;Eoo>qb*;u=G)te81rw0|-U!*ka(B8;jYO`F-j}_#^_Mey0Q<#Ak&D7hck8 zx;=F~DqA&odrDXOft@k{d{1HwK0hU9+V`y;M_A>f@4-CaZ(kHYF~N}{#?xW9`j#pO zp^hV`)~S%-fLC%63z9iZ+$nKkJo!oUiiK>?x2Q2yBb-APU4H9{xNS|%wk@!|mI+>L z!i6PFo29^a;g3)`7+UAgHA>ju4+#Mh>&g0<#$SVZVAvQ>5Ugy^!qna!5~_0OS zG8ZfW!hn8YAVdWr`~3T3Wm8S-pHv=9%plt24=YcnmL+aieVF!VeuJ}!7G=4nPDIA;HsfIBaI ze4+n+Rv)J^vg&2*K6mo{#61OxHkN5V9&+J1BZzlsfzwDpaWY|fmZL_+OPwu|aHG^{ z{n(cK>{&w7tanEP9noG2*wkp_l;{tbN~Pwk;ksvS zX1nX=^AKq@Xg5FqR0U@bCmb&4u|}8VZS0yZY|%+kjm5s(p7_OI9?=cE4A>R;Uere$ z#`VtzEGw`Zvwku{Mbt;{68l%l*uD9Gw@lGx?poI>=m1~$OZB*LQ5Xs00ktCVj~tktd6}4_>rIef%tOOcR1mSTqUa?Y2^%f}VNt7bCZP9O2-V~Q^AxQ0dtjHKD$ZLk9o(I6K-4HnC37tXzShMsNLjf&D+h$+Cw zDDgEB7^V7*Ty%QKCI%4{6F{7MN=^&uJ{lLGd5I8)kN`j&e=0rC2`Kq05YpwZg$u+n^E4D8xkRNqs6hPMXA^{5X(|IlQVc ze#OpW=@PModlI^&KQdjnbTt0k~bsf4A&Omo!q z4=$!!)*@s$N>k~iXcjE6$s?m-SYi8rki9ovvPjAP%c|E1N3;A!J6;4Hz?&RJcpF)2 z?X#V7h)_x@f6b(2yXnqlR2IG4-2!Kmi4a{0QX{0-9MA%RYG_hq8^Ix6g0qHQiryPt zs@8ACJG>C)GO1BM0GfWRazBlUv`?-#oQi>Ok(3mbL>la()OIy*;z_uI)(1(31G|bi!Sx( z(uERzVySxY^d)hD!-b(8wleV3r`1+I-C=*S*vo_tn}@Eqsq53uRkidC+{(sS6s3_tnC`u!9*yE&0)=+DL?l;W&IHCPXg+*iw8@203kW>KvPk?AWZ*c`z{!(I5mcWJAtzs)S_B= zm<@Gcm%QKZ45U9c0&FUkwx=3{jcTLVA*PzAp0!-$1@ZXC8U-DCDmo#+suPR1tKhiz z#EDg~YP|OJ>D5-;=tKNydV4~5=`jfE0h%yqXiM|=x2V5*&%ah5%xe;&r4mtjh9!0_ zKZ}&l3PZiV{wlAFhc~$Ay!t{P8T}Tfp)R%}JuFfttELFF$7nc+U68r4Foq)DHk&YL zm-wd}gt37yirt%!AYeiA?eNTm5{(W-ChdXiW7jlfY|f)%AxKaY(EaH5a{OIu;*9-E zWfx2JmK=kAvd0W5Cw+&us(?IrO{Pg2L&-!|w$x3Ba-NS&JS@zUrD^@+Wt_4gLdg@X ztlyH-6?BJ#MUoG^Ek>%UMd+T#A(I-zI${(UJggOs`Zp?X|Hd1gqk^ML$b>7eyDAtp z`?HIgqAQ7Ow2t-LW^hc?YQDx*l9`~G+A8S#QX_r`#37oNzY8!dz$GM39QuAI&~>ZN zOI%+ka<~SnTScm%8Wrg#q;ZmMZTCyWmrk~m{0+LR>g2f!N`x`0C~qO2?1e;;fM>v_ zKDDe@e1#M6wU<7y@{aFbE{t&eyJU%%LK4j+=YRyq<}zE zzc&n8-I$Vkn+G)C1yv=~Lsf(66A5bH2_1a7oeA#9DgS@@ zPX?fGs^f5`nHODF)ffLY*_Yc{J~T{UhYqwVu=*EPL~uO2=_nYV+SXXV5+dPYIAe+Q zQ0b1(1>NTd>A>LML*Re6HL?aBLe^%f;`*bgpK~`abVR5`|AC{ZE$sh3EF{Q8x^(LE z>=p%+3F0c{pW;;osb}@#D4@7=g8c>aW2f@Hbr}C8@l|TQoy&*iqQwJ7zSN|&Q8ocZ zo)Wsac7cLfF+Zrvr>yfZs94PSv_*ebO95+^I!%`m?d~(q+VBgDf*aX>_AxbuTa(A^ ztHP0yA>83coeDwj*n>uLw{JwfM$?M4U^QHcF?2r}(9JD-|JsMb4xEC!8PYHr6sd34 z`CCeNhyd#yDU7Apy;BPN*j42K4jC;W_fm<=I@ta-nt71Jd-@;*1fJh})VD8qyLY}@ zNozDiEEJD5yjjOlBbnDs&pay)yiq_rz^jQiFk2*E)NIaiM zb&z*cb%V#Up9#Y+V<5K?1+;|iBJ|#lxeL5lQmp_0yPWzijD*2{gQ<6?da!MhBpM=) zX4w>qnIb2(p)kSr$vk)p>eU>2=jT^fta6BxmXY#Is~fa2Rm|IpxFhb;QaV`)C}ZGN zumnM#4}Ynq2rRz%jo|eR_ymBPbEOr`zRvpaRU~cj7Fi3toKrWyn$mFxYgnAx=`3(R zyFZvlH%#L=jl(;(zZhdIOlrSGT#1frzTULL}zt0{N(^o}zX^E@kIJ z>eXjiE(soL`CDLZpmiD(+&0jIBUoDLrJdY*);Cv9nmsD@ExBPV)veF)2G-JJ1pJ#V z%^}hrFN3WmiJ=nMV{ApxD$y(M&vIN19At6lQC#exeXmQ?4@ zv#k4A6;=6L%S^$w0ORaAbW6J&AZXojrh;>TCY$I3WBW$~!% znRsfp_q0Z6roIyKJXwe&jtjX9(a)eItT*`l$Obq_vHftfvavD>ES^63W&-51S!@{Y z0?1kx9wDH871Zni4padAeY0Eqk&!`B0Xs;XR9s zKVStjZ9%P{) zxUXq6YCA45muK6-3b5cMS?m3sfm*ZZ#V1;{XQeAZ#LQf}@Yv_r!dgqI?0)7T{pKXS zEMe&^z9))H_EisRA3XX5;D^BPLgBRm1Nh?^cq0urO*IYmZOsIZ6GBWYoz7N1>u~p( z47wRH1%FN6W;I9*o{3nRge_htogA5$&KL0K+QQ=twp8Y0c-N?YHDU0k<2T4gVQ5o1 zQk&=b_Y8PA8ApylEj^q3B`)?vYjvcUS~St`C)8LLm#CM$p#cHinchQDsZB zP9lc`F72-0Mk?F1=<+x!;LW%JgTXxZO2+4lWPPMl9G8|LWgye9ZIf*44HeH~t@&H4 zEwv&Q2%*ws>&cKG9}uGd9zqlNxL(C?LS3rtPLU2YVISJpRUPo;`k9J5Y{CNocAtA4 z`2hq2@9)LP9t7a#w6%sahJie{y`#gh&4~p{%kolvpy_Fh4tqntU-ieB-Y!*-tc3f{ z`O$u_k#4b8Wr4L>m(Ym1IbI{pC2f`Z#`zMC}DTZNZ8`8jt0HIreyn?4y_iL6eqWhQvYj;y5 zcv&-Uecq-aTWl9rquzJHV2mIxq_qVUd}q2aKsK(KPz~HA)$fuNu-wNply`+IvlYwq zb>MSTjRc2AOh(s*nQp7MBT|op{uUHqHPq}rV2U?HpaQ5q<;5I)5DzE_-HPKJ!YEeW zHTSV(P`Oj#;!{ThV_;AtzVOvLmMTh=ScO%si#I?_7kPoy_ zE|;35=6OaMfrAoA!2iLkO~KemZY)68ez>XE>}94+izz1WL} zS2xlRJua_kX!cIoZ9+3Z#%S95$L^xhJ?u8E{m9yWE~;fw%&ysH60a`{?@A*CU2e)J z(l(Rp_8tg>!F>EGFZg3Cmr)H?isk%bJs+o5=5gnd?oeX`1g zu0MkAZr1S4mcQr+-%-2nFHax`Qa$*t1dfJwd<5H2oD@+I-SXY2B#PSRtb28hjV@n< z7#+HO=j&IlW^9+TTWO#3ee=CLLPF{DEJ4w`rQA374?lDZHsU zeWriyiq}fJbRiP`CK9Y3;oAO+Ap&Y&{Fbi-0rb}Vtnz8v*&F-#to#>T`{=#~@%tcC z0Ehcz1Z(yR8O#>8dC&yxQ1~MCe2C(2@b@_YHeKwhCWC*H6nR zr_{2jZdG*?DW^RuA|;l?qh;UhMs1VwD#kyM+2Ez#*K&Knp3CN(J`suJ+cOKr31ME{ zS7nnjhJ5vfO}lbtMhHUM>rUBKztCA`rYjVtqt?V{3v7Y335%AG3FQYaFv}vhFe2~W z6ib(W9fqQNEunNjV%#vwy@${!bIB6|h#3)mp@}@@v%Eq(bl*;d3O0{7wk%&kRe7w@ z9?Ve%5UvLZ`yN|m1qDrTrq;WAuR3fuLoW{p6XwfTyT6^7vkg*IVsaVhZD@#vhyKjb7-wq5C%e#Nmk# zW!sW-?fpk9=G5=T0_|(IyVfLf^SJ@M;RyC5!gsR&|h*nw0-FR$ocbt_9U*w7UL%vGdWls^-?OOdNvM zb9SdljalFAVffbT1@4qw<_#<}cRf}a4eECd(ww!YnX0`BF^4DIW$l z{BdroPi(r!d3>;3I+BOQRV`8~c4 zWXgGOT^A%S8ijoYa*m{m#2=kxkMxbluu#!{Al6NEHb}p%4B_q$UUd^W?l$(8l0iOh zG4+-`Y+-*I!1wcpY|VsblgA7j(k|FeOUpwxa zjf%xnZ|mVkV?{7b)G!%9xG5W}-86Dwlm2=_N$7d#ww&=}+d?Dst6;DotUUo8>aB+! zT11Sc95*E#{#O#5&lk}VkH@w5_PRxDd07A zPMtN9z;Mx_mvovGBUPfCeO8;o*38N^6OF^@m0O@^Pf-(p5(ev*XUc=MtxHVAQnRo- z|5G`y@aGo=a+mG8un9pZ$GqaO*C9Fh*m`_PwDw@-##J#Uos~ z3UAw+UKJdCD+ zDN73*{DKh6#Ly5Yeh(-Kw41OEibqD=EH3ElC|xq&#JFAaXquQZ8kDYD^%18c$bd_# zFRLi1UVvfx77PT>2v)z4PR?1_rGv>eZ;Wn{e8jN(civ3PPZRiAEiAB9;4Hl-m%0;; zf`?prrFv?Ts>!cTV$c9E)iSU90!N@tW?mx`H>@k$nNayHyQzaFlZ)3PAq^L2MBULN zd`U9jrwx^&Y5W&r*l6;?SrDU;viaB5fd4zDeD)xcNSnLT9o|Jl#P_y~v}nOd*}kY} zJJHDW8@s4lC{RBT7QUmHPtKbobjn8*snCyTZk7y|K)eh(#Hd#?jUsC(2f;>JAToe( z!XUE73lO1jn&JI!EAYBly;cJaTsX=d2vbVYj1V?8k{z%CG=S{xVf#~n9O(ERcE&`P z(nDy2gopk=lKKDb(U}SK+WY=c-HjfR)rq(ZDlW$|g1|?DD6d?&TW?r0ykh@5jaSb? z0uqF$X!m1>`1~~sA&Jg8e0f6wL%MybmHG=$HmgjM0-tD;AJ7+od ze0|Z?BhMQm-Ozz#$;f;_$Iy!JlW)twDh0z%Q-1jHy>1w`4sJ-&%thLMiPVH_U2 zOo};TqMFvMxyzV5gN^y&A3}6B^{H*0{Z{+_ze+_ub?u`n^i;2qRP0_?9#m~}1^gK> zy1;rfu_BPRZ|9i;R4_s8zOR46p`N$+=n0!HNVR@_+e80C-mObE!X7jLib-Ty9~tmh z(YGRJHVw&>iZ`I(H@{_aq-#(xG1Pt=AMp8}fSYu?h+fvu7A8Bm!UPKVt zI5(gU$2Ab!hBXdg35E!RgK$vv9uO3VI z+LMuMv@05`oy%wv$uI^7op#3QDo8x+T;ed4b3V=B9^Z8P50=AOmGak;jF?;-4(fJh zx90m^_Y5g|#*PG;B1qjyno_w3@tGey4v-6u7?a{s2kgfCXK{j>gS?ttJQv~h zGGJ|o4!v*hWj0THmsIHH_ck!p2a6ahz#W4V{6i5}N)FG?_F|Yb)Wm-#Q0jXW((Jv= z>GZl@q>oO@n!#}&YG__X<+4)xZ`hA#UJ#`G;M^7)qj4-cy3ia$@qp+bwcR6oyK=`d zshj^%wrh1G9=9;VB|`i#P++bp9pm;=St0TAZMieJ zC%)f`VH)~`XVcCJ93s}qjdP;sNGR~1G~Zy;5*aVxG!$yC$E-p=0;Kb%;G-6Kx39Q* zj4Y&7_~`^32w8c{p6}cRWz5X6SEJ+^yDO~^hH@-H&>*Z(HlGALcq+Yi0PSVrC#P~^ zTLq*3E}dA=DIm)}m!ab*{DI2mBh*gM&;FbMF06nj-DcI*kHW?BS>QrpQIg{4Ca~_rqzwHA zIj&w2?V_L`AYM{o8LOCTGslSyM=dpc|d=HE|#EA{7XK3zBA~1D9XQz(y zmM(xYgxpuW230P8g|jADx)J*F%W(h24CnYH0Bij~#RH}U1oh;L)u8Tup5ylXW%rsPZT07!%9q=X(;L-eLcf}TlO0)n2 z`Qm*nb*ck|8pkRB^CMr%E_0qt8uTUa8`9bG<^|X18%%~JMrz#=4u_I$rTO6XsTMZ~ z<@w(_`1&lvDBx1Aoc)5C?_gPGt_FQ4xt6|%P6n>*_jqv8eFgPhYL*(qloMhY8^?n* zod{mH1fFUjDkD=+6oGT_IVSo|f0>4e!v~(e$Md1-3k<=3pWq5Htv-qXc4(uvwfB~B z)RL0ee}9rew%EJ-d%s{l-1pq5@|jM}$y@QHji)L97R%YIdZTzq9XIMyN0h0ez5h+K zW`3W$<;#K^2^E_3Q~OM$4UUwZmd1^SRufly>c8rH-Axsgs?d_j9=@g_^6+!*&tWnJ z3~o6pED`d;E3K~BsD>@Se-Uo$2m~Hpup)_6v%Vw~`jEO%6kr=<=^y$lHk0eJ@n1Al zkZr#^%sfq%(>B;n5ZWD(q2b=5`$OchO@WCxXjgDD`pmM^C^#Io9rPsWl7vFHrFfLt77!;4rtR{$D}y!X zXK6jYYsg!w6T+ZNZJnqIuoIz?f1*b;aS6}ZWZ7YC{(p`UuVI|Z=n&|q&S zk&}Y!nTR=cLmwo580nYvIU1gX6i>MlvboO`SW*G|>7~xp%q2kuQ$RPtcdekWRShrR z=``pB9I_C06}qj_4n%lDjJ|qV!QUSM(@?cJyaZ^I`fkbQb$&DzC%XFOuEi&rl5>p= z$jS0+qdLW#Ny&^WI=UW}TZes`J|tQ5qoTR^*4hx(|JXn8kqNKX!z6K|?MN%>j0>VS zvLYC0X`CV{{IV`Cz^9oObwXMGh#DELTMh7TJd@7;_2)n`nYhen5Mk9XacBL&d$(2-ADqfSN8C`Mffo?D0 z{8IPqNXUt;g?b8gL}Si6%(N;Di`*g_bYW$st#M*b+06!17G(knt-E|N@^1Io3(BNK&Il-F#gmeRS`(JyNPGs;s(lW} ziYW!E2lsu59`u-K${?v3mE?**U4|=kYBRvAC4!YUe^ZF)XIe!2_ZInl5r@w`+1-7n zsF#DL^&-MR0d?XrVMa=NkCdM%cs)^X2Z(O8#sS$u?!WGD^BnKNb~*{~6WG^-((93v zWzG=4_O>5mXkTsc86}{Y=R3ue3m+qM^O54h%$-bzjAp#*%FN7t7U&exqOw8`mf+@r zk1}46L=SrA3E`>!@P?Q0B$?y}|57{Ndz+jW`OQ;TN*4&yP{M}Tols>sLtKAHg=SZkM_r}?5>Ec`dq2x;RFg%?Mv~&}lE0IIVf_W53Ek#(IG(jvi^Vn0q>VdRN-=125}{ED@|zaf z*yL@QlO=278!1xA+*`hkW=fSjsjt~@?Bh;=j7U4(xnixtI$$f7gYjWnH)8tR<71z& zeQddY!p3kg`B8qC&PyDp1JNpB0D3K@FCFNXvID}?=o zCil7ft?$b5tHyJGN6l;6&|5 z6v7?%!e&T<4*!H}2K+aCzu6^jo^WDlK|fz^R%02WG%F|Gnf7(5s{{7El`7{PN|wDY zYD-a5dC~j(^B20QARAq~jC6SHtmff;Fb12(`OMQTR2~V-qJJ$!Zoj(k&3Pv0-I`~J z(zbGf8EfC49ZjX^$5hOFe(-aka`aJ^w8&#(ex=IuGjM)JI0R*uWwc%Pve;> zBO(zwK?ByPdKn5lt6=$GA8LGn^;l{zvKjGQ+cTv*beGa5hPWDFxOccNJ(8v4Hx&t z2oGOOTJ2B>&r)E8tMUKT>tAY|dZ8b%1Nc8P40u^jCP$zp&_VtqZ;Gr27&4E?2pv{} z+*^ZkOAzzi8#BFbw9Ac@SY5ig-*kD8YAp2RpIZ=Ca3cke&n`M;Drke#P9b6_xOy*i zT{ZBI4N%PeM^i|pffM#n(#&Yw=l|z{_4V?J1YlZRNv341h|wJ*PBPP==@w*e@?SkD z|0!A2+z(z&*f3je4&U$6r1`C~*l;=&|Ep!oI$Zh^4$DUPNl#H1VQ$0VA<|s_mkkdl z*Zzr)qPj@~Oig#+6N-ARz-0)( zXW2GadDDa8q(n<|U~(3|Gm1Y}EBs|^*kfYh%k2+p7D0&4EjoE*%1sFJg|wkY_n*M3 zeXa8{&d6P>WD&;yMQQ`y`n3r~64zveKTV+OD@MFSLy9*IoVLxptYZ-|PDQUjF~X#< z2Ry(Szt#T}uc{dil76E?XLeG|#VMX=k0pY|1hc7}7pEo~K#tD(Kb4$mI27y}$H$hP zvXw1MAvDaG8OF$xj4jJ+8OoNyU}VOa#y&J-%TlPwwP5~p`&^S%UUDZcXMOlM97hZo?GK%(RWrGr;X|d><@bJ%{Xvc z%oZZv#lrK9wcu4;vtG$pd*TFT>b|(y zc$#pUrarp}r6g|(eHg?|8h7y!Q$!9emx;y}RRo>VZ7$jr4U04J73`T(X$w(EHR5~p zO=)j_KVh|~i`z|(@s8XuH#D^m4-GAiq|!Rvq!xvnvihoO+{%sb+gP;bv&Lpr%6-$k z+C|gv2HBg35>dlimED^2tJ~=re=d5tUXw|9ee1i0yYv1kyLiw(4mkgQ$jl9qi_nr@ zIUgEBpVyhSE_rB8PFHx7=UGUXdDz$BIwm}*?cD;cFbIBqUChc?_(d_7S8L7IgmcsG zgYKQaW8*886dRtc_ct>jGDq|=Pa%Bk5Q^6cRi71Ce`0N#MQ%W9jGHqmB)2G|g4pWUQ&7I{jMW00aw-;3227Tu^6^u}XJp4z+N9ywp7xsZx zjsLI`DCHv0**#e{0`ENTVf+0(SRm~rLd8}+UaRqJBB07$(l7eF0JJ=0X?vN7UC$#M z3!>DMr6VVi_dvc?L3)weS8sgz=Jl6Nb)lHN!fSr{FgUwlV`s)Qi)->O#Ef(4!UH^;*_d|JfDgEgrMRu6?KV>(_uw-R;|bnx-#~Fua4bB3Jv@X1dsZ zv^}Wu$f2GWsVnJuCFy9JKS+&s0u))3H&#Y8;S|oF_U1mloE|-?St+RUqcv9tMxvAA zWWjstUd7S6UoTIyXzGsD4%3j`@xOA{H`Vv8hZ%c;Z_k=esO`nN+z1~Kqh&gu=U0!g zQf4Fp@YI>2L-SW6j{ZkN4Zy|X#G=HnQG(53F;cb&+}}CzpDzj0$&*&YZh{h z({C3o%^{BCvEQkO+EC@=+*?Y*Ckam?92ras3~=r$V>=DKAHNNi?vP_3IVBbfG@U(G z7Qr#VQX$>>n%-BKq7#8%tIkN&cDyVa2)OE+ldl@zH>sLF&#R3mTViGk>u0O7Ta|Qj zv<;R-G`q7im^r<>2lpSbR*pNEO5RVnn7kpn;`D>LAwQeA1LW>oBp<-em8W7D*(OZb z4!v+s?v9x9m%t9O(u2^sS{Wwc%U!s{y)=1szzw)*S+#XIZ z8>-}6az#7i!!o5clAqODo~g1pP&oGDe2Kk$>B99nt>*$inb=_o{KMJKn53o@@)ZG+ zLh1Nhg$IwNy?5ccg+~`$A6}?$~awY^;`pRZbqv4 zTvJk$&zKX25`4ZIdQ6u*v)SCO@r&s8<^x`zXodkfQe=EA`P5wIvku@B7mH&)pa>i1i0@kK7 z8J(BbWGiAG!e{%qSM6t}!DRShq+rm4^O7EMB7cE8Pf`9rvmS7fI}8}?3aY0q+PGcC zUDc#e9u*;+_>P}&P3SX2rH!a(2AByuS_^2>VL-S#?5M(0k64#3Z1BnC<67hvTNggu zYZ^h7^S%#Vf8Bdd?rwtPQjTX@L-lU|ayxw}T{7#dNQM39$HL&z(OHeLm;DkWK}M%o zmL*>c^aWr+1vQxQmg$kT92H%K)$a$3&8PG}N$-e#YLQD)_lWhHk2x6j2!2 zjaz(>(r&f%B};FQi!zeML%+N}u5@|5wT$APgy-6V0F?OGtnD-kw5c22$Kq?`B}%N} zLLP+`m2rvMXRRpWS=5B1EQPwzuScRwF7jF-SwbC_0Dk4|YNvjFe#L&5yE|quO4yI7 zME09(77xHA?xbjVS9BjiPint#mIhpS&j8;hIV(JSnR7d_V6VT zKL0W{)E(*HRLdEAq((xXBL$#I7=%9&!#MzYAU!Y;1Ob9Ut{^A^1VX@I+MFE(`k=;p z?cV}$VFB2{nExJ-8{Gls1X%vca49U16on>Y05&*u5XK%Ig!R9utgmCB0|y!^>w&;f zAP5Eo>nS^d^_7E3BmzQLH!3Ph2m6cWEDo&`Mhu!x{lpOj9Qmc_8XST1Lm(`|{3CD} zJPCpLgM(fIfNS^LIRj4qjrlt#0uhYC1_hG^V|xPRnC>!Z&xU18$cj76vKJGE(u4_4May`{loB=bU_C207Ed;Fwidm?B{QQ j_R|OZ8~Q^qXc!0vhd>Q_t8?faEr1Qu!Q!5|Z{j}zWxcY9 diff --git a/packages/bridge/public/apple-icon.png b/packages/bridge/public/apple-icon.png deleted file mode 100644 index 2c42f520cd1ad405f7452e5fc77899b7b2919119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19277 zcmb?>V{;{36YYs@+fF9d#I|itY@Rq1+qN~aZQHhO^FHrSxVLWY>ebb~Ygcvc{?b_C zit-W&u(+@Q002QsQdIdr-TOa*hWrneH*KK)Q{d)8azX$=T`b(E5yXEsh_kYUFra!G z|Li}5*hErU4gm0^1OWVl0D$-ZT>hs3fGZOKaBc_y{7wS^upF}5m3aTVfHano5C#1F z@8orrCjRGvagfw<1^^(!|0f`}7TN#3mt2+-6;cJRUv+sknrWy}y=Q*#l*+3?fHK?# zuV5A(;SLV2_ECZ)AQMyS<5chuu4%7T^L<1+Y(^n?n$TQll4|R35pbl*RNCKUK^( zz$Ozbi51#v3b@D>@fuVoHCGY+L>}8en%h3V5bm$7BZ=lq+u~d)m$R_665X`iiV50A zLJE9l+~wa7zpn2VRT3=L{2aGhw%bQMt5X(Q^+Sk;KInrN3ZSt7Uc!5Iz_ICK2j3WE zrQYN)kg}geq+XWgJ3WbTyKjyKpg2C;> ztu_;;9(z{F0}mHF%=@}c<}rQEj2 zm@cSQNk~Z!-nH`mVX46ai2L`;Fn|3O0QPTAnEJK%NKQ%tW1#-Xs0FH%7DjdnM9AzO>QF!xLL(m+yf%cElea$q3 z^9n_&m@lQEWLw#fDC8GqmK7L)2>?uqYKMv|1=DmM0R+Q~sQp$_N`dk)y?-PXOB0hA zHz%K&A2!Q(+l5Uce5hE#!kI5RjL{dAP!e(KC4#=bx)y$V|qRiLq9iibj*lVv9EsNsYl2!xhJp zF85i?D*86y-Dp{ft86sFCLE0I)e8+L_fH6B;6M0Z!fWCbt6EU2_NfT`u@0h?$OD8# zR6BB1=<9=`LbxD9^HAW#+c24`6y9Q6t}(ZRU`lHZ&ovPC_zu)L~UiC%)D_JRBIdcNArKW-&4Bryy)PK zx5|#7P3#DHbQ@Ur2A4)-vxQPP3OKoFDHO z8Oh=c9DzrNT%yoogk-BsLpfn}frDI=76kvu4i_=%i+gWkv1>dgQ(w0I1nypouzQiZ zju>lK!JFN7=M$cH%K>i9`HBqa&X|*J6tmRw1g~LcdMAGa>Q+ADGE`GJ9t4|y7OE{CI9al`gfM$C$+cuP+4llICtU^k0qt)KZCzwWY2edO-_;Ia%~ z^IN>3;~0fQ^>z@J=<CTR*3W5*$3&UU=t;+Z6)L$ z@vBGS(|1gENnS5)#OP23&$JFb>^~OLws1ps0k~#Uz>}#BKgCCYnrPWl~91PqtI0&%Uk&9Ya2mFh9xnUOOlx?O4?ns zQlvnpR>)S(X-V^}{aT;~l?pNHx4DZF9kFn`2@O(Of^_c?ps=O_x40lvnbp3qaYfcZ9nip6{I*2=-ck+tuN+suD|q4Hvjo9j z=Q#bKWk%oEQ}m%vlRMSdn1P%p|2-Dv3T`kppbbuVAB1zDN%+g zWb}DyMsR1Lv|Z19?45s%L4QJYWh_-$pfN;i;@Wq6WU8*5%zs&%YSOhk%XqauGaM0# ziE%=nbq70O^f_bB{rb0X8P{WwUTxCj%9FR{O-ig3_|R6bKU zz2;I!nkrukgaJsS6-`y%`U-wq| zdKaO^8sldhX}eR!jZ~1Ad-P7eTL|18Z1(4g>|$M(rn_u;?^0M!lK36 zBaWw1Qjf=lMsq(R)KM>}E#D>M&7UzaJf0^w^UqNu*XLH8-k&EOqQ8i%FsE;TXJ`k@ ziM(>Am80SDN$U1Nl9`_bFaq4Bm~aLFQn03_2iso#WI=lN1miyb z;I(4Y@o_O*dH7QiA6bT^_X`ya|0HF+Nmps3HIKN6_>_7TsZO`xR72sTYB`uk8Y6Yz z<8nFBkiOfSZ`te!G{7oVoB)PR59n&Q#2@URo)JR*x4#Fb0DRWh_X8OvJ!I{U1ZN~eO$wPNp?$=?HYgQDA1Yh#*4tFFL8@?9YXV-%cQF9Zpab_77%xT={zN}h z8&H6m;W7hU)M!Glc7sTxLkCg`kITDpG`(3U`o11%FiP@F1h@It8}y!u_Ln zCZvl`A64FJ+SfGto3_18yuyQh!iUTQ%(Wah!f98bm-B!Y`?@Te+_qx2hFSFq8+8=a z;<3y3^}STNqWr+=bw)1&`eRYJ8UCK~Ava*C>HyS>xK%&Pj7uwB5x%&YeU z`S(Z(InM)Bt!FUxWe-kTxx45si>v(pVg+Y34#l=S9nJ9lP`>rgBz>49S4!TFUK5P+ z)FdQ7iL@%%y~wTv-9B7Uu;@G@>$Dc|H#&D_w=~ZRK@?;ndvIdDJ3}qsju{Q20{CB^ zcKjASy=75$DSF&OF&cg?IBt^Bo`f5kKiQnCA&y`9k7}vJOe7PWlT}B`30dBJoYifIJvg3hzWf(3jIkeX*J~oe7@4?J0q_)J+(Hq|x{_H;bBy&In;^ddss8 zy?b#7XSY8wRf&DJ!!pC8uqBRhB0`|x;w^GJti94WD1=*)CZf+RbHH771k#5|e1p8} z%A>FnOSG9#2mCJ7@ZH581~9%Y@r;MmBk0nSJ;TR6ps)6xp4~^3p{A;QZK`gVg5UcC zI-hgatNPKzbQC!9{~-wYwDv882L#lRimOz@(9pLZ7X$O*8QW z$Pu|1FOC{-6|LS4Ux8dMW_DmsXreWGeijcVIy@^+4+icw5%vzMD7#eK4p7g0!lpjq zGJq|z-UWb7?J||Z98jx=DjE!27iIK9&XaNF{qp(EGk1B9O?SfwFj zyW*MaJsM&8@~UG#r$a(L+g{dI1P z;X)=*BM}D`aRb?dj(ElX%!g=b{nyuqz4!K9*$p{<9Z2WpJ5Oy_$j~r|F8!Grv{@L|UOGyFhDbNLF;JRa*kl>*&r82+P} z#GD{bU)%P+*9N{zUtV`-BLdz>P%*OreYYC4o!uV-LersT z4ad04n-GtopbFAoSr6+a0u^TCjUp)1H5Zm{K}Ss>hE?CqA?jg9c~l*zwpY48p8Y(p z?Yxg2cOnlULfQRu+rLe)ne8OkI=qUZb5tmD=KU+n#DWI{=%TEYDeq^-97I}300-eB&Vm}+vw5mN z!r&e2Gh4P&1*#5HuBCvzEqvlT9BaZZ#VUv7*C&44 zrB8%(#%_Q1Y1T1>LSvB!BNl>q9^krU*HxBPDX*Qi3s2^nwNB)al4}wiZVr{#*J~nl zAO`*sG3U6goYa-)el?%)>iXOm{sDhI`*#y0>>jc2{Z|)cs8|hAk1K~Ts+q7L=8NW% z@@7TVd3|wMV8fob@1T{~Lt(j-gL{H-`l0I3k<47}-C7UlNV?7X*W;gc9i$cbZWA2; ze}ojyG-e6i;bKgUwoc@|ulN4!r&UV}4y3uk5I@m=Q!v8JomQ&q5U1@s1#!qb_1 zIDsN7sTuI@f;2JdFU)b?okoSV4EW5MUN6 z{#!PKe4&|&7HO#1Bjo903%r-GjF+Gn@o)4jmD8$b8u23|48Jn6x`2EDFoA-1G7hu( z_T57U!bS}CWo+T0F$grlQMgF_TOrZOBlC||D9hF$1cFT#rn2F<8=aZ!rf?>+t#8j% zU9`1GCYAG6E@JF~`4ka+zf~qpn2-4FACy2~)RSuD!Z139X3mvM;Tv3nI^G@kP*Q#K zZi>*6S|rMg_hqG{$1oN+)%pj|%=Z@Kr&^!XGUI|#Cupw+?B(TjcWMdkEcuVhNvi}q zx#uL@Kx@59Y#-XF#Wt2=6+LEC-+l0+zD97qFXcaagc%?S z?n0T`ixq`rK#7`<^UwOIrL-La(J8i+z4fk_=NkvyqAp}ve8^G!yIDE{%!?f0Cg9W> zYhth3aTW!@?>QZ=;Y(a9Xb$s8#k9{0?S>hog%&Uy=cc0%L-Jw#FJoPE^x)Pu7s#vb zi<@XpX9+b$R-4%bPE?$$EmAbL%OslLz^8J|;<}sU&JR46;LU50{QGSGdj(Z(W3u$) zcTPJjOE&G*U>Ika>ab`B(#lN5s8)oE9hJUUR|RTbF)=6jL&QKlhlni@gyp>b2Go%@ zo5I&S#7a7_v6fWcK9NCfv$F8}{+(&FiSHCxkG^Aw05HV|@72P-B@epx4uyaKYW{{?FFNI z#l{L@e9(ea6wZD`sU{eb@l%hI@J*e{HReDO^ShEmjOS09OAvDjTNh5|l1UiY3^^XE zyA-Lkd7Sl~#=%JQ49=q|oq!>vqVarc-l}QALinrN z++;*L!`Da!#2}ZQ+T=r(Y4eiws%A-u|KpT*B|vWBIJ2xt%^Xj{RFV>6aM|s}g=6xl z(39ZbV&hF(0Cz}5jR{*x!dw6Nx&CG{$F*9&j;%nd84OD)>8RAdtt$DJ;Fx=N`pM@o z<=a{9zi1uoZau;0V8y>n0*Yz3DP zL-dlvU;Eoo>qb*;u=G)te81rw0|-U!*ka(B8;jYO`F-j}_#^_Mey0Q<#Ak&D7hck8 zx;=F~DqA&odrDXOft@k{d{1HwK0hU9+V`y;M_A>f@4-CaZ(kHYF~N}{#?xW9`j#pO zp^hV`)~S%-fLC%63z9iZ+$nKkJo!oUiiK>?x2Q2yBb-APU4H9{xNS|%wk@!|mI+>L z!i6PFo29^a;g3)`7+UAgHA>ju4+#Mh>&g0<#$SVZVAvQ>5Ugy^!qna!5~_0OS zG8ZfW!hn8YAVdWr`~3T3Wm8S-pHv=9%plt24=YcnmL+aieVF!VeuJ}!7G=4nPDIA;HsfIBaI ze4+n+Rv)J^vg&2*K6mo{#61OxHkN5V9&+J1BZzlsfzwDpaWY|fmZL_+OPwu|aHG^{ z{n(cK>{&w7tanEP9noG2*wkp_l;{tbN~Pwk;ksvS zX1nX=^AKq@Xg5FqR0U@bCmb&4u|}8VZS0yZY|%+kjm5s(p7_OI9?=cE4A>R;Uere$ z#`VtzEGw`Zvwku{Mbt;{68l%l*uD9Gw@lGx?poI>=m1~$OZB*LQ5Xs00ktCVj~tktd6}4_>rIef%tOOcR1mSTqUa?Y2^%f}VNt7bCZP9O2-V~Q^AxQ0dtjHKD$ZLk9o(I6K-4HnC37tXzShMsNLjf&D+h$+Cw zDDgEB7^V7*Ty%QKCI%4{6F{7MN=^&uJ{lLGd5I8)kN`j&e=0rC2`Kq05YpwZg$u+n^E4D8xkRNqs6hPMXA^{5X(|IlQVc ze#OpW=@PModlI^&KQdjnbTt0k~bsf4A&Omo!q z4=$!!)*@s$N>k~iXcjE6$s?m-SYi8rki9ovvPjAP%c|E1N3;A!J6;4Hz?&RJcpF)2 z?X#V7h)_x@f6b(2yXnqlR2IG4-2!Kmi4a{0QX{0-9MA%RYG_hq8^Ix6g0qHQiryPt zs@8ACJG>C)GO1BM0GfWRazBlUv`?-#oQi>Ok(3mbL>la()OIy*;z_uI)(1(31G|bi!Sx( z(uERzVySxY^d)hD!-b(8wleV3r`1+I-C=*S*vo_tn}@Eqsq53uRkidC+{(sS6s3_tnC`u!9*yE&0)=+DL?l;W&IHCPXg+*iw8@203kW>KvPk?AWZ*c`z{!(I5mcWJAtzs)S_B= zm<@Gcm%QKZ45U9c0&FUkwx=3{jcTLVA*PzAp0!-$1@ZXC8U-DCDmo#+suPR1tKhiz z#EDg~YP|OJ>D5-;=tKNydV4~5=`jfE0h%yqXiM|=x2V5*&%ah5%xe;&r4mtjh9!0_ zKZ}&l3PZiV{wlAFhc~$Ay!t{P8T}Tfp)R%}JuFfttELFF$7nc+U68r4Foq)DHk&YL zm-wd}gt37yirt%!AYeiA?eNTm5{(W-ChdXiW7jlfY|f)%AxKaY(EaH5a{OIu;*9-E zWfx2JmK=kAvd0W5Cw+&us(?IrO{Pg2L&-!|w$x3Ba-NS&JS@zUrD^@+Wt_4gLdg@X ztlyH-6?BJ#MUoG^Ek>%UMd+T#A(I-zI${(UJggOs`Zp?X|Hd1gqk^ML$b>7eyDAtp z`?HIgqAQ7Ow2t-LW^hc?YQDx*l9`~G+A8S#QX_r`#37oNzY8!dz$GM39QuAI&~>ZN zOI%+ka<~SnTScm%8Wrg#q;ZmMZTCyWmrk~m{0+LR>g2f!N`x`0C~qO2?1e;;fM>v_ zKDDe@e1#M6wU<7y@{aFbE{t&eyJU%%LK4j+=YRyq<}zE zzc&n8-I$Vkn+G)C1yv=~Lsf(66A5bH2_1a7oeA#9DgS@@ zPX?fGs^f5`nHODF)ffLY*_Yc{J~T{UhYqwVu=*EPL~uO2=_nYV+SXXV5+dPYIAe+Q zQ0b1(1>NTd>A>LML*Re6HL?aBLe^%f;`*bgpK~`abVR5`|AC{ZE$sh3EF{Q8x^(LE z>=p%+3F0c{pW;;osb}@#D4@7=g8c>aW2f@Hbr}C8@l|TQoy&*iqQwJ7zSN|&Q8ocZ zo)Wsac7cLfF+Zrvr>yfZs94PSv_*ebO95+^I!%`m?d~(q+VBgDf*aX>_AxbuTa(A^ ztHP0yA>83coeDwj*n>uLw{JwfM$?M4U^QHcF?2r}(9JD-|JsMb4xEC!8PYHr6sd34 z`CCeNhyd#yDU7Apy;BPN*j42K4jC;W_fm<=I@ta-nt71Jd-@;*1fJh})VD8qyLY}@ zNozDiEEJD5yjjOlBbnDs&pay)yiq_rz^jQiFk2*E)NIaiM zb&z*cb%V#Up9#Y+V<5K?1+;|iBJ|#lxeL5lQmp_0yPWzijD*2{gQ<6?da!MhBpM=) zX4w>qnIb2(p)kSr$vk)p>eU>2=jT^fta6BxmXY#Is~fa2Rm|IpxFhb;QaV`)C}ZGN zumnM#4}Ynq2rRz%jo|eR_ymBPbEOr`zRvpaRU~cj7Fi3toKrWyn$mFxYgnAx=`3(R zyFZvlH%#L=jl(;(zZhdIOlrSGT#1frzTULL}zt0{N(^o}zX^E@kIJ z>eXjiE(soL`CDLZpmiD(+&0jIBUoDLrJdY*);Cv9nmsD@ExBPV)veF)2G-JJ1pJ#V z%^}hrFN3WmiJ=nMV{ApxD$y(M&vIN19At6lQC#exeXmQ?4@ zv#k4A6;=6L%S^$w0ORaAbW6J&AZXojrh;>TCY$I3WBW$~!% znRsfp_q0Z6roIyKJXwe&jtjX9(a)eItT*`l$Obq_vHftfvavD>ES^63W&-51S!@{Y z0?1kx9wDH871Zni4padAeY0Eqk&!`B0Xs;XR9s zKVStjZ9%P{) zxUXq6YCA45muK6-3b5cMS?m3sfm*ZZ#V1;{XQeAZ#LQf}@Yv_r!dgqI?0)7T{pKXS zEMe&^z9))H_EisRA3XX5;D^BPLgBRm1Nh?^cq0urO*IYmZOsIZ6GBWYoz7N1>u~p( z47wRH1%FN6W;I9*o{3nRge_htogA5$&KL0K+QQ=twp8Y0c-N?YHDU0k<2T4gVQ5o1 zQk&=b_Y8PA8ApylEj^q3B`)?vYjvcUS~St`C)8LLm#CM$p#cHinchQDsZB zP9lc`F72-0Mk?F1=<+x!;LW%JgTXxZO2+4lWPPMl9G8|LWgye9ZIf*44HeH~t@&H4 zEwv&Q2%*ws>&cKG9}uGd9zqlNxL(C?LS3rtPLU2YVISJpRUPo;`k9J5Y{CNocAtA4 z`2hq2@9)LP9t7a#w6%sahJie{y`#gh&4~p{%kolvpy_Fh4tqntU-ieB-Y!*-tc3f{ z`O$u_k#4b8Wr4L>m(Ym1IbI{pC2f`Z#`zMC}DTZNZ8`8jt0HIreyn?4y_iL6eqWhQvYj;y5 zcv&-Uecq-aTWl9rquzJHV2mIxq_qVUd}q2aKsK(KPz~HA)$fuNu-wNply`+IvlYwq zb>MSTjRc2AOh(s*nQp7MBT|op{uUHqHPq}rV2U?HpaQ5q<;5I)5DzE_-HPKJ!YEeW zHTSV(P`Oj#;!{ThV_;AtzVOvLmMTh=ScO%si#I?_7kPoy_ zE|;35=6OaMfrAoA!2iLkO~KemZY)68ez>XE>}94+izz1WL} zS2xlRJua_kX!cIoZ9+3Z#%S95$L^xhJ?u8E{m9yWE~;fw%&ysH60a`{?@A*CU2e)J z(l(Rp_8tg>!F>EGFZg3Cmr)H?isk%bJs+o5=5gnd?oeX`1g zu0MkAZr1S4mcQr+-%-2nFHax`Qa$*t1dfJwd<5H2oD@+I-SXY2B#PSRtb28hjV@n< z7#+HO=j&IlW^9+TTWO#3ee=CLLPF{DEJ4w`rQA374?lDZHsU zeWriyiq}fJbRiP`CK9Y3;oAO+Ap&Y&{Fbi-0rb}Vtnz8v*&F-#to#>T`{=#~@%tcC z0Ehcz1Z(yR8O#>8dC&yxQ1~MCe2C(2@b@_YHeKwhCWC*H6nR zr_{2jZdG*?DW^RuA|;l?qh;UhMs1VwD#kyM+2Ez#*K&Knp3CN(J`suJ+cOKr31ME{ zS7nnjhJ5vfO}lbtMhHUM>rUBKztCA`rYjVtqt?V{3v7Y335%AG3FQYaFv}vhFe2~W z6ib(W9fqQNEunNjV%#vwy@${!bIB6|h#3)mp@}@@v%Eq(bl*;d3O0{7wk%&kRe7w@ z9?Ve%5UvLZ`yN|m1qDrTrq;WAuR3fuLoW{p6XwfTyT6^7vkg*IVsaVhZD@#vhyKjb7-wq5C%e#Nmk# zW!sW-?fpk9=G5=T0_|(IyVfLf^SJ@M;RyC5!gsR&|h*nw0-FR$ocbt_9U*w7UL%vGdWls^-?OOdNvM zb9SdljalFAVffbT1@4qw<_#<}cRf}a4eECd(ww!YnX0`BF^4DIW$l z{BdroPi(r!d3>;3I+BOQRV`8~c4 zWXgGOT^A%S8ijoYa*m{m#2=kxkMxbluu#!{Al6NEHb}p%4B_q$UUd^W?l$(8l0iOh zG4+-`Y+-*I!1wcpY|VsblgA7j(k|FeOUpwxa zjf%xnZ|mVkV?{7b)G!%9xG5W}-86Dwlm2=_N$7d#ww&=}+d?Dst6;DotUUo8>aB+! zT11Sc95*E#{#O#5&lk}VkH@w5_PRxDd07A zPMtN9z;Mx_mvovGBUPfCeO8;o*38N^6OF^@m0O@^Pf-(p5(ev*XUc=MtxHVAQnRo- z|5G`y@aGo=a+mG8un9pZ$GqaO*C9Fh*m`_PwDw@-##J#Uos~ z3UAw+UKJdCD+ zDN73*{DKh6#Ly5Yeh(-Kw41OEibqD=EH3ElC|xq&#JFAaXquQZ8kDYD^%18c$bd_# zFRLi1UVvfx77PT>2v)z4PR?1_rGv>eZ;Wn{e8jN(civ3PPZRiAEiAB9;4Hl-m%0;; zf`?prrFv?Ts>!cTV$c9E)iSU90!N@tW?mx`H>@k$nNayHyQzaFlZ)3PAq^L2MBULN zd`U9jrwx^&Y5W&r*l6;?SrDU;viaB5fd4zDeD)xcNSnLT9o|Jl#P_y~v}nOd*}kY} zJJHDW8@s4lC{RBT7QUmHPtKbobjn8*snCyTZk7y|K)eh(#Hd#?jUsC(2f;>JAToe( z!XUE73lO1jn&JI!EAYBly;cJaTsX=d2vbVYj1V?8k{z%CG=S{xVf#~n9O(ERcE&`P z(nDy2gopk=lKKDb(U}SK+WY=c-HjfR)rq(ZDlW$|g1|?DD6d?&TW?r0ykh@5jaSb? z0uqF$X!m1>`1~~sA&Jg8e0f6wL%MybmHG=$HmgjM0-tD;AJ7+od ze0|Z?BhMQm-Ozz#$;f;_$Iy!JlW)twDh0z%Q-1jHy>1w`4sJ-&%thLMiPVH_U2 zOo};TqMFvMxyzV5gN^y&A3}6B^{H*0{Z{+_ze+_ub?u`n^i;2qRP0_?9#m~}1^gK> zy1;rfu_BPRZ|9i;R4_s8zOR46p`N$+=n0!HNVR@_+e80C-mObE!X7jLib-Ty9~tmh z(YGRJHVw&>iZ`I(H@{_aq-#(xG1Pt=AMp8}fSYu?h+fvu7A8Bm!UPKVt zI5(gU$2Ab!hBXdg35E!RgK$vv9uO3VI z+LMuMv@05`oy%wv$uI^7op#3QDo8x+T;ed4b3V=B9^Z8P50=AOmGak;jF?;-4(fJh zx90m^_Y5g|#*PG;B1qjyno_w3@tGey4v-6u7?a{s2kgfCXK{j>gS?ttJQv~h zGGJ|o4!v*hWj0THmsIHH_ck!p2a6ahz#W4V{6i5}N)FG?_F|Yb)Wm-#Q0jXW((Jv= z>GZl@q>oO@n!#}&YG__X<+4)xZ`hA#UJ#`G;M^7)qj4-cy3ia$@qp+bwcR6oyK=`d zshj^%wrh1G9=9;VB|`i#P++bp9pm;=St0TAZMieJ zC%)f`VH)~`XVcCJ93s}qjdP;sNGR~1G~Zy;5*aVxG!$yC$E-p=0;Kb%;G-6Kx39Q* zj4Y&7_~`^32w8c{p6}cRWz5X6SEJ+^yDO~^hH@-H&>*Z(HlGALcq+Yi0PSVrC#P~^ zTLq*3E}dA=DIm)}m!ab*{DI2mBh*gM&;FbMF06nj-DcI*kHW?BS>QrpQIg{4Ca~_rqzwHA zIj&w2?V_L`AYM{o8LOCTGslSyM=dpc|d=HE|#EA{7XK3zBA~1D9XQz(y zmM(xYgxpuW230P8g|jADx)J*F%W(h24CnYH0Bij~#RH}U1oh;L)u8Tup5ylXW%rsPZT07!%9q=X(;L-eLcf}TlO0)n2 z`Qm*nb*ck|8pkRB^CMr%E_0qt8uTUa8`9bG<^|X18%%~JMrz#=4u_I$rTO6XsTMZ~ z<@w(_`1&lvDBx1Aoc)5C?_gPGt_FQ4xt6|%P6n>*_jqv8eFgPhYL*(qloMhY8^?n* zod{mH1fFUjDkD=+6oGT_IVSo|f0>4e!v~(e$Md1-3k<=3pWq5Htv-qXc4(uvwfB~B z)RL0ee}9rew%EJ-d%s{l-1pq5@|jM}$y@QHji)L97R%YIdZTzq9XIMyN0h0ez5h+K zW`3W$<;#K^2^E_3Q~OM$4UUwZmd1^SRufly>c8rH-Axsgs?d_j9=@g_^6+!*&tWnJ z3~o6pED`d;E3K~BsD>@Se-Uo$2m~Hpup)_6v%Vw~`jEO%6kr=<=^y$lHk0eJ@n1Al zkZr#^%sfq%(>B;n5ZWD(q2b=5`$OchO@WCxXjgDD`pmM^C^#Io9rPsWl7vFHrFfLt77!;4rtR{$D}y!X zXK6jYYsg!w6T+ZNZJnqIuoIz?f1*b;aS6}ZWZ7YC{(p`UuVI|Z=n&|q&S zk&}Y!nTR=cLmwo580nYvIU1gX6i>MlvboO`SW*G|>7~xp%q2kuQ$RPtcdekWRShrR z=``pB9I_C06}qj_4n%lDjJ|qV!QUSM(@?cJyaZ^I`fkbQb$&DzC%XFOuEi&rl5>p= z$jS0+qdLW#Ny&^WI=UW}TZes`J|tQ5qoTR^*4hx(|JXn8kqNKX!z6K|?MN%>j0>VS zvLYC0X`CV{{IV`Cz^9oObwXMGh#DELTMh7TJd@7;_2)n`nYhen5Mk9XacBL&d$(2-ADqfSN8C`Mffo?D0 z{8IPqNXUt;g?b8gL}Si6%(N;Di`*g_bYW$st#M*b+06!17G(knt-E|N@^1Io3(BNK&Il-F#gmeRS`(JyNPGs;s(lW} ziYW!E2lsu59`u-K${?v3mE?**U4|=kYBRvAC4!YUe^ZF)XIe!2_ZInl5r@w`+1-7n zsF#DL^&-MR0d?XrVMa=NkCdM%cs)^X2Z(O8#sS$u?!WGD^BnKNb~*{~6WG^-((93v zWzG=4_O>5mXkTsc86}{Y=R3ue3m+qM^O54h%$-bzjAp#*%FN7t7U&exqOw8`mf+@r zk1}46L=SrA3E`>!@P?Q0B$?y}|57{Ndz+jW`OQ;TN*4&yP{M}Tols>sLtKAHg=SZkM_r}?5>Ec`dq2x;RFg%?Mv~&}lE0IIVf_W53Ek#(IG(jvi^Vn0q>VdRN-=125}{ED@|zaf z*yL@QlO=278!1xA+*`hkW=fSjsjt~@?Bh;=j7U4(xnixtI$$f7gYjWnH)8tR<71z& zeQddY!p3kg`B8qC&PyDp1JNpB0D3K@FCFNXvID}?=o zCil7ft?$b5tHyJGN6l;6&|5 z6v7?%!e&T<4*!H}2K+aCzu6^jo^WDlK|fz^R%02WG%F|Gnf7(5s{{7El`7{PN|wDY zYD-a5dC~j(^B20QARAq~jC6SHtmff;Fb12(`OMQTR2~V-qJJ$!Zoj(k&3Pv0-I`~J z(zbGf8EfC49ZjX^$5hOFe(-aka`aJ^w8&#(ex=IuGjM)JI0R*uWwc%Pve;> zBO(zwK?ByPdKn5lt6=$GA8LGn^;l{zvKjGQ+cTv*beGa5hPWDFxOccNJ(8v4Hx&t z2oGOOTJ2B>&r)E8tMUKT>tAY|dZ8b%1Nc8P40u^jCP$zp&_VtqZ;Gr27&4E?2pv{} z+*^ZkOAzzi8#BFbw9Ac@SY5ig-*kD8YAp2RpIZ=Ca3cke&n`M;Drke#P9b6_xOy*i zT{ZBI4N%PeM^i|pffM#n(#&Yw=l|z{_4V?J1YlZRNv341h|wJ*PBPP==@w*e@?SkD z|0!A2+z(z&*f3je4&U$6r1`C~*l;=&|Ep!oI$Zh^4$DUPNl#H1VQ$0VA<|s_mkkdl z*Zzr)qPj@~Oig#+6N-ARz-0)( zXW2GadDDa8q(n<|U~(3|Gm1Y}EBs|^*kfYh%k2+p7D0&4EjoE*%1sFJg|wkY_n*M3 zeXa8{&d6P>WD&;yMQQ`y`n3r~64zveKTV+OD@MFSLy9*IoVLxptYZ-|PDQUjF~X#< z2Ry(Szt#T}uc{dil76E?XLeG|#VMX=k0pY|1hc7}7pEo~K#tD(Kb4$mI27y}$H$hP zvXw1MAvDaG8OF$xj4jJ+8OoNyU}VOa#y&J-%TlPwwP5~p`&^S%UUDZcXMOlM97hZo?GK%(RWrGr;X|d><@bJ%{Xvc z%oZZv#lrK9wcu4;vtG$pd*TFT>b|(y zc$#pUrarp}r6g|(eHg?|8h7y!Q$!9emx;y}RRo>VZ7$jr4U04J73`T(X$w(EHR5~p zO=)j_KVh|~i`z|(@s8XuH#D^m4-GAiq|!Rvq!xvnvihoO+{%sb+gP;bv&Lpr%6-$k z+C|gv2HBg35>dlimED^2tJ~=re=d5tUXw|9ee1i0yYv1kyLiw(4mkgQ$jl9qi_nr@ zIUgEBpVyhSE_rB8PFHx7=UGUXdDz$BIwm}*?cD;cFbIBqUChc?_(d_7S8L7IgmcsG zgYKQaW8*886dRtc_ct>jGDq|=Pa%Bk5Q^6cRi71Ce`0N#MQ%W9jGHqmB)2G|g4pWUQ&7I{jMW00aw-;3227Tu^6^u}XJp4z+N9ywp7xsZx zjsLI`DCHv0**#e{0`ENTVf+0(SRm~rLd8}+UaRqJBB07$(l7eF0JJ=0X?vN7UC$#M z3!>DMr6VVi_dvc?L3)weS8sgz=Jl6Nb)lHN!fSr{FgUwlV`s)Qi)->O#Ef(4!UH^;*_d|JfDgEgrMRu6?KV>(_uw-R;|bnx-#~Fua4bB3Jv@X1dsZ zv^}Wu$f2GWsVnJuCFy9JKS+&s0u))3H&#Y8;S|oF_U1mloE|-?St+RUqcv9tMxvAA zWWjstUd7S6UoTIyXzGsD4%3j`@xOA{H`Vv8hZ%c;Z_k=esO`nN+z1~Kqh&gu=U0!g zQf4Fp@YI>2L-SW6j{ZkN4Zy|X#G=HnQG(53F;cb&+}}CzpDzj0$&*&YZh{h z({C3o%^{BCvEQkO+EC@=+*?Y*Ckam?92ras3~=r$V>=DKAHNNi?vP_3IVBbfG@U(G z7Qr#VQX$>>n%-BKq7#8%tIkN&cDyVa2)OE+ldl@zH>sLF&#R3mTViGk>u0O7Ta|Qj zv<;R-G`q7im^r<>2lpSbR*pNEO5RVnn7kpn;`D>LAwQeA1LW>oBp<-em8W7D*(OZb z4!v+s?v9x9m%t9O(u2^sS{Wwc%U!s{y)=1szzw)*S+#XIZ z8>-}6az#7i!!o5clAqODo~g1pP&oGDe2Kk$>B99nt>*$inb=_o{KMJKn53o@@)ZG+ zLh1Nhg$IwNy?5ccg+~`$A6}?$~awY^;`pRZbqv4 zTvJk$&zKX25`4ZIdQ6u*v)SCO@r&s8<^x`zXodkfQe=EA`P5wIvku@B7mH&)pa>i1i0@kK7 z8J(BbWGiAG!e{%qSM6t}!DRShq+rm4^O7EMB7cE8Pf`9rvmS7fI}8}?3aY0q+PGcC zUDc#e9u*;+_>P}&P3SX2rH!a(2AByuS_^2>VL-S#?5M(0k64#3Z1BnC<67hvTNggu zYZ^h7^S%#Vf8Bdd?rwtPQjTX@L-lU|ayxw}T{7#dNQM39$HL&z(OHeLm;DkWK}M%o zmL*>c^aWr+1vQxQmg$kT92H%K)$a$3&8PG}N$-e#YLQD)_lWhHk2x6j2!2 zjaz(>(r&f%B};FQi!zeML%+N}u5@|5wT$APgy-6V0F?OGtnD-kw5c22$Kq?`B}%N} zLLP+`m2rvMXRRpWS=5B1EQPwzuScRwF7jF-SwbC_0Dk4|YNvjFe#L&5yE|quO4yI7 zME09(77xHA?xbjVS9BjiPint#mIhpS&j8;hIV(JSnR7d_V6VT zKL0W{)E(*HRLdEAq((xXBL$#I7=%9&!#MzYAU!Y;1Ob9Ut{^A^1VX@I+MFE(`k=;p z?cV}$VFB2{nExJ-8{Gls1X%vca49U16on>Y05&*u5XK%Ig!R9utgmCB0|y!^>w&;f zAP5Eo>nS^d^_7E3BmzQLH!3Ph2m6cWEDo&`Mhu!x{lpOj9Qmc_8XST1Lm(`|{3CD} zJPCpLgM(fIfNS^LIRj4qjrlt#0uhYC1_hG^V|xPRnC>!Z&xU18$cj76vKJGE(u4_4May`{loB=bU_C207Ed;Fwidm?B{QQ j_R|OZ8~Q^qXc!0vhd>Q_t8?faEr1Qu!Q!5|Z{j}zWxcY9 diff --git a/packages/bridge/public/blockchains/ETH.svg b/packages/bridge/public/blockchains/ETH.svg deleted file mode 100644 index dffd071..0000000 --- a/packages/bridge/public/blockchains/ETH.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/packages/bridge/public/blockchains/solana.webp b/packages/bridge/public/blockchains/solana.webp deleted file mode 100644 index e96608387180ee4523abdf6d7133fd802e76a7ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1214 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYw5k`r+NiN4dTwZ^cf&TgNqBi-R$wRAnB+ zugjj>Q#8E{{DR6njxIf0rSL=lqrjI7kN-0qI8py&RlyJSj}reG&IsB6;c5TR(6y@M z$#!?1%|0S^S{vg{DldF{HhFK^Jk1};kM((8ykGs=DyHmP$E%)4uhbQ1Jm6tdxi0?x z+UBg|p*+4aE|xDnJji(*M`q{po$?LRZt$6=V94k2`?1VQxqWl9mvcQ@rI&W~x8#+j zQX8L4+WF@6WBYE~ebR^jGt~G0XAliq-&?2q?ME*A-~SBue_~VCAF-GJ_9L~d{y|Xv zM^mjD*B`C_8C>?g`DX;=zVe$=KP$fc5A&fTPd3zldZvHvKf|-i`eXZrD-K6p54wC* zOn>R$xr}W`(vz6%{xhh&Q~!PQ+uOLxAJ;ejiTfztvB&x0#J{^gyo=S%eHyPFFu`+1 zQDw{oHtA*jlHb?MtXJA&nZEPY15K?EWnV|PyJCkk7IhtYBX>mV3xB(v-Q^m^b5>VGAmShhuZeT*XME;AAJ3?{>-(hnL*P{%58VnSs${0 z7Cret12g-720{P${(}CW(^P3et1w+&MQT~ioc LMFNm9`~RB&uom - - - WalletConnect - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/packages/bridge/public/favicon-16x16.png b/packages/bridge/public/favicon-16x16.png deleted file mode 100644 index f90c68647ebced7f92c0747c67d7dfe7d0ad44a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1742 zcmZ{j3pCVO9LH}5QT2_w2fd<2pW(`2-IshV~ z0r&`~B1QlRL;x7`0)Tu9faL*a#P&u2d>3wK=gr*XU;!0X> zO$tkr?)mrxOHx1`FE@S_7u0itDS?<(K{W(S%5ND}m6006NOOsH+jY&ZLXG}>^~ZV3 zMst;)=PZ1EWoO1+*Q^FwZtXWb+VYiGgZx;o@{8<%gjV+PKj>$g)^-=Jl3ZIdo)Z|? z4kvw&-NQ~bdu7~pzj((fyAD>T7FAKi6~?#A4Qoqv@7~1Szp=KbP!!W4h;R2#x(}0h zr!{$;Yjnw~r~OuIl@F~}e70Insu!cp#fiNBgZ#ee;GXb(4@06K$f6jjO>q0Jml|M{ zb$<2MqN*c)14p<6c6l|nS8L$LkFz9BSLz+J>r%ZRoy3NY`3@cq=#LHRjojO{H?lJ* zt|Q>^wA&W1bm+Fh`Eq@cb>@kCHi(MF0K+!ruL%-C^MmgJT}> z54G_U@833hT}*kAzjZv583E$=vg2kyfD_u6d*RpuoXn{VCPP+dm6BSu<^wc4*A+T9;3 z>WSFfwI`}``m%N<-@{Hf!+UqnY=8%K)OXM=v!QhJ%Nyp;uUU=f*pFRu89D3m1Rh`t zTav^bh!^xtO-&7*e7hJv!9pR;M*6mAYq1VaCj6SE=f-847-Fx;{PZSBA*{8%?TcFZ z^HhHLDit|)@==)*$XhzPj1Ahm%n>e6rrlHpwUsjcv`qP^L^3#|p>AK53O -ey5*Ur?$P0|yHNEZqbE%#D|}Ib3$S^e3F8QcN6G z+ZbM(6%JcXeivn0wdR8N(2`@cR>H!j0{$z-gIgQ5a(0cWrMh=7B#T4Siv9X-gw?lr zl)f8LS0$*fNIR8!db_K;ThGJpt_{}^1F~UhiTLK8;Lwo2-+#;}Anz6A=gp0aj*YRP zn48rj`Djhucwg~UMdg;bq?H?kjEp1GBY#Fm<#&wu@D=5LaoOb_YR+^HvhnxaXF^wz zlN0Txa@<19FsDFku1A=hoGrsau+4Y-9t)O>$dWv+T34y9Kqa!rEz8c#J?U<}W0Z?I0=u=;f(W{5QgzpKORI&&uP#3B>?nYMOGv_!(Ssp0(seqXH(!4};ssbNz*WJQkiw z58^O*{sR2hi@_uM20n(Uo*~oQ2lZy?)4fS3!;qni(TNDrKvz#62P1IM-{62@C#(Rd MW;T>OQ?ICh0o9HHc>n+a diff --git a/packages/bridge/public/favicon-32x32.png b/packages/bridge/public/favicon-32x32.png deleted file mode 100644 index 0b6246b26232ea5bc257f0271a977b74c2ad7809..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmZ{k3ozT+9>-5YEK*lg>an%m=v+#POM?{ZtnKpy%yH4}ddnJG8anS(cQv0w+y@8`BMdmVERE2L-PYvH%7RG>)3R*d}>i z0ZagrECEoa1F#NnDW3xnM+D#{8vv>b0AuN;TmCL^L5u6dpo6XLQPFdy2;R|=dWFdV zKxJ(QLKJfu)@!zT)7^qX`xZl(nI*y4)N67! zA$^FEFGACDl3;Mhk0qAbYTfl3h&G)h^U5eOt^ft@88o!+2(=z*W6nEUc z%vCyT_gvF0O_So1zFKQPl=>mr_Fplfq=jqNX4M_#dwtVUZU)%5x5}`+Cz_6ZdwY6= z;rC;|w{}+_`NnL3ztQkkJS#HT=&OR>cOhYB-?Ts3AMH1;Lce;_8WgtZSv?VPbt0kn z(lI|@`<2#6-f*qf9DyQYw9Il_8s$Aq&gFgP&KKFO82gepzf=T$K6Sj<#pdNz-Hy?= zPQxMI54wv-jCej55i>zoh~I(yc-7u!s%#yn=zE&z=+9i*3d zEhijdTuAbnvBEG)?_=lmPdZYdV~Io1rw7kyA66o<1@{07=UTbZn0L5$fm99UHF`IuHu>BA1DmEjnUbnWZuyS7*^C1ve8Ju3 z(mv>m)#qUGPPdROThTA}VZ=<9{5M`N%O1ZD$%w5F2RXo zyX)=3O$vqg>qc#v>zK?3ZehNQF3nYedS^4NQr>=PTE9muDt3_Q-b2SrLr%XP$hy1q z-6?2O{VT;5I~TcUIsY^wJMLhHxbsCC{HIySJwoMC966uLi{--!*c0s`JkbFU5rc>% zDv?MflWpLcNSw3K%>5sMND?KCR{VcKabh<+-N+2X8B-jbJX*gioP7*74dVUc$1SZ>#K{0V6 zE|p4`@Zv;#v7Aa}!Ke&CSGKwce`0>`Nu|c{g@PD4fSm31LF_r0G5*Ns59X*aN*=R~ zj5U~R!-(le2vaEH%N0^S`2AD_saSBRHRQ;je3(Hn1t3R=>_BpIB9pBhHm|~n{zpE6 z!X!Q*(rCq12i0&XfH#O1p5nvTCy2!IQxX9oniDVNNyIY3e;Ly&GyefMS^Nk9 diff --git a/packages/bridge/public/favicon-96x96.png b/packages/bridge/public/favicon-96x96.png deleted file mode 100644 index 7c767b10a641e5cc771555a4fc7947dc2d588514..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6104 zcmZ`-cQl+|w|@05MD&O*`pjUoQKCn5(GqoxVbl>ukKRI*AX=h@D2WmY(Q6Q0h)(n{ zdKV&wE8n_n-QV}!d)K@7+3TGBJkLJo-G7}Eqpzz$Mb1JF005QdeO1HjX!F-eiLb}y z3?J$1KPqXYmS6Dcm>MAvgXPeTo5pknCu#`S~)ao%p03e$I0F3Tg4F+=831V9<4OQUk@0ZtHoN~QF=6?T?Cjbz|{B=B6RQ5HWUQ1I| z$;fwRCp)+VY3kLjxDYrL$QOIe$iOA&Cop8D<*XVT|Ja;XEB`A;Hlw-0vs(~SA}v-2 zqxXXYJi6;2P+g>5HJW9(0@Nr*J(8!$`0Zs0-@_3~SBR2qxN*c=$=-p0)9rD^U-Q`Q zz#)axW@d`Zk;bK=X3wF^j}zw=pMT9eU-?$*ZdLy;JH8Uwh%R6B@(H94ZF1*>5Mo&)WgRjr`wA-S(7V6uIy&`{Y z?HsptJzcxWj+`yA`cR*o&T+9M!@2Oi(;-xkZ0Iv1*9AfDnS=M!?!#sFMs53G;C7oQ zL{uUU@1}tiM0{Y3B0H~4iK&^I(AC49=}WN#UHIouaU}I6jtXNR>|zw0P)?Int87ts zhu0wy_}RAn2*3Vzk5Y+@XY`S1s>It-r!mBZwjlBCTl>R)1eGVX)?aICAJy5@P1B}O zXM7xSw)5bm1`~-KhOgb28Myyv%$b8&=P9-TY~N2q=$a&>b?Dx)cZop4M4ga;O9^Ny z#lPX9UwU<;axLvkm&!QRTKybQQ}B<d9sK>V;QS zLCW`IV@s?GqArj!Y9x31_yym_o~i_WVp#?ioQd@P(sE)R7c0_CsR<|r52p8S@)Y1n zM?NWN*!e)}5J0>bAB+Pn!m^<0w%#ejX*S%9#3r$}XIC8WkA>?>KI-?VCa06l$b&5q zk`t+Ix)G)kszlFn*6?GM;2yCz*^uu?B||tuq6wqZ*7T$qE=d$GUk6l$NG<%PpZX=? zBuS(}G}%{O;H6@njnjEYb<6T}O7D`mZ5OaOWwid+;u69;D^Cof-^x=< z@0I4lln>k5NQ{1;A~?m*dcugH%0${73Nu=g#i;KnQ-v726;HI56*+$=i2ozi9|5A4 z^xmzT+Fxk?NfjCAfaklFtN5%2#sa;T5}vv_!ylO$!}Z2(ReTUE#qiyTv@k6Z%4ko> zrV*f8$}(%!94|m~%VQUX;I~f~*V^F(VRr@6Nl;mF`p)Q@M4e#YVKEQeF$L`7`cFN@ ztrKIlT)-Wdo81YQUT`Cak>Bpofax>ZpL=`0%6u?eoi?{w7WRV5AV5dt{5kEE(7=|zn9Mgv;0SoDGnXbs#7msoSp(WxxZj(UZNhCtC`@$C1t z8kl~j5}Msq*wrp(p%yH2k#c3<`U7SjbgF*0Puu+G{V%v=5va=h2|1?6!t;yYq`b#8 zwCsUAuvd4oRf&);*2zo&CX>}+shR^l_e#0?Wx2xkNd{l7BW%qmUuEN|?fRFI>%4gv z>02h+Be3q5`Kf5`B1kxZ+>@jktyi71YyK@zq_L2A(dX)n^(>q1@#l2jB_ZI||w?mL%6kM-)R!#vsS`0~gHjSkZ+FMuBKnD8H|FqjcPFke;P4VIk zv56XS~$ zYo{PYQtOE0hecx6D4TOV% zJ0~=GN__m#Svj4y;4`_&B9TXySXH=A@yd?j<@4xn`VSF)FXzmS^7zKM70WRY!ZI!au2e#!NvWbkO`f=(C#HKpFB=X`wOmywn z4T={kT)ZY^U^Ld|9jzCmiAaoiYLOkw;%H{i8G47kqf=meo7;M`{Z3g5N>c_EgwK_+ zJ}|2ZN;qe`5|}IrSnR@rE`WO~(b$!nifx``hHY(B3dUx)UVu$Slb>;PR)^S*R39wf zVt~JlNP|T8r$cR-ne@$*en$F4bs?2$H-#9i^DAHGoE)e1-VajvsY#)BXPI9(#Fada zQ7cey3Y&d&<1@u?(A9DzS!*$NuJwur-*4a%B6PlvVWwW1@?=q`a%73oa@ddn8|GV! zqlS?_KJTK0etA`SrvY(Ck0cvjjxX*iAxSbXm&5BJdS)74cxzMN{fX8d;w~CPEeC^- z^s}H~X`+-sQ*;Hb2U}D}H6^WZ%uqBMs?^g$1z_wKWg|LB=p8m98J3zg%viU-fwI!O zTh5ZLn{C=ZjLMe(!*HZ2Zh_q$n0?`n3dwC|N4+Aw*)xj_o&2EEoG#|l?|j0s0)J3j zHpoBLUP3m%T_HsU@X|L+qb5pHg5A{#oIzuX;?JMb<~Tw{3S`5Dg?F6;$2xIZ^=Mh~ z;5}nds|_%NEdJU%AK}aXT@60zl+hJcr~7Q7m<@%yX{3lK|0Y7v#5uM49P4N@^DWUc zFr-?C#;`QdLt*GEj>aOTs?0@~;E7HY)@NPM0ayshI9U8_dW?+}XH+gfsNIS<>P-C7EphRS^TXlkZ`i{}-iB_cSe^MI zWX~*P>6~Ci#5iBFj7gXL{Fn8fD1<9xAM5duksI6|0)7ucwcUPmn(DfWE zXU^}{G@3$TL(S)Bzrz<%YMyCVG`EvC*t3c$RK;vFl$a#HPsDv}14rspeD&Ol*`dti z2^DuXcnGIF78v!7pCOY#=AD{UXs^5BKX8lh+t|%LP-gDdzDx~TI^Lwil7s4D`gUzD)tqhc1=bzA4?XE!6J_$R(S2N!6R;#elrq zr0`67onhB%YhVF4lfJ_Sgv?e1XRtkf+z@Er&?V;cvhl?dN`G!n`$s$Z^PWg8oiooP z@^r!~Q$Vmg)qblM|HXWKy}ZCM0bjG0?y1e%UeKJ@DK*fhajjBly;%L@hOE8&=a`~3 zd~(-EBi0e0QpNnHDaRU4emc||21BZ0sJ*75Uvz`7fV&k>sGHv2erL@(!gLk@98?Vb zkf%QKX}v5AAmK3kQo9dhd}HsRxQ=VvI#2LZSNZjG1$!Qu*}|oGvQ7cU&OP2}?cT#$ zK4yDC&oNM)H1aE?opYffz|xci&TxII`CnkSKU`&V^XPS^OkQmX&jc{>(#Pi}5YtJ~ zpd3r3q0J!?9Til*q#!qm=-#RK2Em^Z(?y&T-JVg^6ZW8uJ%1ei-)427{W59-$y;Wp zqcK`c`6l-=P~&n;#_)J`)3V`8V`csy!?&rXpG?fZH)?%fJm9RyD>1K&cw%Qe1w&!Do`IDRC+c4t!cFuUKb3@PAt* z9EEZ9fnnz73Yw$(y5c+fK|MRfW5y=zJ=28O@Fr#}C(t z`&QPHX~hH%iq>*YI8Z_4ZQ2H-XJeH=ebdi_?b}1#ueR z`tc3VOSf7&9_84ze+{B2Mp+@2mmiZDopg0Y*as0lL``W&KOSQ9WAR-K7Ebl`mTRfv-U%u|ha@u$^j7c0-=yLwjE(3DlG1sLD1RIy(FRJ{#gc)o6~ zJ6bYcv*3talYMH2=h?nZl?eT^zW%B%k3p)}pTuM76^l$%U?H{lKs0kH>%{1n`k)c! z3^|6$8J>NeDZYA4W!$XFDEMK*sNSvs96o>MPH&-8i`NJD^UK|Hvu2KA{@YXoZt^ znFU>VJSn6@Ll4BMq=nV#5G_lDZ~dcgIY@3axv~ct)to>mK19SCzTn;N-*A`>rv&Fl zC}g!z8rQq`El{lv5Q8nqo8a&-skKS-g-7)SO7bZCjS}mr3CBQEP27_o62B>qKCX5C zB9^M%UnjzIzv$arl5JfdbIW`()^4vSy!maTh{BYBbAo+d$X5IbHgN^Fj9~CUfk8#&srqcyFa0*w*I#SPdQ`z=L#>nAKwWa*+7BE1V%~p&}!}lEERB zjd}&qR)D3aB04)3V(;3i78$Y>dSZmC^0#c~Z;;kEx-?hU);QIiqFLGIe!sGgqWw59 zf0{J;8igK<*o%#MxKRowuLU)iOBab^6z7K{C zLbT-ZBgh7agBEw%M<^^;g^XetFeL5|XE$1# zV2J@Lihp9eQSKBs%=2DHiVntL1{^UujnB_~+xIP|4Vgw(hRT_5F{BZsmaF~r>gvz6 zN!8!V>tj+Bcs#hvApd-Nhe@L?+gocTy!AA!8PENypS}B|S;nb(+n|`GERB_?Oe3VS z?}3x9ZQt^kPC35Z(;E-O>Z00_<)Vt+<}Ea-ja9TeSi;(HHaE+Fs8#CV^NRjZc?)yD zD|)?qScWg?&^aEAwYZC9MgP;)=BK9k`}NlT_`~__XaS3RZQ}v4*|8TYmUA1Dsm>0N+N3=R(;-?HHXx{mjtU4 zqot;|C2Bd4aRTl#pZT+1%;x+ z_6xOo2c5e}@s^EW7Q8W=TZ#ipeh~E8`AR#`7V`Eyz%w+6`$Pbm6$rd!%4#6#;fLL= zn|s^AnmvTMxhG$fIA=((ACF@zhf)kPtn;I)_AFANhT~D+Rgdl(!>2R$8%i@g4K_7I zxlO?Sv2P%Cqi@jGh&LQ7L1lS3VfSdbl%$nIQ+vSWetjc3d*1K07V2n*C|7u? zEsPnSX|D}+abiP8o3kpR4&||KU)_q>cLqp3=F=x(CuF|kvMDEF%P11*A7-9k%T|VS zw<~@Nd`|R8%iR>cgoYRJxl$kO9z^>2$ywkkTdo@AADCLMA>)?c_uR_y>KxsD#4}n{ zD>P)CW%`EV)4GHAcg4mK{Z}<3ll^tn@xHoVMT6$b^EndJ*;d}Z@ZIB@E$Oq+W(xMa zz^_AHti&Gx%LnbKhIlZ^+Zr(BHtyTrm<7=t1xEW{ACp257BEPHN8Y=TvP_s}w49(X za}G(%Xqf)Ric0C0tn>HmXC39QMlEXxVd&Y{vjRYyi$)!Yyv1!wuULpX$z5!KDhhT% zpRZkqP<|*UPx)=R>kd~=im2^Mrs8Jsb79Fnl_n9K-@9YRm}mIkD~WCRdKqV2reEFj zn|6L@L;sw^tmN*<_z_piKqq4D42Hf`p^~k7iS-e^cYOhs<{p~6(-L(sc4=h~nL^s} zV{93WA!H55scO4s>6ujMRFf`$GsK8~P0#C~m>{*X*1nEIde8`{;@Fsvzkr5L$wah{ zGTrYuj(W$gsi==iWm))ZW^v^~C!O37Ou-|_%^`cj@&B?7jhB~<3u@YRx~8vYuisjE zF=}QQJ2(a@i|{~R2S5xg1`z>^i$K6eU{(r(t z-zLa4LH%z9PqaP82kwCcG+p5iNFBI?Bf^ - - - - - - EthereumSolanaTerraBridgeLockupobservationPostVAAby bridgeEnd userwalletVAA retrievalPostVAA withfees paid by user diff --git a/packages/bridge/public/home/background.svg b/packages/bridge/public/home/background.svg deleted file mode 100644 index 6f28399..0000000 --- a/packages/bridge/public/home/background.svg +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bridge/public/home/footer.svg b/packages/bridge/public/home/footer.svg deleted file mode 100644 index 262289d..0000000 --- a/packages/bridge/public/home/footer.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/bridge/public/home/get-started.svg b/packages/bridge/public/home/get-started.svg deleted file mode 100644 index 4755c4f..0000000 --- a/packages/bridge/public/home/get-started.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/bridge/public/home/icons/bridge-direction.svg b/packages/bridge/public/home/icons/bridge-direction.svg deleted file mode 100644 index 551018e..0000000 --- a/packages/bridge/public/home/icons/bridge-direction.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/bridge/public/home/icons/down-arrow.svg b/packages/bridge/public/home/icons/down-arrow.svg deleted file mode 100644 index 82c0a67..0000000 --- a/packages/bridge/public/home/icons/down-arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/bridge/public/home/icons/layers.svg b/packages/bridge/public/home/icons/layers.svg deleted file mode 100644 index 293daeb..0000000 --- a/packages/bridge/public/home/icons/layers.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/bridge/public/home/icons/sd-card.svg b/packages/bridge/public/home/icons/sd-card.svg deleted file mode 100644 index e763c3a..0000000 --- a/packages/bridge/public/home/icons/sd-card.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/bridge/public/home/main-logo.svg b/packages/bridge/public/home/main-logo.svg deleted file mode 100644 index 1153d67..0000000 --- a/packages/bridge/public/home/main-logo.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bridge/public/index.html b/packages/bridge/public/index.html deleted file mode 100644 index be602c3..0000000 --- a/packages/bridge/public/index.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Wormhole Solana Bridge - - - - - - -

- - - - - diff --git a/packages/bridge/public/logo.ico b/packages/bridge/public/logo.ico deleted file mode 100644 index da4839396bd02f30766830af208d273bcc7641f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmeI0d2kc=6~|R)r)63iDBYy#k>KW_IiLxfCTU3u9>% z#)mLqj(`jXf^CdBZOgW7%ZF^)k}dg=Z~3-Z+u*ioo1w?QuixLUB@~kBWQOTXXOf-S zk+k0B^ZUK`_WQmMjplor0L}RE8hi$7)^i%oB#lNB7^wcv!u7+r_B5{HEACLQ>Xk5YToA!?0@k8Vzk4j6j3VywKxT<%#`fah|kKNQccyF@)3)2LfIM_t+!a)*CP z9UmuC`zJ~4IciCWq2{D0avhD(u{8{=%pD6}DtN}84e7>i>AbN^d)kQSjNlpZoUt_~ z!PpWXV{AV7iLvR(USs2lUB-q}+cVhn_j@27oO{oSomiv3E&8CoH8x(~lAzN!C+*X_ zk|XqupYGH*q-@jIo!z8&UI^1WE{5uBu7v3AH^d40eEy%>lwZzBj!83qo0M7uPp+0qs0X%~vLo|SA z0M7uPp}Jt9!CD+-s4SZsRay2ns`UO3#3T!AG&wG=HPv1YG1;##H`#KRn5s<+O;+=K zQ)T%aQ-$?SQ@MS*smwXeRO))kWNw{$y14VXF^rBiCe&U=Os`{rd!6&OaX1vghyTAkt{q2{F+`$!9}IAyrfvZxwKHexvW6;tjLq0sq(<88#44!?h~)b&{ny3{YANF zW4he4`7;?BD|c;6m7$k%=gw0yG}GgbI2P{JcW*Sn?Y}kKLEzHxJR1!KSqWSMm*hny z1TKL~;F4#BQPuKQH&i_rFDsf3E_6Mez*V(2L(oH3UkCRp^?}=qUedchL+vMwyA?fU`x!zX zqt0F6?mj^s5yyPo_UMDurb{G6Q{!TFtVelcfc-v;{&-7XjQs`|DZNhR=7O7jm&^KI zSSETOxSP<&(Erdo{kSLnxJQ(Ji2aUo;ah_oTs#>)cEqzh zPwBG*tH51zo%+^ZQTr{p=z-u~xXaa|_wF<({nxz*F-8wY&l%Z-2f2>!Vf`f58w2))T3hRW9q_UM~8b(#O%a(9093 z^}qqO=lQsi)RerJT*nkHHJ;qTdf**@KKqXSKHev0iHNg^IE#q0*t6xlh&YSLuh_LC zMMQo@JtktmB7BF4IE%=y*cuxrBF-ZErr4~H7MqgxiA{$;7U3yG*YR)>JzH!z zr4`Y)#riYS%lGoX?Z4gOCj*ez3GO||_>PEV9(m>4q7LzG(Rv;}hDTm`c$o>PC%*Y$ z6yJ0xl1Cl$uH-#@*K-@eL_kdH5UNd2S;Q&%ry=*73C&p?po|8ouVzD&Br& zC2zmF{QLg#Moxc-v&dId&3H)>9Dt^cB|e(may0nIvr>MEQQt=h`?4@m9KD1&C&LYK+`nb>w_|n!m)H3s?cyF0MMLiMxA8Og3 zyG`LTZ&r7HgX+)H88;N%)rwE^a&6g5;q#U-pI6QJi18TIv5EQTyLtid=dTw@cyGO2 z_(#N9fLDp z<>I}K9o4Bs_)g|m{q@4fg?CNa>fr7h*A1hLACiV+2%eZ!h`vJJ{w8q6Mw@~q@ z)$phfvc0$MPrSkWv8q!semaHR!YeB}b$pjsFA!sJ;hXQ~mT{5WOyt(fg=e&9gR6RJ zg1@Dz!gt{xgUDJkuNtSqW_;B1kmAjmPAR#KL~fZ*skv2kYBaY#ZWuY0+3W%{_HO~{QrE>-NU!lS>OYzo> z``w{N0QEE-@s;rYNQkfGys%C}9ZQbPP^mU+wS+pB@cu}MuY@|55MK%Ll@MR4swhZ8 zElHT0q)N*i33Gyk8AGzzW=fbdq%y~=5@rplwBZ%0#P!nVl4jwtd*fc0y7`V$%WR(W z)zoU})HkfDa?C>&vy_?0QvEvSqUls#`4aFS*yQr;7Q*a zYSY#PppH*`S*L=bQ=@vJ%(TjTi}wdy%N#Z{*e%8AGgHyJHmWM<~GcB9gO=N zxX(}_X1v1wr!eO|P6cvcKW4xa@!2V7+fc~^@uTM z(2^!E_jz!q_;Du@_DiOl;0^{-!SJJmS&{Po^z&Zh=MVYn0sG~^%}{k}K6DCtq2v}^ z%)4rCz1(Sj+!v`t&8<2EcOk}@gA4n-++Tw`(U1EG<$eAz8UMyp?iWAt^*>e~tusQ6RvsBOIP|sYs<2A0VZW@QW;xM;!sAmrK%%Pq+usN_f?3pX&4JB<&E?)1$L0KMESLT7ANl;Z{~Eqc-^uU5z9-@w7p>7eP=Wt8 o@ZiT6IQ?!>zOrlVZxy&F8u#KW{wG2+?%w;@HTJjY|MKts2W-t8RsaA1 diff --git a/packages/bridge/public/manifest.json b/packages/bridge/public/manifest.json deleted file mode 100644 index 37065d3..0000000 --- a/packages/bridge/public/manifest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "short_name": "Wormhole Solana Bridge", - "name": "Wormhole Solana Bridge", - "icons": [ - { - "src": "/android-icon-36x36.png", - "sizes": "36x36", - "type": "image/png", - "density": "0.75" - }, - { - "src": "/android-icon-48x48.png", - "sizes": "48x48", - "type": "image/png", - "density": "1.0" - }, - { - "src": "/android-icon-72x72.png", - "sizes": "72x72", - "type": "image/png", - "density": "1.5" - }, - { - "src": "/android-icon-96x96.png", - "sizes": "96x96", - "type": "image/png", - "density": "2.0" - }, - { - "src": "/android-icon-144x144.png", - "sizes": "144x144", - "type": "image/png", - "density": "3.0" - }, - { - "src": "/android-icon-192x192.png", - "sizes": "192x192", - "type": "image/png", - "density": "4.0" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/packages/bridge/public/ms-icon-144x144.png b/packages/bridge/public/ms-icon-144x144.png deleted file mode 100644 index a1867131d2401e67de421e7bc53e6c4d32b611f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13104 zcmb7r1yCKq)93PVw-8*CpuyeY;ch{Ly99TKhih;RZo%E%B?NcpVZk-Q?f8FnRrlRh z-Bn#}_jJwluVr?(c59}3B9s-S&{2p`002Ojkrw~*Cgc9YNC1ld9Qt1|$=NBoCjY%R0i>{$wA#6{FRR!)7r=YDFc zZ=Snv*i)zLj>uEXBeg0hW5Y!)42sskYpfPwcc_(Wh$JAZLz9O4|%O_v2pOOQ(g54x)tTu%NI-bn{Nb+~MNzCVFOvCFF z1zLl(cETPyAO=?XUuOlffnya3(}0-DA(_rLQTJlvLZa|)Jm+dcgaNTw|5j84CvP)( zPY`B~*R-Eu5X`?%+%LRk3@nc`U6mBs^gWoc9&B(K=)`O+9(Sp*wIGNi91$#tW#PpB zHv4l#Lu6?i##M&tCmAOl(r2-ao};8u z&AG9D^xZhO0GRj}4|D>;aonirWVnkY6Q9K)^HIAQMlW6NooQQW44QInfEDB;L{wB9 z;mQWm>6gdxf;N{tL}eAEq`ry*H)tv5Z0$EdTud9tbK99aopP|fiC9CLGzq%93k42x zHZP2%^>Rg}}L7hHK&ZhIYw2?0@z++2Ke?4~#W1BFSC5AC+mSI5*-5DX2oH~JR zQi=KkX9LCKiol^1hXe@D23RE0M4}y>V9X#285w^~)@^uUlS^jlK)6CKU2Y~1uyp-= z5G1InogUB)OYZtvvmV|C0XMFaU<}&^3BqGw$lA}P)(Yt<2cMC!4j}wiu@h6r(_wOJ zkQ1v#B7;xPM-n<+VTZ5y!>nu~P)-9Ifv!kwx7V!nh^+q3nm`|uk^{NSkWq*%7gH-+ z`rrV&#xjwkpBLq8VkiP-^2SWIXLo+#t=p8sL7ojVjxEL4KOn!9ikwX>p!1HDd?4S@ z8v7m}q>nP92&dt`mR@81kf%)CXOX)s|0%THgF9lT6t1}vu4IKP-o;dz+pc?8Us|=Y zpCP#ll@O|d4^vvzm5($X5j-_%sx~jFndpYZ6O+KR>RGE)i^{P;-;(YGCu3@g1dPFK ze2z0nuN1o3GeODC@pzPC(GskyR9jXL(8S@9l9rS-pB60n6nX5p6Dk{v!;o(Y;B&0@ zF~(UYrfJV;1gQ}cklSGM-6gc-)I`Xyl$Ke42FsGMs5VkbE31-gXY-`V)^#t#bR;WL zrzw^xN(_1)orWurjIUTXbqJZl#y+J3iyHB_&a)Bf&SNp}1@NDWF$<&zjf-r8M&Pk@ z6?+vS61Hd-3^pGRp==6{D?~ZVgvOHuEx-Sq7`kMKPd3nU@=WU!72n|ZLw-=trtsRu znr6U#O=DB$hX|@{fh0QMzQnwor_raPrq!&O6UptmmGEED#mHo&y|Z?Ofw}>UNXKU= z6=%y2I~w~cFb9L(k47XdzA;W`HpCK4a2MYo`x2@#N8f)KNB@)0G1q`24$`7t9Ki=t z2v>uwa}|!GafCr0@;e?Bc(k+E|4yru!}L0ziHoH^f**DNC3Hm^4_Bk*ix(^9wuZ0C zj?UAz=t1raR!IbURDc7s?q}>ZcTmlB#2$yJ{>MOizG~he3;;i4BbrCcC4QqN{LPC^+%guQjj}_Ih;Hh0Web+$%>oGwb zA*I6@6UyvTmMCfjodys85vp_Q4RpH@pHiHx%Vw%n;`=E@vFxx4me7!D2_^zzNd_^d zqay#iJcmx!cECs@c;pup?$`bu&MIJvkIs=l@=fl$RdtyEb8mcm6gfsNz$r(jAY~_R zU$q(qEduF^I29MVn$?Un^dAl6UsIJ}Ye~8@afvm~qzrtEMhSARaz3CkAv)@I+>GZR zHf&N1@Q(6vJYYg_#|suUKaq8iRcze!ld#BMU}sw~noup8Zw&x{El)j43c2LJ|1oyR z6K9`;8Pi&7~j8;1CE9#Sov6 z-W6nY9ipTq&DpK~F}aXf9^(eP{$_&5A(gJthj9!+YMY(xk-Bx4Kx6>@YY@~c46k}u zu-G<2(qjj7E6cSOq~N~KxZU(tmM3`+Y0>UgSPP9r1w8Ra{$hnEgK8`k4JGxXnm^1_ zH8ZMa5hCHxu;#N)hSEi6zhmVrfhy-xVI6WXM`l3h79&3?_l?~m)A#Pbdms>4j?SGY z{CRE?A{f`8qzpCH=MDd;G)KpO@nI2P7kLG72OTiR=(YP$RTkn7uyx-?lk-wiFWAEB zJuJi)OqkMt_QUBZm(G-ebOk!DQZllti@76gLt_2rVHW@P1RJea^ZsbHPzo~Zuj*Q| zV<6RoD^PzojzQE680aBzE9jdIb$JQ5?};55G)1v>nidA7YofW%SkX@lnG6fB|AqMj zXZPtoDhh9TJaVv8=_${3Yda3-V8-BH4hs*Isr`OU{X;dJBgT?jB0-Bq@R6yr5hL~I z^$BcszCXIo7HLrrLmh=faaqRGA{G-u`{|{!jdVW{HBNDhT(P8$yd`YoS$H~Sl@kiv z20qFzyK zV(kLb>a*@?Bkr58&g>NWRbZun=XRMP989R8jM{|Vg4BZt zH)*|&zOf`3<7IXIOPfr2=nE2ibm_C=ujP+4^a)D~TC4*hxQ}i9IP1wqxvIqIp$$Ji z7d+6c9?fI-l|`k;)U2H+spZ1r+8YMf9(!(A2H)85R(tDoXtT6u?LPh8e}NhWAZm$$ zI{&mOL8G7fFN$`~)-ihJ09}|1-DH%m4ac8U>QPv3FceiW6%F@1b+X|@lq;qTy(J5o zAh+uy6v`4t7s`j%Jpa;1yF&2MR9BT9&@#Bp+#J+S!QA8vIYozAFjPLSa$rf^-ksqS z9HMEH)U|E>V-l{3@{RGL6T3Sya#f@Q=3{$nDN~n*u)`8GqQLyHxcZS&{PUj-Gyc!| zXi(X_%>A2uOD(NP*7pGInUsjC$yvtLohfQ}xSVm@X5UH73+Zzfo7lYBw^;<*DPC+P z8<%76-#I%~-`{h|F$`g~myEgOM-7K+9faOHxRfs+#YK3rJ;x)8En@{>9Z$=kHC%qX zNBILf35D)k>$RHH9`-yrE4>7K0%5XH1-y42sjy*2eSxE>uCn#+16O)A-ode%F4~|y z;Am8;4D4yRMY+l;+OsfKQ;Dm!8_7E$jp3VSd~Vq15=(HP81S`xkDHj~{u%vWg7%j#K*Va*PtcEIW;YjtJ}V+;pfaw)2}hX$yq!;riFnBjJwL8?W9 z?tugG`*Wm(!L^81tg=g0;sigEB_R_DD;EF$&WuPey?{(NmW1PY1(9*^&LtX!baB&e ztgaLvvv`V6E?UqosJy(XWi)c=3XnvXDC)*^L?;s=)b#nlP>4>!IkwRIUU?7vWrx(E zR2iO@ff_IDE(e-B*TFdz)C7b}c66One^b>jr*MxNVTRQ6zt`1!y7-RB<&eb#;ZgQCiAS18O)#Ep1g>ceps4}8s_aVUww{BnFoqva0I|QA)aJSvEa+$stw6v)GZ0 z((Q`^V;`O9!>v&qhhG$2w?23eV}UF7Y~J|@_hi{L9WB-F{}$gz#`Q-tnZ~-F_t~G@ z_MrFz>0}os?6E5Jp>VM;Nnv40k?48)`be5RQdkkw*RsnGW?R6@3X)m)u zUW;*5&6n(oKiV_5vQ$wu{#SCYt!xzKE@z#=28|BO>%bsa-Z*P75~n|Is>*&;oHkc^qy596UbWI} zFGMhDHQYu^UFGOXamqzozrp*ujr=ju7vZP6Mo2^uv zBwFIF^hn}l{n9MXmrG}d4t0oN(f&slZqvvDS>Fy*Th}(A`qp2ypy*fbFfEZmbc2-0 zLCX2d|51E`UZnN|>ks;1%pfOviq|3tdH=6WW+uLx4^UPBMk@rmP9cohy9^mia#E#p zyh1E8W=5qz1L=HMMt@1zLW=%D{KYUqTANjs9gY3B1`dvkH-Tw^G@*Xhp%HQcag^5r z-3`r|j=6!tr;02lGe?=Jpn}sFF9`?DASn`Io7TWNr#H0?X+jfITHbh{6D`5xB zv;>tA6xspSRb3TLjQ~PrYkjs!*?nEO~)oQVax>qIHz%o)#>_nAUO% zH3wBfNozA!v|zvtp`=c0Bp~2Eq^DwhoR5St4d2jAW6YUeLfLvy6b_y~cPs$JAS*Hm z3Y<5B9+_jIIwWcdhKOSus-XU12iQe=NqVRmS^!=|bMbU^s9u_VSpSM91RiEtfFSD~ z#?u~%HZTyhK=?-sEM8O6BN|@!wTME6o+9I&rt{n~^+|QPtJz-?db0pbfxjWdC}b3O z0bBt*&(^VGSu%`}WrooctQ0ixn1(XG7voG1mbs%hO^MjXGR0DZUq)8Zcux9)ASCMD zSkh`eb(w|jdf~7@R5=w4OjUGYaD#x&E0J$sZ=Ot}LF6>2a;vc|l11Dy1$yL7>%3m1 z+qZ=WHJ~bY9K9NLf|--5XyvE8Q?v$>@_W0@B%{dO@Z`aY#@`>hlXzoEtM!!@vAqw9b*TSMgro+?GO8%$}9YqiK&aNR2&VPxEC zWpnl1&lu}1r4>=EBla68;gpuo+9d_PZR+^X+~2=%husMZ3tx(e@-T}+ARd?^v{gRD zOAm4q?$L=Ema#{?z~A5WS=~-K_uUu*9o$7a15c_6N=gL;h#IkInx_(BAA?lLMR;7- zxDgZwEq}NWZJe-{7bMfM&asD@r|Inu99FNm9Xw_z>_m^S%EqJewoyn@XdATaXb3jA zLzOVDUAx#o#o`z|;r}iI|57S)6jgnw9;Kt0__)j9;FyI)F7TRiJFheG8b%DtH8Rm{ zX+?@LfiDf%`l4LeP=lU7cVqt;+s4Y!uTWG0M=yDQ8rgP}@zDOqLZX9V)?S;x_T`B@ zn#&q?1;aL_o~y0=4|5)-wm<55#PifXW6o`{hoAgEyZ~XzO-SfK?2kvp!`B!NmJ8oW|+Za`q#)^x}mxbPZCU0S--#AF>|s0Szo_tz&xYKBelC%U*vC@23Q z#6<*YcVWmwg4@1vKN=UWjxpb~7l_3kM+0QNIKRyhg8!3^kgS7Pel72h_ zq|&qCEJ}r-4H@#H(wpbYj`*%SZ>S?T*G3NGJ0DDX{is%fL{rb+915r^o z+JuPbj&X)41mE*(%Zq6CJf*MQLu2&sLp^i@d2pR;CW`#oMx!Ar?s$P+&FYd>$TN8~ z1BT@ISbJ(!A|bUmQ>CB{iGoQ)N&q~9e>`Jq(c9PU!nd=hvoYKPb}v@xIGo=k5X@j9 zQS#46I+N_}-29i2`m1>Jl7AQuEV+}x{IZ5M)Yfyz;KK`%6Y&&v`^Ss;97z32{2^B2 zb02BMr+p(GA*$gtzEkSVl<8KQQ;!gSY+r##t_lI;_M_cnKlXpfwLb31eI*kbRsUSt z=7kP1JVLOFb)=GVN2XY6DOq{l)%c);iqx^TWyK~fprT?L4=X9O@BWB?%9{!Qwr<>yi`gY!|sAXMd8 z2r>J&dDOo+&90aCZ^;IKmt2LYpzY=NMRbhv#vc@VAx{mFUvjr?`n@B`6W;RuQVJJZ zfVK&~7z6nb4LmFPUH(2Yc-{Y`X_4u5XPxSULB3j#sKkF*ND6;P2c)9bd^$ahHfQ)a zQx7M?&EFRtdHW>Jy0%Yhj@#a(w#O=10XmeaZ@ zrLJ&=syHwB<+t^e)t@0PYYv%zWWZuR^b@?$Yo^hYomUA8JcX1&y5Y+iJFDDcR ztJV9Sfy|&c>VroSmXh>9sN(ejIjmK_^D~BX648jET&NAVrK=iEnC_uRLIwH~TqJn1 z@N_{Tg)Rb@TKdf1;*k=WUqoqlJe&r1rqp|L)snaS1ox_wVpDo63?`kNDcqw3&Axs2 z?;YF3KzfS>VlX~ziyDMRyp~7eLajKu)QY7YCZc|TQbO4_>t7VY4U*~4rnIA|oc0tL zi%(vQKj0jpQqKywC7MB`Sj8GDzOQk|b-!2=%4Q)G=X%DjIDX9GI^ZWZWufrTe}y0N zu7eKZ01(7o_sVfCcGfZTWF00+6YRh`!tOKw0XM;%k)KYsYC;iNe)5_FD~W{yDTpIa z(VMuyfNGCz$ISDU@ez&(-sTW8RUU70kkZ}ekxrBr{VA1XPQ%C7R6i-=2>a!gaNU-D#1r%Dqh;v^Su{SLD!HHQ23 zaU>&bij8!H7ZI|60sRjzY7lGqCoISyc{Qx~F#;CQaf;_Ic7zt3i9yGV=unE39Y-1x z#%5ZKz*=4%-;hRsfZ@_(ww+wV%?Z8OKH1H#y0t3z73< z9d9Z=MiJ7E`BN5GuC7`TdA7_~Fv`Ytz6B{UVD)gVcPpZCbB2|q3ADfs;Ck(6Eu7U? zvWEv4Lfs}BkUEx(GE{KOEKHT)h$G2DjHAU1jclH7C67knS!=Jfi3J{_6TulyGgYkz zNG@i{qh!S*ymo;I@Gle;^dk9ub%iuZfg=+Y1AQL8Y{vK;9*)vS z2WoL4^rXjt;>GT^t>*tEfrA8Wxb?0t)$ORAJg$iGOTWAe{~a>E9Bz3Z=38Ir_0xwY zjpJJ}iR%s?u4H*qeBpt5gmm^`+!onzP4J}K*CeFQ*+kOQEZMJ77>1M~2y`R5_*2Q} zg*wAI;_kYAt6VdjPljB%Rd1 z&mf=zE=O`JLg;vhD@ZnsB?Bw#*2p}v8?kK@=Bq~eZhEc}xsa5T8f2n{q1iCU;3Dg< za*ECR`yw)FsWIqq{(|EBqmgu#(7=d=lgTBs~kxxVes2c z;QQ4saWQXyKb@1%Za0>25Ka~Mv-$LaM1#wA$hhm_u5bA_j4t)SpgTHs9LATHfTZ>Z)b7sVg z&&rB9+Fr35h}MJwdSM@F3nS{_egvIKDO3V9bH*k9Hk1}pYb#|X_7)(^&UPaZNoh9O zlyxJiM{$0c!8o-cRoG`5&9cfheM1MXlrKWG<>h}f{A`v6h0D%|tRE7)Jy7-kjV!gsw`fL=Z)AWz~&h0p@c}w_7hJlGnJ=Q~I7UbH;4) zdZ);7YO#NC8Sx(CkB{b*7B%Jfq|~VLHZ!%~HMAulvmEJ-q?5E0Vm=-d?xeG#Dhn?*8{HWMBBYXz7chUxo2?)yH>%n`jrN1~M!_9;_lPJWcy| z5|t(YW4XS^7PnYFz08FMq6DO<#xzTlv~=d3UZ5C(VKIYR@~*uePBnX?E&WWBb~Ivx z)|WcBLU*CHv_fk=12_qW4%C&9cmDmk>4(%)+u8J#Z2u~GQi%x*eTLuT2A+uE4X$%9 zC0i&4-g)b?sb+FIGc=&FnTNwKco{DfNJT5V3xxDKJoFchmUK*v{y1hG$6aAe$ywmW zyuftPIF~wccShIIWf%3mHFPL87F$;us*7adh7nn_Y=2u3O~ZD=@jQR;dqq{wY!fi~mN!qV_68rW1`sg_l|6-{tr2P4SLmAlbh zEj8#{X$pS#IH%~pRsKoLedJU!#a7i3p%i))}5d(UtQqT?X@-T z7Vt3a2MP~4GDE9(dLLt9H$T(*GX|a`I3mCe4+*H|fmqqr=^E~QcmnC}6 zE(mC9S^p&7rEYMZ)U@Hs+5ECvbd(p{Z(+2$Tj9hUPW*M$z+HDU?ca^wt#M2wp=@ah z4RZ}oG87p^SXC5KP3x0;Oo5F8!w`x-TVknqBB@ql+;4UOTEb|3 zsl3ME{w{5&$$ZV!PdbVB6?8B|Ah~)`ulUb7SE9(Vu{~BIi=5G4JsVv85>nkGs%Pms zPo0NrTa^F4A+dUWkw3E8NWgmWeUzWE(UK?*wm^8~<1uym=EctBvd7zxB1_L81YAQ< zMKJsUMr|o27xlPj8YI2aQ;iAUCLiZVg1kRCXM{_`0j3-*)yH1sv-@Z9t#^DGF4@a{3w2}8W@C?FQ)T`Sg0v@?zknla!4MKAfHWAfHLN+w~QLlX7D1zJkNKEVWx z9dHZ^@=Z1Cx_JLQ2(`E7hC}=6(EWW<`FK_T`V`=D;3fm?p0e9NAacPBk85g3C}#aS zAt`lQ3!I7hg+^X$Hf$MtY`Z!;^b4R>dra~Epz^!#*0rypMzF9cU3GQBA8$S9n_(qr ztLBhrO4OSh7&=~v1z{p$F_xHkR8i2mS{B@GbRZ7)t;j%{>617?wJX_q_Fj?~=)z@F zH}LeK=RH5CFs$-E*tCB$qgc2ZT%lP*eBt!N&#!CT*tQF~wobkZ!8J9@Y3ecp+8)R^ zgUJPs1v>V-5GQ)_eKx7LLqM6xPG;uBQ3@D`hT3sa6b=O;1S5&OMI_NJ#g|u zxO=NX#|^X8Yy@~s3f~jyUqIaip6UJT6B$yGFALzZOCFcsvx`BSMuB6$Vm(1Q#YFQW5|qy!{K|z%?Lq@r8Mkz7LjpB2^(+2(Ux|v)5SCfjP_+}5T`h3 zrhi}?%kxB2)8diT`500oLox^K;#Tc`2LGb@+hx}&TA%OQY4-(ZpvF7dsTguBr`;XYd2Qd zbnk~%c&>~^esAuB{1#?Zc-d1d7#&wjTgbL}+bC~MWW=K3+5{n2*!yLXwY(2Er}Lfx zrs^Fu@Jp>icLC?XNBTCSAr@<$52a<{BB=OW2T(FqNu3nJrIA4p|G|MuK&r?PtR2-g96%MMc z4#XG!VL>?S2VMZE&i-y{EFHwo_hr%XnpfwN-N5TW9!v8}4QijN%kIBVAB$YoU<$Tu zJ~O$d99ZYw4hr!YbA=QAY+yeNm>qX03Ys0mxy6qo2;A2RC^J*vcW5cvoSforEFLm< ztZC&_rHDe-BpowVD!tU+!l_pcyJ`I7Y$k0UxWX~+77cA)a@ec9q;6OFvc}Xl&F!TD87p>+@cA6IaII%0X3^xR;2xJg#4mUre9V!L?ShKEYO8xR9^j2aMf$tOP zePPM%>SNC8grGA@I>_O6?#29Ir&57B+==Bd-D5sW2NiIPkwefi2KWgTK89fwu*U# z?=m<`uuw^meP)DD8P4^1^<;w7tkEjCS@4lnz+TwlIJN1NA&H)%1?a0>F=>{%(tOO< zt0rk$GdHBI4-z5hTH5zCHeS?dNGDpfW|uz=E@6_QOgEpNv>Yn?D!Ecz6FDd1c5YH% z+vm>15WC8urmocw^D9Qo+(Rt165(H{i*eDa@&L3xKqnEti#gPMtzep9(*FI2kSnAf zcaYP%ym<~^&Br>gwG|H@24MX%bNC|j)}N?Z@HoTm%Pt#$k5a=pQC-U{H3Y52i26}$ z&d?rDC{S7hUyrGL)$MY6q_WfWP1X>%VG@HYjsr2@*IzBmeUO=nWtPJmmxwlENt~!{ zWUG&R;P|3`t49p^2;C z*76rKLp+PSB;B#N+J_mHG`TK44^kV!^{JhHgtPq8u+36mx@X@@Skwo{lhQR$q>ey7 zxlJxK`15?d6$3UTdYNstZMvLm>*Bbdj*Cfg@Q*=Lh+VeKM|8WIO_P&(P+1T@mH;Pu zgt%d_5lW~frI*d_13JD{Tw<+Y6E;s7y%y;@aMLI*`?CUp_#|#I`XJu7zba>TLFvae zc0>G?DN?Mp;bNdd)sUF;Y4Fv3;H0GkEF2la9TQ3wvxHD9AFgMA_kGGWcxMWD_-k=8 z*tG1(Q{(Q(1+OVu6V=n?ht7%|UGx5X{n&={_SY1Zy!Ng0h8bkZa(?l?QL4H5=)nyw zMfV+PO^eUOmKqRHDOx&A6j!(-*p(A6fTz{+fJzNcsm+28#5_lT|7@9n#&@oQvVlBu z{pFa3rQoUEzg_5p1P4rhchl)%Xcn^!+Q;%>42S~k%!cp$l9LfMhe$`x*=E`MvFtXD zHEgrAG%^Bb&}A-+e*R`@oD0^;RSm)z)Ne#M(FJ_$&A1E`F7^um=W8ZmggQ`OWxerS$4db;#luj}OEi6$Oqd z-@)*RJtK%B^=Dq#6Fqa3fhNnGb0OWBry;A&`6}{%j3iC%v`2&DgzV1}VJTlvZP{e% zc}iqR*}H{lr_d+@VE;Wa;lZw}d_=whoIXL0;ake9-nAa#=XhyBzv6<)Jx4z+UG3p2 zlW9&e^)0@;_?V!R^>p@H4B*T|WYUn^Ehw|uRZq`(3~{WHuM~#B(lg-}mWp9^_ViI83m ze8y#CCE|n`WA%p?RBBHIkV|`LG}2-~_SD|RFIElbucpN?M84m7k`&7+`4~H~vyaHi z%Q!M|Kf9R9xu6D@==0yFQPpKACK7X+T5D%Wf?m}iTLU=9vxaIrrx5`EIDFQ1^9o%XqCJ!lo=6+gt{@_EGD;e$q zPAkfEM|yOytB3cAU>i)u*U0uNR!kT%r=#4$jBS4RZl5_j@^z@bFktxnWeUP2yYER9mn)|? zSjIo1W?0Jh%5kR0|7gL_mexJTW9soP&K+e>0X3dq6MWxlo#Uehh53Qvec;mj+Cj|o ze5>gu`Xe!JEoDwsS=f)N`s!M_jcoa)wv$G?vy7LX=7ymUa#)Uu0{3Z z&riYf!|ni&LmBi;b&n*k1EEJQgojh&SXCXjufFBfKW=rZGTG<4E1lo`HgfX)IQ~Xs zEf_6T+6Z5p*?8H9z0>92r)gT;)9=C_GmEHRbNT6?1864dnFjLT%2+xS@3D`akSPQF zt*?wdUTc(Jaz(3hQXi0UuG)@c(LEqP`?^~2XzGmd!%<=E8v8wjZr-aO5arEomTkLy zgSpY~Gq56O2sawl`bRvP@uNU=McMjx&+H|+}DvVDQEV}4# zYam|3VN;vxn&HqYH9(rB@3b=}w#p@61$}AEHTtgNXTzOdxvG!E&mmVJ1eTyTcY-S> zxLeCtqJ+MQ7FZ*2FD-J5BFm_S#p>06M_(Nk)~j_hOU%(#a+IHya`DURELkL97&M~r z@ya}XOOe-(TKM@qR?q_t44i+s@CKS9M^ur}vkZtC0o>qS_B55Mr}^(NN&wakt_L^d z75>8UGO1td-@{3&AKe;C8ohJ}Wb!7C8B&r?cGj2nP54eHpU{x7eFz!h7p_HF8d20g zDNdUswj2I&*y`DeE$Yu80oWf-76e6Kbw|U5ByA*wYR;Rj{b6b}!>iBeyvdfoDD{;4 zUw5FxD#2lyDjT_Hj627@)09J0=)w^+O}IAIw$Rfr4&H1f<28+9lX*2Q{aJ+(Hk6$$ zzsh&#%(8*vAS$?Zk=7{xyW#(vUN?(hVW(bhqMnu$!r#s?P`OBGxtJQcnDLo7nY{^s zjfIVsk%gU+l|_w(gO7!UkCT)Btz}`^qk{YXzZuxtn_8KB{@)FfJUUq43?%;(!P(y2 z#ofrs43M!kvM^IHvam9-rr=`YX5wMwrC?)W8;A3WXcXwy9 z`Vabz-_T6%;I!OGUm#nZtI_^+&( z9qcTG>ogSq4?hZOZzzD3i;s> l6LvErP8Locb`EZ)Hw&h>{Ggk>i*FGC83{%4DpAA0{{anj!gT-u diff --git a/packages/bridge/public/ms-icon-150x150.png b/packages/bridge/public/ms-icon-150x150.png deleted file mode 100644 index 2a1c7a0e078b4e46f3d238fe016ecc7993265088..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14002 zcmbVz1x#eY)92vswm6F}?(T~(4uiYv;O?%AySwY+&MfXMzPK;8_+o<{|1X!^cb8l) zxxA{bbl0z{x?krdoqE;LDoQeF$VA8h002!+R#NRlrvHZ#;Xhg-DCfNo0c$0$C=LMp zNI-cpf&1t~xvI&01=P=woP2aB%w*LR0RSIb03av~0Dyc91swwb?rZ?SsWAW`kO=?~ zIOTS!3VkTxP32`I0q_5L3VSP3K1Pt7WOZBt0J!M?Fcio-@57#pMov;3=(Tp9=i5^* zqk7c8bm==YMNKP~3Hx1+R#K#7?y2&(zvbH+3HNG%Ym#f9Oya_eq!QX7KU_5K>%x0E?{hRudj`r)c2{Lf{7#+Tdse zb0LUHiHl{#SO(wiX7>udXsJT+z!|8I#Z(ub9U4sdLm7lvin)6|eHyE*si_IX@tE-} zhJL<h1upcelve0pqhF zSW4vNYvP5&!0`Jhl&*Vaz*<&Yhgeko5i65Y#RB4DnUEd^fgyhc^z8HwQV}5X-7pw< zk}9cn%(9%B(_u_b#w(mfiN3%|&aJ1<%WpRhJhN-gxwQ8HI@DT6sh~J_6?zg=MMeFh zsf%D!IFHnRoOKN18kzC}`eGXk()-B(T*9q|(8XR6?*?BpB)i!2d{W(QsAtsUbs??E z`q1rJ@W4_p+bR`30rD%^5H->ZbZT=F#Cr2yW) zNYz(QL<|@YB5&!U)Ihvph!feoB+gYQZlUooS`6mH2hX4JjnDKIDr_SA8DvUhB)^1z=28amDD(NDYOz>;RU zBxDNJXsF**_f@~>0$)|E_V>g>w= zgAQ)S;vX+9L=C#8S`yHaWV4PpS17k7-#1#I(`;cMWLM5x#wumoYNe}-uf^&a;lpt; zwj_a88bo)Kr!sbOsUshYno&vNK7cCZL1OD#H-|$&Oyc;Qq^%X)wXjzHLvI`H7xEy} z*W4|hIzsBhYv!OWnlTw|77^FQAez{zKhA>pQKzxu0oebjJ$d8Zo}0g`H9r-qmY7&J zXLXyJ^bCBNmCGZP)A%+#bjXua4Q8^WB3!6(0#RgUd0fJSXjF4j#mz3Gp|llY_!Cpx z)*GF%Ywkym@mFMWM_hL*vMzQUojrbRIC+ph}QYm+q%JZs3*14L)N=5-UhTD z$ZU*-&oCM+K-(d4)D>lAhMD13NV(cSjV(u?xODxa2E0VG{}Rrf%eXs!Q*alg_!SH; z(Zy}T6;|O=wa7$J#Ej}?oL+T*$SI)vVQ}Qjz0gH^?$*Ol$dJ7vxSHR7U;9*FoR^hS z?o9MMm({rEQXdLI+)4{KQBZul`WTNm_OQY;>5Q?N3aZ-beYe$q%CqRq8>9LNW)|;I zlGtSrnsMo_3RWJ^_SK+PvqSo<>icOb#PQInW1Xw4vSwD4st(@PUug_aebD^}R=px$ z-xtZvM|Q8E}?>kHGvP^BA2P%AEF&b{?F{mP60YXBqP- zsQJUIa%n=?O@RuI;!~)_qG=`PJ?mQp==t;OGudxaCL;gS&ZCptf1iHkl>dX7!N|RG zC^RtD+bb=5tbaNTNneQo~KE%#%)0JU4Pb^B#4S+uNA&U)}nzO!fVT?8>&p$BY55IgHa71N3 zPRZaa=?!(|mxwc*h1sxXw$cMnkvU@c37adLPmB=8=MIEBG`EuT4T+gJ0i4TY@GP_q zab!wz_VHU9MG392 zo0@ewT~X2_ zo9K$gKNmYk)qh#qp-MKDHI#HndUq8-_ubM#5T3|Upp|@xcHWNxqe+R;2Vy%(`i1I? z0DFAPbQn4J{0=FYR*VRs$zAt7Kfym{&CZ_I`EF_3Go%OSKts0Agk4m+-{~fS9GC8a zVZ&*Q_&t6&p755HSxM_Aw&}_qs8p+NK_OIVmWH$W9XCr=8|3sM*s}9pC#A6L9X@JK z(Xwb-?PlQLIrX^AqQvpgE2yr(Pb7}-6qA7s!#pdm)};0#2s!aKCx!7kN9n%tzoP}t zUf6kFg^!-EmsAq~W~Kj8yF*vm(C=P;X@U5;KuPFfa9Z=_n69MZ*Hk50=>i3WV7Qmc z-`YIB=U;i&_N%Nxb|6@goo9J@(Vt7}qK*&E>Is9w&RjM-;d6hy*Dsz$2>QbBHw0VB zqTT1#7`b%ypIE}$E$8GfMDmsE&Sm=l?O2gu8={ZnzAX~JlkxDZw$ojT-wl7ULdnGi zTB&U2O?a?pMp-+Xz(oIvnn^e@JIP6%|0D!&Ra zGHALyTUMev3zzdsACN1Dn=-yjtb$I#hjTzJs@;An`xJqN(E^7&Yd>eIkzK{cZB)FB z=Bvh>)Uno5;hHlA$9iKaP(e8dO6u%VSmP?S04_$k>o|NH{u?a-QiZ7lVXbLWReRrp zayoD1h0|CK%T6mrK^8?BI{pEyV|tjq`uLM)7hTLJ%oSt;l^0mrtbH$L)Zwq3N-4Dj zl~?wv{Bu5*&5P*{^WepFnu!pXPJ$OSy+24(&Tl%?BA=E|)S)CeC1zHx(1~NH+fnxv zBAHXXu3}5En(2ZyGYnp$DiIy(6|e4V^m&Z(Up790+j?su*F?rKwvJ zOnUh{!^@$as)~~Z*zi_s2J~?2jf)DXi{AZM#o-Xx!&#p$-@y?i#v^_S;3se=I9eSU zkMd7%Hg7@S1UMKxi+OSpeq{Ywv}&oV8=b3Fhd0kbSx{?9AuJ(WYj_{}`)B)IUm`^h z)IOg?!4!Oj3{Gi=AO3MKBujeYhn8+4K}`Go79l=Jvxp%Za5tJ7ELwSi$*XFjt|JLf zMibPHZ-c|{;ANJy*1FXbaBL~df|m)rV-!9;yeRjB>9u`UruqIZwjZ_Bo?u?Weu!`I zu0vjf@X9Hfx4Qq;Jj!$(wU-L~&f-=}@B;i-))}M%l|7Z4S-7neV6XrAg#qCTwOP!4 zaSvLW{6)w9&w@4YzlN_x)_gOqGVDtA5fA0kkEbFAfu@ z5av*Mwkt|0mSfyU^N{=eNRNJEg~263@vYCLu?f>go}0@Mk>01A0-pkLZs_Gn!&~Ry zKWO<`@1t&@#q%)+*S29t&awlx@lfiYj%s?zv+zAP?NE;@W$B^-r}ODPDW5WP{RDra zr2|kK;<}(p{h!Gs4dq+={lS`oii={VL}i?<7d{6GP|75)*vBA0XW?7Rd9V(5=f|5@ zqBd|t9rd^UiN7Lx^NfK4gwkexUs7&7(@U^8ONXgI$*ss!=GL9J4mr{M3o|5O`E8M4 zO=3B25DD$m3*SSZmCI$r9R;FOL*Hsk7Flb*fm<&+QJjb#LLsD~6YI0@=MamrjlcDB z2ez}E(RFTxuCI8grM`IHbXN>+=a6vwt7sXa!$xs92TeY+k+*lxhZD-&1}6_}{<$W` z=hAl$5Z;SIb?h5twN~K0D1xx-pq;_GHR{33g*?{aHf|MI1E&=pA8?yt@1f0Y=IzLV zwg%_wYkSJoD3pc7sgi_^%G}>t)*2B|Gl{P-@{lZb=DLtWyK-NTQmHwup#{B$s&Xcc zj@hA}<~b#4n6mIU!b10$j{L2K3c4Cf8O&&Sr<(diCdn$vPwb^qfN3Sk%gI>;8bI!k zE-dJ5Nm@zxaT>P2oww|jCQNiE@0LQ7*^S?Hai?Te=~nBW4e$KGJ%2R)XADPe#7*D< zEHtpyTj~DD6mH9qV{WPmU-b58f62}lZi~ff9AbKZGOT|`PVVg`qG9w0(3HDfP->Op zosNhx0i_^NdRdKzUBM6hRm%Npmf452&#bN_@yW`XsCJDtdacklMlEkRBqYBXWDxYK zy0XbYT29kqU4u5>OAfHlw*SII(s0Yc_8EA}8Dcr@C2F z?1*)s_Lg;)UJ)DccTR>3NT%%x;7wjlaGG+eV@_=gYv~|zkjL8W+d&qiFWFd6gQs19 zSKPsO_eB2Xx3NdgXTb9#u1c>Ws!stfD_uB1(MTKEeGjHQoNra-L@j1J`+~FPP+ZJD ztz4tGKCwMra_TP^IQ=BagZcdk-++7?m$tQ!_AvxGusq9Xy~DzJbB&(!^>;~pt}-`L ztz;K-$~Mac3?3N^8zZ746-|~{-BD;YQSK-YZAGrf_UcbM5Iu8#l40v}-M5)tttusT z9TM9FxGVE6wJAdnXzr^Bkd-)xR7n=}$TV-y{^cohjp{|;%A$BDqkF&EZ(PA+6_v9p zv!$@Mf;A`u`1h|s2l1P3xYq*uvK-zc9nt$dndORX*z{t;LtAl?NEcgt13RiRc8N2E znByJG32DW;Nax4sY+w=NH}iQF+k(xhZIE^ zAl7PPOAmidz!SO$h-4H>&sN|9NXtIL5v z%{~cDcmthI|D&yM*!0NsN+Uh~mU7ApX4QACyaOqC z@!!LX(1XnBh%{|4mq4Wv&1uVy==MbOuP*U~-BLrhCe$7yh^bjXjR#&n_!Z)_;jT z%$iE3x%55NF~TvPh6;Ep<5l$lU6elC4ka;cChcA4zfwi2%oPbW8xTk8CTzs|l#}tn z5@G1h_FBJ_oe+}gKqDya92{cwoHcmQs`npZ@_Bek0m$wd--nd9+g^Aygk{DPG_}uU z6oe#8h<|ctVUS)_ZKRAeVI5=KT!G?RVoBOY=3Nv=h)@Q0i8KVYg_+M5+R;)CwiFrJ z=NXub5?yf9mJB$Z+xTIJ9_mD`hrPHK_qSwXTR+{10e_1fz|*|TNsDxZ)(K|RUSCuM zTz+I}NOrv2S>h31k#@W(U0%eBmfs&adF%vow-J+C^YV=O=`W7YGJywb-mh2n^fY_% z&^LscVF_1E6UK;7X(i6_5gO*&bA$1Mxbt_M4ZsueNrUfUr|-2jz>fQ2SaiLaW| zn{(MAi#sQx^z-rjw$+*2cQucS6zkd7GK%xO8Z2Y4`_WepW zxWUf*oL#)(P`4duSWr(Azgq6ETJ*}-uj2JoM-85+>e92;6};dv)|ftGG<29y1)`0IR_ zIenn|ZENYVm#TPE;;CaqfAiwQlx`VQRC!VT-z}}v=C`#g)I?I@)#FcGi50EO+|{!X z%J8?g@rAdH+CYZWlaha{qU$SpZkWy2qoM_$0x8! z$+6NLlc&6kU#J`P95?rD-k%#1$Qofg@eZfK&yuSOhF)1;3XvkR8I*Uov;mK2oec;G z*@zT4n6yqC?snVn7<56w(x8=Lq-rF@xWbCf6f&o}Sz)ip`>UO{_giDcm(&s75g|D$ zif**t)zC3CmUp3|X=(-xsYAbUpSIk_HbG{N?f213(LHd}qWLtjKIi&RyNH6^w26%O zQ+_3$Jjtm504qvB=2PZUr-%2(X@P@zbQbMdA5V&?#UdpE723tmJr+J6u6tvBNwIz; zug^LfRyXB$-0>Z=OMBY0{YddvBI`Ryl|86@@+q25tywu;+Q4U0t3-*}L4}G7r3*7I zhc=scG)^jn$+s<)cJy0@Gu0esh>m?76?gfl8NPcCB!@0vLSLQ^q5u*c8EG-3`nR9& zb-3>fD%bVbG>S}--)^74S>dsk?oibTh#Sh$b`eCXhZIrmyTY|YZZfvQHii|J53Zr# z;dYtu3~uw{i-K8DF)JP(=>z{-Kfl!W^I+e|g5PpykiWIMisJq{2>Xfw`9up2U2Ba* zCI5Ld5c@fPS(=nd+}au7P4V#03lM(Kh$y8oku#rPhrEWC&1Ow^a&uE1xE(cih^RF~ zu#u1R(h%tXxRd-gfXCVsO*&zpb?^f`TjP|DY-jkzJrYC^Xrtir9RvE}r}ToC#%~4d zcxUq-g2&XhENr*MrfcI>9twdt-udc%7|YgunG!t#v{J>Z^?6ZyV@6+=){ZC>@FSnr z_m!uB&Lf*0xr6@OK#odgL#z<~VH&d4XJ*Pv zMNKL;k7Apu&>S%0GSd0MOYyyD1vk2B`BWGLi-c=3b#()Nu~qrE(zR01I;xQ4R!I;> zad7NN4hcZ~Y{dsJdvx{LS77-07-cJL%mOj6)cd^cN%zle{{15r3R4i{%rlc<(~O4K zcglB-T?OVG9pBO3IFixC_-MkoHFIKD>~z(hX4Jt;U=jDpzM>6)^&jZ9Pzh02nQlQ^ z`Pi`m4=i}Uf40-g;;|Ejpa$pJaGg!ePV{@P7B+8|2(t0uIWO7`wd)#6!68t{X|ptkOSO+cJA?3*})mNba$?_u{{;7gcH-M+w?#ZpwD;l({phz=HAzP}f6n8(6pu&pUsqfL~r}rDC5p&uGq|0rlUG^Him}KSJBYV?espc7P*U;hy8A3(gNm3r_v2p~jC{dbFXN?6;sg#HEB`0Q5Q?F11sCFsOD@6?DZ z5*-l-rqc7``CfuNPm}mgSw-q2OfRxyc9O$_+4AE;h2K#U96p$Mwwp}c(tf(2aE$TO zSFE#zYZ6h);`D0@Ybxo`9e-+Jk;~xXln12KJckx(aI_<0>yMyv68+IMLS^iaS%ylOdCFz zvw9il+3A`ELqEn9bP;aqPg(Hzevf(yiOG#VhJ2!q|M9B3JtT`!zVPZWWh1hb+Al?y znRF{`5fMVjMzk*ZS#Z1J$=RcS0sd~2Lrj3&hNSsa(P>nWcgzK24@t&vUKEvL!;)6S zM5(Mo27bEC>5!;-{l?`d`TMgo`m2fm@Y{HWQ0!{G0pTO%SR8Z(qDvPAXNeGr_j%=m zXAx=hrkBozg8y$>8+V8=kxa}Xi;f<}oi0dkle^W6fY}gU2_!T0t_Ui*3i;BwbIfhNCoyh?ma+6quJT=@q%a&;fK2c))2i zCffJv3B!XfZ>HnD&(9mop-eBVNsVUt!+z|TTO7E6E#16A)*EWGxaQWoV@!;&VM9Mc zYpknhYrUN_n}l(w6q4_etrysy6ps>?65930MaNm@`1Pyz@`N9t-EkLJ5A! z0+rojCT1$r(8sT#NeTO5C;pgfJx2cGbg6Sq$ZLJ0zmXix_oP?8ZFDPpX5F-Qi391~ zXT5!>lu?*4uqDxikP3OS_b6B|4HItQCAWH7wYL~X>u;^z|8xiWKK-~3P3zI;D452N z?QuV6s(ZCfy3W$3WjGIox)1jiOzd|stlFP1J?Q6Ilg?x|u=cMoEL|!-bbOeDawYmc zThUaAu1wQO1ZuxgvEGjw*3l`uw{ks8 z#&u?|Eu(LUx7(If13g>P`knjLoioqS%he*c71Y*qYMa-&_SRKoR~5;ul^(q+FjCyw zeW-7IdvF+#gn%5gVuzn2LaET1f^Gxe-Eh;-Y6Ha*R{(+Z6K_d7b~3^x8y+lis0yd; z$(`|ke$BBr+Q(+VWNqjF@wkO8EHvnS1UVo2Ts-gn{Ih=F9ZKCs2y1=b=6mh=*H;bc zj&2j(Eg&{iAt+4sz3%+L`#X6io*(6yfUI!-Zq$>u|5MerV7MsXQS2o5A9DT1JKJzQ z$tMx1iwY3~`9tRA2NQ3i5V7o{wq zRUcn)U0n9WezFJTUMSf1gazao--RI6on_*`S<#CtIu$rw;@1Q2qc8sh6aUD;qWKsNBvvl#jz8nOI9<+L zL@HsGyGG}n=Dl6v!ZUgV0z&nM%;Ge;%WU;i=Ux-?;-)8$usME5m+tm!*bwt+NwDZ? zy;MP^(TZD(piju zk{Pr!TVdPW#ucz9R{?f|Un7WE@Qtg~)Dtu^0ywx*SFdK6#FZMQo_q5At64Cdh(oHI z|M0Sa%5B!V_^u`eobbo&J2DlA;QVwxH^YX7vmh|*wvnzR^dOGawn){7TA%nPrXQnH z)1+FEva5Lu{z~{$Bsvlp+(QBpno^U}X=>g0ERVHYCwl+8fwU3c$sbBeXL*(mt(e#H z-&TI|T$aB+bBekQ=)})oE5Z{~oTRb3i@eWkAX&)IgL-(D&mx+Ot1H!hd(Ii8=TDDz z$)YD8-$#;<;qIGa_fG>Y4rfKN>Kgd_F&r)6h;1~co`kmzon1Bwarlx1q2#~9Az?wXa zl%Hpatg0 z-7(!Fx^xNW`0Vt|#&g_c@FrcD&LK;>tLv;O9^Ec1+T^?}Z%ggD$6V*l!!D(Mi>Z_4 z$}YJ{(1u?~fdKvtys@Lahwsnt#N_m4yvesa#0r*Uw-1yp(}v!YKW_?t!C zT#!_R+hs6bGnZb@U^7f(bt49R?Y9M0cunE8n=P1{dPUuPghgtOG_`$ynDii)<^#Rv z1J?7!)|W06ax{`*Kc*m~_u&3NkFAl71+3(wF84#Er4{skB{6?9HE1((Y1~g*1Zr<8 zd`8kIKf8454weksHmbmvmS=Z|;RIAqfht&5lQQn-U?y3J`k<3+XH>&Y6?^BiH)Nov z(`9Iwh0C$NNZA8(c>aHuF|p{hSXiL8+CQEdVo5vYw}N`Lv(y26m zou=GGm~iHHruoIEzsmgm)Q2wQ?-8+d#G|X-XL1;enLt;Q0g{OFtq&S9Q`LVqfss0I zK!g5_87!n^Ts{#8K1v{J+`20j{KdbK-S1~=`bLt961-p!9IgF^kUJtgP*37S`7jJK zI-^S7l_w0~;uw!RhSv7%bkZU5KJ7!}GVPy}Pf6yJ)oR2S13pPl&sQ`5gTQR)wpDv1 zI1b{x_cZ^a#D-6%2@97v-?*R>&Bv|lF7e5hKb9`nUpNjqWEB3gc zdC-xi?-Ck(f6{KB$Pr0%FRuJu92${(1_dQ1Q|o9L4r>!3$D4X*5)7bx1bPIQ#l`Z4vwcSW_mVF($@4S!a)a+N8rRra9`Ca;t z%dzH!4VLUZdh?SL^r6f7aSj*hL%tdZ?Vq>(hJxMiQu>AhG~$IDg-nw8w31My?trXU zpAWT94@$`}%T@Y!;4(c=^NtWHZXHXVC11*c+5C0=#41Fz**kI4w`PkX2^@tw*UNG_ zv#KW_DSY>G9&7xDqO?jRQZ#hS>0mZy<;hN7M1tM+dScPyCtD|*qvU0u8iBTe*mdKL zaZ_u*ez1}C@+8;EQit5B2`RGaVMD%K(6-{}EyzB<5tpCffCgN3_Y3X8e$^D%a{KrR z1*c~_QY##ImLkye@{{n~2?go0O@h6YUD?my(6bAMW9^?Tqzig!)1+@dRLbvsvFl6= z>Z^ZTy3?1a`&V0$90TI(iBkq1!In#}d25hf-xon%O6J|M6tq;&BK`DqANTxbzgKxO zgJ-ATU`P#}6~3O)p{mVw(03t>qzphsl#evOSf;{j=|GAdr}V5X-KRk~w?f8>C9m+$ zl10EjD?B6rG*l`h7k))~Q6NAFF$!mT9gJNcN|AuRyIol&w`V2R=SJ5pL*k#|{Se03 zm{3!R_(T%v^4BQJ6n6|N`_jt{Cl&A;o)Z#~JNW$6AJf)lM=ynfYiDu(4S%WNx+Axe z&-+ph&L00l^PCmK3o}Q~xz75P+aP+mExnn%C#96ykUOHl_}O!#M;k+A8q1IQto@W z!XsgeJk{woPOc2=wesN}GqgWp;QXufR*wL#T_&3zc^i|3kmy4S$! zW>j1BRydEm!Sa#V80RYXp56Rg1Yc1)-o8~q?iNb7&?R7*qGaxOXn7_+5~woNU~P?6 zu@2;at(1OTgQkLhhz~{jcO7URtoP0jexnX@Pb6U|c*1qq*75x3?O4`-x^;6+-v^{+ ztzbqFrq+CaZn66>D*JB3A65oriX7phxjo-IyGv$J&s*GCY#$*(o=f7T5n>eP4=6L^aA^w#)mW(W}?I$S%Ccy_#*SxVS<{rQZxA7B62{kx2(yFCYr zAi1kTS`6}*GD_~YXCJ8yHUn$$Pkib3ee$*s?CQ~bQ^)$B9P*zj*PTA!0McH;Mt}ya z4r!dp*gy|omANHn*+cN4<5BkW`ETaxSt&kp6J??7$TpfBC5as_Suf3U?&!(|e46}y zX@_69_6q?O-o^07ZVI!HV^k+HEO%eXD_XN7?y|jW<525Tvd8TfodUh+5Z3a>{|TKu z3YE{^&O8*^G+ey;BVR)G@>RICmLJ}5i$09`4vl|?IUC&mLC$01{QUx-CR4Owt<|dV zeY!(k{pfR8b1|y^TdxwIFxW?(8^6)Rz4fejl_*P4%Lulx#3CjiaDVSB7<3n^*1q5D zc&4IojM#y2xGsX{k1=3zFdT`0+d5nm_+}CrmLb6rPVTc9V2L1>a0siKkD~u&!iLIq zIfsOt_PBiQ-jlq4btb5l?^~{uayI_Com2HT+P0?NL+<7Zd+(f6TEC=pZ`ScoSc4X} z=rb9%f?jsFYwDuc{XyJd`JZqn&%ZY!oYZE;CPjiDie1K0MRKJG-p~6*_7cV1WxQE)7@RHV&s{m6~h+>GpObJ zoEVq%R>$Edsy8x4z}mwa%wQ|CFsM#s?guzlITX%?3WF4kd3r+Cmq1!LRfodfn1a8aq2_Yj9eK*>~iQ3#V_jZLQ=|7^?~A;}TK=<=C<=GZd2ezlgA0RxkJ1lf3w%CEme{p1rU z)PRkb9(o$Vkkoj_WHeHM9l)46^U@6&j%BVq9 zi+?zrlr$-9GL02)kuh7&4p)GOXktFk>!o{4_#=UIQo9wq;pnS+%ld2^iGyku2Qze@ zITi)~dH1v|N-j3xtW`%2VW}nrb2Saer6Pif#94c5URmLT$SUa zJoIfS5|1{XOGvwRd~+q5rlT>BSv*y@Nqr=0FCDzF6j+d0I+Nt~sXFGqcSAJf1EzSvj z3@$2n*>5<2L-_F6;qpbZp!QaDEd@JoX04hN>%vf!4pi<&NG4=`T0cbMZ!?DZsc=K&OIOKG z`I~`}?GlG-gTnkOm)*O0Ry>e~s|acEvhV$sb2%gQ3c1Q=gJVw=;7J8Blw#GGv%^ep z==e7ljGR59n=!?S$pYY?hEs~zQ`b|_s*>#gLO`cBEoyVx&EGCj=0V$CEg`44`|E=L z7HvvLNn9qn%|8-(dYn}Zql$xzj`uG$j@{N_f#A`01(kQ?wiOcsg5g>#M29GY!1CX! zHc386#7D#a5BbwMheo#+;*#gk3xC<)aW_cMbn<-(#88qI@82LbK5PHqv5;zLJ0uKz zKAbf5>Ioi$__L|DVWfeZ#>@bkQa;aFIQUC<^{t{dVeL;f%{@3%tN~pI z3JuFtb;7~AU^6j{Xs>)t`7dtTcj%p|eFxu4yL`*W7w;7z554&fp+k;Ai0*C7dJ^%4 zJYpCYqGP_8EXx*sx<^fZtB2cOL*g32H2krY^pLS(tHQWOzQcPe6TrAwKk3Ea5wp$P z73ngY3|opW>oES7eZ^`e7>jDw!vj3=6LS+z4o*GAM2B0+C440m&2-$m5}K)y{REys zJJ|cLit{{rxK?nmy3b3%8a+|B?C+M$3WGi)oq1ClAc8DXfPY4D2BizPT>AToy9@#l zPdl-X`idnr5DJ25?BLNA@8j4OlE)NOgKY7L9}j;Uk;3x5lbx*%7ISIOSR!TxvnuBK z1_I=h@H zv5b&6r9_dkJgpku);X0HxBw)hk`TWCI~GQ!K(S;yED+Mh)E)E6)buR~X{X~}MliBh zqfR6j4Y9qOxa#Tjz7EWnO42YPzjy4Q*QtvhU=fP#%?-6tPcDzuS9^sapWcp`Yy^Qs zl4z)C7&9X{Z6fuM@4otB@!|93U;iSY`78v)_S}MhuSNOop9t>|)z1eushpr65-D%jDJF=ugo+XUw&5lh7x2@FuFB zI~|#3a7rI6vEWYpGkF*}v=4%i7s`c*O-_C$-YUihVlJu>n`WgqqV|+!GYg;Vzi(x? zkcFJ1QYo56q47oOi$rnm<&eB2_Uag)+^GdFRw z5HNGG_z(aNHV$@XHcn=CHXs|902`YCH#g%)%f@y{0~`0h8GszkZ7jY2?*^$}J?tL_ z(*KFz>S*caY2so5kOP@mSty!V*_hc;@UZZ*@Glk1DLH4+zG8^P_I#V*z0M`Zcv! za8<_wA diff --git a/packages/bridge/public/ms-icon-310x310.png b/packages/bridge/public/ms-icon-310x310.png deleted file mode 100644 index 6075908545d7e3f14793f5b287ad03274998d2bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42733 zcmdRV^-~n*Z<@*;(wOo_RiA(hL2`KvO;ih zwb3Xq2A}@Z;T@GEgyE_thz|c#$c!YFWZ~f4so~&!1L5GF{xkU=z`;4Qz`-5q!@=>S zz`^0#Wwa{t{WpPVC@moh_x`_@(@`A%pXH04q=q9L+^5k03B0v==6~yb;iN=`R9u%& zU)`Ebhwayq-nQHBRc||);rc&OC7lf{z)4C|)pGpuC6gTa)}WCjPT;ufX8ikKMJ&kL zXcU7KO=5xX-;eMFF~zjngRP-|Amt>G6jd#P>WTezFGbtn1K6NN)*7 z6j+>VShyM+rA*J_uBn{4RP~i51#Wg$`ZO`?bXrZWx+}K1O~xmcoEM&`MkRdW#u>Rk z^LpZcvgwu>V;`Nsy*jzB-btZi$n-_a=L@ zNg_byH3mui-M;%dw${7arHlO~Bv*eb-!TeYDc`Am*C!{J^z zJzy3I30M1|t@s`P*~5p!^DV*-t;-whhQx%TzJ`vxoIF-ck81e1f%TZLi~~+cnzSc7 zal#WG{{?MCtBJwx)HBnGuY!zDc=X8V3iMKXtBc z2B9;<>%wV&(&kun+pTm*MzEFtMe13_+jRAOdC}6HJg#$wJ^hPRBD0*r>u?@>%Qq=w z1zT~W_Xt}weBzW9rkKsIxzAOhd_u4a^t%+>jMpdae#juaZ>`N%&RUE*#du{t-|=~c z2zK|}k%Iwh0i=S++5wjzYSR7Gd^bLN;!f=0c??7}DIr9SSg1$d$Y}Lnsj*7|InC$U z%=XefkC#Rmu3^%J&hp4gSFzVhJOPgEsRnc~hfU{DqiyIfA_#^Cfw(qq#bO` zR9IQ?#JE33vl(zhyZ9YK=tp0xLG*`jJtElrt0fh@!2!EEq`*UK>F7nGP` z2KsFB;tcskbk(!{!l~i_5uP~33D%6Ew6!xM;wK~9_XxCUL>`zXoCPh&>A)3fU#sqF zz>8%>^@nJ4@BLGUXu+Gw4Wvcj{t>G2Fbsp^~jNO`;KnAOu_!II>OYewk%&TGomskW(My{l#kh?K3h$oexM(NEpZVw!Wp@N-?nCAN$`Ze@o##+Mfiw zSq|As-ne86KUJZF&h$MCEkLzooAAJasz2ZIly5MnrfEidignMLFmzdLMRg-x_Fx3Y z(zs12M5BDk*!O2XWk@TidP}$51_iTyOYhb!Q{*SLVbamkPk_XPK+qQS+iw@Q!rbr{ zUwuKTs0L!|{d-~x<>v-Co*nZ@zc!8!iAt7v$_H*EjbLOW>AdTS+Enl<)) z_X{<+YOV+G%|{z;^u~bC`3H4V->zJ*QN+3p1OHST#`JJkTGl60=2|-b9O(%33W~PG zxk`NMc^owi+*;}0xM7E*87J2i#LFrT#-%e3`)BQjQyR?CL&0cT@o(NOfgzqE zq)%NMChM~9M3kp?S!3-v26N~`@NoR<47XBv#)MD3pYa@-vQKLqZC9~;)GaP-mcUCk zEw;ms=Wo)MMJ)B1Jb-apo**&0Zll2eV`)fVmdQVHF=C~V^Uy}k2hjOFn#b1{t7acG z?$pz}b_dY=o8a>=`|&oy=7nO`1}$GT_({&@570nAe~mF&%zk*ue5SX7a`X@Gm->A( z0cjjh3w9NEjYq(sLMTavgt_miYck;vyn4%B;mS1XQ(4p*OKSEKf3{1-8Kk~h{1ha& zk744vwTW^y=0=~@3xiFwx=-|d+juHe=f56J@KhMF$3p3(5)aiO;mp0*sT<3BEZ1>gx-vrd6h9y9O=uB+O!?d2aOC2<;3Ee zPEIlkLw8atIGPq|kkQCsV~{-6>dx#Yh9SA6lk#>E6Ly0`#$mo@0UfKWdKh>&AfL!N zjv>B^IeNUqYnu<_G>U+}nE%bi|@Nt3MW1ez$VB z{gS-Dgin!k3EO5~IdL@Rj z(dP3qlg@LQi5pcp((|erkPLitw~{+$)5k8zKakk69}W)F;&Gb2ZPdUlj4rJ`?hYwa z`i4 zXGL=ccGigw9aR?+rWgUmU}NPM?S1R$I_C?)Q?hbvn3ygHw@&r=h>4vuGWA%7cgDx>XY$L{rgE*0A($~1pPTSbMO=a5PD7}Yo)5*C{5`yu; z*7@c2>`jb4DtooVb&ioJ*ec8W>HhsO1bTu%bmFgb{y@*7dpyh2u#b@JcODg0S31~( zy21D|G1&JYEO6!Wi@}+sZExjkPH{cSh|OTVO4Si7GuLmm(J!nCk!I%R3bl=&>B9&G<|ujgzmUN%Dp07ae|QEfA^H_z2yV@h19B z{-dAhTpqgF{PvK%_D};^A@+G+c#V4X5^VJ7Yg){BK-O!1V~#(}5CQqzBn$W>w52oB zL=i}!Lm_}g-!4>Fw2AUm8st@I;Du;GA$>)MRVKyG)rejEd?0*KL~p#%K@q#XHMmMb z==w$RxUx0IGH_FvW0uDWEud9F*>$$YUOauRDpa%Dn_6x~=s2{JYv3!-?<3!#&=SQ!~7AL#)D`Fv`G}c4&vBxb&iZZ%z6wb<>>6NRt!o*S=#wnx{FjFXDTn8k3Iy*V&y%@;Sfa2`?JVXoyvMY0&$qPUxq71rsh z62d+A356VudpsTw;;Snt&8?R_?8h0yiIX~E)=1rPY@Rl!+Ua9lgT~0uip%&ZrmFVuayQ8^;M|HD|DqFIyfS*4g_G+ZTAG?^BmH* z_nOQ=k~R7QUr!iMYKS}Hzfm`rb}@Vt zAVcQE%3gd3zwnyHmc1n9UFp*ocZIb%5~#!5*6=UVeDV}XuxD?b;*hl^Y3!uBAe@}O zH^zk!VExORF5s;FJo!48zr0+b=vLs3j)G$?ixna_0xZzGtR6fE11v$gRCRTLyfHw}XaDQrVmjj; zQecz1>29IpKZN}vlRx>yJR0+{9NmgKb@4he=jPg@xCG-h69^%^b6T10LkGM|$kP@P zJpGs4c>>`Uo~-XznNfwMCk<)@&YA%nA_AUcvyy80a?-|p+sei}=+EeS{VxG{wu3JK z-?qj9*6#DJt7tner-{J4m07!OrXBzNr~l&126X2B*9KTS!8M_;^cplGCrw-*=u}?b z=J*0czJ}AORmN>N(wFpu4z!cld_|T1rj`qSEx9BSE>ewZEBwA1XJ#VU$JH|b`zwEP zDT+65u(Z0yfK)^)bC7e>wwm4ngWdYnQ;|0TdRJf+gr%j zjl7XlXh#aY_DSTqWMp1p(F54%RNT`Q_84Nnj`~Kv0qUyR0ekYU;&;f%(;GgQzE6g* zglyc(HeWA6C+bUY2{wO3buDi>vn#bZ)b5*3RVfRW)cNF3S>VMn1Ys^a{&p)o>CdXz zb^H9U++ao}D#)P#B%2ILyknZD%MIvUB+XxD4>}`9Ex%2)vnYuM?x%4D?af0&I-Z0d zJAIEPe1AD+Ef|zs%ABjapiMhN;48^VNv`CXN9qa{T&0jgDB5nkBW4l+nTmJz1cqs4 z^7-P(r)@$9mh;t_P7eeRNW?xgppAw#(0S`t)FS^&%YH|?t&THTvT_RO2R&;gSpmgf z&%HQvS;xEQLi*!T3F1Ec3%T#i<=4y6IBCxuaRgd5rei7-Ro6asX-cLH*IgCnuuC`6 zOA3?ASbeY`T}+^In7LLxqVKA0ofjS)F58K5r@i|U^0P>*+3CWkIdm0m1|ELvPf)v` zqw$)`+64B`WXx!)+ec4M2OzwLrC0k=;qp|3cW*DDSoqxC`d7&qGtqy424~!9J~fGs zt5%+2U>vj}6kr;Fd0C6@>%O!KFx~MQSs1&7n(QIDxeeuUkYRwQf0i`H-KdWI{7{`W zC(pZT1s(JS*g`u8x5Bl!JG(r>28HDb4WBXIhX&%ula#%mf5seM_Y7=i*s#16VcKZ5uef(yE*F{eVG^Uen@3xWhO9l6 zQA8W|ph!A#{5{R@g0$g~s&(E-D~iEjz)l zsV(ZefE+GaR4oy&Tpr@$oc<0tmhqIBiv1zYwN)KlN0Fa{QNDz_C^eELr(?9ZBH7mx ziE&uJEzn_@P2*b)d?VkiZ0<61@vs~GGbl&$K9VT$@>YH}0Pu;Gkd|*TdRBfvpp4gN zg6?eIl%kz^pf9#u3UA_U;tcA2)~+RbD$pnY;!bsA&SxTQa5l?`-c@EO{HW6`E`v=V zc{1&wpZrKS$#z~VBN#Aynd?X}VTc&OU|_`2o?86m7h+~3?S?29LJY}qJlf457$J+m zxc!^?Yu{9Sfg`_8u-$^#)IO zYF^bgNm&~8)*PiI0df}{C)#U~%v1aHGhKW%n%tv>mOb9382eORpmoD_0J z7I(xQa-WadgPmASKZvvPj6*kgb0;j8S@}(5W_O#w_COzLlckHyiG! zeFY?8;mM^b9XI}ESAlGz5*^dC+d|LsfAl5!Xdl#^u=*HjZRX00!5aO?Kv{a_$1vKl z;y}XLvXT*4D7=_D*Mhy+aMoNtd6tVO^iE@K98I&L`K{G`XJq_3pXTb*8fW%L!;d#Vo#3!dk;jsrS?GD6QNkkCNhaVK>TwMf?XF$F4!ES)7#g%g zb>#TfLAFswDxGTVw%2N+&xr>ZNei8P*7*#1;q^9KVyQv79qK_uyi+TqO;deDAGG{~ z6dLWVlpEs5=yUiv`9$klmW+SpA!V{;=c-`&q-Mc9m4^7N|Ai90EBI2NY1|qLqk6jl z^N3stow?oljO`TGb$)-noXURckCrQea7ow|trTp|cUz&_=%>Bb|E#8vDnR-i|Bf@Q zeX{C*f@CcXc|C%wSGU?g#8m_Fc@uWzkW4cBG*Nt5skG6Q*rJ1}4j|+jwWHu#CTZpn z>)tDA1BBUQQim2T*AaR&9_Y6tcT0GP^{MVC;o@4OoiYcz^925F8g}LXi!BFH@zrSt zn-sd_w0UG7H(U&o-yYtq9n%~`5nF-v;|2GXSzJDV8LOQi51u>>@_A#FDt@h#k*k5HR`7T@dU3G{*XUpAtlvL%=+=)gj~9$Z zP~AqPu-tzNv#sI@VYh8iFc(+iX@&8O>|2=ssyhZWY6T=))K(vQm~g$|n1~I~Yntbh zf9ImohB8pENH+K>5!+5!i_)#xVP78So|5YBw7pbHyz$wF zh8X1>=KO+GH}pNJMObA6=Pmb7DO9i1W)Ci6F1|&9C-=T75 zHsn{UBXt6Kiwsb^DD7bwI2gO0()NwOFZMX!Fl+wiOXH8p)8z z2X5~+myzTNUWi7*Z{V0;`c#ZVtnSTKCE?y!;DSzPw(v)2gZym5J<(~F3FfU>EAa&# z#I>~iOV{k=SL^-4(q;Ejlg(n9Jhq!#!xh9y=Q?AdVfa=u>d|78WK6*S(v<6MqVjSt zB--v|NWlB)^Qy}{_VE-le`)RkxNZ%E&Naz(pUnH_?)bchH`(8e3boexv@YB%#bjM~ z!(f;B9XU2X8s&U@67RHLiS9mN!T&dlewx5O@lM%=3)&wD&^nf~VbySRM|VIe?Mkbc zahOFSi?cb7fYS}t_$ap}@G=Q{wEgSqqfR@{YA-E5-kjZfpaFbM!srtJZ-MnP8>eG( zM8XDTxK!7yH#3gsmE97^$MxR*oYartx8~g7T`|%h37I=hSZXlYqpXo? zOZMqPiTiXBhuK>6VTGv8a=Gz#qCJ91xpHEOEjA`_)}EZ0LTv?oJF?N{e9o8-;WWa-&Ni+C68C-qI8$9s031 z+?{0|BafRg=A1TC^J)Fb9kGSVm0$$zrO%VW3mastzoGKR&^Sw-jg6?s`oJ>5Yrk$b zL7c3&H`u7v=%S4lt$neZ%jtUcb;a{CtYhqQk?`)d``g^I!mYmyOobaWEWoMwYy_U8!Jmb+ka$qYv5mi=JZ}ML3PB3v$wetTc=6EGe&VJ!IoiEIe8Ai<)YHGqo{dJrLR$&GF9w#Qg03 zM8ETuX%o9|6hc}AG~^g{0(3hQ_OY_REHf;LO{O1dJj`%0Z3G9PBTjjj@dooKI1X!!zauu-n&Kv7E_YtixfF0mXW$c zY38c0ajc=>5B@i*oXo&%5k%5n{!Fj5e^?OXu{?O%&+K2;!Vob~C!E9YC6M*aZ-;cM zDAnq3i;u;L`^FbP{n}eu;*?KR7b~yg!7R{DE;fJr*us2h_tB;>ObFd8i==auP>@Fe z5gfbs-7N+oP)TwfOeP~|U<~j(t!Hg1R71F8iabLAm-S*aafX`!q@&H11(}h`gE?e_ zX;{xbJ+oZMW!(F31YJ&njXbw_ed6|gU_P+YJQ{{?Ye4SQ_yP&GbTfriMX(&VNt=?(Ja6q@?iNwqvFt`F+T8?Xx_2sW{IeM+R2)rn53@99I0usl3}k;2X7>soZJ$!M^w zJ%Pkp^YYdnUNxdmCE+AeRl!kLNG+$zutJL`;4{791NLml3r4_70L#CQ=)+08Mon7y z6kOg3)vw7)5xpG{5i(NqgNWnIgvsu62LfkdY(Y&sO)ktU5_7Y!!9ivk>r!fpNM@VB z>>H0@1+@?sj@`3P*}G)ns$3h66T;3Wc4*#FqApjhP33y$4O+)KFYn2+#zqki{-}LL?8fhdE^AQ^`|@}C>aHfGuqiQH5a~MCwKJO^G-_!`*?NKb(e#0Z)23H_|z#i zEBynTC-(ry_P(9K^SS#o*5}OiK|c46$USb&f@266hxl1oE5#dV`rNIy_7DSES$zep zHit(NBfL!PzqRq{+@uIkpWgW%yJYn*VswK0YOMT{KU6nZyziqm>uht4dmrIotz|C` z07t+Pc0Bs#3$;xkJt$vN&S5&b=%E{^Fe0sRG)&qbt19?Z5Up4c*@)lBHOsy{}IpYbedF-SiqY$bgiNoq}p z5(Bd#(}Ob?(lvfDWP#Hm>cf;c6)p%FpDRh!ONgDXPX)!3()zHTyXYE56^BQFW^P zitS7LV{!rxhaa%JvKU1~j!sI3_#5up;|#xDea>E@Shc%F_nIW|*in2?>J+@WnUfn( zyaUSKskMrG{UzY(V~vpzS31f>D5K?1hb>XAK}@-%HZtfEh?i`gY!GzH`9f$FeYF1j zg5rf|BmR75N?(5B(ZOtMqnq zl~}CIL#9A@M7$qSh8pth^4oZ-Ic*yiQ2d}3rt>_C$Qz-yDNA}|BTozVwYV(}==;7g zR9j23m+-Z~G&a+NQ6^B)_#_FeKxJGs#HIr8s8Owt797}`IHLA(g`9eeQD=09eCkTp zOKF<(0M4T_dW7qO3BQ#O;=jhxfw3))S(Jqf-LnlXPMx=woSg_qaZVFt!j!X8_7a`H zma)K_?Wdm@^wUG|z_|Fa`QUOzKJlH0zVA-${mxcC{u4$PZ1+1DexN}&Hf>{jA`(xn z$8|L)Ha{72ky;_Lqya=s7L_d7r%QDp8>=UJ6SwccT&z@j`&o5PVfiYn1s=KNYKnxX zkd?J&nnc5@M|N1+%NkIX?{9UUS)<-=O>#U{g!^qvXdo=u+0Smy(+$0Q7bxQ5?j}3KCrvhVS~-}`KSG)-Bx3Sql%D5+MR5Bq1xNWGIZV!FxO_CmrCh3 zyPsd#56hbp9h#Rf5^x>|o!9))x>ne9+8wG1v-Js-J=mei03x@Kjc&NY}up`rgRp7g;$(lzpybZJv$+ zC4Yh6`I2MbxGTqt67oT+547U|kZM+$33)=|^3S-^mL|vL))>BQWny8K_RWfQ%IQsw zI5ja~?b*EV?e$i#v_Y}8L$bSMJUV%HU^Q^J(H#bjJKO$2pEq)pxZh4RTd1N;M5J9g zep^W$4em2U7_+H-sm40j;!_yf8>k}CC+L2$Hr!$ikiF&)*$cS0?>v>hf z)7x1`i8$Q;o}tDLY#{U-MO!&+{c1Z>e>gK3(`Dm{n-G;HAEvbuaq@k0s3}z3Wc2!q zcc1;NJ>BD^O`?(zB}T=y6o}rcSs8-C^l+iN*ec|n!z}V}K~Pat%LIJp6dszwpS$w% z!x(l>k;g!v_zjSq#Qf>RbEVRFF*j`UHqpL@K0R73m<%omINWdw{k;VkHjqN>N%|pI z*+|!=mHDSy5vkIfb&?EH(bOkVRj+S16D*8Gi zR`%e3U5PSMTRm@EA+BVSmmElwM%&fm8Mg!hJ?eOrsGuIJ!En+=XI(JHyP;u+{xwJ+p+73AeRpM zcwi=w@9W=b)IjN@LG`FqFsxMMA&4emdT|%IqUF+<&ioLJjiKFgi6SRI{$2-o`Mm!V zO=LPC69J(L;)Z{L7_hNpGYNTNgPAIMj4hMPKt}8{V=RiX7fj|q!+Gfe1{S$X?F;#% z6WI6Y6tbA4bbgrWgIcA33QMZUk=({;gs`og1sRt(9F>MZi%DM=(e{CC@&kI=gFnbC zcdBapiS80F%$$NjrM7#5$FvFj#g_w5Dk_otKa_q7#SLNO6HMXYPhNx>Bn27;lUOEy z-5hI6`ndod0WHmMTMF!XYU)9ot7>Wv_@fKId!unte5sBnQcUR>mwMxQ(5tYiDJMT> zQIR>q1pPvz9-_RcJ!jErH+->L{V&yB`>)83c5UWmkuAaGF;Y$GJ*V>HZSjpXJLQ`p zE|K4j5iS@A(^4pM zZ$CF%VA|-jCIbzCNdfVDLRg)#r%HWJ3E3mdhiSy9?|F+P>f#~gK~Fi&rZEG2VtVf> zZW!PNq8voh!jKAnK1SJtC9{I%jm;_pk=iF@pcUh9QxfF`HPu{QBUVw$FfQj1_ytYP z*QlJP7hTr4Aacaht9klxKFt|l);i_CB?$!vue`MT%7ab zKD4K1%+dXV5;nb{p%(5YafidC+7p%!E&&8LUKPJz^6danXJK8Cr@EHH1}s_bqXf*| zZxf_e*(GFqM0V%9#2FP=sWSQEJ_Ll(8JdY>H`P&jmRanivGN9s`_)GaEG8b3wbxAK zRVs$=s}p3=*75~-jq-e8{Uo`id>1F_;-T?R8P*AaF-8}l~OAgnU z&BlP0dG1LhT}$ZwrZ)UZqGiynQ5f`h$cjYRpAt^l8>6+X->omQQ(k&eu*x$@HzvBa z2Bo;pvWXR+*5IFF=&Wc64U5fX+=FDXy1@bWjS8lFZt!1RYD3DS41or+@x|>D&Wrm2 z?kZlPsIyf&)FT(%mXlgK@?_~6z zUhy;+lp?)c@zbH(nE2w@3HtB5j>~e=y<;~qZpJDvtmd`nzSFm3mUsWVCV~(M)`$T9 zeqr71Y@=-mHH9YbXZBG*wgy}nZWf+?i;OLlqEDWs`t-~8F5d!bVifep+Y|G>s@JpD z@ZwK0TL-78^dg%yvv}5)cU5|$-&z4;C0-2Jh(gF|vwYv_kW5ft%|fFYe(8u+(=}$= z>!D$a80!Y+@RU3`gx16>hZ%U&mK*;msH8kcdx@T|z?GV#o&4ceFL?W!ZysPeiX#Zh zXHY)fk8WSy!)vx|!C49oxPOhj`p%rh0t~uQBn%?`4hpDN(i-#(cZ}X4?Q<(PIKQv- zg1_D=KHXFpbE}HyY1BA_U0)M7MolSlFbDoxiFOSO0 zsRHttnc=E4kGIgC6TxId)cD7MO6RzgK5Qpas>cmq;Juw$85*DU$0&DprqwKF>V_tG zf#M9orSr2Vo-6Mxrl`v)(LVI;2dL$=QvVeqv2<{u|5q{@5U;n;R(_=%RRobNQ zWP71_SLQBmQx-X&Ic>Q?JDRZ(oeq(JIjQBVO0v{C&Q-FV)T0Wq8Bmn?H>1<>64rUZ z#+VBC7aXFEa+qDOP+u9EGf$iGO z@~qvZ?Yzl|ubzM8ZfD~@pUCsT_d1op5Q6?+_1c?v!n*qwF&R!mm|6PJe!J)}Y4WBk z-?4zlv+6+D)DI6&4bE=Q*%GgCaMobcrdODgpIt+^C=~bf7Mtzliositvh8b9qh$&~ zYE!#3ftVD9KcZJWgNZ7a)22U%QEL58j47;{Z+l>Z;p*ER$Iw*C0RK&qhjrm zT_8_5ALP+MG{>|zgbk;F_&DX4&0pcMfA&eOn8s>d&W3B^cai8fge{jGUSjPBd1T5r zi8n>oWT8qlyLV{sMG#!ncg9Tsk@xK8#A%X*D`ML zL<=Ki1H8Xaofv8~my^_F1EmA}N-~eJ6G)*Z?pDpQ@|u*CP^IMP2Wr+7m=?!mArQj> z*rFfFR?nJAJ{fbr+1gzrIAgff@&JoLJWL#?Xyb5Q28t!-21h0B5_cYpJmoSu0P}78 z4>@3FR!RamPHR=PC)XM?(?hC=$~T#e;AahqD~*3$erWdU0%BgXZaB|ps~D>m54HxL zs1M&R_BPs2CqiuB&h{^+&pnjKw~c(R1}8xg`z)nKjsU?(N5F+p#BBFsPnPw>k0@Ie zMN9Kc2p;DGOWrwG4TLK=AxFf?=I~91ksa7Hp#ZmLM`UhJg!7ZmLP0rKwxNuYEUZ8%j+0k428A=CpI%Zf%rP2jiWV_WX8|DaY4ou7euh3$JV9UHhaAE-0SWBBGzYLmM^|!gK&#zuo=x2uNk{}Vhcm`c|KxSlaj2PauSJG;Xa%m_Zt3 zwo50H;aS&gw9&ik2Y&Gd45%l+VZFS=s5KT5iLbQ`#3)3sERY=^3J=IMQBl2Ktm6>{ zYpi!P7o~mL*Lu^C%y)K4e_Nq4)+Ua$kox-(MOjKSz37-aG;}cOJ;R>3=E_go@lnZ4 z{!ZmsgAoZj=IjWy@o=MB;zsDe08tKIe8mR|H8<+8IywCTqwdb#iA@3XK&y?QA_Z+;9{bO$D_piEHp&YB@Jn1_E7hh*lN0yok zX@Xwt3p_OOys4+Lsry)?+^(c{R<9!_sP2jI8I>=Wkg^|^WjpziBU=AJFQ-Hxnjka5ix|41w%A#0SY8g;faUab@X>EhElr+-b)4)|;R z#=Hl&>~(#NUX>K1-WlF}dg_exz%6yrokxP1RJDuO zsMt^@NZW>f#NptPXbnBlsI^mvgI1#4|`>pWbJ6(8p5H2-ycLcGP67|wn8 zE%Gy8aD|xrRUBPzJvtii%K84@OMC zs`I=vUl*ivDr(#^yByCSzoyF@WR^d602*b(jfR0m*({$S)o}ohUDC`ZOF@R~|PqCWKk| zYYP85U1m0$ls1NvvJe~p89BhR)&knH5Hp{cz z&NIR``)*c-n#zhT0Z+Ym?6}pu0CDd!KKf9>GomD@<}q^uduL^|#8EwG(GrGqcfb;f zV+YX8fqWO7Hysp2%o z4N+Qzd-lgXlex!0`ZY>&CFu=p9S4fDxB_*>(!|DfQY@*3wMqz`uw!Wi49Xk>{%uBzlCLqtcB;O3@CfA-z=!+ z_llQ|BsUevu~Ke&OvSns}hc(jAOPMNXpQXT39x*Fc!!UEUH|_ zEA(`kv`z($vl4MWg5~rU-d!E@m`W-rC^@vs(bi$_)@c8R^SSag;F412YubU=kG6H) zvwcQ8`AHRSu#1S8oZ)L1K)zM2Bd#KWHg1l)wwkZ4Y~4Bc>HiFx#(PHl>v0QikhT8I z6~;6^i5ijrvfuaBo&K_i-SP#nbZ)F$xtOfrB*_Q?T|;U+lxU*GH8Yp7&Wq4ee09^X zsqs^PK&pZ_;Ov}Xnx_7J2X*SntG_twB?i-fh9_;eR5Z~ZP62jVEM77v z{<~i#=+ukaIgyBKItR%J!%*#PElTSjJ*rICnOHX!NpM(gG@V5nN9zPTH#lghW8DlP zj96r<7<_;Sld!9DaFq&IUqTQ-^A?;9gt*B%7tI#+OJfj%yJW*t(5ZORf@t(GA|%F3 z7}1-K24%Xeev#p6j!LI>7QYmN;$P-<>YV~S|IGvEhuBF|UG^yFME1y>>04m-CmN08 zQ4oiRgsvBzEREqM36m(--&GtJwS6A3m%k*!-DmHGlt$f2hq(^AlaA^6m|(}Kx3uo+ zo~8(Hmi&1FSQuiBbnoVX{HK|vb}*MEt`3jNne^!(TvXaMLk8|vJM#WBnvMVXADfdi zIKjK){qv{BU}%lkrp@3v+}Xe*I6!(8deE$ZN2w&Fi2~79hzYCjx#Rk(NAC1E_M`bf zy3qV@QM4Zgr3PAHxk?D<&pBqeB4H}DM0Sdi4vWeViaGz7dQU%R@`NIRtPHJ6v%a5| zMC70B8_psHW6dBE7782fZhr?t4itJj2nc?BzbW}A)dOmb!`zW}XD(x&QQGDHWuTF@ zCgai_Bqh2C zCeIK~g~iw^^nYBwaRy(0)TYY!JDg6F{mVdMtsE=R_^G$qv)d*@cYk*lP|fIC3F9xi z?+b&_{=t7QphQPbSl0wup`9Jww{Zg{nFV(sokwjZOk*WZoCtHgnSag;4_QT5GoYl3 z7l$Z=%!F@f8O|dLG>WPbImbtMQ-JF1U&%VG9_c|VI0v!RvWQatnM5p%>E0AkI3#66 zwUytznN}VM2G$>mv(3F}q9+yjuBui0>F%eyt9rO8227)RSE!n`-WpS7 z$JC#Q;2M+d)t`9ubRNxM3j!O{X(W(4=3qll*zjxO6*CJc>O?s3WaVKo_6*s3rsX-! z0RrKPYDF}Pasv&>n)>C8w$euqf~0oA}MoEL3Q+ z8r9#qFfPq!hP;ENOQnHV8!|If`0L7&^P$zas^=Ag7TT%C6FRy5ZFDRh3eb0=lyn_Qi7ThX`F|Q>oJ~$#(CiwZ zb-GtNihka0BvouI$&vekv$9s(7WqDQZJ^e@{R*6DnRwuFK6>78`mn))>#86>HUdK7 z)gVM!@MEGTx)}ogRUVKM5^!$sYY zK|k`{LiJJ{KIW6(q9?5ivQS+x3wIAju)ZJPj%6>Rz>-v^Y8?g79(@k;8uXz)(2ZIA z)@d4Ro6mmX?M7u|bRCmqW9O4F43M(~R}0^P(>hevH`GAutGqCkIc6222`p9j7+3hF z;cs@No=pb8+G(t@^e!zVS*TvPUcg5-G8rlJJh{q9edGmmxlKyhryLrLCpWOBlZk=I z1393Jp7!n@*w?1+H}OJIBOFIn=@_|qf~}FQirYG19q^F7T%NusLs{Cis`4nC5D}dd z0k{b-%BR~P?jHBi;NJxY8J(EOXlV^!(TD}*K=IZLy`rmvLg0_)yz%PiR_+fOwIsJL zu(i`p_||xgJM*g#{~^6UsHruVmbKY|$${P-dn`VYy2fb+P_AhcqLDr17px<92GBRC zOKY22{-Ym+A5$z7#bro1>+yHRGV=$9xWNNKOXsnqP+3hFMZxH$ zVU^o%i84#7&Y(IiMYer~zI7_7+eOX#h>)cY&-_m_NrBvQJ0-8yq(M7C}*nOgOoAgR#FJdtJr8 z?c^e-8x8Sy-vY%fKg%+2^q{m<^?H?@xNpHPOk6e7snalCQWuqv;Wf7sW$M z(n!bBIPvM$5JdG9E2)CmK9MC_R~CE|+Hd0Pexd}VK)&P`nT(WimbLCC-9S(1IW-|M?v$?%U1 z8i*&D@CTCvV+0rcu&PYx9ri=nyxak>IHknOF@zC3t?KPEw`rOlP^se*fHB0xsghsH`%XeJp=_D8x{>?HvZ9> zZpElR`3(Aw5$mIpFkQ`eZ^9oXWSd9Ua9#Si+drIFw$QntBndB(+>TV2UtK@A^WV#D zF9guA&{p5qhX3pvjN#Zph%C@@QMJeC+BjhJ+NQle$~zq~UK)m8zFZh zZ2|I?F){|`O6zCaE(ct&fqbNm8A{Yo@q?Ugf)2SZiW|VOK;o46rx!_Sfd8^;=`Xd8 zZ37m60s%#j8s(x33h?wwmwY0#4U^;_sY`~dnw<$|ti98fS)nSi&-S0iVmrqJAgjGa ztoN{ox%+Cd&v^+977%y$G2g@6dRovqA3%i_6!>zMM=~-wbvqFFOtIEi z^7M2IqLHg{_bwP93F2?P_y}Xl=bKoW84<`vqL)Xd8~@MRmdDD~F{>xjBjO9mcP`9H zHyzAh`B2^oS(ZuX(Ih!wv|>oGvd7&&$;Kg{(A=Kc(VwQoE`LxZHGvvJ53SzRn3vPa z{G*_rLb{ULhbl3=mIR?L%RPK|W6BsAUk(yKuPBj@c6$ACGQF>I9u|$JC}&y`pX7-t zQh}xImcSUXt`f~4zEk@&huJ5-O+sU@;{ie^@Tg7cuh+icjCw6zX1>oyM*}<|xDtF|QL=)#RZM6rM zK8RolD`egJXR&w9ou9#b?*2VP3Lp`A2^QlgriQ{mh!xo>Cv+D0~~Cmrqe zMpwy!M}g8bB%q>L%NPy?vOlv5+C-lC+mDFQF)u-iED`wWgB~_V-LLFD{7w#)hfop* ze7mIsx^wj-i}4K)kA$-j@(3XU{rP9)2N@!s2X`Bd2MOc@-Dd7TgNw>phP#hR;Jx-I z$%oNh)3#IHfZ1IPxA%k=7hlG6DWqDS)>+u4Z|PPd)5~9Qr^aSAj($O6zR)0D_N3?0 zD;yx77m}ZpZM=UjGQf6K@pFNA*+u00&l0&$I9fXRD=j*r3e_GAc$LFOJYHwZZcKbB z-HW~cS+?g7Mf3VoPwWg9di0#_!CRe~f_Keh<`QiMN$x9)vdZ=dUWcCk3MaA+#z<;M?$rsnvE|UJ)>!=|E5F{m>xm8*| zape4(t83VyxYxGU*YssON8oaV+#w|YMWe-S6EKkfJax96-hDsV6%Vx(cBXMgo5Fg} zVYpDJgNDYkVhtm-?>VqFsqmMn1r-?D6En-|tSCR8D(#=hq|5tlhZ+vZV zAn7rv*Oyc5Xed-zOt9tc#fH>w1=xhT{+gV>CD(KIHY9i2laCe;+AOQi+XBd;vsnre zZGXK&?My?j3G@4)I=L|z9wV3=hG6;o{6%m^ z4M+j3L>!OS!3UR!6dB=f=Q8D;F#Cx#kmv`LHCS&z)awm3Sw}rA6uMyY4(9#}75L*& z!T?lfMu1!}JU2O?Ks~3j|DJf@&8_a+g75vw+eOdb!EZUT7^V}&I&V8jXzvNE=M=&@ z5b)Dx>$xQ14B>!TIz1ltOWwK=OUily<{A#!Z+pn94lmp6g>bo(U$Q`TgJ1W2E7A zl+}OdxUf%vy=H{u^d+{@nZak_NUqY2T|GgMKy#NURs<5Mw@2CjNVRfx4^c03&bU+$ z-5Pwou_GzC+%^4Fa8TkLiu-{iA=a4XVm%Ew$i7Aj{U+U#*^+Hk)x-#;OXf=+IO5Es zrzp~|0dvKxo?MN*-th(d8>8__e~1V}7eKJN2>@bdUFTw11u?&YmYodyvMqSgKZ87F z>J!B7*&si?o)1R=Eu_{n%@GIs?f(3yNMg|!m=o(xfc$zg-(HmmvEH}WC!4J%-@v<5ca`n!be+U=ag17#m z^>D0Rq5^qzU)dMF(}`!wX|%t@$lyoc`poVXuSzQL-GSN^YpHL4kEK z2EpZdp9`B0_Pt0Qax-E8WRq^!b4Ntf)^bJ8c7@9~z1{tR2UE-CtLuP=c0<#2Qp}x^a|@#M{a`u!E2_|I8+4SS6|KPExXDSNG*Y zen3(dp+75r@pk@Y(O9b>>hCfcnqxqasuc7^x3p4TzLX%s+_w+Fy{BYRI{R*^eA{8= zd_!6S^?Uu7rxdxcKCB_4@3VLW!7R#ujhz0_EYctDm$jF(z6lc>5Ql$dgRSx9?%gWo zyiorTG%bsA^o!6A5t9LO%BJqYSLW8YY&;sLYXRLdza-s--9_iu0Y>1l3i3XRd*mpO zJ9;#amDPBSnam*tVl4GrwnZ1&HN=31Tv0ju4|{HC$0afi^D@g2*9nd?$FJ!-4!q`` z;LK!JlA5A>s_#6zjZ$Y#ffz?rznaw^$ZzJa_;xdC!6i4YQbbsJC4aIbjIiNrx$Zxl zX9rbrtn9!A{0sEOQb80Aj&dkWcO}v1TZwl#TY22&76Yk^Iou<);_TTjrFdtrE*~(V ze!uDZb33G2M|~j(Y#(fvmVLO-s9?B*YnuQ11@#Av3<)4vk4KEocRo%`k9Nc8fxSx5 zu8F4*l->7z^bwR*i`qZ$r$@1YiI=n|HE)}l5@xc}a#HmwP}V53VM<1V+Et8F*MXnh znV=k=dzN1}I|(p>DkuWFxt{o=`jQ-b8+$VWi)Vki@4vj1W63OtfQ3P`c(3G% ztFsL{7pf@`x2A(~D8p|8|84^?&~jb|knAH5#7};mRoNIy!zlAhEXr9HG;yPYp!Efy zc;ihed?n8j8InRH!-rFE3`89^lg0+?Jm<>#O13+S5?q_(BOWs7E$@>pb?e@(ryuHe zD-a)Aq#Tm)-IR$aNPX%H!`KFdHb@F~|4zAoQZz510g|-`DBf6IHxSK(QmT;PP`e{U zWRP;32a%2{C=L<0^9vkHlxJlCV))=+mzr{7X>v0PX?y>9(&ROw$4XT_*gTa_t&#~u zyRe@#mV&g;+*(vZ*RZa_`p*I{hgR~Ohqd-WZ_wJ$Xl$NCr zEkTp#sa+R^E5V^e&LYbbojj`R0e7We`j&o5%n@CG%L1uc?Ez+Oa>Ct6@}KLD{iH+@ z1ltk}^1|!Ara;fEJM8?PNK>qrB5)lvK<}g`ob8P^JqF)jZm)A+T| zDvLc<7Ap@OMuoX=uZw2-4o-#}ApejCE|y+{nrw-j^D2TNl;>;O|Kx z{)A7h;xBR}&u?%09>lXINfKmX6bu%5(~1qL}IlBh=k0 ze}U9GFF(2PVeGl$;0A|j>CUvnsA<&$f>W4f2ENX<^8KB#qKa@ zvi!`3YM+6;fHIKefvS>KE=8EipOY^A=X9`6ziB>_i!sdJa@^r&6unZ_264wVi&xsz z_P-^IZ7v=vnbIVGrpm9<*uO{gPh@p-j+qV5L&BmiG=3R@4{%XQ({+O#t!Y-|lA`6- znmE=aqo9XryDOpgC_|z>{M-p}OG2w6`UXVcHzmswHZpTjw{I&2#qdcLmbahLS#7dU~s;)ShtVQtb5A>+$4&}E&T&46~X0U^q z6Vdfwjik-ZcQHbk7#qb`6cHsc$gb=x+;vu=J|s-)2+MmLkpVVctJsX!mm|s*qZime z{P%_N?JYW2O%1#l>594}boCNtzI=%|M?z8GF&(%zT$AJboUASVud=1a(e!1H@Nu zJ%#+u$>Q5&797S_T9qT0S^!&QcZt*%Y-Ojc9yJA>+{flOF84=U zEfpGL1)l5!>jx|t`aj5k?zWoi_283;cLGQdCm!2%jkk{#b~8~I6^*z z20o;0On;V8vHePH-I00N0TqMki$yy%U&#-GgxUF8=k|oZ{2=ZkHW#V51QQMWcrL~% zx_$!#f;&|bBeE+du$2cZMsahS#pT7&?)Zy2O3#aurO@og%luolFpNJaM=0?Q80B$> z*-v=*mG6|gbx1a8fW0T(zK#X#_g?4E{1(+#BPGuR+#$uxM?*V@ri(eQ>W0`;(<6BM z+nk6!hsMI7!{2cK#V;-*CeF7#E}PzQXMaE2^cR7zBM}GBt5 z3j>r6K29|;UvcX{_f38#O%wA-a5&=$+}(59rg%d(7KiwsXF26`o}%TO#Ri{DcmyV! zY72H(DNtp(#cXM>nN$WS*eHh5krw8*|M^D18d19N9Aq?KXig8ZM-w&nceF*RIhqD% z=o?R~>298_FCPl%pIMGQxnF!YFI(W};~diyJ?Y~HqMhg$f3jy*B*5@7}>n z$6$Dwd|QeCoZv3_X1KuBJXnM@opn@a*)DF{VV*sm4TTQ~3(bEfIEy?ft_^%ZrV#e= zJtSRG6lP%CEPLg@AAE~?5;#}6kASb!;AZD1@}wJ@qAmV@>GJEXe3+6a!Mjvf!meaT zhE^Rnkw5URrEs{hpLV-^WQo^Lyv4iHDovF7(y9x z+!Iso=#lY6OCL5O8$WnDW0Lm7YrJBExBqR?zh@=^j6 znb}*38?$?j&{oZc#)HQFJlh@rrJQrf{>G@9FKx|Q%+?ygBVOB&1I=W6NC1e(_lGzw zNNdFshbGDuclZsRkJJ-AAFF&Xx zEz<$xnAnm>3YtbVj>^*<@UmIwi<}9LQg(80G>>$NT?ohN1P|&l3txDxehVE71&90W z`pLQy9=d(4O|yGhr@qU5mHMRc;Q3h-negtP-^a$5pe}-~#`|5WfV(q6Sm>EWmh{@D z@oS%)c>Q^*FkeaFIfJA58-!EX^oaBL@{@z2kgl4))eN@E9~<0@f_|x z*rlFi_yMn*;wdz7N>g;FpnNWYY;(k|<`TTo`6jVqFDA^qiQ^W)J`@{&5Rx%>b+ai6 zEw4Ba;&c98=eH=?jRNHPR%rU;Sv8RUe#3u3eb|eB=YF-BwXn8d-V2baP!0=Dtcyps z1<#?3$@`U=GwV7^uKAR054NjzVFL7VRfP9x*x>6ZBOgBRrYte!@U~OZhiu%oZ0l;C zf+`}d8zR~479Pvra6Wcua@? zLeBeoN?gLR|6!cM1(}MuST`aE_v*bzTf4Nu%|uK4lkSJ!$7sX}!|^JnHn#xpYbn(x9J!9OS7Uv1^tBX0of zbRCjfD7ac`PQYO4%+?>dAiz({xf;X4LV^!ypw!ch_*B!wN1aG{c5euyg8cr*-W&~| zpTPf^L~;hVZt5Ia5A22Ywt#Ju0xu$`-}kg^Fl4y9E)&JA-b8!+mO=?zNRB7HY`bxe zcaYM1J7ZKBB~Iv@NgbPg3GfnHu4A^+pSza6p~=^h6Nftv`6!6G#{Oy~zY)k0S z3Vw24*WZ?r|% zq9e@O4Z^sQp=-Fri)WoIzRBp+u#hQdD8A_P`K(_C~HK9Fi9Q%B_ z&sQh3VmuGKs&3_6FoZH~+BK9Zd+kV|vVe&@u{ZfjkjP5K2qMWsnOC0yZWE+Zmlb?tABIZWx6 zzG_97Kdi7x1iPl|7X99xA|T`3-Tgn_n~?4w08DdH-74)L2VICu)1}oyq?!Wp`XBAZ zeu>{Ro><Z39^wHrf+e(Y1$r`ii!pov* zh!~feK6ly;uTIy>qQTS~_a4|gph_6-|Ys9w@jbh z4eVBXe$C;I0?n{L&l|##k_r!<4icPwOwV?3BVzAIqV(mO1%^#RzLEu z%)w(F^*t0G1zY;Ty$40%4F9%Tyu4CR((C4d)kQi5=}^nZWZ&p#Ep82)d%BV%dORjs zX&9AHb*HDFyWDrLLZboKysh(qC~O=#{{I|V<5@@S!fH~;FjQ9ytS%VMbdx533|nCJ z;b&v~P??3QYg~5n|L{TBXqT<=9Y)ss zMD{d+?`yJDdbRqxB;FLaIwkmy{s>+}h0BKayBneQH5|u?5nUgSl@yOwYp!h&jfp9p zsD)S%P^L=Iid^@%L$L>EgSSkh+90s~ak2=w#zc;ag|8N4n{k&o#50mbid3+XhaJ}l zkBq>(vlRO|%_y?`M;89WtZ5Tb&B{GzvyjDaSO589<~PJ!kXaME^nb`nyq`$m*%fq_ zF7k=n{xu#QN#Q*)NkBH!IuSma0f+MVohuOt99KH5M}JRP@XLLtDnV235)(tM({U$# z2G>1=0_F_}mik=7Q1~2;UIp|TlkV#_>Lc8CqMPnuzIBfC zZKA+3>q3t(sCRYl(Jwv2JUA3Sb>FQFD{~1pL`MEtpS6C0Kob5$yJc+5AypxV(xrXQ zh#*e#^fNkG#Z-Ze0wX1pkszoR%v0E+le&;Sp?Jd?b+0ZWyu`Rb6J8EzJpDF+WpnvE zqN{Y8HZ=>ZXql#}T#fdr^+G*)i zHDb!f?r0V3NyMJ$bk9kOUtkWWPBeVyTm$H)94hsw^3BM-2+1h(AX_oLE_;hS1E3jr z^bH#LY&NRouZny2G`_@56a0nCN9ab)89G?HK&R57QP^16ShuLg;1FPU=w0u&!?9ro zb5TTvUMy}qoEwp;Z8Ns-b*_&@O#7Cxxx{`%N}fgm#98EkWuUAVLh>XQ95Zsvfd~s9 z&y(H#xu@HYyvK#o{9OGpRm96Xtc=ElNlF=27G$~4;iRwFuF&-?a-s4*6sO}s`_sWrH!j3B_peR?(A?$C zgHHqpYG@PIGFH;R?m?q^QLC&(Gw$lSn_q$dXi86P9A9F2IqqlPE_9J+~Drp#9tZFTdnW1Ld~Bx{7i-u{CpzggHMP(mvhr0?veeD ze3!fPJTn9rgB+MC+p zS|Audpd$V{;Sq!3OzC@dFj8daFX`xbkD3E+78OWvQc0R}TiF!(ZT#|A9Jb;2yw|$@ z=+7p0$?~T1*27QnHW_#WtH;RR5)eirATqFb{$gGxxq%+^bJa@1E<0*D`C2f4-PMzR~XuR8VB-v{1ZiA+O)m?I}9r;(RnpRQF_<$O;IfuTBVtgdRr=BgJzP28dWu#-? z(9&C0?7C}k#k`0u#++hljY&Lmgn3&qspIB`J&e@968Z>J7Zm#Ug5WPGwekkEs_f)27#u2^yxiQ)EY{StS80v3!I(xf^ zxgEZ1a0CD&a$>ql9$Z_V(CzjVRF6ihgZ51Sq?9% zMk`dsCSJ__HB}q&1>al4d^80c2TJ8{|2ge<3_S(s)MfX&K%T0u3wC8X3wwIsThLs4 zeFUoBSobAmcCVa&0Zv0_?W1)DH8~37UARvLkXccX~vIQ;=yM%X)4%oX?_HfO{>k45YUk*S(EBmXNYOM?^=4wa?L);irkN4 zf%WQyfXn*W4*dDyz&cQt@t3B&u3`p~WeEjzv zGj9$7I_R@J=esceGfoIN12rDg2#L*WnFy@O#sK0zCCrh{FHPhW@qwaRiH|?kbs4l= zVb;G48VA_Cyr={olE4{n)II!70||EL9=R6@YIEm;x+~1Zznd6ZY;vvt`WL>qRqV(m zJhgg>6jgqs?$9Oy7XzFKE%b3Rx4ruN;0=`{Cqdt$)7TTJB~H{XzX3-0AW^6d0jkMI zvxk{)V#KP<`PIE-1~Dpexo~D5SbBpf(WpO3+N0i-Q*O3dGHoTBhLji91(?y3vwYub zLzC^IYRL*emYu1e(b@>G#yzs9EnXUQi}|Y$T@PyceG=Y|;Vs{w2F;{gNLyw~jpfUw z$tP7`;@kB1r|VlZ-8etF*6nF~>U6W0*WU=)6t*XKeojfbUkwIh@^2cT8kp2osQIY= zNHNmr*V2rT;)vW?M@C z_@i2Y32VdlVNKBu$gBb6tVYM|M7@qn`2sKIRD?7E-U1VG4sXaN@ZF$J z*GN${t4kXDjgR|37Te+WD83-R`ip8(R(1-OM(1*Ae)5!+=#ZRCBNYP1&N7LZ<@2T) z)7Ou`ZHq?z@SzBHC+tg;oncR1(mF05+>FCZYXuUPc8UUh>;{5=MWINErd=Bvh84;@ z4mL^v(iClzRE$-^8M|tPUN8ZS_{*K^$S|*DoPn z%~S=_?zBSX74Wo+K4aMJoL2MLnnsZpHzd~DRilH*%wM5NauEV>%a%pQT*imG$x_>_V~XsVl6X;!{3U- z%c(YE3Oj|8FQsmF7t(0`U5VE!TFHoiIdd>`3I5&0Bx?LUtrvMHf^73i@?^5?-40k) zxMjVx7|tN$9k5(RhMdoR?B82P*8Kszu2yojT>mm_+>RT>e?b}$zLoQ@<2Lb9|Bk{L z>QD!SJ61s2*yOf_XLD`sEe#L&{N3EqG16KjcG_?@tIG9DumfrZ~yX?yPIDnzI? z$nyx@@6q?p<?V?r*D#HGSj^_uFNj17^5^|O}_l9jfyTq2i}teX|j3`1D4T0TgG zK+KnCRSb{Umxt%$>sD>E2wP5a!T#2WTp~NMJ+WV0+-Sa_)Q8pBji%R=RKc>-muTkO z+Lr}ndq#$Odm&o`z%M=9^4as@OGfWl0WQe#5&{8 za~=3lV#P2ZwDfrSOH1!S4Xi6!Z&husZ&ULA`Tu!5k||9?d}TfaJly$b!mqembPVU6 zHDp$Gi0M|9w@7}{l;HWMqG(F z@$815-xdB3`j6!C2_Gw2Vyk#vQNH7Mx-L0)?19mUn!kCL;N2u`<4II-$&-+RZbj$V z4&a}aK07WSCdh@UZ0)5j_jGKv*R#9D)t!IkQZ(CKOm2rvULxUSck)zuQE71nI?DZx ze$_>9to{IV)wWPQ+hl+1NwK3td2ig9Z2XT-TEVliFaKJ~k>(OqnZ&pR^spKca54Ro zH%Ps7boYPvY(*-%g}u`A7+tF*?k6d=5%6d$=GjMZ$0ppm{}aPAxDRmoAa)lO;jlb; zs6P}1`iE#YQo8Cbw%LP$KQn_;uhe3%(v?`xnKHw=Xy2R+Q&Id+z!cDWyH zZ-+;|>8V(UK)w*!S1(-5Qt=J**WIMmjEsMwbHB812{>}tK&-FN^tH)X<-L#NK>{B1 z{A$b;m#|;?*#g(giP@AeJsW>VmmPQC&O{Lc`Dmsb1xja#jRK{KOWS8d*GsKD`J$9e zrm^dx2n#KVAM0;6h>wrwy||l;`9-{}e3u2iw}Vm=4O*W%ZdIHp5MTtaTj}gse}O82 zyM+W71GWAn1mb6eiGG_uF}k51Ek*ARc(X`mzHVTeY5Io_F+o1BY-tW&F`HK_6d6$w zuhlH-f0I|_bDDcv8_L)sB&NZ8`uW5S4gfg-+eV9DhEf4DyE9JwD42wuuU1)>O!lXY zbDEo!-ltqrV|PcxC~fcLp&9Qyh30`=eRrOfu|SVbtItycFB-pO-2vk>ZWeK25-oNzb-E{~>iw)rfqGU( z7%Oz!^F;1X+?`D5Q+eIrhOdkMZE($vyEZEOY2s^!EXFjM%JSJmj2`h-l!|`qrzf|o zk&p^Fz6@NpkoWMY%O$xU9)EMk+de^@E)(Gv%uPAGyhw{i6a|QNfwL34*>B|}7S-=q zhQso*6IlMh{i>JcNXqJ8tV?kWNbK7SPW<2{+Hm1y$cH`sK1IBC@UM^M`(IT({Nnfj zrNHLLH>|wwzg@T|=8T9eyn)e4xV2-#A0$rF3TK}#n6U~YN3R+s_#6ocMS^}Y&+z5w zuGoYe%ayWAmFpDz#=0*n$yhPrk-|hS^3{ELq%b*cCe>?X#SW?&QgNXf&N{ft6N|A zk}-TIN(%)-H-R_#eIt5@#Vwb{bgo&=95)}(C$d=bY%!vZHh+#gJtPS-WiEVWhElJ{ zI(C$ACSjXF7l$YH=_YAH!CWGzE?P#8BrdoL_^I}D;POBgVb_0UnPvN$saU^6$0EJN zET-BseFzrAOlj<92@Un_*h4xO@S7}swz<9at4wo$C5&slcIoW845RbHx&ngVc=} zaEJedUst=6``+PKB9}MN698TULdcxPWDCs$6A-I_jZ*{14jS>97#Tg12)cI zqp!n)hS~s$qr;wm@WrOh=c6H}{5)167hT-y=}6Mt|NfP~@5m9`aX^SnOWS{W5|U~} zkjyOT4h+o%Rc(1Vto+mxsb5qPV}dj`P&a`2p_zL_i~Vg8HNMD{7$BiCoxK^~uT_Sr zP6eFmq%9GS%LJvadiMr|c4H{YLV|_r-&n0?QB~9%q1>Kia+S57e=E02#SToW-80q+ z^o3ivHzA~kJkLT^E?BLY$B4aq&F3osQX0YLE629s+U{rl&UE42rfH z_EyJ%-ICo~TNtkZ`-eOSXPg?3ACroKnle6qMinBTv-w(bwggnh&}kuG11Sh8pslWX ztcG`fy$TiSuB*Qe{0EwPed8DvEx1^?#~Fon<|9Ye;N28WEXT`R~fBf*lo;9?WhiQ7F@$4xDb zmpxMGjUTMq9#SU7YT8?UKsk{RIm1#p#wCUL2UBQ(1D?^<`Jr-@MV1O&WRc$p%O%&2 zx92=(z9bw452E20S2?td6^O31*6)FJ^pR(#g#YeNFFU`HP#`>y++Oo8Wji_Y9eW^& zTTh_{y;lLm1VxCRNhZz}WJ@^7jDXD^uTOA^(Ykyhzr{5)!<>1Ryp2vZ9dsObTlQ#5 zF)ifzw{rxZ9GIrs4S9eG;qjV2jC+Fk^BI<7$?Z*hr0 zHg~ZBfW}orBrDX=Sr6+1WNW-Kh$L}JKYhMAYL|}q;!a3Tb-bP8Zn!$>5z#>+pVg}Og@^Q}&mXGYnebq53kSXJ5B+&f(Cx)>7vu$1azvrkv ztdHz)Y!_S%f(ktSYqYRit0R{|lYUBjLNwJ{9_tCJW2G~y3}6pz1r>gncUmA+&nQf` zs4jOx1r5y|Dl=*22*o(Cz^Y34X;B=?wUE>p1fyd1aGEh$s?Yd-%&y<#X4DKbf`7$TeYsz*r8aznPP6Ihu9k4W z?eO3UZ!&+!bmL7^JBElu1Mfkk*)VR=NV(MPpUGQ7>}=^OhTz(d6kd&YL4hCdh3+51 zA?vTpPmtEDKWm2FC)?kZPft#uLp4LK(7Gj|_ZX~)UOXnn8yq7*tm;6#JnBiCz#p6# z$>X8IOPas(o?p-8>?-<&xDP6A9}Y?W9)6@gFIZbZ2Av$Gc7{JH?+hbVqPckF{=CEw zinYtsYDB-3$3)oaIQ-38Ksg@NJrN>sX)hlcqo7;lVQ3vNc|jkT>~6irV&yV->afVS z&phHwsq#}P$(^>jlT&v7^#nzDIU9>!kaeXYH`kXy&%NY?IgVECbDF0JV5 z>||j(A1?NZ3nHZD$5jX9iffb>FU$ECrXXAjhkhAuDm8-F@eDSHTgblJH5)gdG-beTw0JO~RBbPrF} zi6YGWS@-)mj(EBjUxht!FRRQNZ80ZZY%5U5dq7dfa66aJ4^%t)@6RaDCSj-lkb#zX~0bH9COQ#?2si zTBt`Fh?AUy-k3KQ_U6>$-8*TA=?NxOvZ(KuiWb5G<0sK7;K z)hQbg8lj`a7rF};iNw?pIv&~z!E}I4$Uc6P=f)RaV@k2HIHz^yzn2U0+6rKH9`;N} z{t$4=evSEF)I<_PzV)@YhD2LnwP`Rw{Cq6_$}qwBT|=NiI1{`yRL(5)DqboRiT z5D!i^a8HyDp?VK5W8wDmP~A4gwu|+O$BcfQ{*bD>tU7R}?`|l?mCTkSl8Y`Z8!63P zJF77M(t$iRteK)Y;z}>o#*o>a3uHCU755=yzfLfZ&=YC4#F-tXb5Jt1jw_-)jyv2@ zopYr%#sdsd}I>44XWfOgDD^NvMd7tgb0>`O<@nI`K^5H~gXpRNY zp?E}G;^+}It@-!ncl3h{aaolVa`+yILSQxi0w<>>C=jLf^PRa>=bRaFlaEC)#c|l}6n=J`{M6(_-1Be59^^v79tUR{Tk-e>f*hdtDU& z_sZ9X#prP#GZa(p2Whzq`~~IZh#b?X7gfAWHj%wf;+SJY?VB(Gsi*NsogCk5F&DNPsuo;bgTjOaM@@I|gE|fVpH2s74$9HFcM^J2Vu5E_Q z%%X24DNz_QDeG>mfX4cWXoLKU7-Y3rwl?>lR=) z?%G${T<~r?J&3H6M`=3tn8|J(z=w=MITfS)M#8_S&rsM|*@AXg8P|?TrLHo!*eoFk z$4DCXP+o9Mt1;*nNVuqt7)kuePG#&Lgeh{L^rk%DuR$iQak^`pREF=hK`BMt+QWKH zx+x3g({l7z-s9u#nUHAbPZ*3+(>pre6r}&8^5ayZ6f zApOeq$HEG;v*$j!y1T$AvX$cp&o@0k-^R8s{JqFs2laH=@gWjmt(x@k=x)(Nga?9JcPW)*Px2!GS(1ZO4*Dp zcw2wwd^GJm{_DBj>sDhj`qiQX^9_-+Z@za!Rw_w z@4x=6r%3em=&OK%Q;ugUzB`KJ0o~OM@P3Yj{i|=cSL92Ic5n~M9R;$HCB$v@8P|OI zNjKaC^{AL!K|5XrOI}B?f+62u>q_xl*G285w_1+CLvoydzP_g$jJ_djP5JH$=g!Pb zn%qkB{g!fv!-Lt(nrVOTDEsRcf7rP~W}0|N8mJ*rolXXznxD3Yti(psW%E{w`pKB@ z@MlVa?4^}A1sKvhuYVY-6zn#|XfBxyQjhso2_oxx@l?> zdv1_{oE`hlNXc_dMJP%>*1SQ`hg^7bafNbVp z*+2$huiNqm@E5{Y?agnjWnEQ5d7x(f1el(3C+6nh|XNyD5hIj5O1}kY3>zyG#gw&yN^YTVDOgP680kf zx^)Hm&om9Cv*u`07eP^kn?1k=LwG#xh@W?=)8W{82 z)tg1uN%OUflkG`v^SF)1< z1Zo#Tb1(siQCssmHGv(0v#+%m5X;f_V z*q>RhiL3Ur=)2+J$0d~-?J-Q6ZGPFlh!bZp*SHFd>0(e0TkVcVOQZCYSf!8#GN;@? z8Bll3NGXGn395hR&NP%o>roe}{Q~A%5kmtd@WHfIbHNO#XrU;d2vE$TXv_^9IES$ zptr&IQ9%B9J!m(Q28i?)`yj=VIJyTQG(H7Mk~)Ps(p9}lcvF79G=BFBBVk2X=b_r) z!FVPD#^J}&eWHvbX<1lcW2*WqjFr2hI(7!_>a>&?DTwzvaB|y4Zz*k zc$vz3=*t3*&ffV?LZ$JAkxYFhL!VO5U6zyS#FanB{|~sz+B(5a~cGz=T{bcxWk5eINLhbytt0ECv@UysK$X%PjXX?fcS?eM>R4osGSV#xGi^5wBKdBe}&Ja0duEoR`IN zM9U{M-!9u}s-e{rD%)-&^nUsF1(57;*0che~$D_(q&u~^9 z8rm5emK^;Kg?J0cMaaf7nbn4Z8^#;-B-T}NWjxpK=!^aI>PqJrQW>yNhEn(m&EX@x@7+yqp|a$4Uns@x z$~~Xc`oEv-iwrvfu<0V!t+;r-7BnHEQX zV%?+{r>~{x%WHT#5to!Q+JJ|cCRKxX`|GV!PV94+JCl50^)^tCutvH0hG7381pwrk9${IK1Jlh>j3{9M5GqXd4u0Ymo9=KN^eI^Xui|#p29=8L1po}FMd;C zN!C~HZqVo3_xk*cIK4~jBn=Do_ZPbLje?PKbyZ63OJ?aNF18F<%aWxUh&rByFtn$+ zEHATem3($_@}(2MGLh~4j+h367HQ#$R|1^(Bl{sQoPWOCuu+<~K5k`Gpn#z{W0Z&D z>)%pq*9}+WY2+lad+fOx)x(2@Cmb={ovmG}y}n?8_BB@`PYIn{`-)?V)R$~t{%#S= zrn~`$_-RF}U#7n`tmkTPdCXn2OGUY(V5?5V<=KA&uOQ`9O@v)*uTClaK2jRpMBu$; zYaaE^o2{6L8g9YrCV$~KTt=6m^V=Zjf^_Md;j6m|T|{QTPrVh}ue%zpiVYSfAGhi+ zc~jCGy*$8;^_QMlTMTH9f}%-@$9bb<@Y&_7DmkbL1WQ@$;IIM$6&@Z4)Ta%QJoXLa zcDW|?&O2oebsDG+VkL66Kf7~$S#$X_(x=XJ1cN%M@YTe@t^fX>3 zBL1G)r>Cav@LUmNRp2h#0eBy15*5A$M|pPU=#@5Bbs!9`jb>oxreJJTe|mo<&o z!xMOf^{3A9GHl=7WBg&2*vt+k(HrEjA<@!@up+&}pHc4CBoywc!VbLX3<%s~nw^P` z)grG%QGey)&5I+i9(zY5#MTPO$)acL?q&3m;df$R6!6DjkqL5ketHaVk!wZ`CM zTW+MKU6EUbsKu1`%)KZx39>fdj!Q=(6`B$wJuZ?f%QTZ+TfbyDM`whsRWz(45t@0z z`jscQr!Rl?E3ZcNst8rPV$EF?Ckg2#WD7B&y#PC@L`Ko!Dk+qpQ1R)ASo=3TB(?NU!DR`}>Sb2L4x0vAgnkCW}f zWoO43@mQp4a1;%UyWaSg=IXi1$V=o9)BOFyczvtHuhK{hb12Xsk!649$V;FV>`|6cSC-6iZlN zFiIGwe4+|FGyF?R6L?Ki&x_O*1HLCB_%_sJf9W=xjh;Hf-}32nxG9oAcXKqXKCcRV z+kLLry^=JDWfu*SquHAq5FreW%nbvji?}#$29!?3VW4@~gsFdjFM`!|NK28O1dF0TOLo6o3_O zk?SMnR+QI(sk?7^ngI_qO{3~$_*6W;1^cF|Pf*tc#KH5bD+LSxal=D5rKKU7vD14S zjAod&T^(@jU2DJAZ?})XCFgAw6+~T-f7~!5&5nh${o2EZfi*v51aXMjZ~9wdc8q+71&|r`wozh)8%b7~6(5R? zoc@C6#}|gA(SPY7anidI?GiHBPl^qgmPe1 zHJcyUwl(WSt!^8BR^WD&$flwrIlqt&rTxT{Z;A6BeiPGY?^h6^uBZq5m~|=6&oSI5 ziR%<7bgHx)4y`pNJfb?VfOb`VJMM4#emY%Eqtd~;fUDH2s=QQ+`8-UIMJ;NxMm7jS z&0l;}ircyy432X-Cg7Az#rl#e*YbY*-4{dMM2G5j^_4*rdrCKN*2~?z1Gt0@-F70@ zi!0EhX?lIyi4m}^L70ACR3%L#`0vi_!8x4hDT4vB-K8OJkNg;x=Ildu%(W_JLJ@RC zo-LbOHQM1)P7AKFnmgf@lhh3s^Zl0#6Mp0guL#nh<~4i?`J51@LGr883peAVMWUSU z`gev-g<&EyjA{#2<^HJm5k^CvQf)GxGY7&IA; z&BoubdZqn}A*~R3{I$rcNtphMy|B7;$z6C~zw)Z7L?qoD93k*)0Yk3U0s7iO{PV#Z zy`9-PrC-gL6Z2|Yv4SOt$yV)u{$RO8FUK2uz+F6o;f0T2VuX&Tr_+FYz)@vZ{-w;Q zuJP6>&By~a8bj+Y39t7^{(%wHd*sritQNUtwJ>it>6!e%d#0 zyy+XgT^O$}9;_w%4_l5skfCQ@G@tm5r zmmfZ9QgBxErKZ~apSUX%9J-m%C_Iz<)fRs~b}l^wt&);(npshDeD)(4m(%^tr@Txp zM_ZzHpK}2v&z)8OhDt+yUsAc*U%A0UV(XMY|M=^K6w1H?qGCV3dx-(d-2pN#z9M3u z+eHiAItqrA4o0T@n%%2sJMs%0RxprN!yo4`)3PO({cI7S-=(yVBEI1HAz0TH6DMr;9k zZ*$$=#zAb&~{K?@o;->B8#{6)W0dwh_cH)e>(qOTscxd||*lTDsRdhhhx`%eDwVJRVb z{hh?^jmpJ!$+5)Lh@3lTyD&K&tylsKio5mg83NgHSKmwL=zg$H_Lq>pZS`5l&3?eX zY^Eb9*Ziy<;k!kV(K^H_zMHm$ac0MFw2tc6GJ}pP10`eU_0c4I$&#^%+Ov2QJE)Go z6GItlR>^@EQF?6*C3F8)qKDtpvTaLR+rOuGxUTH_CP*(7n;z|9 zV{b5>?ZrF52{gDVdzR?@_?Cma&rEq`WIw0yD?XouZY(kzg!1JUCd7etD-`Bdv&5fz zLJ?}0wL@+=d+w$NO!(@WF{-)FOkAJEy~@IC$BcIF+` z4a@PVs}|e!&oJfd@xnL`HW`65F{@k#38fR)nTJ$lM?mL)TE@DF8ry?Nz2H{V-!Et) z@SY_WalQ8?a6_=NUj#gB7d!u@5{a`{PeMv5ym;H{wn_e$Z5rI5-F*$R;~v~+bozlU zpWNb+Z9hwEB(3W3ATm!c{PY7x*@a+RCKv5N)Np4769dAX68~CLGX8N#dXL+BfB0-l zsJnOAN~=DrTLt$|64PwM$WLNRl{JM-D2@iiBJpwGyqeepRBBtS{1fS1@6w3=B7Zr@ zOJlY&)YgT9E9%p}{d)F6FnXyz;^_16#%>{#Tzx?K*>u#a+Y9R|l$N z7F#TjlFM35E8@t8yS93xMNIzKZFwxiA2x{V@uO2a#%4kI3FPFk!k2mEq3QRS8;qru z$AN5bV6d~4xo=CC@O`|Zyu800JJpzh4``!$!e`|%{y8DoU+hZ?pV0|X^9k=?rzL8S z+iys48XnL;(Pk7Wb+<6GZIC0#B(l(&5|wpo=iBDlQ=!x7$^x}%LvO;dfNF@3r_C76 zX+)|}%1kevEc^B@x`vWGpf~OOg%z}u2jt5hrFNZvErna0$4A5$4qGM~X~ihmV#3Ls z^;rF!*)avc<)3UN^C3}gwUHnhakdtim-aE(<~7$);B%SpS}yO;NqB5|_Ks!VeeTR- z&cY~SNb21=0cWJq8NQgn6Azzb{z!_YIxxnj>R*V)Sbk50?GZR>j#X^WiXN#XvBUk5 zagXH;ApBcIVYS!BwfXOm6mAQ~)fK;SOO;sFKj(3=58ywS#cB1kIAMkh7Z~lCrS13) zJyANQZw*_Xr7`Dqi^T9Tqak_7fEUf_KrtTlpbVRzEk~U)o73L6B;)&W9cZlX>JA9j zhlX`e;Q+q&wzlkl^jw9`nalr}`YRdiKr(XgjR4C1WN#ukc$hXTTjWovry%J0BUz2b zeEXJyvh|2ljCzQ4N`?{T?CP2WvmDvbW8R%u0uNn5b4t75lG?Er@Gbmifi9pOkyT&H zu&`2F>abS+kl~7#Pw)$O#kbD&VySn#4KmQ}B*5#raET3#>K=d^VLVc=$^y$KNA2={ zlAO~y+8e3niOljk?VRf4Zs#~hil7&^A??%kMW_+P+pjSCC}rhS{0iW|6~^&h*H@yxZ1caSEoi2S5BzU@=a*Nfq1Li z@X%dLm;+bWA}jm7bvjMO#cpD>&*C))^mkf&1c8UWUz6u%d3rbMPym@IeMnF)Kw`lhrpcH<{T&hA5cZ<9ov1P#`wE4z`1n|#)( z9+Vj4+0hSCH?5C#Ai5)32~RfPo!nK{bU3_l6mE(Hk*IJ^2=RmjI((SC;zIO zn$1Kbp)bHY)5HSfCyYvzdT8TK+*%HP<(2w45=!fEp@Ol{zeYK+Hw%uOU*VCwru82( zZ6y^XzGZk%_^efAVY4joAuha~r?Sel4yMT5-rU$%?r!LZsjRjv4XupST%Fl0j6QxY zn)bTd&KP+x6pdmyA<${Q83@uxA;l?ma%THdRa+i2m}(fs!a6WVDQk+@EkL>(Bwg5q3Jpd}Xze%9*)(wbMb{Sn;CrD+V?Z`$zVREdO4LO(Je zW$5Aa!7r>=iYBZx+yXY#*Y!M;n}{-+CUYMRf2M_9kr%$Tru=6)=vMFVKlLec1?%)R zsOt@dxQ00ryx`c|bSmM(nA)C`)OH_A>~@%KaFF~yHPko9^;DOBI@#6JyHv%!Of2ie z9rp^ue8IWbsDABJl1J?T4+^^2aPyaL8F^hwSbqaYRdW=dkT;0QchX}M;whaZtIdO6 zlE=2IHzvuklPmLSwP#tf#MHrKTQFSO`s0cr=DJZHYIS!=$P%#fEQz6(8&YDU|J z8D2))v5)umhwKunW>zXJ2-Ybw9NqDfJwan1AZU;Dj^s#`f; zV=XldEyfTy@=Nlezz3z37zROSOC5@XNT0>~aE@*&#{o|{I*NXmasu!a-$+K;HjcU4 zM6mC$1!Oiz3Mb~@4c}}SVbEtzmG%VhhEG#hW6pMSbA`$+15DAD-+I-T`ngXWkbWhN z(cqU<1?Ga{Z+UXzXd+vPXwA!Y*hVZ_oQD&J0IAwjX+SsvH@k$)y{KquH$I8~vgm?n zxY9!t+)TU_=3%CiY9wCen5MJpWwFxbafU(3Y zBH}&wG4?KxP%QLy{0F~Dmtbt3KAHWWx0+tUDqCxa_16etpMgxp-|tGD7BgbI5o{x; zQJ2{NzI@F5w~^}i4ZVmtobOXKQ*3S8cAA_5m)5q7BSt8C){}7w7oXWDYo(bVwb%+5 z9NVdhx_OvXBYP{<>0OOj)iL6a%H7L&i-%i843ap7SE5eEAd!V8bc$C z=H5a58y(rQpQVZnl!d^4AjqjPrG%eUid?bRdiE5}x$ZZkketsalZy3AzXV*k_v+(W z@*I~G)#JHgYT-L%ix_cD(m0CuyC}GmscP?e2EVX{6!1~Y;4;?WF??YnKmuh6+3FTI z3_CS%48{pMtP;llT*J0!$#oTIYVE;=f#oLmY{$yoZ&$DB#1ABDM%ow-Is$H8x7qbD z3=aWr;6eiN%?cv>O-5BUS&hBLz=AC^ODkVTJv>wG&}p&rJ?X*Ir2~;IzZ{VAT4!v@ zR&HA9eD$7@nK4~&scg3Koqn7~vF$sxxr&R0abLM?-eNkAQzh$CJHcFjPNX+9LSh#h zi0Ug~qG}o2-DxYZL8mCQTj;IF%^vbAo;UHwd0bH5G)v&EvM~sMwfjEeXH9+CL8F_E z?O!2lnqM`HF5hBZ??#(;k@lMlycWoQ{F|9d!rF;jnzZTSHHMzXskPRQ41<1*g|Pbj z(Dr~wP>pm|^iW*~hRKSMX9`Y%V<%9ns}!#+E~%d6gv-saP-yQ1`0J#Du)>=1u44_v zPU5PFF|>4@oO+#abHm2Jd`xx|OjqoyAe_4s$E-PSB!bXK0+^rU67q%!P1(Ez66dFp zSjR36s(S3o?Prj$iFjy$RdZOzmyK1GkI!zXhB$?aH_1%GEwFmYUUa;EA|@F$E5V-R z>i-=C4Pdg0^%$54_Ir`1yr^AhTT*>s_WR}3i!_xlYH1F|w?*<1Z^WPWL;%H~ClrGN z4(}X&r&d`y^nF1(NM#^>U6{+|Hea#1I9eN~Fa0&+M9KmI+z@$9?$9hFTwJgDB&1mT zPml>d9W3(O7?vgHcY9Ikvqad@lOn{=xH}{ z5Von2JKN;K;?*a#OXbCLKg_p>>+S@XoN04io?08iIUU+QL`=`^&80xqAUFnZK4E_B zoDZ@LNC_lV44)4yg=Gi7X4{X6V7VYNluIvKv2rpXn@6#KUUivOiW7 zEAl-)0;XpMHvCI`vHU!bQTmg}=|bZA)`56}28N@@bu5Cx_5Q2_7$g^n%zDBa!4K2s zurHnuMxslg`NBDAAMl|BP^NM5*yqO9=LeB6xI~!zHvWx7!MVz7f_{lydwRvx!~OF= zQDe+ID9)Hb79?XkcWTVkGDEE#QnVz$9KOd8+(IAmkXbwk7?%PsA?|pf)S|;1eQnPd z5!VmVSJQ`aA&M zBnCxG7dbu5u9-vRQtEWmgB{IKhA?k@&4R#1{(x;a zh7Iu;sk_~+U4`tu+01~Mjdn*LWjYhDLAps491KP{A@TTdKsIx_{kSG*XYcU;+f4TV z+{w1f`SVE%m)uY=;FwJm4GoPI_Te+k!W3o+GIy~=JYHH=ig*~9`(NkI5=6@Sb6>50}?%30H^@j|IFa(WCimub+JTKa4>~fDw#rT%yeqkPf0HYc}gwYxXgM#?@JUl#jZT_Q1T_`oLlM7@KjzlFyqx?@s zO=~v?GZ09|$=uDs(h&v%siLH=Xn?|}X1@PJ^IvmIjjl(pLUI@+fJdRA>MZfUuyD zsHm_or{F^|N<#GC@@Uw2TcYtxODE>MJwOd<|F+?A{!t9+Od{(CJ zHs(%_u6+M%WBB-iq84HRAu%g63xJt9(9}!>U@m4ZXlW|UFDxo31ms0U@S@hYx*|4% QngLDWgR)GSw8@wM0kL(kvH$=8 diff --git a/packages/bridge/public/ms-icon-70x70.png b/packages/bridge/public/ms-icon-70x70.png deleted file mode 100644 index 9de24264fa25187b0022997f6975dcb23edccee4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4306 zcmZ{n2Qb{*+sA)e^dMRYu84>dyQ{C>i7Tr`h_=dVORUARqAr3f2@z#+wL~vb6K$;) zQ6og6_bv&RAi8)rcm6Z)eg8A>{LXWpIp_I&pXZ$U&73(W&csNcnSqx9003r#J33}$ zulL*NE|Gg5(9&bFqjuATX#zmabH+1A8uFOJ&rDwns2t?`Mji+v?wG*rNaAf#| zJcauT0R9jF`0fAzO6dT=jm{#Ns*nShoDB7KfQ#SX%a-C~@(extj+Gw((8T>V3NQC; zvi`EJfsUqm;M7*8-7|QPRZsZEI&qs6nM%&K|E#g45JxUR+n zhQ5lL6x`GlYmHrQ+>ONJYt$W-pv5)8l6y7{<{%u9N{64;g3y`;``PA+ETqywA7mLM zvUBX!EnNkHyD2OM(>3OLR}D}-s=W#nBI8uOi{Nv)0eOde620mPXWFQ{wv;@m1l)oT z9RFBH=M`Iwwh2cf)X~sO^?h7lyGtNiheMzX6uIIAQpcAgP9Z>m zPa%p`Qz$NNg=^{0Xf^xMQF~i%NU|pd(b{M4G!p9JG#QtyP|C(Ml^w}pdHvIC738QE z<+~@oE2V$1QR~g{@bosm^U7VZ%h=US$oTAcsoQ5{Ewlbd=nd|QXQ1%o{?Ai;qed^! zR+8smGSqXQg(>Ps<24^inFgWe3NuOu)`MWmFRDeq_pH}HoOmwS>gT_wJD+l%e6n+9 z+q-qcx3g^Fu;`lMMU5mx{b$$xG6#vqc`%g0+Jcu3EHZWXWxDfmIM+++&rel!=bBfU zS!qf#_^y3wVS$sHOSZi}XwHi6iKCsLgG2mOA13$>7+?GlABlun*oOU4gdlAu2|k!1 zB`uSvJsX1c>-dCk6>Ncryj1I+6Zq+03=^r6gbWDFA~XC3rBx$UQvo%w?-DJRLIH=p zhQsZ(cds~?mQNt+(b?X$U|5z)+1umeJ)dU`_N_m1i*$7IyNsvSwJWg#ZSjy~(G(y+T0A4TaA zr^ePKio1PWB*nzW`ghpUApP#$R<|h35Ju)TYAVH>pBOqKWZ4sbx?LJ+fi_y;ySJ2* z(6`~W?if}wULkO3{z^72+F0||75=uO6)wV-#zZ^I_k`i)mN)IHj50PA63e-*SUwJ1 zpL4fw$&pI|LK?4Kt0ZpzYLcQ$J~fR?rwjFCEKiv6CbMP3ENS+KR;>jUV?phOtSP7X z=;oSMS93FRH2Vg%MfucG&*99w0Hn~m9^;8m+^VlcgPQIYqI&huMmL>MB2ZX5KYsBJ z!^QVWZa!bl@Srg1Z%jyG!Xp+`2-W&rU&`p@{lLZ0>8K>!umrVQ{E_Brw);Dk(@Ule zQaxJ2)fyp}k(0YkBBJuO#99%)TL9OTUlOMS&+%(^H>aW{l~q$bt8vGVkee#&FdX)z zn%YRMo!1u4V&7bi-O8O0d!!J4*lL5Nrg7LEYkOlwn`2WJh^o0_NP2ktX?&ON0X%1E zgYj`@Yv*lfz5HsoL01E~rCUPe;h|7~oNG5*_< z(1y49ZAnQVFZ#E#j^`c@gvP=Beuk=F>zuCFnjcKQ83>YdR4UDAZDRV{_rQ$>O(F

2?Hp$rC^c?9l221#S<+7e zNb=H)uAer$v0wu2!ZW}M9-`20%~*iN4Q@5?j8FOKZCqv8HM|`D_=oV|$+&lm8d_v+ z(`THe@u;;MnHQXKPs#4%tI8eUYx?30;#J`zw9jRrFiIg{RYl zb`@Wa?m4%Wr0}DcMIyn7gZCBop<(Cc4Poy34on#Mpttpcy(Estv983UZb;Ld;x%Zu zN#(r!Nx<=B&`=Zn-YvRvgYDY~RtGj?p1WfSll#b0IDYuEz3=HYPK;URFZ$7X^mN*V zubYE;^YWr1&8!Vg-NIw7UfBotiI!qI^a+O|BfvG9_)s&PcXqV9M%A}|lLJelM91r- zXIm5axu{WsX@q@G=g@U7)M@|00^PzJY;GrInFLB-WogOb1E;Eh*w2X=zAqz_c|^mU z(6Dc#-+ata>?hRCg%n@$H?2TI0valp2U>l5SiG2-+Sf^Hu`0bTv3#mayV!(eq;lM4 z$IIXG0H-}CW4Vm*(MI|T7gvof4kCC8(riAa;bw6dWp5m6JzHdXNS5bgbMtFoek3TZ zpr^VzUe!(ZU165ID~j7%W5o3nk9$$yZ5r7O$KL$u=wP6%yyySkAodn|tPQhH+i>a9 z!mxcH+jtQjW2{E8T^M@cEM`kY4bpO6F)KHoFVedCB}Q$~qHN`DsOuj{^VDUbHqwzn zngI7ePRkyZ4HebS#H~R`F7w#F>kDsfrW6Yk&kde!acoe^*fyzsviZ@UPIwm4m`d>P z+3G`gbVY$wL2d^F#xq1Y2=M%Tz_7YTjH@VCSaoS_o6oM44cBi6(Zf+`HlNH>FnX;D zqlS%*D}8X69*0pJN4@NcnEdib%cE0BVh<@O&SXe71JsqBT#?F5ah0Zob|L*I?|Q-Y zh=jnp?3xDU9Hzbe??+1LE8pmMetJbv9CbGTis#WZ{L>><(M{*R7A?-_`bpWut>xCB z{SKxZ9$&JG>#0I!lzvK1ZnO_qdmi`klSOBCRVI%LVO}$&oebv+*|juG^o%3TsV$@k zuKboi6H_fYh1%G_WzurD)zlx4ZIiDFfPLeJ%VV2(eoSNE>eK52NP==Fv5rYkdGWLL z`+MGpfK}E)EIV&fz-C)`I;{9)Np_A_P1x!xs4ViV?CBfmd=uPu4Vm-1eG7-!HQc9! z`t>wOAsK>fSW~euJEzl1dZzn}xrwih>#6%ZMoQKC%A7x#S!dba(zuqEX>}34R3($8XTVsyyl}!NDJSg)|bY6jNjNi@^- z_!E)ps~kS})fDT*!d>+pey#L?7DwER&g*>o7tzmJ(R_7>Esu14nLu5$4}I*j5LmH( zT{eAfw&LlhesRm3IdWdl?C+SenEmSA4rKU%F7*CtM)a;kQqd89ys!JvHmDUCFpVBl zKOKHL;%Z)Z5M@Nqk4JQxe1d*)4737YN~_TB)k7RTQR`cD)_r&vmG-ujTWdQ0+U*VI zWjBoy{07s`4kkYcVd&5rFs&rdXkJMLEk+LbIyH6dq&gl>})qI_i1G&CYO;z>UH zSABO*WkkX31WIz6`2&4p&Xur`r2u$)Df>2m_p#c=uX0i9iE1iPI5b_&DXA$~Asy<2 z8=$WgGOB{!C@kb*lz-Bpr3=(iwRqo$ZK7njQrPUH+WU;)ViwizX@eGjwppT!1D3^B za?R|rFDmSVjelQa+6c!Ce=8;;)2#KFrkTM z{&0}M$$oQeJ8|cHywNd~t?7U<8}E13nIGgx{g)I@FAr?E!MUgEIeKHaqsmgR8}V#G zIpmAyI7kBsXMn$xv;@%e_L z=1pv1={Sv>th(zR!j{-q$Q6&Z*iDBnV(df_J>AYC3nb<}DY`R_ui06UH{V2u{LrHH z5n1Rdex=mbafu~MfR@HVdUk}lF0i*NJ4vGFvp7sV9SeNDU~pzNvQI>{<~%F7mM^Xv z-KW31c`zDS;lW*aEN7S?XgpSE#UvJyxE!h<#(cx0XGqY!9ce%4fM~|9L zVr35G268VCRvFE}0~lvco1!*T_QA9>d~+K|&9)^i&61!*eUj~mZ5cXaHdwzz0%1Nj zhI_f?batYx*><*y*=GLac^H=?8W}dZI-jx`IW~UW1txmxoBZeG`RDxkrCxkN$z1fI zIU<$ch5X9AiP3$4adyPGC?R}Z$PSQ(NJ~jVWF(~^<`7vW2t-LvPJ-M+Aged2M# zB@;602S^oPG=u+(`KP9mlDiAi%^d?sDN3^dzR_fc`(Jtf!&oAnG48*SFR!oDkrAGM zAuyzu3+55p1^8!GU^L22z1G6$zw*G$$rK0hLlmISic+$Qu1?NU tP6!1@CwVD^B0|Q+Q4S&pm625dkrg2F`WEID$H^4{16?DXN-c-T{{gic{GI>+ diff --git a/packages/bridge/public/robots.txt b/packages/bridge/public/robots.txt deleted file mode 100644 index 26c1d46..0000000 --- a/packages/bridge/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: * diff --git a/packages/bridge/public/transfer/background.svg b/packages/bridge/public/transfer/background.svg deleted file mode 100644 index 9ca6f2c..0000000 --- a/packages/bridge/public/transfer/background.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bridge/public/transfer/input.svg b/packages/bridge/public/transfer/input.svg deleted file mode 100644 index afc68b5..0000000 --- a/packages/bridge/public/transfer/input.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/bridge/public/transfer/select-bg.svg b/packages/bridge/public/transfer/select-bg.svg deleted file mode 100644 index 113b8b4..0000000 --- a/packages/bridge/public/transfer/select-bg.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/bridge/src/App.less b/packages/bridge/src/App.less deleted file mode 100644 index 86561c5..0000000 --- a/packages/bridge/src/App.less +++ /dev/null @@ -1,341 +0,0 @@ -@import "~antd/dist/antd.dark.less"; -@import "./ant-custom.less"; - -@solana-green: #00FFA3; - -body { - --row-highlight: @background-color-base; -} - -.app-logo { - background-image: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMwMHB4JyB3aWR0aD0nMzAwcHgnICBmaWxsPSIjZDgzYWViIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAwIDEwMCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTQwLjM2LDUwLjkxYzAuMDA3LTguMTc0LDMuODM2LTExLjUyNSw3LjA0OC0xMi44OThjNi41NTEtMi44MDEsMTYuNzksMC4xNDEsMjMuODA5LDYuODQyICBjMS4yNDYsMS4xODksMi4zNjEsMi4zMDksMy4zNjUsMy4zNjhjLTUuNjg0LTguMzcyLTE1LjAyNS0xNy41NjYtMjkuMDY0LTE4Ljg1OWMtNy43OTQtMC43MTYtMTMuNzk0LDIuNzk5LTE2LjAzMyw5LjQwOCAgYy0yLjY0OSw3LjgyMSwwLjM0MSwxOS4zMDUsMTEuMTgxLDI2LjEyMmM2LjE1MywzLjg2OSwxMi4zLDYuODY5LDE3LjM0MSw5LjA0NWMtMC41NTEtMC4zNTQtMS4xMDUtMC43MTYtMS42Ni0xLjA5MSAgQzQ1LjczMyw2NS42NjIsNDAuMzU0LDU4LjI4MSw0MC4zNiw1MC45MXoiPjwvcGF0aD48cGF0aCBkPSJNNjAuMDI3LDYzLjc2MWMtMC4wNzgtNC43MTUsMS44OTgtOC4yNSw1LjQyMi05LjY5OGM0LjEzOS0xLjcsOS40OS0wLjAwNCwxMy42MzMsNC4zMjMgIGMwLjY5MSwwLjcyMywxLjMwMywxLjQ1MywxLjg3NSwyLjE4NGMtMS42NzQtMy42OTktNC41MS03Ljk1OC0xMS4xMjEtMTQuMjY5Yy02LjM3MS02LjA4MS0xNS44NzktOC45MTItMjEuNjQyLTYuNDUgIGMtMy44MTIsMS42MjktNS44MjksNS40NTQtNS44MzQsMTEuMDYxYy0wLjAxLDExLjgxNSwxNi4zMTIsMjEuNjQ2LDI1LjA3MiwyNi4wNzJDNjMuNzc1LDczLjc0Niw2MC4xMTUsNjkuMTY4LDYwLjAyNyw2My43NjF6Ij48L3BhdGg+PHBhdGggZD0iTTI3LjU5MSwzOC4xM2MyLjU1Ni03LjU0NSw5LjMzMS0xMS41NjgsMTguMTExLTEwLjc1OGMxMS41MjksMS4wNjEsMjAuMDE1LDcuMTQ4LDI2LjAxMywxMy45MiAgQzYxLjUsMjYuMDU0LDQ4Ljk2MywyMC4zMzksNDguODE3LDIwLjI3NGMtMy4yOTYtMS42ODgtNi43OTctMi41MzEtMTAuNDU3LTIuNTMxYy0xMi43NzQsMC0yMy4xNjcsMTAuNTgtMjMuMTY3LDIzLjU4MyAgYzAsNy45NjEsNC4yMDEsMTUuNTIxLDExLjIzOCwyMC4yMjJjMy43ODksMi41MywxMS40ODgsNS44MjQsMjAuMDQ2LDkuMDM4Yy0yLjI1NC0xLjIxNS00LjU2NC0yLjU0Ny02Ljg3NS00ICBDMjcuODg1LDU5LjIxOSwyNC42OSw0Ni42OTQsMjcuNTkxLDM4LjEzeiI+PC9wYXRoPjxwYXRoIGQ9Ik03Ny42MzcsNTkuNzY5Yy0zLjU2OC0zLjcyOS04LjA1Ny01LjI0Mi0xMS40MjgtMy44NTVjLTIuNzIxLDEuMTE4LTQuMjQ2LDMuOTY3LTQuMTgyLDcuODE0ICBjMC4xNDgsOS4wMzUsMTEuMzEzLDE1LjMxOCwxMy41ODgsMTYuNTkyYzMuNDg5LDEuOTU0LDcuNjI1LDIuMDg3LDcuOTA0LDEuOTM4czAuMjc5LTAuMTQ5LDAuNTMxLTAuNjUxICBjMC42Ni0xLjMwOSwxLjA1My00LjI3NSwwLjM2MS04Ljk2NkM4My43NzcsNjkuNDg5LDgyLjA5Niw2NC40MjcsNzcuNjM3LDU5Ljc2OXoiPjwvcGF0aD48L3N2Zz4="); - height: 32px; - pointer-events: none; - background-repeat: no-repeat; - background-size: 32px; - width: 32px; -} - -.app-title { - font-family: "FF Oxide Solid"; - font-style: normal; - font-weight: 300; - letter-spacing: 0px; - - h1 { - font-size: 48px; - margin: 0px; - } - - h2 { - margin: 0px; - - span { - display: inline-block; - font-size: 16px; - margin-bottom: 20px; - background: linear-gradient(270deg, @solana-green 0%, #DC1FFF 101.97%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - } - } -} - -.app-action { - border-color: @solana-green; - color: @solana-green; - - padding: 20px 30px; - line-height: 2px; -} - -.action-spinner { - position: absolute; - right: 5px; -} - -.ant-tabs-nav-scroll { - display: flex; - justify-content: center; -} - -.discord { - font-size: 30px; - color: #7289da; -} - -.discord:hover { - color: #8ea1e1; -} - -.telegram { - color: #32afed; - font-size: 28px; - background-color: white; - border-radius: 30px; - display: flex; - width: 27px; - height: 27px; -} - -em { - font-weight: bold; - font-style: normal; - text-decoration: none; -} - -.telegram:hover { - color: #2789de !important; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -.social-buttons { - margin-top: auto; - margin-left: auto; - margin-bottom: 0.5rem; - margin-right: 1rem; - gap: 0.3rem; - display: flex; -} - -.wallet-wrapper { - padding-left: 0.7rem; - border-radius: 0.5rem; - display: flex; - align-items: center; - white-space: nowrap; -} - -.wallet-key { - padding: 0.1rem 0.5rem 0.1rem 0.7rem; - margin-left: 0.3rem; - border-radius: 0.5rem; - display: flex; - align-items: center; -} - -.flash-positive { - color: rgba(0, 255, 0, 0.6); -} - -.flash-negative { - color: rgba(255, 0, 0, 0.6); -} - -.ant-table-cell { - padding: 6px 16px !important; -} - -.ant-menu-inline-collapsed > .ant-menu-item { - padding-left: 16px !important; -} - -.ant-pagination-options { - display: none; -} - -.ant-notification { - a { - color: blue; - text-decoration: underline; - cursor: pointer; - } -} - -.ant-layout { - background: transparent !important; -} - -.ant-layout-content { - display: flex; - overflow: auto; -} - -.flexColumn { - display: flex; - flex-direction: column; - flex: 1; -} - -.card-fill { - height: 100%; -} - -.card-row { - box-sizing: border-box; - margin: 5px 0px; - min-width: 0px; - width: 100%; - display: flex; - flex-direction: row; - padding: 0px; - -webkit-box-align: center; - align-items: center; - -webkit-box-pack: justify; - justify-content: space-between; - - .card-cell { - display: flex; - flex-direction: column; - align-items: flex-end; - box-sizing: border-box; - text-align: left; - margin: 0px; - min-width: 0px; - font-size: 14px; - } - - .left { - display: flex; - flex-direction: column; - align-items: flex-end; - } - - .small { - font-size: 11px; - } -} - -.ant-slider { - margin: 20px 15px 40px 15px; -} - -.ant-layout-header { - align-items: center; - height: 42px; - padding: 0 20px; - color: rgba(255, 255, 255, 0.85); - line-height: 64px; - display: flex; -} - -.ant-statistic { - user-select: none; -} - -.ant-statistic-content { - font-weight: bold; -} - -.ant-select-selection-item { - .token-balance { - display: none; - }; -}; - -.token-input { - display: flex; - align-items: center; - border: 1px solid grey; - padding: 0px 10px; - margin: 5px 0px; -} - -.token-balance { - margin-left: auto; - margin-right: 5px; - color: @text-color-secondary; -} - - -[class="ant-layout-header"] { - height: 16px !important; -} - -.dashboard-amount-quote { - font-size: 10px; - font-style: normal; - text-align: right; -} - -.home-statistic { - font-family: "FF Oxide Solid"; - font-style: normal; - font-weight: 300; - letter-spacing: 0px; - - .ant-statistic-title { - display: inline-block; - font-size: 48px !important; - background: linear-gradient(254.55deg, @solana-green 10.02%, #DC1FFF 89.22%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - } - - .ant-statistic-content { - font-size: 20px !important; - } -} - -.links { - position: relative; - height: 100%; - - .bottom-links { - position: absolute; - bottom: 0px; - } -} - -.ant-pro-sider { - background: transparent !important; - - .ant-menu { - background: transparent !important; - } -} - -.ant-layout-footer { - padding: 0px; - background-color: transparent; -} - -.dashboard-amount-quote-stat { - font-size: 10px; - font-style: normal; - text-align: center; - font-weight: normal; -} - -.bridge-card { - border-radius: 20px; - box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px 0px; - width: 450px; - margin: 100px auto 4px auto; - padding: 0px; - - .ant-tabs-tab { - width: 50%; - margin: 0px; - justify-content: center; - border-radius: 20px 20px 0px 0px; - } - - .ant-tabs-tab-active { - background-color: @background-color-light; - } - - .ant-tabs-nav-list { - width: 100% !important; - } -} - -@media only screen and (max-width: 600px) { - .bridge-card { - width: 360px; - } -} diff --git a/packages/bridge/src/App.tsx b/packages/bridge/src/App.tsx deleted file mode 100644 index d2220c7..0000000 --- a/packages/bridge/src/App.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import './App.less'; -import { Routes } from './routes'; - -function App() { - return ; -} - -export default App; diff --git a/packages/bridge/src/actions/index.ts b/packages/bridge/src/actions/index.ts deleted file mode 100644 index 41dba20..0000000 --- a/packages/bridge/src/actions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const nop = () => {}; diff --git a/packages/bridge/src/ant-custom.less b/packages/bridge/src/ant-custom.less deleted file mode 100644 index 26b2c72..0000000 --- a/packages/bridge/src/ant-custom.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '~antd/es/style/themes/dark.less'; -@import "~antd/dist/antd.dark.less"; - -@font-face { - font-family: "FF Oxide Solid"; - src: url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.eot"); - src: url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.eot?#iefix") format("embedded-opentype"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.woff2") format("woff2"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.woff") format("woff"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.ttf") format("truetype"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.svg#FF Oxide Solid") format("svg"); -} - -@primary-color: #ff00a8; -@popover-background: #1a2029; diff --git a/packages/bridge/src/assets/metamask.svg b/packages/bridge/src/assets/metamask.svg deleted file mode 100644 index a04dcfe..0000000 --- a/packages/bridge/src/assets/metamask.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bridge/src/assets/walletconnect.svg b/packages/bridge/src/assets/walletconnect.svg deleted file mode 100644 index a2243de..0000000 --- a/packages/bridge/src/assets/walletconnect.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - WalletConnect - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/packages/bridge/src/assets/wormhole.svg b/packages/bridge/src/assets/wormhole.svg deleted file mode 100644 index 3e5349f..0000000 --- a/packages/bridge/src/assets/wormhole.svg +++ /dev/null @@ -1,4719 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bridge/src/components/AppBar/index.less b/packages/bridge/src/components/AppBar/index.less deleted file mode 100644 index 004db18..0000000 --- a/packages/bridge/src/components/AppBar/index.less +++ /dev/null @@ -1,102 +0,0 @@ -@import "_colors"; - - -header.ant-layout-header.App-Bar { - position: absolute; - width: 100%; - background: transparent; - display: flex; - justify-content: center !important; - height: 80px; - - .nav-burger { - cursor: pointer; - display: none; - } - -} - -.app-bar-item.logo { - position: absolute; - left: 10%; -} -.app-right { - position: absolute; - right: 10%; -} -.app-bar-inner { - display: flex; - min-width: 50%; - justify-content: center; - height: auto; - align-items: center; - button.app-bar-item { - padding: 0; - } - .app-bar-item { - cursor: pointer; - padding: 0 30px; - color: @tungsten-60; - font-size: 18px; - a { - color: inherit; - } - &.active { - color: white; - } - } -} - -@media screen and (min-width: 901px) { - header.ant-layout-header.App-Bar { - width: 100% !important; - } -} -@media screen and (max-width: 1200px) { - - .app-bar-item.logo { - position: relative; - left: 0; - } - .app-bar-item.app-right{ - position: relative; - left: 0; - padding: 0; - } -} -@media screen and (max-width: 900px) { - header.ant-layout-header.App-Bar { - position: fixed; - transition: ease-in-out 0.5s; - width: 0; - max-width: 240px; - height: 100%; - flex-direction: column; - justify-content: flex-start !important; - padding: 0; - .nav-burger { - display: inline-block; - left: 30px; - position: relative; - transition: ease-in-out 0.5s; - z-index: 10; - } - .app-bar-inner { - //opacity: 0; - left: -100px; - position: relative; - transition: ease-in-out 0.5s; - flex-direction: column; - } - background: #06101a; - & > .nav-burger.mobile-active { - width: 30px; - position: relative; - left: 0; - } - - .app-bar-inner.mobile-active { - left: 0px; - } - } -} diff --git a/packages/bridge/src/components/AppBar/index.tsx b/packages/bridge/src/components/AppBar/index.tsx deleted file mode 100644 index def20fb..0000000 --- a/packages/bridge/src/components/AppBar/index.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import React, { useCallback, useEffect, useState } from 'react'; -import './index.less'; -import { Link, useLocation } from 'react-router-dom'; -import { - MenuFoldOutlined, - MenuUnfoldOutlined, - SettingOutlined, -} from '@ant-design/icons'; -import { Button, Popover } from 'antd'; -import { LABELS } from '../../constants'; -import { Settings } from '@oyster/common'; - -export const AppBar = (props: { isRoot?: boolean }) => { - const [showMobileMenu, setShowMobileMenu] = useState(false); - const location = useLocation(); - - const isActiveClass = useCallback( - (lookupClass: string) => { - return location.pathname.includes(lookupClass) ? 'active' : ''; - }, - [location], - ); - - useEffect(() => { - const header = document.getElementById('app-header'); - if (header) { - header.style.width = showMobileMenu ? '100%' : '0'; - } - }, [showMobileMenu, document.body.offsetWidth]); - - return ( - <> - setShowMobileMenu(!showMobileMenu)} - > - {showMobileMenu ? ( - - ) : ( - - )} - -

- {!props.isRoot && ( -
- - logo-bar - -
- )} -
- Bridge -
- {/*
*/} - {/* FAQ*/} - {/*
*/} -
- Proof-of-Assets -
-
- Help -
- {!props.isRoot && ( - } - trigger="click" - > -
- - ); -}; diff --git a/packages/bridge/src/components/AssetsTable/index.less b/packages/bridge/src/components/AssetsTable/index.less deleted file mode 100644 index bbd02f1..0000000 --- a/packages/bridge/src/components/AssetsTable/index.less +++ /dev/null @@ -1,45 +0,0 @@ -@import "_colors"; - -#recent-tx-container { - max-width: 70%; - margin: auto; - padding-bottom: 70px; - .description-text { - color: @tungsten-60 - } - .ant-table-pagination.ant-pagination { - margin: 16px 100px; - } - .ant-table { - thead { - tr > th.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - } - tbody > tr:nth-child(even) > td.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - tbody > tr:nth-child(odd) > td.ant-table-cell { - background-color: @tungsten-50; - border: none; - } - } -} - -@media screen and (max-width: 900px) { - - #recent-tx-container { - max-width: 100%; - } -} - - -@media screen and (max-width: 1200px) { - - #recent-tx-container { - max-width: 90%; - } - -} diff --git a/packages/bridge/src/components/AssetsTable/index.tsx b/packages/bridge/src/components/AssetsTable/index.tsx deleted file mode 100644 index b5c79dd..0000000 --- a/packages/bridge/src/components/AssetsTable/index.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { Table } from 'antd'; -import React from 'react'; - -import './index.less'; -import { Link } from 'react-router-dom'; -import { TokenDisplay } from '../../components/TokenDisplay'; -import { toChainSymbol } from '../../contexts/chainPair'; -import { formatUSD, shortenAddress } from '@oyster/common'; -import { useWormholeAccounts } from '../../hooks/useWormholeAccounts'; - -export const AssetsTable = () => { - const { - loading: loadingLockedAccounts, - externalAssets, - totalInUSD, - } = useWormholeAccounts(); - - const columns = [ - { - title: 'Symbol', - dataIndex: 'symbol', - key: 'symbol', - render(text: string, record: any) { - return { - props: { - style: {}, - }, - children: ( - - - {record.logo && ( - - )}{' '} - {record.symbol} - - - ), - }; - }, - }, - { - title: 'Name', - dataIndex: 'name', - key: 'name', - }, - { - title: 'Amount', - dataIndex: 'amount', - key: 'amount', - }, - { - title: 'Amount ($)', - dataIndex: 'amountInUSD', - key: 'amountInUSD', - }, - { - title: 'Price', - dataIndex: 'price', - width: 100, - key: 'price', - render(text: string, record: any) { - return { - props: { - style: { textAlign: 'right' }, - }, - children: record.price ? formatUSD.format(record.price) : '--', - }; - }, - }, - { - title: 'Asset Address', - dataIndex: 'address', - key: 'address', - render(text: string, record: any) { - return { - props: { - style: {}, - }, - children: ( -
- {shortenAddress(text, 6)} - - ), - }; - }, - }, - { - title: 'Wrapped Address', - dataIndex: 'mintKey', - key: 'mintKey', - render(text: string, record: any) { - return { - props: { - style: {}, - }, - children: ( - - {shortenAddress(text, 6)} - - ), - }; - }, - }, - ]; - - return ( -
-
Total Value Locked
-
- {formatUSD.format(totalInUSD)} -
- a.name)} - columns={columns} - loading={loadingLockedAccounts} - /> - - ); -}; diff --git a/packages/bridge/src/components/CurrentUserWalletBadge/index.tsx b/packages/bridge/src/components/CurrentUserWalletBadge/index.tsx deleted file mode 100644 index f7ed091..0000000 --- a/packages/bridge/src/components/CurrentUserWalletBadge/index.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -import { shortenAddress, useWallet } from '@oyster/common'; - -export const CurrentUserWalletBadge = (props: { showDisconnect?: boolean }) => { - const { wallet, publicKey, disconnect } = useWallet(); - - if (!wallet || !publicKey) { - return null; - } - - return ( -
-
- {'icon'} - {shortenAddress(`${publicKey}`)} - {props.showDisconnect && ( - disconnect()}> - X - - )} -
-
- ); -}; diff --git a/packages/bridge/src/components/EthereumConnect/index.less b/packages/bridge/src/components/EthereumConnect/index.less deleted file mode 100644 index bd16d9c..0000000 --- a/packages/bridge/src/components/EthereumConnect/index.less +++ /dev/null @@ -1,58 +0,0 @@ -@import "_colors"; - -.ant-btn-group.ant-dropdown-button { - button { - text-transform: uppercase; - color: white; - background: #E67828; - //border-radius: 8px; - height: 40px; - } - button:first-child { - width: 134px; - border-bottom-left-radius: 8px !important; - border-top-left-radius: 8px !important; - } - button:last-child { - border-bottom-right-radius: 8px !important; - border-top-right-radius: 8px !important; - } -} - -.eth-connect { - display: flex; - justify-content: center; - & > button { - color: white; - background: #E67828; - border-radius: 8px; - height: 40px; - width: 166px; - } - - .eth-address { - position: relative; - width: 183px; - height: 48px; - background: @tungsten-100; - border: 2px solid #193650; - box-sizing: border-box; - border-radius: 8px; - - font-size: 16px; - line-height: 21px; - color: #03E1FF; - display: flex; - justify-content: space-evenly; - align-items: center; - } - .disconnect { - cursor: pointer; - color: #193650; - font-size: 16px; - &:hover { - transform: scale(1.3); - transition: ease-out 0.5s; - } - } -} diff --git a/packages/bridge/src/components/EthereumConnect/index.tsx b/packages/bridge/src/components/EthereumConnect/index.tsx deleted file mode 100644 index c119e8d..0000000 --- a/packages/bridge/src/components/EthereumConnect/index.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import { Button, Dropdown, Menu } from 'antd'; -import './index.less'; - -import { useCorrectNetwork } from '../../hooks/useCorrectNetwork'; -import { shortenAddress } from '@oyster/common'; -import { useEthereum } from '../../contexts'; - -export const EthereumConnect = () => { - const { - accounts, - onConnectEthereum, - connected, - walletProvider, - select, - disconnect, - } = useEthereum(); - const { hasCorrespondingNetworks } = useCorrectNetwork(); - - const menu = ( - - - Change Eth Wallet - - - ); - - return ( -
- {connected ? ( - hasCorrespondingNetworks ? ( -
- {'ethereum-icon'} - {shortenAddress(accounts[0], 4)} - disconnect()}> - X - -
- ) : ( - - ) - ) : !!walletProvider ? ( - onConnectEthereum && onConnectEthereum()} - overlay={menu} - > - CONNECT - - ) : ( - - )} -
- ); -}; diff --git a/packages/bridge/src/components/Footer/index.less b/packages/bridge/src/components/Footer/index.less deleted file mode 100644 index 611183b..0000000 --- a/packages/bridge/src/components/Footer/index.less +++ /dev/null @@ -1,3 +0,0 @@ -.footer { - margin: 20px 0 20px 0; -} diff --git a/packages/bridge/src/components/Footer/index.tsx b/packages/bridge/src/components/Footer/index.tsx deleted file mode 100644 index 50410cf..0000000 --- a/packages/bridge/src/components/Footer/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { GithubOutlined, TwitterOutlined } from '@ant-design/icons'; -import { SecurityAuditButton } from '../SecurityAuditButton'; -import { Button } from 'antd'; - -import './index.less'; - -export const Footer = () => { - return ( -
- - - -
- ); -}; diff --git a/packages/bridge/src/components/Input/index.tsx b/packages/bridge/src/components/Input/index.tsx deleted file mode 100644 index e3365cb..0000000 --- a/packages/bridge/src/components/Input/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './input'; diff --git a/packages/bridge/src/components/Input/input.tsx b/packages/bridge/src/components/Input/input.tsx deleted file mode 100644 index 5e83ac2..0000000 --- a/packages/bridge/src/components/Input/input.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { - ConnectButton, - CurrentUserBadge, - NumericInput, - useMint, - useUserAccounts, - useWallet, -} from '@oyster/common'; -import './style.less'; -import { TokenSelectModal } from '../TokenSelectModal'; -import { ASSET_CHAIN, chainToName } from '../../utils/assets'; -import { TokenChain } from '../TokenDisplay/tokenChain'; -import { EthereumConnect } from '../EthereumConnect'; -import { CurrentUserWalletBadge } from '../CurrentUserWalletBadge'; - -export function Input(props: { - title: string; - balance?: number; - asset?: string; - chain?: ASSET_CHAIN; - setAsset: (asset: string) => void; - amount?: number | null; - onChain: (chain: ASSET_CHAIN) => void; - onInputChange: (value: number | undefined) => void; - className?: string; -}) { - const { connected } = useWallet(); - const [lastAmount, setLastAmount] = useState(''); - - return ( -
-
{props.title}
-
- - {chainToName(props.chain)} -
- props.onInputChange && props.onInputChange(props.balance) - } - > - {props.balance?.toFixed(6)} -
-
-
- { - if (props.onInputChange && parseFloat(val) !== props.amount) { - if (!val || !parseFloat(val)) props.onInputChange(undefined); - else props.onInputChange(parseFloat(val)); - } - setLastAmount(val); - }} - style={{ - boxShadow: 'none', - borderColor: 'transparent', - outline: 'transparent', - }} - placeholder="0.00" - /> -
- props.setAsset(token)} - onChain={(chain: ASSET_CHAIN) => props.onChain(chain)} - asset={props.asset} - chain={props.chain} - showIconChain={false} - /> -
-
- {props.chain === ASSET_CHAIN.Ethereum ? ( - - ) : connected ? ( - - ) : ( - - )} -
- ); -} diff --git a/packages/bridge/src/components/Input/style.less b/packages/bridge/src/components/Input/style.less deleted file mode 100644 index b82b9d2..0000000 --- a/packages/bridge/src/components/Input/style.less +++ /dev/null @@ -1,228 +0,0 @@ -@import "_colors"; - -.multichain-option { - display: flex; - align-items: center; -} - -.multichain-option-content { - display: flex; - align-items: center; -} - -.multichain-option-name { - display: flex; - flex-direction: column; -} - -.ccy-input { - margin-top: 10px; - margin-bottom: 10px; - .ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector { - height: 70px; - } - .ant-select-selector, - .ant-select-selector:focus, - .ant-select-selector:active { - border-color: transparent !important; - box-shadow: none !important; - align-items: center; - } - .ant-select-selection-search { - align-items: center; - display: flex; - } - .ant-select-selection-item { - display: flex; - height: 60px; - - .token-name { - display: none; - } - .token-balance { - display: none; - } - } -} - -.from-input .token-chain-logo{ - position: absolute; - right: 20px; -} -.to-input .token-chain-logo{ - position: absolute; - right: 40px; -} -.token-balance { - color: grey; -} - -.ccy-input-header { - display: grid; - - grid-template-columns: repeat(2, 1fr); - grid-column-gap: 10px; - - -webkit-box-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - align-items: center; - flex-direction: row; - padding: 10px 20px 0px 20px; -} - -.ccy-input-header-left { - width: 100%; - box-sizing: border-box; - margin: 0px; - min-width: 0px; - display: flex; - padding: 0px; - -webkit-box-align: center; - align-items: center; - width: fit-content; -} - -.ccy-input-header-right { - width: 100%; - display: flex; - flex-direction: row; - -webkit-box-align: center; - align-items: center; - justify-self: flex-end; - justify-content: flex-end; - -} - -.ant-select-dropdown { - width: 150px !important; -} - -.dashed-input-container { - width: 342px; - height: 342px; - - border: 4px dotted; - border-radius: 50%; - box-sizing: border-box; - &.left { - border-color: #6E1080; - } - &.right { - border-color: #008051; - } - .input-header{ - margin-top: 26px; - display: block; - text-align: center; - font-style: normal; - font-weight: normal; - font-size: 16px; - line-height: 21px; - } - .input-chain{ - margin-top: 13px; - font-style: normal; - font-weight: normal; - font-size: 20px; - line-height: 24px; - .input-icon { - margin-right: 10px; - } - .balance { - margin-top: 22px; - font-size: 12px; - line-height: 16px; - color: @tungsten-60 - } - } - - .input-container{ - position: relative; - margin: 16px -36px 34px -36px ; - height: 66px; - - background-image: url('/transfer/input.svg'); - background-size: 100% 66px; - background-repeat: no-repeat; - - input.input { - padding: 0 36px 0 36px; - font-size: 32px; - line-height: 39px; - ::placeholder { - color: @tungsten-40; - } - height: 100%; - } - .input-select { - display: flex; - align-content: center; - flex-direction: row; - position: absolute; - right: 11px; - top: 7px; - height: 52px; - width: 161px; - padding: 0 19px; - background-image: url(/transfer/select-bg.svg); - background-size: 100% 52px; - background-repeat: no-repeat; - .token-chain-logo { - position: relative; - width: auto; - height: auto; - display: flex; - } - .token-logo { - width: 32px; - height: 32px; - } - } - } -} - -.dashed-input-container { - & > button.ant-btn:not(.ant-dropdown-trigger) { - text-transform: uppercase; - color: white; - width: 166px; - font-size: 14px; - background: #E67828; - border-radius: 8px; - height: 40px; - } -} - -.wallet-wrapper { - display: flex; - justify-content: center; - padding: 0; - - .wallet-key { - position: relative; - width: 183px; - height: 48px; - background: @tungsten-100; - border: 2px solid #193650; - box-sizing: border-box; - border-radius: 8px; - padding: 0; - margin: 0; - font-size: 16px; - line-height: 21px; - color: #03E1FF; - display: flex; - justify-content: space-evenly; - align-items: center; - .disconnect { - cursor: pointer; - color: #193650; - font-size: 16px; - &:hover { - transform: scale(1.3); - transition: ease-out 0.5s; - } - } - } -} diff --git a/packages/bridge/src/components/Layout/index.less b/packages/bridge/src/components/Layout/index.less deleted file mode 100644 index a210227..0000000 --- a/packages/bridge/src/components/Layout/index.less +++ /dev/null @@ -1,5 +0,0 @@ -.metamask-icon { - background-position: 50%; - background-repeat: no-repeat; - background-image: url(/assets/metamask.svg); -} \ No newline at end of file diff --git a/packages/bridge/src/components/Layout/index.tsx b/packages/bridge/src/components/Layout/index.tsx deleted file mode 100644 index 02fe182..0000000 --- a/packages/bridge/src/components/Layout/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import './../../App.less'; -import './index.less'; -import { Layout } from 'antd'; -import { useLocation } from 'react-router-dom'; - -import { LABELS } from '../../constants'; -import { AppBar } from '../AppBar'; - -const { Header, Content, Footer } = Layout; - -export const AppLayout = React.memo((props: any) => { - const location = useLocation(); - const isRoot = location.pathname === '/'; - - return ( - <> -
- -
- -
- - {props.children} - -
-
-
-
-
- - ); -}); diff --git a/packages/bridge/src/components/RecentTransactionsTable/index.less b/packages/bridge/src/components/RecentTransactionsTable/index.less deleted file mode 100644 index c1e9885..0000000 --- a/packages/bridge/src/components/RecentTransactionsTable/index.less +++ /dev/null @@ -1,54 +0,0 @@ -@import "_colors"; - -#recent-tx-container { - max-width: 70%; - margin: auto; - padding-bottom: 70px; - .completed { - color: @surge-30; - } - .failed { - color: @tungsten-60; - } - .error { - color: #6E1080; - } - .description-text { - color: @tungsten-60 - } - .ant-table-pagination.ant-pagination { - margin: 16px 100px; - } - .ant-table { - thead { - tr > th.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - } - tbody > tr:nth-child(even) > td.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - tbody > tr:nth-child(odd) > td.ant-table-cell { - background-color: @tungsten-50; - border: none; - } - } -} - -@media screen and (max-width: 900px) { - - #recent-tx-container { - max-width: 100%; - } -} - - -@media screen and (max-width: 1200px) { - - #recent-tx-container { - max-width: 90%; - } - -} diff --git a/packages/bridge/src/components/RecentTransactionsTable/index.tsx b/packages/bridge/src/components/RecentTransactionsTable/index.tsx deleted file mode 100644 index 86466f7..0000000 --- a/packages/bridge/src/components/RecentTransactionsTable/index.tsx +++ /dev/null @@ -1,349 +0,0 @@ -import { Button, Table, notification } from 'antd'; -import React, { useEffect, useMemo, useState } from 'react'; - -import './index.less'; - -import TimeAgo from 'javascript-time-ago'; -import en from 'javascript-time-ago/locale/en'; - -import { Link } from 'react-router-dom'; -import { TokenDisplay } from '../../components/TokenDisplay'; -import { toChainSymbol } from '../../contexts/chainPair'; -import { - formatUSD, - shortenAddress, - Identicon, - programIds, - TokenAccount, -} from '@oyster/common'; -import { useWormholeTransactions } from '../../hooks/useWormholeTransactions'; -import { ASSET_CHAIN } from '../../utils/assets'; -import { TokenChain } from '../TokenDisplay/tokenChain'; -import bs58 from 'bs58'; -import { SyncOutlined } from '@ant-design/icons'; -import { typeToIcon } from '../Transfer'; -import { ProgressUpdate } from '@solana/bridge-sdk'; -import { WormholeFactory } from '@solana/bridge-sdk'; -import { useEthereum } from '../../contexts'; -import { useBridge } from '../../contexts/bridge'; - -TimeAgo.addDefaultLocale(en); -const timeAgo = new TimeAgo('en-US'); - -export const RecentTransactionsTable = (props: { - showUserTransactions?: boolean; - tokenAccounts: TokenAccount[]; -}) => { - const { loading: loadingTransfers, transfers } = useWormholeTransactions( - props.tokenAccounts, - ); - const { provider } = useEthereum(); - const bridge = useBridge(); - - const [completedVAAs, setCompletedVAAs] = useState>([]); - - const baseColumns = [ - { - title: '', - dataIndex: 'logo', - key: 'logo', - render(text: string, record: any) { - return { - props: { style: {} }, - children: record.logo ? ( - - - {record.logo && ( - - )} - - - ) : ( -
- - -
- ), - }; - }, - }, - { - title: 'Asset', - dataIndex: 'symbol', - key: 'symbol', - render(text: string, record: any) { - const urlText = record.symbol || record.address; - return { - props: { style: {} }, - children: - record.lockup.assetChain === ASSET_CHAIN.Solana ? ( - - {record.symbol || shortenAddress(urlText, 5)} - - ) : ( - - {record.symbol || shortenAddress(urlText, 5)} - - ), - }; - }, - }, - { - title: 'Tokens moved', - dataIndex: 'amount', - key: 'amount', - }, - { - title: '$, value', - dataIndex: 'value', - key: 'value', - render(text: string, record: any) { - return { - props: { style: {} }, - children: record.value ? formatUSD.format(record.value) : '--', - }; - }, - }, - { - title: 'TX hash', - dataIndex: 'txhash', - key: 'txhash', - render(text: string, record: any) { - return { - props: { style: {} }, - children: ( - - {shortenAddress(text, 6)} - - ), - }; - }, - }, - { - title: 'Date', - dataIndex: 'date', - key: 'date', - render(text: string, record: any) { - return { - props: { style: {} }, - children: timeAgo.format(new Date(record.date * 1000)), - }; - }, - }, - ]; - - const userColumns = useMemo( - () => [ - ...baseColumns, - { - title: 'Status', - dataIndex: 'status', - key: 'status', - render(text: string, record: any) { - const status = - completedVAAs.indexOf(record.txhash) > 0 - ? 'Completed' - : record.status; - return { - props: { style: {} }, - children: ( - <> - - {status} - - {status === 'Failed' ? ( -
b.date - a.date)} - columns={userColumns} - loading={loadingTransfers} - /> - - ); -}; diff --git a/packages/bridge/src/components/SecurityAuditButton/index.less b/packages/bridge/src/components/SecurityAuditButton/index.less deleted file mode 100644 index 20a3359..0000000 --- a/packages/bridge/src/components/SecurityAuditButton/index.less +++ /dev/null @@ -1,7 +0,0 @@ -.audit-button { - display: inline-block; - position: relative; - width: auto; - height: auto; - margin: 0 20px 0 20px; -} diff --git a/packages/bridge/src/components/SecurityAuditButton/index.tsx b/packages/bridge/src/components/SecurityAuditButton/index.tsx deleted file mode 100644 index 3670076..0000000 --- a/packages/bridge/src/components/SecurityAuditButton/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { Button } from 'antd'; - -import './index.less'; - -export const SecurityAuditButton = () => { - return ( - - ); -}; diff --git a/packages/bridge/src/components/Settings/index.tsx b/packages/bridge/src/components/Settings/index.tsx deleted file mode 100644 index 44ede05..0000000 --- a/packages/bridge/src/components/Settings/index.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { Button, Select } from 'antd'; -import { contexts, useWallet } from '@oyster/common'; - -const { ENDPOINTS, useConnectionConfig } = contexts.Connection; - -export const Settings = () => { - const { connected, disconnect } = useWallet(); - const { endpoint, setEndpoint } = useConnectionConfig(); - - return ( - <> -
- Network:{' '} - - {connected && ( - - )} -
- - ); -}; diff --git a/packages/bridge/src/components/TokenDisplay/index.tsx b/packages/bridge/src/components/TokenDisplay/index.tsx deleted file mode 100644 index 04dbcdd..0000000 --- a/packages/bridge/src/components/TokenDisplay/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { useConnectionConfig } from '@oyster/common'; -import { TokenInfo } from '@solana/spl-token-registry'; -import { debug } from 'console'; -import React from 'react'; -import { useEthereum } from '../../contexts'; -import { ASSET_CHAIN } from '../../utils/assets'; -import './style.less'; -import { TokenChain } from './tokenChain'; - -export const TokenDisplay = ({ - asset, - chain, - token, - logo, -}: { - asset?: string; - chain?: ASSET_CHAIN; - token?: TokenInfo; - logo?: string; -}) => { - return ( -
- - {chain && } -
- ); -}; diff --git a/packages/bridge/src/components/TokenDisplay/style.less b/packages/bridge/src/components/TokenDisplay/style.less deleted file mode 100644 index abbc561..0000000 --- a/packages/bridge/src/components/TokenDisplay/style.less +++ /dev/null @@ -1,29 +0,0 @@ -.token-chain-logo { - position: relative; - width: 60px; - height: 60px; - display: flex; - .chain-logo { - - position: absolute; - bottom: 3px; - right: 3px; - } -} - -.token-logo { - border: 1px solid hsla(0,0%,50.2%,.5); - border-radius: 50px; - background: #fff; - width: 50px; - height: 50px; -} - -.chain-logo { - border: 1px solid hsla(0, 0%, 50.2%, 0.5); - border-radius: 20px; - background: #fff; - width: 30px; - height: 30px; - -} diff --git a/packages/bridge/src/components/TokenDisplay/tokenChain.tsx b/packages/bridge/src/components/TokenDisplay/tokenChain.tsx deleted file mode 100644 index c98617b..0000000 --- a/packages/bridge/src/components/TokenDisplay/tokenChain.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { ASSET_CHAIN } from '../../utils/assets'; - -export const TokenChain = (props: { - chain?: ASSET_CHAIN; - className?: string; -}) => { - const { chain, className } = props; - return ( - - ); -}; diff --git a/packages/bridge/src/components/TokenSelectModal/index.tsx b/packages/bridge/src/components/TokenSelectModal/index.tsx deleted file mode 100644 index ffd2070..0000000 --- a/packages/bridge/src/components/TokenSelectModal/index.tsx +++ /dev/null @@ -1,175 +0,0 @@ -import React, { useMemo, useRef, useState } from 'react'; -import List from 'react-virtualized/dist/commonjs/List'; -import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer'; -import _ from 'lodash'; -import './style.less'; -import { Input, Modal } from 'antd'; -import { useEthereum } from '../../contexts'; -import { TokenDisplay } from '../TokenDisplay'; -import { ASSET_CHAIN } from '../../utils/assets'; -import { - useConnectionConfig, - useUserAccounts, - useWallet -} from '@oyster/common'; -import { TokenInfo } from '@solana/spl-token-registry'; - -export const TokenSelectModal = (props: { - onSelectToken: (token: string) => void; - onChain: (chain: ASSET_CHAIN) => void; - asset?: string; - chain?: ASSET_CHAIN; - showIconChain?: boolean; -}) => { - const { tokenMap: ethTokenMap } = useEthereum(); - const { connected } = useWallet(); - const { tokenMap } = useConnectionConfig() - const {userAccounts} = useUserAccounts() - const [isModalVisible, setIsModalVisible] = useState(false); - const [search, setSearch] = useState(''); - - const inputRef = useRef(null); - - const tokenList = useMemo(() => { - const tokens: any [] = []; - if (connected && userAccounts.length) { - userAccounts.forEach(async acc => { - const token = tokenMap.get(acc.info.mint.toBase58()) - if (token) { - if (!token.name.toLowerCase().includes("wormhole")){ - tokens.push({token, chain: ASSET_CHAIN.Ethereum}) - } else { - if (token.extensions?.address) { - const ethToken = ethTokenMap.get(token.extensions.address.toLowerCase()) - if (ethToken){ - const name = `${ethToken.name} (Wormhole)`; - tokens.push({token: {...ethToken, name}, chain: ASSET_CHAIN.Solana}) - } else { - console.log("Wormhole token without contract info: ", token) - } - } - } - } - }) - } - return tokens; - }, [connected, userAccounts.length]); - - const showModal = () => { - if (inputRef && inputRef.current) { - setTimeout(() => inputRef.current?.focus(), 300); - } - setIsModalVisible(true); - }; - - const hideModal = () => { - setIsModalVisible(false); - }; - const firstToken = useMemo(() => { - return tokenList.find((el: any) => el.token.address === props.asset); - }, [tokenList, props.asset]); - - const delayedSearchChange = _.debounce(val => { - setSearch(val); - }); - - const getTokenInfo = (token: TokenInfo | undefined, chain: ASSET_CHAIN | undefined) => { - let name = token?.name || ''; - let symbol = token?.symbol || ''; - return { name, symbol }; - } - - const rowRender = (rowProps: { index: number; key: string; style: any }) => { - const tokenObject = tokenList[rowProps.index] - const token = tokenObject.token; - const mint = token.address; - const chain = tokenObject.chain - const { name , symbol } = getTokenInfo(token, chain); - return ( -
{ - props.onSelectToken(mint); - props.onChain(chain); - hideModal(); - }} - style={{ - ...rowProps.style, - cursor: 'pointer', - height: '70px', - top: `${rowProps.style.top}px`, - }} - > -
- -
- {symbol} - {name} -
-
-
- ); - }; - - const { name , symbol } = getTokenInfo(firstToken?.token, props.chain); - return ( - <> -
showModal()} - style={{ cursor: 'pointer' }} - > -
- -
-
{symbol}
- -
- hideModal()} - footer={null} - className={'token-select-modal'} - > - { - e.persist(); - delayedSearchChange(e.target.value); - }} - /> -
- - {({ width, height }) => ( - - )} - -
-
- - ); -}; diff --git a/packages/bridge/src/components/TokenSelectModal/style.less b/packages/bridge/src/components/TokenSelectModal/style.less deleted file mode 100644 index 7d71c0c..0000000 --- a/packages/bridge/src/components/TokenSelectModal/style.less +++ /dev/null @@ -1,51 +0,0 @@ -@import "_colors"; -.input-token-search { - margin: 20px 0 20px 0; -} -.assets-scroll { - height: 60vh; - overflow: auto; -} -.multichain-option:hover { - background-color: rgba(255, 255, 255, 0.08); -} -.ant-modal-body { - ::-webkit-scrollbar-track { - border-radius: 5px; - background-color: transparent; - } - ::-webkit-scrollbar { - width: 10px; - background-color: transparent; - } - ::-webkit-scrollbar-thumb { - border-radius: 5px; - height: 50px; - -webkit-box-shadow: inset 0 0 30px rgba(0,0,0,.3); - background-color: #555; - } -} - -.token-select-modal .ant-modal-body { - height: 80vh; -} - -.ReactVirtualized__Grid.ReactVirtualized__List:focus { - outline: none !important; -} - -.multichain-option { - .multichain-option-symbol { - margin-left: 10px; - font-style: normal; - font-weight: 500; - font-size: 16px; - line-height: 21px; - color: @tungsten-60; - } - .down-arrow{ - margin-left: 10px; - width: 15px; - height: 11px; - } -} diff --git a/packages/bridge/src/components/Transfer/index.tsx b/packages/bridge/src/components/Transfer/index.tsx deleted file mode 100644 index 8938b8e..0000000 --- a/packages/bridge/src/components/Transfer/index.tsx +++ /dev/null @@ -1,318 +0,0 @@ -import React, { useEffect, useMemo, useState } from 'react'; -import { notification, Spin, Button, Popover } from 'antd'; -import { contexts, useUserAccounts, WalletSigner, useWallet } from '@oyster/common'; -import { Input } from '../Input'; - -import './style.less'; -import { ASSET_CHAIN, chainToName } from '../../utils/assets'; -import { - displayBalance, - fromSolana, - ProgressUpdate, - toSolana, - TransferRequest, -} from '@solana/bridge-sdk'; -import { useEthereum } from '../../contexts'; -import { TokenDisplay } from '../TokenDisplay'; -import { useTokenChainPairState } from '../../contexts/chainPair'; -import { LABELS } from '../../constants'; -import { useCorrectNetwork } from '../../hooks/useCorrectNetwork'; -import { RecentTransactionsTable } from '../RecentTransactionsTable'; -import { useBridge } from '../../contexts/bridge'; -import { WarningOutlined } from '@ant-design/icons'; - -const { useConnection } = contexts.Connection; - -export const typeToIcon = (type: string, isLast: boolean) => { - const style: React.CSSProperties = { marginRight: 5 }; - switch (type) { - case 'user': - return 🪓 ; - case 'done': - return ; - case 'error': - return ; - case 'wait': - return isLast ? : ; - default: - return null; - } -}; - -export const Transfer = () => { - const connection = useConnection(); - const bridge = useBridge(); - const wallet = useWallet(); - const { provider, tokenMap } = useEthereum(); - const { userAccounts } = useUserAccounts(); - const hasCorrespondingNetworks = useCorrectNetwork(); - const { - A, - B, - mintAddress, - setMintAddress, - setLastTypedAccount, - } = useTokenChainPairState(); - - const [popoverVisible, setPopoverVisible] = useState(true) - - const [request, setRequest] = useState({ - from: ASSET_CHAIN.Ethereum, - to: ASSET_CHAIN.Solana, - }); - - useEffect(() => { - if (mintAddress && !request.asset) { - setRequest({ - ...request, - asset: mintAddress, - }); - } - }, [mintAddress]); - - const setAssetInformation = async (asset: string) => { - setMintAddress(asset); - }; - - useEffect(() => { - setRequest({ - ...request, - amount: A.amount, - asset: mintAddress, - from: A.chain, - to: B.chain, - info: A.info, - }); - }, [A, B, mintAddress, A.info]); - - const tokenAccounts = useMemo( - () => - userAccounts.filter(u => u.info.mint.toBase58() === request.info?.mint), - [request.info?.mint], - ); - - return ( - <> -
- setAssetInformation(asset)} - chain={A.chain} - amount={A.amount} - onChain={(chain: ASSET_CHAIN) => { - const from = A.chain; - A.setChain(chain); - if (B.chain === chain) { - B.setChain(from); - } - }} - onInputChange={amount => { - setLastTypedAccount(A.chain); - A.setAmount(amount || 0); - }} - className={'left'} - /> - setPopoverVisible(false)}>x} - content={ - -

This website should be only used to migrate liquidity from Wormhole v1. -
Wormhole is upgrading on-chain contracts to v2 in next 2 weeks.

-

To see the tokens you need to connect both wallets first

-

If your SOL -> ETH transaction is taking more than 1 hour, make sure to
- to look at the recent transactions table below and click on retry Icon
- if the transaction failed

-
} - visible={popoverVisible} - > - -
- setAssetInformation(asset)} - chain={B.chain} - amount={B.amount} - onChain={(chain: ASSET_CHAIN) => { - const to = B.chain; - B.setChain(chain); - if (A.chain === chain) { - A.setChain(to); - } - }} - onInputChange={amount => { - setLastTypedAccount(B.chain); - B.setAmount(amount || 0); - }} - className={'right'} - /> -
- - - - - ); -}; diff --git a/packages/bridge/src/components/Transfer/style.less b/packages/bridge/src/components/Transfer/style.less deleted file mode 100644 index 97796e8..0000000 --- a/packages/bridge/src/components/Transfer/style.less +++ /dev/null @@ -1,123 +0,0 @@ -@import "_colors"; - -.input-card { - display: flex; - flex-direction: column; - align-items: center; - margin-bottom: 10px; -} -.ant-popover-title { - text-align: right; -} -.ant-popover-inner-content { - text-align: center; -} -.swap-button { - border-radius: 2em; - width: 60px; - height: 60px; - font-size: 30px; - top: 150px; - & > span:after { - content: '➤'; - padding-left: 0; - } -} - -.exchange-card { - position: relative; - max-width: 900px; - width: 100%; - margin: 167px auto 150px auto; - display: flex; - justify-content: space-between; -} - -.action-button{ - width: 240px; - height: 64px; - - border-radius: 12px; - border: none; - background-color: @surge-20 !important; - color: white !important; - font-weight: bold; - font-size: 18px; - line-height: 23px; - text-align: center; - letter-spacing: 0.04em; - text-transform: uppercase; - font-feature-settings: 'ss02' on; - -} - -.action-button:hover { - background-color: @surge-30 !important; -} - -.transfer-button{ - display: flex; - - position: absolute; - width: 240px; - height: 64px; - left: calc(50% - 240px/2); - top: 555px; - - border-radius: 12px; - border: none; - align-items: center; - justify-content: center; - background: @surge-20; - color: white; - font-weight: bold; - font-size: 18px; - line-height: 23px; - text-align: center; - letter-spacing: 0.04em; - text-transform: uppercase; - font-feature-settings: 'ss02' on; - &:disabled{ - background: @tungsten-50; - color: #193650; - } -} -div:not(.home-container) { - & > #recent-tx-container{ - width: 100%; - max-width: calc(100% - 388px); - margin: auto; - } -} - -@media screen and (max-width: 1200px){ - .exchange-card { - height: 770px; - width: 100%; - margin: 97px auto 0 auto; - justify-content: space-between; - flex-direction: column; - align-items: center; - } - .transfer-button { - display: flex; - position: relative; - width: 240px; - height: 64px; - left: calc(50% - 240px/2); - top: 30px; - margin-bottom: 100px; - } - .swap-button { - top: 0; - } - div:not(.home-container) > #recent-tx-container { - max-width: calc(100% - 100px); - } - - .swap-button { - & > span:after { - content: "⇅"; - } - } -} diff --git a/packages/bridge/src/components/Wormhole/Camera.tsx b/packages/bridge/src/components/Wormhole/Camera.tsx deleted file mode 100644 index db93f3b..0000000 --- a/packages/bridge/src/components/Wormhole/Camera.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import * as React from 'react'; -import { PerspectiveCamera } from '@react-three/drei'; -import { hasWindow } from './Utils'; - -/** - * Creates the perspective Camera for our WormholeCanvas. - * - * @returns {JSX.Element} - * @constructor - */ -const Camera = () => { - const cameraAspect = hasWindow ? window.innerWidth / window.innerHeight : 1; - return ( - - ); -}; - -export default Camera; diff --git a/packages/bridge/src/components/Wormhole/Utils.ts b/packages/bridge/src/components/Wormhole/Utils.ts deleted file mode 100644 index 40e5fbc..0000000 --- a/packages/bridge/src/components/Wormhole/Utils.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { - BufferAttribute, - BufferGeometry, - Color, - InterleavedBufferAttribute, - TorusGeometry, -} from 'three'; -import { BufferGeometryUtils } from 'three/examples/jsm/utils/BufferGeometryUtils'; - -/** - * Tests if we are in a browser and have a window object. - * @type {boolean} - */ -export const hasWindow = - typeof window !== `undefined` && typeof window.document !== `undefined`; - -/** - * Takes a TorusGeometry and calculates positions & colors of individual particles. - * - * @param particleSize - * @returns {[]} - */ -export const calculateTorusProperties = (particleSize: number): any => { - let bufferGeometry: BufferGeometry = new TorusGeometry(60, 45, 60, 80); - - // if normal and uv attributes are not removed, - // mergeVertices() can't consolidate identical vertices - // with different normal/uv data - - bufferGeometry.deleteAttribute('normal'); - bufferGeometry.deleteAttribute('uv'); - - bufferGeometry = BufferGeometryUtils.mergeVertices(bufferGeometry); - - const positionAttribute: - | BufferAttribute - | InterleavedBufferAttribute = bufferGeometry.getAttribute('position'); - - const colors: number[] | undefined = []; - const sizes = []; - - const color = new Color(); - - for (let i = 0, l = positionAttribute.count; i < l; i++) { - color.setHSL(0.01 + 0.1 * (i / l), 0.5, 1.0); - color.toArray(colors, i * 3); - sizes[i] = particleSize * 0.3; - } - - return [positionAttribute, colors, sizes]; -}; - -export const vertexShader = ` - attribute float size; - attribute vec3 customColor; - - varying vec3 vColor; - - void main() { - vColor = customColor; - vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); - gl_PointSize = size * ( 300.0 / -mvPosition.z ); - gl_Position = projectionMatrix * mvPosition; - } -`; - -export const fragmentShader = ` - uniform vec3 color; - uniform sampler2D pointTexture; - - varying vec3 vColor; - - void main() { - gl_FragColor = vec4( color * vColor, 1.0 ); - gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord ); - if ( gl_FragColor.a < ALPHATEST ) discard; - } -`; diff --git a/packages/bridge/src/components/Wormhole/WormholeCanvas.tsx b/packages/bridge/src/components/Wormhole/WormholeCanvas.tsx deleted file mode 100644 index f8e0666..0000000 --- a/packages/bridge/src/components/Wormhole/WormholeCanvas.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import * as React from 'react'; -import { Canvas } from 'react-three-fiber'; -import Camera from './Camera'; -import WormholeGeometry from './WormholeGeometry'; - -/** - * Three.js wormhole component. - * - * @returns {JSX.Element} - * @constructor - */ -const WormholeCanvas = ({ - onCreated, - rotate, -}: { - onCreated: any; - rotate?: boolean; -}) => { - return ( - - - - - - - ); -}; - -export default WormholeCanvas; diff --git a/packages/bridge/src/components/Wormhole/WormholeGeometry.tsx b/packages/bridge/src/components/Wormhole/WormholeGeometry.tsx deleted file mode 100644 index f111d42..0000000 --- a/packages/bridge/src/components/Wormhole/WormholeGeometry.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import * as React from 'react'; -import { Color, Float32BufferAttribute } from 'three'; -import type { Mesh, BufferGeometry } from 'three'; -import { useTexture } from '@react-three/drei'; -import { useFrame, useUpdate } from 'react-three-fiber'; - -import { - calculateTorusProperties, - fragmentShader, - vertexShader, -} from './Utils'; -import disc from './disc.png'; - -// The individual "particle size". -const PARTICLE_SIZE = 10; - -/** - * Three JS Point Geometry calculating points around a Torus. - * - * @returns {JSX.Element} - * @constructor - */ -const WormholeGeometry = ({ rotate }: { rotate?: boolean }) => { - const mesh = React.useRef(); - const pointTexture = useTexture(disc); - - // The uniforms for the shaderMaterial. - const uniforms = React.useMemo( - () => ({ - // Adapt the color of the WormholeCanvas here. - color: { value: new Color('dimgrey') }, - pointTexture: { - value: pointTexture, - }, - }), - [pointTexture], - ); - - // The calculated torus properties. - const [positionAttribute, colors, sizes] = React.useMemo( - () => calculateTorusProperties(PARTICLE_SIZE), - [], - ); - - // Rotate mesh around the y axis every frame. - useFrame(() => { - if (mesh.current) { - // x-Axis defines the "top" we're looking at, try e.g. 30.5 - mesh.current.rotation.x = 30; - if (rotate) { - mesh.current.rotation.z += 0.0005; - } - } - }); - - // Calculate the geometry. - const geometry = useUpdate((geo: BufferGeometry) => { - geo.setAttribute('position', positionAttribute); - geo.setAttribute('customColor', new Float32BufferAttribute(colors, 3)); - geo.setAttribute('size', new Float32BufferAttribute(sizes, 1)); - }, []); - - return ( - - - - - ); -}; - -export default WormholeGeometry; diff --git a/packages/bridge/src/components/Wormhole/disc.png b/packages/bridge/src/components/Wormhole/disc.png deleted file mode 100644 index 92572c6221f356e3541815873e48b8b8373a19a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1399 zcmV--1&I2IP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipe@ z3<40qNoMT;0013nR9JLFZ*6U5Zgc_CX>@2HM@dakWG-a~000Ee zNklQSQbJ?t+H#?ZrC6yRFy?n`2lSB z0c`jIM2Zk7WtU%2C4`rdK(2&bY#uQo#3m;AHHI;sM;E<=CaxO;F;}{>G&Ax!_ulW` z?_3M6Z%mbE+ExF=at%P{5(Ko%65=iiY&d6f1^`Rn=me%zc+JdkmjrGA&$*jj<#HmC z*pEh|uU@`<8J(Y>j{-O$F90YK5zXWuC18Lz0+hgB5CTMWZkS5{WibSMp1jqYJ9>mCk=+lGgSe;ynh{N*~}7tvTOa5x;i z$K!EtZEcA(-_>4>AG$qP~JQZ zKLE^Tv!|(4>V3Vzi^Zb8ySrQULSjr0l%u1gLL!lPdlLjAk%$D~+%yUG$_yx}R4NmX z$6wt50c~wgv|>=g%YcB5-_stUi7EG?mNcjsT>IgrN<}P2f#Lf*8s94-&D4;Wi?G>4-O8><#L(t?d|nDolfg@Q@^mV zP@I^Uh^5o%Z2)lqI{=b&7RqJt+}zym z-rnBd1RMjfPiMfWzgkU{nq`>_KpVp_9bT{Zn?NAYIWRDAKM)AGySloX{C>aH0Nvc& zlp~SI+4}l=etCKM-J3UWQn_62HGl-A{WS^HLWM&9UsY_7a00juz{_!5yW8#Va5|ly z=H})WK@gfWP2*KnwdC{p^FpB@Wipv;Hk(ZYI0A4;{uaRdYT&i@0*;hR6J - !show ? ( - <>{children} - ) : ( - <> - -
{children}
- - ); - -export default Wormhole; diff --git a/packages/bridge/src/components/Wormhole/wormhole.less b/packages/bridge/src/components/Wormhole/wormhole.less deleted file mode 100644 index 2c9c4ca..0000000 --- a/packages/bridge/src/components/Wormhole/wormhole.less +++ /dev/null @@ -1,7 +0,0 @@ -.wormhole-overlay { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} diff --git a/packages/bridge/src/constants/index.tsx b/packages/bridge/src/constants/index.tsx deleted file mode 100644 index b6c11ec..0000000 --- a/packages/bridge/src/constants/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from './labels'; -export * from './style'; diff --git a/packages/bridge/src/constants/labels.ts b/packages/bridge/src/constants/labels.ts deleted file mode 100644 index e7dd339..0000000 --- a/packages/bridge/src/constants/labels.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const LABELS = { - CONNECT_LABEL: 'Connect Wallet', - GIVE_SOL: 'Give me SOL', - FAUCET_INFO: - 'This faucet will help you fund your accounts outside of Solana main network.', - ACCOUNT_FUNDED: 'Account funded.', - AUDIT_WARNING: - 'Oyster is an unaudited software project used for internal purposes at the Solana Foundation. This app is not for public use.', - FOOTER: - 'This page was produced by the Solana Foundation ("SF") for internal educational and inspiration purposes only. SF does not encourage, induce or sanction the deployment, integration or use of Oyster or any similar application (including its code) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. Anyone using this code or a derivation thereof must comply with applicable laws and regulations when releasing related software.', - MENU_HOME: 'Home', - MENU_FAUCET: 'Faucet', - APP_TITLE: 'Wormhole', - CONNECT_BUTTON: 'Connect', - WALLET_TOOLTIP: 'Wallet public key', - WALLET_BALANCE: 'Wallet balance', - SETTINGS_TOOLTIP: 'Settings', - GO_BACK_ACTION: 'Go back', - TOTAL_TITLE: 'Total', - ENTER_AMOUNT: 'Enter an amount', - TRANSFER: 'Transfer', - SET_CORRECT_WALLET_NETWORK: 'Set correct wallet network', -}; diff --git a/packages/bridge/src/constants/style.tsx b/packages/bridge/src/constants/style.tsx deleted file mode 100644 index 3818b89..0000000 --- a/packages/bridge/src/constants/style.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export const GUTTER = [16, { xs: 8, sm: 16, md: 16, lg: 16 }] as any; - -export const SMALL_STATISTIC: React.CSSProperties = { - fontSize: 10, -}; diff --git a/packages/bridge/src/contexts/bridge.tsx b/packages/bridge/src/contexts/bridge.tsx deleted file mode 100644 index 1d778c0..0000000 --- a/packages/bridge/src/contexts/bridge.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React, { createContext, FunctionComponent, useContext } from 'react'; -import { SolanaBridge } from '@solana/bridge-sdk'; -import { - useConnection, - useConnectionConfig, -} from '@oyster/common/dist/lib/contexts/connection'; -import { utils } from '@oyster/common'; - -export const BridgeContext = createContext(undefined); - -export const BridgeProvider: FunctionComponent = ({ children }) => { - const { endpoint } = useConnectionConfig(); - const connection = useConnection(); - const programs = utils.programIds(); - - let bridge = new SolanaBridge( - endpoint, - connection, - programs.wormhole.pubkey, - programs.token, - ); - - return ( - {children} - ); -}; - -export const useBridge = () => { - const bridge = useContext(BridgeContext); - return bridge; -}; diff --git a/packages/bridge/src/contexts/chainPair.tsx b/packages/bridge/src/contexts/chainPair.tsx deleted file mode 100644 index 6a176df..0000000 --- a/packages/bridge/src/contexts/chainPair.tsx +++ /dev/null @@ -1,405 +0,0 @@ -import React, { - useCallback, - useContext, - useEffect, - useMemo, - useState, -} from 'react'; -import { useHistory, useLocation } from 'react-router-dom'; -import bs58 from 'bs58'; -import { - programIds, - useConnection, - useConnectionConfig, - useUserAccounts, -} from '@oyster/common'; -import { TokenInfo } from '@solana/spl-token-registry'; -import { - ASSET_CHAIN, - filterModalEthTokens, - filterModalSolTokens, -} from '../utils/assets'; -import { useEthereum } from './ethereum'; -import { BigNumber } from 'bignumber.js'; -import { AssetMeta, WrappedAssetFactory } from '@solana/bridge-sdk'; -import { WormholeFactory } from '@solana/bridge-sdk'; -import { - bridgeAuthorityKey, - TransferRequestInfo, - wrappedAssetMintKey, -} from '@solana/bridge-sdk'; -import { useBridge } from './bridge'; -import { PublicKey } from '@solana/web3.js'; -import { ethers } from 'ethers'; -import { deriveERC20Address } from '../utils/helpers'; - -export interface TokenChainContextState { - info?: TransferRequestInfo; - - amount: number; - setAmount: (val: number) => void; - chain: ASSET_CHAIN; - setChain: (val: number) => void; -} - -export interface TokenChainPairContextState { - A: TokenChainContextState; - B: TokenChainContextState; - mintAddress: string; - setMintAddress: (mintAddress: string) => void; - lastTypedAccount: number; - setLastTypedAccount: (chain: ASSET_CHAIN) => void; -} - -const TokenChainPairContext = React.createContext( - null, -); - -const isValidAddress = (address: string) => { - try { - const decoded = bs58.decode(address); - return decoded.length === 32; - } catch { - return false; - } -}; - -export const toChainSymbol = (chain: number | null) => { - if (chain === ASSET_CHAIN.Solana) { - return 'SOL'; - } - return 'ETH'; -}; - -function getDefaultTokens(tokens: TokenInfo[], search: string) { - let defaultChain = 'SOL'; - let defaultToken = tokens[0].symbol; - - const nameToToken = tokens.reduce((map, item) => { - map.set(item.symbol, item); - return map; - }, new Map()); - - if (search) { - const urlParams = new URLSearchParams(search); - const from = urlParams.get('from'); - defaultChain = from === 'SOL' ? from : 'ETH'; - const token = urlParams.get('token') || defaultToken; - if (nameToToken.has(token)) { - defaultToken = token; - } - } - return { - defaultChain, - defaultToken, - }; -} - -export const useCurrencyLeg = (mintAddress: string) => { - const [amount, setAmount] = useState(0); - const [chain, setChain] = useState(ASSET_CHAIN.Ethereum); - const [info, setInfo] = useState(); - const { userAccounts } = useUserAccounts(); - const bridge = useBridge(); - - const { provider, tokens: ethTokens } = useEthereum(); - const { tokens: solTokens } = useConnectionConfig(); - const connection = useConnection(); - const defaultCoinInfo = { - address: '', - name: '', - balance: new BigNumber(0), - decimals: 0, - allowance: new ethers.utils.BigNumber(0), - isWrapped: false, - chainID: 0, - assetAddress: new Buffer(0), - mint: '', - }; - useEffect(() => { - if (!provider || !connection) { - return; - } - - (async () => { - const ethToken = ethTokens.find(t => t.address === mintAddress); - let solToken = solTokens.find(t => t.address === mintAddress); - let mintKeyAddress = ''; - let symbol = ''; - let decimals = 0; - - //console.log({ chain, solToken, ethToken }); - if (chain === ASSET_CHAIN.Solana) { - if (!solToken && ethToken) { - try { - const bridgeId = programIds().wormhole.pubkey; - const authority = await bridgeAuthorityKey(bridgeId); - const assetAddress = Buffer.from(ethToken.address.slice(2), 'hex'); - const meta: AssetMeta = { - decimals: Math.min(ethToken.decimals, 9), - address: assetAddress, - chain: ASSET_CHAIN.Ethereum, - }; - const mintKey = await wrappedAssetMintKey( - bridgeId, - authority, - meta, - ); - if (mintKey) { - mintKeyAddress = mintKey.toBase58(); - solToken = solTokens.find(t => t.address === mintKeyAddress); - if (!solToken) { - symbol = ethToken.symbol; - decimals = Math.min(ethToken.decimals, 9); - } - } else { - setInfo(defaultCoinInfo); - return; - } - } catch { - setInfo(defaultCoinInfo); - return; - } - } - if (!solToken && (!symbol || !mintKeyAddress || !decimals)) { - setInfo(defaultCoinInfo); - return; - } - const currentAccount = userAccounts?.find( - a => a.info.mint.toBase58() === (solToken?.address || mintKeyAddress), - ); - - const assetMeta = await bridge?.fetchAssetMeta( - new PublicKey(solToken?.address || mintKeyAddress), - ); - - if (!assetMeta || !currentAccount) { - setInfo(defaultCoinInfo); - return; - } - let info = { - address: currentAccount.pubkey.toBase58(), - name: solToken?.symbol || symbol, - balance: new BigNumber(currentAccount?.info.amount.toNumber() || 0), - allowance: new ethers.utils.BigNumber(0), - decimals: solToken?.decimals || decimals, - isWrapped: assetMeta.chain != ASSET_CHAIN.Solana, - chainID: assetMeta.chain, - assetAddress: assetMeta.address, - mint: solToken?.address || mintKeyAddress, - }; - // console.log({ info }, 'sol'); - setInfo(info); - } - - if (chain === ASSET_CHAIN.Ethereum) { - if (!solToken && !ethToken) { - setInfo(defaultCoinInfo); - return; - } - let derived = false; - let signer = provider.getSigner(); - const ethBridgeAddress = programIds().wormhole.bridge; - let b = WormholeFactory.connect(ethBridgeAddress, provider); - mintKeyAddress = mintAddress; - - if (!ethToken && solToken) { - mintKeyAddress = deriveERC20Address(new PublicKey(mintAddress)); - if (mintKeyAddress) { - mintKeyAddress = `0x${mintKeyAddress}`; - derived = true; - } - } - - let isWrapped = await b.isWrappedAsset(mintKeyAddress); - if (derived && !isWrapped) { - setInfo(defaultCoinInfo); - return; - } - - let e = WrappedAssetFactory.connect(mintKeyAddress, provider); - - let addr = await signer.getAddress(); - let decimals = await e.decimals(); - let symbol = await e.symbol(); - let allowance = await e.allowance(addr, ethBridgeAddress); - const assetAddress = Buffer.from(mintKeyAddress.slice(2), 'hex'); - - let info = { - address: mintKeyAddress, - name: symbol, - balance: new BigNumber(0), - allowance, - decimals, - isWrapped: false, - chainID: ASSET_CHAIN.Ethereum, - assetAddress, - mint: (solToken && derived && mintAddress) || '', - }; - if (isWrapped) { - info.chainID = await e.assetChain(); - // info.assetAddress = Buffer.from(addr.slice(2), 'hex'); - info.isWrapped = true; - } - - if (chain === ASSET_CHAIN.Ethereum) { - info.balance = new BigNumber( - new ethers.utils.BigNumber(await e.balanceOf(addr)).toString(), - ); - } else { - // TODO: get balance on other chains for assets that came from eth - - const bridgeId = programIds().wormhole.pubkey; - const bridgeAuthority = await bridgeAuthorityKey(bridgeId); - - const mint = await wrappedAssetMintKey(bridgeId, bridgeAuthority, { - decimals: Math.min(9, info.decimals), - address: info.assetAddress, - chain: info.chainID, - }); - } - - // console.log({ info }, 'eth'); - setInfo(info); - } - })(); - }, [ - connection, - provider, - setInfo, - chain, - mintAddress, - ethTokens, - solTokens, - userAccounts, - ]); - - return { - amount: amount, - setAmount: setAmount, - chain: chain, - setChain: setChain, - info, - }; -}; - -export function TokenChainPairProvider({ children = null as any }) { - const { tokens: ethTokens } = useEthereum(); - const { tokens: solTokens } = useConnectionConfig(); - - const history = useHistory(); - const location = useLocation(); - const [lastTypedAccount, setLastTypedAccount] = useState(0); - const [mintAddress, setMintAddress] = useState(''); - - const base = useCurrencyLeg(mintAddress); - const amountA = base.amount; - const setAmountA = base.setAmount; - const chainA = base.chain; - const setChainA = base.setChain; - - const quote = useCurrencyLeg(mintAddress); - const amountB = quote.amount; - const setAmountB = quote.setAmount; - const setChainB = quote.setChain; - - const tokens = useMemo( - () => [ - ...filterModalEthTokens(ethTokens), - ...filterModalSolTokens(solTokens), - ], - [ethTokens, solTokens], - ); - - // updates browser history on token changes - useEffect(() => { - // set history - const token = tokens.find(t => t.address === mintAddress)?.symbol; - - if (token && chainA) { - history.push({ - search: `?from=${toChainSymbol(chainA)}&token=${token}`, - }); - } - }, [mintAddress, tokens, chainA]); - - // Updates tokens on location change - useEffect(() => { - if ( - !ethTokens.length || - (!location.search && mintAddress) || - location.pathname.indexOf('move') < 0 - ) { - return; - } - let { defaultChain, defaultToken } = getDefaultTokens( - tokens, - location.search, - ); - if (!defaultToken || !defaultChain) { - return; - } - setChainA( - defaultChain === 'ETH' ? ASSET_CHAIN.Ethereum : ASSET_CHAIN.Solana, - ); - setChainB( - defaultChain === 'SOL' ? ASSET_CHAIN.Ethereum : ASSET_CHAIN.Solana, - ); - - setMintAddress( - tokens.find(t => t.symbol === defaultToken)?.address || - (isValidAddress(defaultToken) ? defaultToken : '') || - '', - ); - // mintAddressA and mintAddressB are not included here to prevent infinite loop - // eslint-disable-next-line - }, [location, location.search, location.pathname, tokens]); - - const calculateDependent = useCallback(async () => { - if (mintAddress) { - let setDependent; - let amount; - if (lastTypedAccount === base.chain) { - setDependent = setAmountB; - amount = amountA; - } else { - setDependent = setAmountA; - amount = amountB; - } - - const result: number | string = amount; - if (typeof result === 'string') { - setDependent(parseFloat(result)); - } else if (result !== undefined && Number.isFinite(result)) { - setDependent(result); - } else { - setDependent(0); - } - } - }, [mintAddress, setAmountA, setAmountB, amountA, amountB, lastTypedAccount]); - - useEffect(() => { - calculateDependent(); - }, [amountB, amountA, lastTypedAccount, calculateDependent]); - - return ( - - {children} - - ); -} - -export const useTokenChainPairState = () => { - const context = useContext(TokenChainPairContext); - - return context as TokenChainPairContextState; -}; diff --git a/packages/bridge/src/contexts/coingecko.tsx b/packages/bridge/src/contexts/coingecko.tsx deleted file mode 100644 index 6519d90..0000000 --- a/packages/bridge/src/contexts/coingecko.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { EventEmitter } from '@oyster/common'; -import React, { useContext, useEffect, useState } from 'react'; -import { MarketsContextState } from './market'; - -export const COINGECKO_POOL_INTERVAL = 1000 * 30; // 30 sec -export const COINGECKO_API = 'https://api.coingecko.com/api/v3/'; -export const COINGECKO_COIN_LIST_API = `${COINGECKO_API}coins/list`; -export const COINGECKO_COIN_PRICE_API = `${COINGECKO_API}simple/price`; - -interface CoinInfo { - id: string; - symbol: string; - name: string; -} - -export interface CoingeckoContextState { - coinList: Map; -} - -const CoingeckoContext = React.createContext( - null, -); -export function CoingeckoProvider({ children = null as any }) { - const [coinList, setCoinList] = useState>(new Map()); - - useEffect(() => { - (async () => { - const listResponse = await fetch(COINGECKO_COIN_LIST_API); - const coinList: CoinInfo[] = await listResponse.json(); - setCoinList( - coinList.reduce((coins, val) => { - coins.set(val.symbol, val); - return coins; - }, new Map()), - ); - })(); - }, [setCoinList]); - - return ( - - {children} - - ); -} - -export const useCoingecko = () => { - const context = useContext(CoingeckoContext); - return context as CoingeckoContextState; -}; diff --git a/packages/bridge/src/contexts/ethereum.tsx b/packages/bridge/src/contexts/ethereum.tsx deleted file mode 100644 index 1b1b5df..0000000 --- a/packages/bridge/src/contexts/ethereum.tsx +++ /dev/null @@ -1,261 +0,0 @@ -import React, { - createContext, - FunctionComponent, - useCallback, - useContext, - useEffect, - useMemo, - useState, -} from 'react'; - -import { useLocalStorageState, useWallet, SignerWalletAdapter } from '@oyster/common'; -import { TokenList, TokenInfo } from '@uniswap/token-lists'; -import { ethers } from 'ethers'; -import { MetamaskWalletAdapter } from '../wallet-adapters/metamask'; -import { Button, Modal } from 'antd'; -import { WalletConnectWalletAdapter } from '../wallet-adapters/wallet-connect'; - -const ASSETS_URL = - 'https://raw.githubusercontent.com/solana-labs/oyster/main/assets/wallets/'; -export const ETH_WALLET_PROVIDERS = [ - { - name: 'Metamask', - url: 'https://www.metamask.com', - icon: `${ASSETS_URL}metamask.svg`, - adapter: MetamaskWalletAdapter, - }, - { - name: 'Wallet Connect', - url: 'https://walletconnect.org', - icon: `/blockchains/walletconnect.svg`, - adapter: WalletConnectWalletAdapter, - }, -]; - -export interface EthereumContextState { - provider?: ethers.providers.Web3Provider; - signer?: ethers.Signer; - tokens: TokenInfo[]; - tokenMap: Map; - accounts: string[]; - connected: boolean; - chainId: number; - walletProvider: any; - select: () => void; - disconnect: () => void; - onConnectEthereum?: () => void; -} - -export const EthereumContext = createContext({ - tokens: [], - tokenMap: new Map(), - accounts: [''], - chainId: 0, - connected: false, - select() {}, - disconnect() {}, - walletProvider: null, -}); - -export const EthereumProvider: FunctionComponent = ({ children }) => { - const [accounts, setAccounts] = useState(['']); - const [provider, setProvider] = useState(); - - const [providerUrl, setProviderUrl] = useLocalStorageState( - 'ethWalletProvider', - ); - const [connected, setConnected] = useState(false); - const [chainId, setChainId] = useState(0); - const [isModalVisible, setIsModalVisible] = useState(false); - - const { connected: walletConnected } = useWallet(); - - const [tokens, setTokens] = useState<{ - map: Map; - list: TokenInfo[]; - }>({ - map: new Map(), - list: [], - }); - const walletProvider = useMemo( - () => ETH_WALLET_PROVIDERS.find(({ url }) => url === providerUrl), - [providerUrl], - ); - const wallet = useMemo( - function () { - if (walletProvider) { - // @ts-ignore - return new walletProvider.adapter() as WalletAdapter; - } - }, - [walletProvider, providerUrl], - ); - - useEffect(() => { - (async () => { - const map = new Map(); - const listResponse: TokenList[] = await Promise.all([ - fetch( - 'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/tokenlist.json', - ) - .then(_ => _.json()) - .catch(_ => ({ tokens: [] })), - fetch('https://tokenlist.aave.eth.link/') - .then(_ => _.json()) - .catch(() => ({ tokens: [] })), - fetch('https://tokens.coingecko.com/uniswap/all.json') - .then(_ => _.json()) - .catch(() => ({ tokens: [] })), - ]); - - listResponse.forEach((list, i) => - list.tokens.reduce((acc, val) => { - const address = val.address.toLowerCase(); - const current = acc.get(address); - const extraTag = i === 2 && !current ? 'longList' : ''; - - const item = { - ...val, - logoURI: - current?.logoURI || - (val.logoURI - ? val.logoURI?.replace( - 'ipfs://', - 'https://cloudflare-ipfs.com/ipfs/', - ) - : ` https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/${val.address}/logo.png`), - tags: val.tags ? [...val.tags, extraTag] : [extraTag], - }; - - acc.set(address, item); - return acc; - }, map), - ); - - setTokens({ - map, - list: [...map.values()], - }); - })(); - }, [setTokens]); - - const onConnectEthereum = useCallback(() => { - if (wallet && providerUrl && !connected) { - wallet.connect(); - } else if (!connected) { - select(); - } - }, [wallet, connected, providerUrl]); - - useEffect(() => { - if (wallet) { - wallet.on('connect', () => { - // @ts-ignore - setAccounts(wallet.accounts); - // @ts-ignore - setChainId(wallet.chainID); - // @ts-ignore - setProvider(wallet.provider); - setConnected(true); - }); - // @ts-ignore - wallet.on('disconnect', error => { - setConnected(false); - setAccounts([]); - // @ts-ignore - setChainId(0); - // @ts-ignore - setProvider(null); - }); - // @ts-ignore - wallet.on('accountsChanged', accounts => { - // @ts-ignore - if (!accounts || !accounts[0]) setConnected(false); - }); - // @ts-ignore - wallet.on('chainChanged', (chainId: string) => { - setChainId(parseInt(chainId, 16)); - }); - } - return () => { - setConnected(false); - if (wallet) { - wallet.disconnect(); - } - }; - }, [wallet]); - - const select = useCallback(() => setIsModalVisible(true), []); - const close = useCallback(() => setIsModalVisible(false), []); - - useEffect(() => { - if (walletConnected) { - onConnectEthereum(); - } - }, [walletConnected, providerUrl]); - - return ( - wallet?.disconnect(), - onConnectEthereum: () => onConnectEthereum(), - }} - > - {children} - - {ETH_WALLET_PROVIDERS.map(provider => { - const onClick = function () { - setProviderUrl(provider.url); - close(); - }; - - return ( - - ); - })} - - - ); -}; - -export const useEthereum = () => { - const context = useContext(EthereumContext); - return context; -}; diff --git a/packages/bridge/src/contexts/index.tsx b/packages/bridge/src/contexts/index.tsx deleted file mode 100644 index a785181..0000000 --- a/packages/bridge/src/contexts/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export * from './market'; -export * from './tokenPair'; -export * from './ethereum'; diff --git a/packages/bridge/src/contexts/market.tsx b/packages/bridge/src/contexts/market.tsx deleted file mode 100644 index b82b04c..0000000 --- a/packages/bridge/src/contexts/market.tsx +++ /dev/null @@ -1,361 +0,0 @@ -import React, { useCallback, useContext, useEffect, useState } from 'react'; - -import { Market, MARKETS, Orderbook, TOKEN_MINTS } from '@project-serum/serum'; -import { AccountInfo, Connection, PublicKey } from '@solana/web3.js'; -import { useMemo } from 'react'; - -import { contexts, utils, EventEmitter } from '@oyster/common'; - -import { DexMarketParser } from './../models/dex'; -import { MINT_TO_MARKET } from '../models/marketOverrides'; -const { useConnectionConfig } = contexts.Connection; -const { STABLE_COINS } = utils; -const { cache, getMultipleAccounts } = contexts.Accounts; - -//const INITAL_LIQUIDITY_DATE = new Date('2020-10-27'); -//export const BONFIDA_POOL_INTERVAL = 30 * 60_000; // 30 min - -interface RecentPoolData { - pool_identifier: string; - volume24hA: number; -} - -export interface MarketsContextState { - midPriceInUSD: (mint: string) => number; - marketEmitter: EventEmitter; - accountsToObserve: Map; - marketByMint: Map; - - subscribeToMarket: (mint: string) => () => void; - - precacheMarkets: (mints: string[]) => void; - dailyVolume: Map; -} - -const REFRESH_INTERVAL = 30_000; - -const MarketsContext = React.createContext(null); - -const marketEmitter = new EventEmitter(); - -export function MarketProvider({ children = null as any }) { - const { endpoint } = useConnectionConfig(); - const accountsToObserve = useMemo(() => new Map(), []); - const [marketMints, setMarketMints] = useState([]); - const [dailyVolume, setDailyVolume] = useState>( - new Map(), - ); - - const connection = useMemo(() => new Connection(endpoint, 'recent'), [ - endpoint, - ]); - - const marketByMint = useMemo(() => { - return [...new Set(marketMints).values()].reduce((acc, key) => { - const mintAddress = key; - - const SERUM_TOKEN = TOKEN_MINTS.find( - a => a.address.toBase58() === mintAddress, - ); - - const marketAddress = MINT_TO_MARKET[mintAddress]; - const marketName = `${SERUM_TOKEN?.name}/USDC`; - const marketInfo = MARKETS.find( - m => m.name === marketName || m.address.toBase58() === marketAddress, - ); - - if (marketInfo) { - acc.set(mintAddress, { - marketInfo, - }); - } - - return acc; - }, new Map()) as Map; - }, [marketMints]); - - useEffect(() => { - let timer = 0; - - const updateData = async () => { - await refreshAccounts(connection, [...accountsToObserve.keys()]); - marketEmitter.raiseMarketUpdated(new Set([...marketByMint.keys()])); - - timer = window.setTimeout(() => updateData(), REFRESH_INTERVAL); - }; - - const initalQuery = async () => { - const reverseSerumMarketCache = new Map(); - [...marketByMint.keys()].forEach(mint => { - const m = marketByMint.get(mint); - if (m) { - reverseSerumMarketCache.set(m.marketInfo.address.toBase58(), mint); - } - }); - - const allMarkets = [...marketByMint.values()].map(m => { - return m.marketInfo.address.toBase58(); - }); - - await getMultipleAccounts( - connection, - // only query for markets that are not in cahce - allMarkets.filter(a => cache.get(a) === undefined), - 'single', - ).then(({ keys, array }) => { - allMarkets.forEach(() => {}); - - return array.map((item, index) => { - const marketAddress = keys[index]; - const mintAddress = reverseSerumMarketCache.get(marketAddress); - if (mintAddress) { - const market = marketByMint.get(mintAddress); - - if (market) { - const id = market.marketInfo.address; - cache.add(id, item, DexMarketParser); - } - } - - return item; - }); - }); - - const toQuery = new Set(); - allMarkets.forEach(m => { - const market = cache.get(m); - if (!market) { - return; - } - - const decoded = market; - - if (!cache.get(decoded.info.baseMint)) { - toQuery.add(decoded.info.baseMint.toBase58()); - } - - if (!cache.get(decoded.info.baseMint)) { - toQuery.add(decoded.info.quoteMint.toBase58()); - } - - toQuery.add(decoded.info.bids.toBase58()); - toQuery.add(decoded.info.asks.toBase58()); - }); - - await refreshAccounts(connection, [...toQuery.keys()]); - - marketEmitter.raiseMarketUpdated(new Set([...marketByMint.keys()])); - - // start update loop - updateData(); - }; - - initalQuery(); - - return () => { - window.clearTimeout(timer); - }; - }, [marketByMint, accountsToObserve, connection]); - - const midPriceInUSD = useCallback( - (mintAddress: string) => { - return getMidPrice( - marketByMint.get(mintAddress)?.marketInfo.address.toBase58(), - mintAddress, - ); - }, - [marketByMint], - ); - - const subscribeToMarket = useCallback( - (mintAddress: string) => { - const info = marketByMint.get(mintAddress); - const market = cache.get(info?.marketInfo.address.toBase58() || ''); - if (!market) { - return () => {}; - } - - // TODO: get recent volume - - const bid = market.info.bids.toBase58(); - const ask = market.info.asks.toBase58(); - accountsToObserve.set(bid, (accountsToObserve.get(bid) || 0) + 1); - accountsToObserve.set(ask, (accountsToObserve.get(ask) || 0) + 1); - - // TODO: add event queue to query for last trade - - return () => { - accountsToObserve.set(bid, (accountsToObserve.get(bid) || 0) - 1); - accountsToObserve.set(ask, (accountsToObserve.get(ask) || 0) - 1); - - // cleanup - [...accountsToObserve.keys()].forEach(key => { - if ((accountsToObserve.get(key) || 0) <= 0) { - accountsToObserve.delete(key); - } - }); - }; - }, - [marketByMint, accountsToObserve], - ); - - const precacheMarkets = useCallback( - (mints: string[]) => { - const newMints = [...new Set([...marketMints, ...mints]).values()]; - - if (marketMints.length !== newMints.length) { - setMarketMints(newMints); - } - }, - [setMarketMints, marketMints], - ); - - return ( - - {children} - - ); -} - -export const useMarkets = () => { - const context = useContext(MarketsContext); - return context as MarketsContextState; -}; - -export const useMidPriceInUSD = (mint: string) => { - const { midPriceInUSD, subscribeToMarket, marketEmitter } = useContext( - MarketsContext, - ) as MarketsContextState; - const [price, setPrice] = useState(0); - - useEffect(() => { - let subscription = subscribeToMarket(mint); - const update = () => { - if (midPriceInUSD) { - setPrice(midPriceInUSD(mint)); - } - }; - - update(); - const dispose = marketEmitter.onMarket(update); - - return () => { - subscription(); - dispose(); - }; - }, [midPriceInUSD, mint, marketEmitter, subscribeToMarket]); - - return { price, isBase: price === 1.0 }; -}; - -export const usePrecacheMarket = () => { - const context = useMarkets(); - return context.precacheMarkets; -}; - -const bbo = (bidsBook: Orderbook, asksBook: Orderbook) => { - const bestBid = bidsBook.getL2(1); - const bestAsk = asksBook.getL2(1); - - if (bestBid.length > 0 && bestAsk.length > 0) { - return (bestBid[0][0] + bestAsk[0][0]) / 2.0; - } - - return 0; -}; - -const getMidPrice = (marketAddress?: string, mintAddress?: string) => { - const SERUM_TOKEN = TOKEN_MINTS.find( - a => a.address.toBase58() === mintAddress, - ); - - if (STABLE_COINS.has(SERUM_TOKEN?.name || '')) { - return 1.0; - } - - if (!marketAddress) { - return 0.0; - } - - const marketInfo = cache.get(marketAddress); - if (!marketInfo) { - return 0.0; - } - - const decodedMarket = marketInfo.info; - - const baseMintDecimals = - cache.get(decodedMarket.baseMint)?.info.decimals || 0; - const quoteMintDecimals = - cache.get(decodedMarket.quoteMint)?.info.decimals || 0; - - const market = new Market( - decodedMarket, - baseMintDecimals, - quoteMintDecimals, - undefined, - decodedMarket.programId, - ); - - const bids = cache.get(decodedMarket.bids)?.info; - const asks = cache.get(decodedMarket.asks)?.info; - - if (bids && asks) { - const bidsBook = new Orderbook(market, bids.accountFlags, bids.slab); - const asksBook = new Orderbook(market, asks.accountFlags, asks.slab); - - return bbo(bidsBook, asksBook); - } - - return 0; -}; - -const refreshAccounts = async (connection: Connection, keys: string[]) => { - if (keys.length === 0) { - return []; - } - - return getMultipleAccounts(connection, keys, 'single').then( - ({ keys, array }) => { - return array.map((item, index) => { - const address = keys[index]; - return cache.add(new PublicKey(address), item); - }); - }, - ); -}; - -interface SerumMarket { - marketInfo: { - address: PublicKey; - name: string; - programId: PublicKey; - deprecated: boolean; - }; - - // 1st query - marketAccount?: AccountInfo; - - // 2nd query - mintBase?: AccountInfo; - mintQuote?: AccountInfo; - bidAccount?: AccountInfo; - askAccount?: AccountInfo; - eventQueue?: AccountInfo; - - swap?: { - dailyVolume: number; - }; - - midPrice?: (mint?: PublicKey) => number; -} diff --git a/packages/bridge/src/contexts/tokenPair.tsx b/packages/bridge/src/contexts/tokenPair.tsx deleted file mode 100644 index dd7f9e8..0000000 --- a/packages/bridge/src/contexts/tokenPair.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import React, { - useCallback, - useContext, - useEffect, - useMemo, - useState, -} from 'react'; -import { MintInfo } from '@solana/spl-token'; -import { useHistory, useLocation } from 'react-router-dom'; -import bs58 from 'bs58'; -import { TokenAccount } from '@oyster/common'; -import { TokenInfo } from '@solana/spl-token-registry'; -import { - useConnection, - useConnectionConfig, - useAccountByMint, - useMint, - getTokenName, - getTokenIcon, - convert, -} from '@oyster/common'; - -export interface TokenContextState { - mintAddress: string; - account?: TokenAccount; - mint?: MintInfo; - amount: string; - name: string; - icon?: string; - setAmount: (val: string) => void; - setMint: (mintAddress: string) => void; - convertAmount: () => number; - sufficientBalance: () => boolean; -} - -export interface TokenPairContextState { - A: TokenContextState; - B: TokenContextState; - lastTypedAccount: string; - setLastTypedAccount: (mintAddress: string) => void; -} - -const TokenPairContext = React.createContext( - null, -); - -const convertAmount = (amount: string, mint?: MintInfo) => { - return parseFloat(amount) * Math.pow(10, mint?.decimals || 0); -}; - -export const useCurrencyLeg = (defaultMint?: string) => { - const { tokenMap } = useConnectionConfig(); - const [amount, setAmount] = useState(''); - const [mintAddress, setMintAddress] = useState(defaultMint || ''); - const account = useAccountByMint(mintAddress); - const mint = useMint(mintAddress); - - return useMemo( - () => ({ - mintAddress: mintAddress, - account: account, - mint: mint, - amount: amount, - name: getTokenName(tokenMap, mintAddress), - icon: getTokenIcon(tokenMap, mintAddress), - setAmount: setAmount, - setMint: setMintAddress, - convertAmount: () => convertAmount(amount, mint), - sufficientBalance: () => - account !== undefined && convert(account, mint) >= parseFloat(amount), - }), - [mintAddress, account, mint, amount, tokenMap, setAmount, setMintAddress], - ); -}; - -export function TokenPairProvider({ children = null as any }) { - const connection = useConnection(); - const { tokens } = useConnectionConfig(); - - const history = useHistory(); - const location = useLocation(); - const [lastTypedAccount, setLastTypedAccount] = useState(''); - - const base = useCurrencyLeg(); - const mintAddressA = base.mintAddress; - const setMintAddressA = base.setMint; - const amountA = base.amount; - const setAmountA = base.setAmount; - - const quote = useCurrencyLeg(); - const mintAddressB = quote.mintAddress; - const setMintAddressB = quote.setMint; - const amountB = quote.amount; - const setAmountB = quote.setAmount; - - useEffect(() => { - const base = - tokens.find(t => t.address === mintAddressA)?.symbol || mintAddressA; - const quote = - tokens.find(t => t.address === mintAddressB)?.symbol || mintAddressB; - - document.title = `Swap | Serum (${base}/${quote})`; - }, [mintAddressA, mintAddressB, tokens, location]); - - // updates browser history on token changes - useEffect(() => { - // set history - const base = - tokens.find(t => t.address === mintAddressA)?.symbol || mintAddressA; - const quote = - tokens.find(t => t.address === mintAddressB)?.symbol || mintAddressB; - - if (base && quote && location.pathname.indexOf('info') < 0) { - history.push({ - search: `?pair=${base}-${quote}`, - }); - } else { - if (mintAddressA && mintAddressB) { - history.push({ - search: ``, - }); - } else { - return; - } - } - }, [mintAddressA, mintAddressB, tokens, history, location.pathname]); - - // Updates tokens on location change - useEffect(() => { - if (!location.search && mintAddressA && mintAddressB) { - return; - } - - let { defaultBase, defaultQuote } = getDefaultTokens( - tokens, - location.search, - ); - if (!defaultBase || !defaultQuote) { - return; - } - - setMintAddressA( - tokens.find(t => t.symbol === defaultBase)?.address || - (isValidAddress(defaultBase) ? defaultBase : '') || - '', - ); - setMintAddressB( - tokens.find(t => t.symbol === defaultQuote)?.address || - (isValidAddress(defaultQuote) ? defaultQuote : '') || - '', - ); - // mintAddressA and mintAddressB are not included here to prevent infinite loop - // eslint-disable-next-line - }, [location, location.search, setMintAddressA, setMintAddressB, tokens]); - - const calculateDependent = useCallback(async () => { - if (mintAddressA && mintAddressB) { - let setDependent; - let amount; - let independent; - if (lastTypedAccount === mintAddressA) { - independent = mintAddressA; - setDependent = setAmountB; - amount = parseFloat(amountA); - } else { - independent = mintAddressB; - setDependent = setAmountA; - amount = parseFloat(amountB); - } - - // TODO: calculate - const result: number | string = 0; - if (typeof result === 'string') { - setDependent(result); - } else if (result !== undefined && Number.isFinite(result)) { - setDependent(result.toFixed(6)); - } else { - setDependent(''); - } - } - }, [ - mintAddressA, - mintAddressB, - setAmountA, - setAmountB, - amountA, - amountB, - connection, - lastTypedAccount, - ]); - - useEffect(() => { - calculateDependent(); - }, [amountB, amountA, lastTypedAccount, calculateDependent]); - - return ( - - {children} - - ); -} - -export const useCurrencyPairState = () => { - const context = useContext(TokenPairContext); - - return context as TokenPairContextState; -}; - -const isValidAddress = (address: string) => { - try { - const decoded = bs58.decode(address); - return decoded.length === 32; - } catch { - return false; - } -}; - -function getDefaultTokens(tokens: TokenInfo[], search: string) { - let defaultBase = 'SOL'; - let defaultQuote = 'USDC'; - - const nameToToken = tokens.reduce((map, item) => { - map.set(item.symbol, item); - return map; - }, new Map()); - - if (search) { - const urlParams = new URLSearchParams(search); - const pair = urlParams.get('pair'); - if (pair) { - let items = pair.split('-'); - - if (items.length > 1) { - if (nameToToken.has(items[0]) || isValidAddress(items[0])) { - defaultBase = items[0]; - } - - if (nameToToken.has(items[1]) || isValidAddress(items[1])) { - defaultQuote = items[1]; - } - } - } - } - return { - defaultBase, - defaultQuote, - }; -} diff --git a/packages/bridge/src/hooks/index.ts b/packages/bridge/src/hooks/index.ts deleted file mode 100644 index 41dba20..0000000 --- a/packages/bridge/src/hooks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const nop = () => {}; diff --git a/packages/bridge/src/hooks/useCorrectNetwork.tsx b/packages/bridge/src/hooks/useCorrectNetwork.tsx deleted file mode 100644 index b902f0d..0000000 --- a/packages/bridge/src/hooks/useCorrectNetwork.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { useEthereum } from '../contexts'; -import { useEffect, useState } from 'react'; -import { useConnectionConfig } from '@oyster/common'; - -export const useCorrectNetwork = () => { - const { env } = useConnectionConfig(); - const [hasCorrespondingNetworks, setHasCorrespondingNetworks] = useState( - true, - ); - const { connected, chainId } = useEthereum(); - - useEffect(() => { - if (connected) { - if (chainId === 5) { - setHasCorrespondingNetworks(env === 'testnet'); - } else if (chainId === 1) { - setHasCorrespondingNetworks(env.includes('mainnet-beta')); - } else { - setHasCorrespondingNetworks(false); - } - } else { - setHasCorrespondingNetworks(true); - } - }, [connected, env, chainId]); - - return { hasCorrespondingNetworks }; -}; diff --git a/packages/bridge/src/hooks/useWormholeAccounts.tsx b/packages/bridge/src/hooks/useWormholeAccounts.tsx deleted file mode 100644 index 38a2489..0000000 --- a/packages/bridge/src/hooks/useWormholeAccounts.tsx +++ /dev/null @@ -1,381 +0,0 @@ -import { useCallback, useEffect, useRef, useState } from 'react'; -import { - useConnection, - useConnectionConfig, - MintParser, - cache, - getMultipleAccounts, - ParsedAccount, - TokenAccountParser, - programIds, - fromLamports, -} from '@oyster/common'; -import { WORMHOLE_PROGRAM_ID } from '../utils/ids'; -import { ASSET_CHAIN } from '../utils/assets'; -import { useEthereum } from '../contexts'; -import { Connection, PublicKey } from '@solana/web3.js'; -import { models } from '@oyster/common'; -import { AccountInfo, MintInfo } from '@solana/spl-token'; -import { - bridgeAuthorityKey, - wrappedAssetMintKey, - WrappedMetaLayout, -} from '@solana/bridge-sdk'; - -import bs58 from 'bs58'; -import { - COINGECKO_COIN_PRICE_API, - COINGECKO_POOL_INTERVAL, - useCoingecko, -} from '../contexts/coingecko'; - -type WrappedAssetMeta = { - chain: number; - decimals: number; - address: string; - mintKey: string; - mint?: ParsedAccount; - amount: number; - amountInUSD: number; - logo?: string; - symbol?: string; - name?: string; - price?: number; - explorer?: string; - wrappedExplorer?: string; -}; - -const queryWrappedMetaAccounts = async ( - authorityKey: PublicKey, - connection: Connection, - setExternalAssets: (arr: WrappedAssetMeta[]) => void, -) => { - const filters = [ - { - dataSize: WrappedMetaLayout.span, - }, - // { - // memcmp: { - // offset: TransferOutProposalLayout.offsetOf('assetChain'), - // bytes: 2, - // }, - // }, - ]; - - let resp = await (connection as any)._rpcRequest('getProgramAccounts', [ - WORMHOLE_PROGRAM_ID.toBase58(), - { - commitment: connection.commitment, - filters, - }, - ]); - - const assets = new Map(); - const assetsByMint = new Map(); - - // aggregate all assets that are not from Solana - resp.result - .map((acc: any) => ({ - publicKey: new PublicKey(acc.pubkey), - account: { - data: bs58.decode(acc.account.data), - executable: acc.account.executable, - owner: new PublicKey(acc.account.owner), - lamports: acc.account.lamports, - }, - })) - .map((acc: any) => { - if (acc.account.data.length === WrappedMetaLayout.span) { - const metaAccount = WrappedMetaLayout.decode(acc.account.data); - if (metaAccount.chain !== ASSET_CHAIN.Solana) { - const assetAddress: string = new Buffer( - metaAccount.address.slice(12), - ).toString('hex'); - - assets.set(assetAddress, { - chain: metaAccount.chain, - address: assetAddress, - decimals: 9, - mintKey: '', - amount: 0, - amountInUSD: 0, - // TODO: customize per chain - explorer: `https://etherscan.io/address/0x${assetAddress}`, - }); - } - } - }); - - // build PDAs for mints - await Promise.all( - [...assets.keys()].map(async key => { - const meta = assets.get(key); - if (!meta) { - throw new Error('missing key'); - } - - meta.mintKey = ( - await wrappedAssetMintKey(programIds().wormhole.pubkey, authorityKey, { - chain: meta.chain, - address: Buffer.from(meta.address, 'hex'), - decimals: Math.min(meta.decimals, 9), - }) - ).toBase58(); - - assetsByMint.set(meta.mintKey, meta); - - return meta; - }), - ); - - // query for all mints - const mints = await getMultipleAccounts( - connection, - [...assetsByMint.keys()], - 'singleGossip', - ); - - // cache mints and listen for changes - mints.keys.forEach((key, index) => { - if (!mints.array[index]) { - return; - } - - const asset = assetsByMint.get(key); - if (!asset) { - throw new Error('missing mint'); - } - - try { - cache.add(key, mints.array[index], MintParser); - } catch { - return; - } - asset.mint = cache.get(key); - asset.wrappedExplorer = `https://explorer.solana.com/address/${asset.mintKey}`; - - if (asset.mint) { - asset.amount = - parseInt(asset.mint?.info.supply.toString()) / - Math.pow(10, asset.mint?.info.decimals || 0); - if (!asset.mint) { - throw new Error('missing mint'); - } - - // monitor updates for mints - connection.onAccountChange(asset.mint?.pubkey, acc => { - cache.add(key, acc); - asset.mint = cache.get(key); - if (asset.mint) { - asset.amount = - asset.mint?.info.supply.toNumber() / - Math.pow(10, asset.mint?.info.decimals || 0); - } - - setExternalAssets([...assets.values()]); - }); - } - - setExternalAssets([...assets.values()]); - }); -}; - -const queryCustodyAccounts = async ( - authorityKey: PublicKey, - connection: Connection, -) => { - const tokenAccounts = await connection - .getTokenAccountsByOwner(authorityKey, { - programId: programIds().token, - }) - .then(acc => - acc.value.map( - a => - cache.add( - a.pubkey, - a.account, - TokenAccountParser, - ) as ParsedAccount, - ), - ); - - // query for mints - await getMultipleAccounts( - connection, - tokenAccounts.map(a => a.info.mint.toBase58()), - 'single', - ).then(({ keys, array }) => { - keys.forEach((key, index) => { - if (!array[index]) { - return; - } - - return cache.add(key, array[index], MintParser); - }); - }); - - return tokenAccounts.map(token => { - const mint = cache.get(token.info.mint) as ParsedAccount; - const asset = mint.pubkey.toBase58(); - return { - address: asset, - chain: ASSET_CHAIN.Solana, - amount: fromLamports(token, mint.info), - mintKey: asset, - mint, - decimals: 9, - amountInUSD: 0, - explorer: `https://explorer.solana.com/address/${asset}`, - } as WrappedAssetMeta; - }); -}; - -export const useWormholeAccounts = () => { - const connection = useConnection(); - const { tokenMap: ethTokens } = useEthereum(); - const { tokenMap } = useConnectionConfig(); - const { coinList } = useCoingecko(); - - const [] = useState([]); - const [loading, setLoading] = useState(true); - - const [externalAssets, setExternalAssets] = useState([]); - const [amountInUSD, setAmountInUSD] = useState(0); - - useEffect(() => { - setLoading(true); - - let wormholeSubId = 0; - (async () => { - // authority -> query for token accounts to get locked assets - let authorityKey = await bridgeAuthorityKey(programIds().wormhole.pubkey); - - // get all accounts that moved assets from solana to other chains - const custodyAccounts = await queryCustodyAccounts( - authorityKey, - connection, - ); - - // query wrapped assets that were imported to solana from other chains - queryWrappedMetaAccounts(authorityKey, connection, assets => { - setExternalAssets( - [...custodyAccounts, ...assets].sort( - (a, b) => a?.symbol?.localeCompare(b.symbol || '') || 0, - ), - ); - }).then(() => setLoading(false)); - - // TODO: listen to solana accounts for updates - - wormholeSubId = connection.onProgramAccountChange( - WORMHOLE_PROGRAM_ID, - info => { - if (info.accountInfo.data.length === WrappedMetaLayout.span) { - // TODO: check if new account and update external assets - } - }, - ); - })(); - - return () => { - if (wormholeSubId !== 0) - connection.removeProgramAccountChangeListener(wormholeSubId); - }; - }, [connection, setExternalAssets]); - - const coingeckoTimer = useRef(0); - const dataSourcePriceQuery = useCallback(async () => { - if (externalAssets.length === 0) { - return; - } - - const addressToId = new Map(); - const idToAsset = new Map(); - - const assetsToQueryNames: WrappedAssetMeta[] = []; - - const ids = externalAssets - .map(asset => { - // TODO: add different nets/clusters - - let knownToken = tokenMap.get(asset.mintKey); - if (knownToken) { - asset.logo = knownToken.logoURI; - asset.symbol = knownToken.symbol; - asset.name = knownToken.name; - } - - let token = ethTokens.get(`0x${asset.address || ''}`); - if (token) { - asset.logo = token.logoURI; - asset.symbol = token.symbol; - asset.name = token.name; - } - - if (asset.symbol) { - let coinInfo = coinList.get(asset.symbol.toLowerCase()); - - if (coinInfo) { - idToAsset.set(coinInfo.id, [ - ...(idToAsset.get(coinInfo.id) || []), - asset, - ]); - addressToId.set(asset.address, coinInfo.id); - return coinInfo.id; - } - } - }) - .filter(_ => _); - - assetsToQueryNames.map(() => { - // TODO: query names using ERC-20? - }); - - if (ids.length === 0) { - return; - } - console.log('Querying Prices...'); - const parameters = `?ids=${ids.join(',')}&vs_currencies=usd`; - const resp = await window.fetch(COINGECKO_COIN_PRICE_API + parameters); - const data = await resp.json(); - let totalInUSD = 0; - - Object.keys(data).forEach(key => { - let assets = idToAsset.get(key); - - if (!assets) { - return; - } - - assets.forEach(asset => { - asset.price = data[key]?.usd || 1; - asset.amountInUSD = - Math.round(asset.amount * (asset.price || 1) * 100) / 100; - totalInUSD += asset.amountInUSD; - }); - }); - - setAmountInUSD(totalInUSD); - - coingeckoTimer.current = window.setTimeout( - () => dataSourcePriceQuery(), - COINGECKO_POOL_INTERVAL, - ); - }, [externalAssets, setAmountInUSD]); - - useEffect(() => { - if (externalAssets && coinList && !loading) { - dataSourcePriceQuery(); - } - return () => { - window.clearTimeout(coingeckoTimer.current); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [externalAssets, coinList, loading]); - - return { - loading, - externalAssets, - totalInUSD: amountInUSD, - }; -}; diff --git a/packages/bridge/src/hooks/useWormholeTransactions.tsx b/packages/bridge/src/hooks/useWormholeTransactions.tsx deleted file mode 100644 index 60284c0..0000000 --- a/packages/bridge/src/hooks/useWormholeTransactions.tsx +++ /dev/null @@ -1,424 +0,0 @@ -import { useCallback, useEffect, useRef, useState } from 'react'; -import { - notify, - programIds, - TokenAccount, - useConnection, - useConnectionConfig, - useUserAccounts, -} from '@oyster/common'; -import { - POSTVAA_INSTRUCTION, - TRANSFER_ASSETS_OUT_INSTRUCTION, - WORMHOLE_PROGRAM_ID, -} from '../utils/ids'; -import { ASSET_CHAIN } from '../utils/assets'; -import { useEthereum } from '../contexts'; -import { - AccountInfo, - Connection, - ParsedAccountData, - PartiallyDecodedInstruction, - PublicKey, - RpcResponseAndContext, -} from '@solana/web3.js'; -import { - bridgeAuthorityKey, - LockupStatus, - LockupWithStatus, - SolanaBridge, - TransferOutProposalLayout, - WormholeFactory, -} from '@solana/bridge-sdk'; - -import bs58 from 'bs58'; -import { - COINGECKO_COIN_PRICE_API, - COINGECKO_POOL_INTERVAL, - useCoingecko, -} from '../contexts/coingecko'; -import { BigNumber } from 'bignumber.js'; -import { ethers } from 'ethers'; -import { useBridge } from '../contexts/bridge'; -import BN from 'bn.js'; -import { keccak256 } from 'ethers/utils'; - -type WrappedTransferMeta = { - chain: number; - decimals: number; - address: string; - publicKey: PublicKey; - coinId?: string; - price?: number; - explorer?: any; - logo?: string; - symbol?: string; - amount: number; - value?: number | string; - txhash: string; - date: number; // timestamp - status?: string; - owner?: string; - lockup?: any; - vaa?: any; -}; - -const transferCache = new Map(); - -const queryOwnWrappedMetaTransactions = async ( - authorityKey: PublicKey, - connection: Connection, - setTransfers: (arr: WrappedTransferMeta[]) => void, - provider: ethers.providers.Web3Provider, - tokenAccounts: TokenAccount[], - bridge?: SolanaBridge, -) => { - if (tokenAccounts && tokenAccounts.length > 0 && bridge) { - const transfers = new Map(); - let wh = WormholeFactory.connect(programIds().wormhole.bridge, provider); - - let lockups: LockupWithStatus[] = []; - for (const acc of tokenAccounts) { - const accLockups = await bridge.fetchTransferProposals(acc.pubkey); - lockups.push( - ...accLockups.map(v => { - return { - status: LockupStatus.AWAITING_VAA, - ...v, - }; - }), - ); - for (let lockup of lockups) { - if (lockup.vaaTime === undefined || lockup.vaaTime === 0) continue; - - let signingData = lockup.vaa.slice(lockup.vaa[5] * 66 + 6); - for (let i = signingData.length; i > 0; i--) { - if (signingData[i] == 0xff) { - signingData = signingData.slice(0, i); - break; - } - } - let hash = keccak256(signingData); - let submissionStatus = await wh.consumedVAAs(hash); - - lockup.status = submissionStatus - ? LockupStatus.COMPLETED - : LockupStatus.UNCLAIMED_VAA; - } - } - for (const ls of lockups) { - const txhash = ls.lockupAddress.toBase58(); - let assetAddress: string = ''; - if (ls.assetChain !== ASSET_CHAIN.Solana) { - assetAddress = Buffer.from(ls.assetAddress.slice(12)).toString('hex'); - } else { - assetAddress = new PublicKey(ls.assetAddress).toBase58(); - } - const dec = new BigNumber(10).pow(new BigNumber(ls.assetDecimals)); - const rawAmount = new BigNumber(ls.amount.toString()); - const amount = rawAmount.div(dec).toNumber(); - transfers.set(txhash, { - publicKey: ls.lockupAddress, - amount, - date: ls.vaaTime, - chain: ls.assetChain, - address: assetAddress, - decimals: 9, - txhash, - explorer: `https://explorer.solana.com/address/${txhash}`, - lockup: ls, - status: - ls.status === LockupStatus.UNCLAIMED_VAA - ? 'Failed' - : ls.status === LockupStatus.AWAITING_VAA - ? 'In Process' - : 'Completed', - }); - } - setTransfers([...transfers.values()]); - } -}; - -const queryWrappedMetaTransactions = async ( - authorityKey: PublicKey, - connection: Connection, - setTransfers: (arr: WrappedTransferMeta[]) => void, - provider: ethers.providers.Web3Provider, - bridge?: SolanaBridge, -) => { - const filters = [ - { - dataSize: TransferOutProposalLayout.span, - }, - ]; - - let wh = WormholeFactory.connect(programIds().wormhole.bridge, provider); - const resp = await (connection as any)._rpcRequest('getProgramAccounts', [ - WORMHOLE_PROGRAM_ID.toBase58(), - { - commitment: connection.commitment, - filters, - }, - ]); - - const transfers = new Map(); - - resp.result - .map((acc: any) => ({ - publicKey: new PublicKey(acc.pubkey), - account: { - data: bs58.decode(acc.account.data), - executable: acc.account.executable, - owner: new PublicKey(acc.account.owner), - lamports: acc.account.lamports, - }, - })) - .map((acc: any) => { - if (acc.account.data.length === TransferOutProposalLayout.span) { - const metaTransfer = TransferOutProposalLayout.decode(acc.account.data); - let assetAddress: string = ''; - if (metaTransfer.assetChain !== ASSET_CHAIN.Solana) { - assetAddress = Buffer.from( - metaTransfer.assetAddress.slice(12), - ).toString('hex'); - } else { - assetAddress = new PublicKey(metaTransfer.assetAddress).toBase58(); - } - - const dec = new BigNumber(10).pow( - new BigNumber(metaTransfer.assetDecimals), - ); - const rawAmount = new BigNumber( - new BN(metaTransfer.amount, 2, 'le').toString(), - ); - const amount = rawAmount.div(dec).toNumber(); - const txhash = acc.publicKey.toBase58(); - - transfers.set(txhash, { - publicKey: acc.publicKey, - amount, - date: metaTransfer.vaaTime, - chain: metaTransfer.assetChain, - address: assetAddress, - decimals: 9, - txhash, - explorer: `https://explorer.solana.com/address/${txhash}`, - lockup: metaTransfer, - }); - } - return null; - }); - - await Promise.all( - [...transfers.values()].map(async transfer => { - const cachedTransfer = transferCache.get(transfer.txhash); - if (cachedTransfer && cachedTransfer.status === 'Completed') { - transfer.vaa = cachedTransfer.vaa; - transfer.status = cachedTransfer.status; - transfer.owner = cachedTransfer.owner; - } else { - const resp = await (connection as any)._rpcRequest( - 'getConfirmedSignaturesForAddress2', - [transfer.publicKey.toBase58()], - ); - - for (const sig of resp.result) { - const confirmedTx = await connection.getParsedConfirmedTransaction( - sig.signature, - 'finalized', - ); - if (!confirmedTx) continue; - const instructions = confirmedTx.transaction?.message?.instructions; - const filteredInstructions = instructions?.filter(ins => { - return ins.programId.toBase58() === WORMHOLE_PROGRAM_ID.toBase58(); - }); - if (filteredInstructions && filteredInstructions?.length > 0) { - for (const ins of filteredInstructions) { - const data = bs58.decode( - (ins as PartiallyDecodedInstruction).data, - ); - if (data[0] === TRANSFER_ASSETS_OUT_INSTRUCTION) { - try { - transfer.owner = (ins as PartiallyDecodedInstruction).accounts[10].toBase58(); - } catch { - // Catch no owner - transfer.owner = ''; - } - } - - if ( - data[0] === POSTVAA_INSTRUCTION && - confirmedTx.meta?.err == null && - bridge - ) { - const lockup = transfer.lockup; - let vaa = lockup.vaa; - for (let i = vaa.length; i > 0; i--) { - if (vaa[i] == 0xff) { - vaa = vaa.slice(0, i); - break; - } - } - try { - let signatures = await bridge.fetchSignatureStatus( - lockup.signatureAccount, - ); - let sigData = Buffer.of( - ...signatures.reduce((previousValue, currentValue) => { - previousValue.push(currentValue.index); - previousValue.push(...currentValue.signature); - - return previousValue; - }, new Array()), - ); - - vaa = Buffer.concat([ - vaa.slice(0, 5), - Buffer.of(signatures.length), - sigData, - vaa.slice(6), - ]); - try { - if (vaa?.length) { - const _ = await wh.parseAndVerifyVAA(vaa); - transfer.status = 'Failed'; - transfer.vaa = vaa; - //TODO: handle vaa not posted - //console.log({ result }); - } else { - transfer.status = 'Error'; - transfer.vaa = vaa; - //TODO: handle empty data - //console.log({ vaa }); - } - } catch (e) { - //console.log({ error: e }); - transfer.vaa = vaa; - transfer.status = 'Completed'; - transferCache.set(transfer.txhash, transfer); - } - } catch (e) { - transfer.status = 'Error'; - transfer.vaa = vaa; - //TODO: handle error - } - } - } - } - } - } - }), - ); - - setTransfers([...transfers.values()]); -}; - -export const useWormholeTransactions = (tokenAccounts: TokenAccount[]) => { - const connection = useConnection(); - const { tokenMap: ethTokens } = useEthereum(); - const { tokenMap } = useConnectionConfig(); - const { coinList } = useCoingecko(); - const bridge = useBridge(); - - const [loading, setLoading] = useState(true); - const [transfers, setTransfers] = useState([]); - const [amountInUSD, setAmountInUSD] = useState(0); - - useEffect(() => { - setLoading(true); - - (async () => { - // authority -> query for token accounts to get locked assets - let authorityKey = await bridgeAuthorityKey(programIds().wormhole.pubkey); - if ((window as any).ethereum === undefined) { - notify({ - message: 'Metamask Error', - description: 'Please install metamask wallet extension', - }); - setLoading(false); - } else { - const provider = new ethers.providers.Web3Provider( - (window as any).ethereum, - ); - // query wrapped assets that were imported to solana from other chains - queryOwnWrappedMetaTransactions( - authorityKey, - connection, - setTransfers, - provider, - tokenAccounts, - bridge, - ).then(() => setLoading(false)); - } - })(); - }, [connection, setTransfers, tokenAccounts]); - - const coingeckoTimer = useRef(0); - const dataSourcePriceQuery = useCallback(async () => { - if (transfers.length === 0) return; - - const ids = [ - ...new Set( - transfers - .map(transfer => { - let knownToken = tokenMap.get(transfer.address); - if (knownToken) { - transfer.logo = knownToken.logoURI; - transfer.symbol = knownToken.symbol; - } - - let token = ethTokens.get(`0x${transfer.address || ''}`); - if (token) { - transfer.logo = token.logoURI; - transfer.symbol = token.symbol; - } - if (transfer.symbol) { - let coinInfo = coinList.get(transfer.symbol.toLowerCase()); - if (coinInfo) { - transfer.coinId = coinInfo.id; - return coinInfo.id; - } - } - return ''; - }) - .filter(a => a?.length), - ), - ]; - - if (ids.length === 0) return; - - console.log('Querying Prices...'); - const parameters = `?ids=${ids.join(',')}&vs_currencies=usd`; - const resp = await window.fetch(COINGECKO_COIN_PRICE_API + parameters); - const usdByCoinId = await resp.json(); - - transfers.forEach(transfer => { - transfer.price = usdByCoinId[transfer.coinId as string]?.usd || 1; - transfer.value = - Math.round(transfer.amount * (transfer.price || 1) * 100) / 100; - }); - - setAmountInUSD(10); - - coingeckoTimer.current = window.setTimeout( - () => dataSourcePriceQuery(), - COINGECKO_POOL_INTERVAL, - ); - }, [transfers, setAmountInUSD, coinList]); - - useEffect(() => { - if (transfers && coinList && !loading) { - dataSourcePriceQuery(); - } - return () => { - window.clearTimeout(coingeckoTimer.current); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [transfers, coinList, loading]); - - return { - loading, - transfers, - totalInUSD: amountInUSD, - }; -}; diff --git a/packages/bridge/src/index.css b/packages/bridge/src/index.css deleted file mode 100644 index 1cbfcbe..0000000 --- a/packages/bridge/src/index.css +++ /dev/null @@ -1,33 +0,0 @@ -body { - margin: 0; - - font-style: normal; - font-weight: normal; - font-family: DM Sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', - 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif !important; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} - -.ant-pro-basicLayout-content { - margin: 0 !important; - background-color: #141414; - color: rgba(255, 255, 255, 0.85); -} - -.home-info-row { - min-height: 75vh; -} -.img-svg-absolute { - position: absolute; - left: 0; - width: 100%; - height: auto; - top: 0; -} diff --git a/packages/bridge/src/index.tsx b/packages/bridge/src/index.tsx deleted file mode 100644 index 31520f9..0000000 --- a/packages/bridge/src/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import './wdyr'; - -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; -ReactDOM.render( - - - , - document.getElementById('root'), -); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/packages/bridge/src/manifest.json b/packages/bridge/src/manifest.json deleted file mode 100644 index 15df998..0000000 --- a/packages/bridge/src/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Wormhole Solana Bridge", - "short_name": "Wormhole Solana Bridge", - "display": "standalone", - "start_url": "./", - "theme_color": "#002140", - "background_color": "#001529", - "icons": [ - { - "src": "icons/icon-192x192.png", - "sizes": "192x192" - }, - { - "src": "icons/icon-128x128.png", - "sizes": "128x128" - }, - { - "src": "icons/icon-512x512.png", - "sizes": "512x512" - } - ] -} diff --git a/packages/bridge/src/models/dex/index.ts b/packages/bridge/src/models/dex/index.ts deleted file mode 100644 index 9fc9e36..0000000 --- a/packages/bridge/src/models/dex/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './market'; diff --git a/packages/bridge/src/models/dex/market.ts b/packages/bridge/src/models/dex/market.ts deleted file mode 100644 index 54aee09..0000000 --- a/packages/bridge/src/models/dex/market.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { contexts, ParsedAccountBase } from '@oyster/common'; -import { Market, MARKETS, Orderbook } from '@project-serum/serum'; -import { AccountInfo, PublicKey } from '@solana/web3.js'; -const { MintParser, cache } = contexts.Accounts; - -export const OrderBookParser = (id: PublicKey, acc: AccountInfo) => { - const decoded = Orderbook.LAYOUT.decode(acc.data); - - const details = { - pubkey: id, - account: { - ...acc, - }, - info: decoded, - } as ParsedAccountBase; - - return details; -}; - -const DEFAULT_DEX_ID = new PublicKey( - 'EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o', -); - -export const DexMarketParser = ( - pubkey: PublicKey, - acc: AccountInfo, -) => { - const market = MARKETS.find(m => m.address.equals(pubkey)); - const decoded = Market.getLayout(market?.programId || DEFAULT_DEX_ID).decode( - acc.data, - ); - - const details = { - pubkey, - account: { - ...acc, - }, - info: decoded, - } as ParsedAccountBase; - - cache.registerParser(details.info.baseMint, MintParser); - cache.registerParser(details.info.quoteMint, MintParser); - cache.registerParser(details.info.bids, OrderBookParser); - cache.registerParser(details.info.asks, OrderBookParser); - - return details; -}; diff --git a/packages/bridge/src/models/index.ts b/packages/bridge/src/models/index.ts deleted file mode 100644 index ef81038..0000000 --- a/packages/bridge/src/models/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dex'; diff --git a/packages/bridge/src/models/marketOverrides.ts b/packages/bridge/src/models/marketOverrides.ts deleted file mode 100644 index 1a626c8..0000000 --- a/packages/bridge/src/models/marketOverrides.ts +++ /dev/null @@ -1,2 +0,0 @@ -// use to override serum market to use specifc mint -export const MINT_TO_MARKET: { [key: string]: string } = {}; diff --git a/packages/bridge/src/models/totals.ts b/packages/bridge/src/models/totals.ts deleted file mode 100644 index b3c3a06..0000000 --- a/packages/bridge/src/models/totals.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface TotalItem { - key: string; - marketSize: number; - nativeSize: number; - name: string; -} - -export interface Totals { - marketSize: number; - numberOfAssets: number; - items: TotalItem[]; -} diff --git a/packages/bridge/src/react-app-env.d.ts b/packages/bridge/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/packages/bridge/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/bridge/src/routes.tsx b/packages/bridge/src/routes.tsx deleted file mode 100644 index ccdce6d..0000000 --- a/packages/bridge/src/routes.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { HashRouter, Route, Switch } from 'react-router-dom'; -import React from 'react'; -import { contexts } from '@oyster/common'; -import { MarketProvider, EthereumProvider } from './contexts'; -import { AppLayout } from './components/Layout'; - -import { - FaucetView, - HomeView, - TransferView, - HelpView, - ProofOfAssetsView, - FaqView, - RenbtcDebugView, -} from './views'; -import { CoingeckoProvider } from './contexts/coingecko'; -import { BridgeProvider } from './contexts/bridge'; -import { UseWalletProvider } from 'use-wallet'; -import { TokenChainPairProvider } from './contexts/chainPair'; -const { WalletProvider } = contexts.Wallet; -const { ConnectionProvider } = contexts.Connection; -const { AccountsProvider } = contexts.Accounts; - -export function Routes() { - return ( - <> - - - - - - - - - - - - - } - /> - } /> - {/*} />*/} - } - /> - } /> - } - /> - {/*}*/} - {/*/>*/} - - - - - - - - - - - - - - ); -} diff --git a/packages/bridge/src/serviceWorker.ts b/packages/bridge/src/serviceWorker.ts deleted file mode 100644 index 852bc17..0000000 --- a/packages/bridge/src/serviceWorker.ts +++ /dev/null @@ -1,146 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/, - ), -); - -type Config = { - onSuccess?: (registration: ServiceWorkerRegistration) => void; - onUpdate?: (registration: ServiceWorkerRegistration) => void; -}; - -export function register(config?: Config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA', - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl: string, config?: Config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.', - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl: string, config?: Config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl, { - headers: { 'Service-Worker': 'script' }, - }) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.', - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready - .then(registration => { - registration.unregister(); - }) - .catch(error => { - console.error(error.message); - }); - } -} diff --git a/packages/bridge/src/setupTests.ts b/packages/bridge/src/setupTests.ts deleted file mode 100644 index 74b1a27..0000000 --- a/packages/bridge/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/extend-expect'; diff --git a/packages/bridge/src/types/buffer-layout.d.ts b/packages/bridge/src/types/buffer-layout.d.ts deleted file mode 100644 index 32e44d0..0000000 --- a/packages/bridge/src/types/buffer-layout.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module 'buffer-layout' { - const bl: any; - export = bl; -} - -declare module 'jazzicon' { - const jazzicon: any; - export = jazzicon; -} diff --git a/packages/bridge/src/utils/assets.ts b/packages/bridge/src/utils/assets.ts deleted file mode 100644 index 0e9a347..0000000 --- a/packages/bridge/src/utils/assets.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { - getTokenName, - getVerboseTokenName, - KnownTokenMap, -} from '@oyster/common'; -import { TokenInfo } from '@solana/spl-token-registry'; - -export const getAssetName = ( - parsedAssetAddress: string, - assetChain: number, - solanaTokens: KnownTokenMap, - ethTokens: KnownTokenMap, -) => { - if (assetChain === ASSET_CHAIN.Solana) - return getVerboseTokenName(solanaTokens, parsedAssetAddress); - else return getVerboseTokenName(ethTokens, `0x${parsedAssetAddress}`); -}; - -export const getAssetTokenSymbol = ( - parsedAssetAddress: string, - assetChain: number, - solanaTokens: KnownTokenMap, - ethTokens: KnownTokenMap, -) => { - if (assetChain === ASSET_CHAIN.Solana) - return getTokenName(solanaTokens, parsedAssetAddress); - else return getTokenName(ethTokens, `0x${parsedAssetAddress}`); -}; - -export const getAssetAmountInUSD = ( - amount: number, - parsedAssetAddress: string, - assetChain: number, -) => { - return amount; -}; - -export enum ASSET_CHAIN { - Solana = 1, - Ethereum = 2, -} - -const CHAIN_NAME = { - [ASSET_CHAIN.Solana]: 'Solana', - [ASSET_CHAIN.Ethereum]: 'Ethereum', -}; - -export const chainToName = (chain?: ASSET_CHAIN) => { - return CHAIN_NAME[chain || ASSET_CHAIN.Ethereum]; -}; - -const EXCLUDED_COMMON_TOKENS = ['usdt', 'usdc']; -const EXCLUDED_SPL_TOKENS = [ - 'sol', - 'srm', - 'ray', - 'oxy', - 'mer', - 'maps', - ...EXCLUDED_COMMON_TOKENS, -]; - -export const filterModalSolTokens = (tokens: TokenInfo[]) => { - return tokens.filter( - token => - EXCLUDED_SPL_TOKENS.indexOf(token.symbol.toLowerCase()) < 0 && - !token.name.includes('(Sollet)'), - ); -}; -const EXCLUDED_ETH_TOKENS = [...EXCLUDED_COMMON_TOKENS]; - -export const filterModalEthTokens = (tokens: TokenInfo[]) => { - return tokens.filter( - token => EXCLUDED_ETH_TOKENS.indexOf(token.symbol.toLowerCase()) < 0, - ); -}; diff --git a/packages/bridge/src/utils/helpers.ts b/packages/bridge/src/utils/helpers.ts deleted file mode 100644 index 562ec9c..0000000 --- a/packages/bridge/src/utils/helpers.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { keccak256 } from 'ethers/utils'; -import { programIds } from '@oyster/common'; - -export function deriveERC20Address(key: PublicKey) { - const ethBridgeAddress = programIds().wormhole.bridge; - const ethWrappedMaster = programIds().wormhole.wrappedMaster; - let hashData = '0xff' + ethBridgeAddress.slice(2); - hashData += keccak256(Buffer.concat([new Buffer([1]), key.toBuffer()])).slice( - 2, - ); // asset_id - hashData += keccak256( - '0x3d602d80600a3d3981f3363d3d373d3d3d363d73' + - ethWrappedMaster + - '5af43d82803e903d91602b57fd5bf3', - ).slice(2); // Bytecode - - return keccak256(hashData).slice(26); -} diff --git a/packages/bridge/src/utils/ids.ts b/packages/bridge/src/utils/ids.ts deleted file mode 100644 index e85a623..0000000 --- a/packages/bridge/src/utils/ids.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; - -export const WORMHOLE_PROGRAM_ID = new PublicKey( - 'WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC', -); - -export const TRANSFER_ASSETS_OUT_INSTRUCTION: number = 1; -export const POSTVAA_INSTRUCTION: number = 2; - -const INSTRUCTION_LOOKUP: { [key: number]: string } = { - 0: 'Initialize Bridge', - [TRANSFER_ASSETS_OUT_INSTRUCTION]: 'Transfer Assets Out', - [POSTVAA_INSTRUCTION]: 'Post VAA', - 3: 'Evict Transfer Proposal', - 4: 'Evict Claimed VAA', - 5: 'Poke Proposal', - 6: 'Verify Signatures', - 7: 'Create Wrapped Asset', -}; - -export function isWormholeInstruction( - instruction: TransactionInstruction, -): boolean { - return WORMHOLE_PROGRAM_ID.toBase58() === instruction.programId.toBase58(); -} - -export function parsWormholeInstructionTitle( - instruction: TransactionInstruction, -): string { - const code = instruction.data[0]; - - if (!(code in INSTRUCTION_LOOKUP)) { - throw new Error(`Unrecognized Wormhole instruction code: ${code}`); - } - - return INSTRUCTION_LOOKUP[code]; -} diff --git a/packages/bridge/src/utils/layout.ts b/packages/bridge/src/utils/layout.ts deleted file mode 100644 index 38931a4..0000000 --- a/packages/bridge/src/utils/layout.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import * as BufferLayout from 'buffer-layout'; - -/** - * Layout for a public key - */ -export const publicKey = (property = 'publicKey'): unknown => { - const publicKeyLayout = BufferLayout.blob(32, property); - - const _decode = publicKeyLayout.decode.bind(publicKeyLayout); - const _encode = publicKeyLayout.encode.bind(publicKeyLayout); - - publicKeyLayout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new PublicKey(data); - }; - - publicKeyLayout.encode = (key: PublicKey, buffer: Buffer, offset: number) => { - return _encode(key.toBuffer(), buffer, offset); - }; - - return publicKeyLayout; -}; - -/** - * Layout for a 64bit unsigned value - */ -export const uint64 = (property = 'uint64'): unknown => { - const layout = BufferLayout.blob(8, property); - - const _decode = layout.decode.bind(layout); - const _encode = layout.encode.bind(layout); - - layout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new BN( - [...data] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - }; - - layout.encode = (num: BN, buffer: Buffer, offset: number) => { - const a = num.toArray().reverse(); - let b = Buffer.from(a); - if (b.length !== 8) { - const zeroPad = Buffer.alloc(8); - b.copy(zeroPad); - b = zeroPad; - } - return _encode(b, buffer, offset); - }; - - return layout; -}; - -// TODO: wrap in BN (what about decimals?) -export const uint128 = (property = 'uint128'): unknown => { - const layout = BufferLayout.blob(16, property); - - const _decode = layout.decode.bind(layout); - const _encode = layout.encode.bind(layout); - - layout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new BN( - [...data] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - }; - - layout.encode = (num: BN, buffer: Buffer, offset: number) => { - const a = num.toArray().reverse(); - let b = Buffer.from(a); - if (b.length !== 16) { - const zeroPad = Buffer.alloc(16); - b.copy(zeroPad); - b = zeroPad; - } - - return _encode(b, buffer, offset); - }; - - return layout; -}; - -/** - * Layout for a Rust String type - */ -export const rustString = (property = 'string'): unknown => { - const rsl = BufferLayout.struct( - [ - BufferLayout.u32('length'), - BufferLayout.u32('lengthPadding'), - BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'), - ], - property, - ); - const _decode = rsl.decode.bind(rsl); - const _encode = rsl.encode.bind(rsl); - - rsl.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return data.chars.toString('utf8'); - }; - - rsl.encode = (str: string, buffer: Buffer, offset: number) => { - const data = { - chars: Buffer.from(str, 'utf8'), - }; - return _encode(data, buffer, offset); - }; - - return rsl; -}; diff --git a/packages/bridge/src/views/faq/index.less b/packages/bridge/src/views/faq/index.less deleted file mode 100644 index e69de29..0000000 diff --git a/packages/bridge/src/views/faq/index.tsx b/packages/bridge/src/views/faq/index.tsx deleted file mode 100644 index 82eaeba..0000000 --- a/packages/bridge/src/views/faq/index.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -import './index.less'; - -export const FaqView = () => { - return ( -
- ); -}; diff --git a/packages/bridge/src/views/faucet/index.tsx b/packages/bridge/src/views/faucet/index.tsx deleted file mode 100644 index e3833d7..0000000 --- a/packages/bridge/src/views/faucet/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import React, { useCallback } from 'react'; -import { Card } from 'antd'; -import { LAMPORTS_PER_SOL } from '@solana/web3.js'; -import { LABELS } from '../../constants'; -import { contexts, utils, ConnectButton, useWallet } from '@oyster/common'; -const { useConnection } = contexts.Connection; -const { notify } = utils; - -export const FaucetView = () => { - const connection = useConnection(); - const { publicKey } = useWallet(); - - const airdrop = useCallback(() => { - if (!publicKey) { - return; - } - - connection - .requestAirdrop(publicKey, 2 * LAMPORTS_PER_SOL) - .then(() => { - notify({ - message: LABELS.ACCOUNT_FUNDED, - type: 'success', - }); - }); - }, [publicKey, connection]); - - const bodyStyle: React.CSSProperties = { - display: 'flex', - flex: 1, - justifyContent: 'center', - alignItems: 'center', - height: '100%', - }; - - return ( -
- -
-
- {LABELS.FAUCET_INFO} -
- - {LABELS.GIVE_SOL} - -
-
-
- ); -}; diff --git a/packages/bridge/src/views/help/index.less b/packages/bridge/src/views/help/index.less deleted file mode 100644 index a393bec..0000000 --- a/packages/bridge/src/views/help/index.less +++ /dev/null @@ -1,28 +0,0 @@ -.description-container { - .ant-row { - align-items: center; - margin-bottom: 50px; - } - .main-logo { - .logo-title { - margin-bottom: 0; - font-size: 35px; - letter-spacing: 0; - } - } -} -.q-title { - font-size: 32px; - line-height: 160%; - max-width: 80%; - margin: auto; -} - -.q-description { - font-size: 20px; - line-height: 160%; - max-width: 80%; - margin: auto; - margin-top: 20px; - text-align: center; -} diff --git a/packages/bridge/src/views/help/index.tsx b/packages/bridge/src/views/help/index.tsx deleted file mode 100644 index c0ab9b8..0000000 --- a/packages/bridge/src/views/help/index.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { Row, Col, Button } from 'antd'; - -import './index.less'; - -export const HelpView = () => { - return ( -
-
- -
-
How does Wormhole Work?
-

- Wormhole allows existing projects, platforms, and communities to - move tokenized assets seamlessly across blockchains to benefit - from Solana’s high speed and low cost. Wormhole does this by - wrapping ERC-20 tokens, which are then usable in Solana’s low-cost - defi ecosystem. -

- - -
- -
- - - - - - - -
- How can I integrate Wormhole into my wallet or dapp? -
-

- Wormhole is an open-source project accessible to all. -

- - - - - ); -}; diff --git a/packages/bridge/src/views/home/index.less b/packages/bridge/src/views/home/index.less deleted file mode 100644 index 16c61bb..0000000 --- a/packages/bridge/src/views/home/index.less +++ /dev/null @@ -1,184 +0,0 @@ -@import '_colors'; - -.App { - height: auto; -} -section.ant-layout { - width: 100%; - margin: auto; - position: relative; -} - -.get-started { - background: url("/home/get-started.svg") center center no-repeat; - background-size: 100%; - cursor: pointer; - width: 224px; - height: 64px; - display: inline-block; -} -.down-arrow { - background: url("/home/icons/down-arrow.svg") center center no-repeat; - background-size: 150%; - cursor: pointer; - display: inline-block; - width: 25px; - height: 21px; -} -.logo-title { - /* SOLANA <-> ETHEREUM BRIDGE */ - background: linear-gradient(90deg, #DC1FFF 11.29%, #4DA9FF 51.42%, #00CC82 93.23%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - font-size: 16px; - line-height: 160%; - text-align: center; - letter-spacing: 0.8em; - text-transform: uppercase; - margin-bottom: 90px; -} - -.home-subtitle { - font-size: 32px; - line-height: 160%; - margin-top: 80px; -} -.description-text { - font-size: 14px; - line-height: 160%; - color: @tungsten-40; -} -.home-container { - width: 100%; - - background-color: #06101a; - #how-it-works-container { - display: flex; - flex-direction: column; - height: auto; - width: 100%; - background: @tungsten-50; - padding-bottom: 120px; - - & > div:first-child { - margin-bottom: 80px; - } - - .home-description { - display: flex; - flex-direction: row; - width: 90%; - margin: auto; - justify-content: space-evenly; - - .home-description-item { - padding: 0 30px 0 30px; - .description-title { - font-size: 20px; - line-height: 160%; - margin: 22px 0 22px 0; - } - - .description-text { - text-align: justify; - } - } - } - } - - #recent-tx-container { - max-width: 70%; - margin: auto; - padding-bottom: 70px; - .description-text { - color: @tungsten-60 - } - .ant-table-pagination.ant-pagination { - margin: 16px 100px; - } - .ant-table { - thead { - tr > th.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - } - tbody > tr:nth-child(even) > td.ant-table-cell { - background-color: @tungsten-100; - border: none; - } - tbody > tr:nth-child(odd) > td.ant-table-cell { - background-color: @tungsten-50; - border: none; - } - } - } -} - -.justify-bottom-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: flex-end; - min-height: 802px; - .main-logo { - & > img { - max-width: 100%; - } - } - & > div { - font-size: 16px; - line-height: 160%; - width: auto; - margin: 3px 20px 40px 20px; - } - & > div:first-child { - margin-bottom: 120px; - } -} - -.grow-effect:hover { - transition: ease-out 100ms; - transform: scale(1.1); -} - -footer.ant-layout-footer { - padding: 30px 0; - background-image: url('/home/footer.svg'); - background-size: 100% auto; - background-repeat: no-repeat; - width: 100%; - background-color: @tungsten-100; -} - -.wormhole-bg { - background-image: url('/home/background.svg'); - background-size: 100% auto; - background-repeat: no-repeat; -} - - -@media screen and (max-width: 900px) { - .justify-bottom-container { - min-height: 640px; - } - .home-container { - #recent-tx-container { - max-width: 100%; - } - #how-it-works-container { - .home-description { - flex-direction: column; - } - } - } -} - - -@media screen and (max-width: 1200px) { - .home-container { - #recent-tx-container { - max-width: 90%; - } - } -} diff --git a/packages/bridge/src/views/home/index.tsx b/packages/bridge/src/views/home/index.tsx deleted file mode 100644 index de56636..0000000 --- a/packages/bridge/src/views/home/index.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import anime from 'animejs'; -import React from 'react'; -import './itemStyle.less'; -import './index.less'; -import { Link } from 'react-router-dom'; - -export const HomeView = () => { - const handleDownArrow = () => { - const scrollTo = document.getElementById('how-it-works-container'); - const scrollElement = - window.document.scrollingElement || - window.document.body || - window.document.documentElement; - anime({ - targets: scrollElement, - scrollTop: scrollTo?.offsetTop, - duration: 1000, - easing: 'easeInOutQuad', - }); - }; - return ( - <> -
-
-
-
- {' '} - SOLANA <-> ETHEREUM BRIDGE -
- -
-
- Easily move any tokens between Ethereum and Solana
with - Wormhole’s bi-directional bridge -
-
- - - -
-
{ - handleDownArrow(); - }} - > - -
-
-
-
How it works
-
-
-
- -
-
Bridge in any direction
-
-
-
-
- -
-
Staking & Validation
-
-
-
-
- -
-
Layers and Capabilities
-
-
-
-
- {/* */} -
- - ); -}; diff --git a/packages/bridge/src/views/home/item.tsx b/packages/bridge/src/views/home/item.tsx deleted file mode 100644 index dc23a6b..0000000 --- a/packages/bridge/src/views/home/item.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React, { useMemo } from 'react'; - -import { Link } from 'react-router-dom'; -import { PublicKey } from '@solana/web3.js'; -import { contexts, hooks, utils, TokenIcon } from '@oyster/common'; -import { TotalItem } from '../../models/totals'; -const { wadToLamports, formatNumber, fromLamports, formatPct } = utils; -const { useMint } = contexts.Accounts; -const { useTokenName } = hooks; - -export const LendingReserveItem = (props: { - address: PublicKey; - item?: TotalItem; -}) => { - const name = ''; //useTokenName(props.reserve.liquidityMint); - - const marketSize = 0; - - return ( - -
- - - {name} - -
-
-
- {formatNumber.format(marketSize)} {name} -
-
- ${formatNumber.format(props.item?.marketSize)} -
-
-
-
- - ); -}; diff --git a/packages/bridge/src/views/home/itemStyle.less b/packages/bridge/src/views/home/itemStyle.less deleted file mode 100644 index 388fcd2..0000000 --- a/packages/bridge/src/views/home/itemStyle.less +++ /dev/null @@ -1,37 +0,0 @@ -@import '~antd/es/style/themes/dark.less'; - -.home-item { - display: flex; - justify-content: space-between; - align-items: center; - color: @text-color; - - & > :nth-child(n) { - flex: 20%; - text-align: right; - margin: 10px 0px; - } - - & > :first-child { - flex: 80px - } - - border-bottom: 1px solid @border-color-split; -} - -.home-header { - & > div { - flex: 20%; - text-align: right; - } - - & > :first-child { - text-align: left; - flex: 80px - } -} - -.home-info-row { - margin-bottom: 10px; - min-height: 45vh; -} diff --git a/packages/bridge/src/views/index.tsx b/packages/bridge/src/views/index.tsx deleted file mode 100644 index 2ed9391..0000000 --- a/packages/bridge/src/views/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export { HomeView } from './home'; -export { FaucetView } from './faucet'; -export { TransferView } from './transfer'; -export { HelpView } from './help'; -export { FaqView } from './faq'; -export { ProofOfAssetsView } from './proof-of-assets'; -export { RenbtcDebugView } from './renbtc-debug'; diff --git a/packages/bridge/src/views/proof-of-assets/index.less b/packages/bridge/src/views/proof-of-assets/index.less deleted file mode 100644 index 6e546ca..0000000 --- a/packages/bridge/src/views/proof-of-assets/index.less +++ /dev/null @@ -1,3 +0,0 @@ -div:not(.home-container) > #recent-tx-container { - margin-top: 150px; -} diff --git a/packages/bridge/src/views/proof-of-assets/index.tsx b/packages/bridge/src/views/proof-of-assets/index.tsx deleted file mode 100644 index 02e0076..0000000 --- a/packages/bridge/src/views/proof-of-assets/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; - -import './index.less'; -import { AssetsTable } from '../../components/AssetsTable'; - -export const ProofOfAssetsView = () => { - return ( -
- -
- ); -}; diff --git a/packages/bridge/src/views/renbtc-debug.tsx b/packages/bridge/src/views/renbtc-debug.tsx deleted file mode 100644 index 9be5b51..0000000 --- a/packages/bridge/src/views/renbtc-debug.tsx +++ /dev/null @@ -1,185 +0,0 @@ -import React, { useState } from 'react'; -import { - cache, - ConnectButton, - createAssociatedTokenAccountInstruction, - ExplorerLink, - getMultipleAccounts, - ParsedAccount, - programIds, - sendTransactionWithRetry, - TokenAccountParser, - useConnection, - useWallet, -} from '@oyster/common'; -import { PublicKey, TransactionInstruction, Account } from '@solana/web3.js'; -import { AccountInfo } from '@solana/spl-token'; - -export const RenbtcDebugView = () => { - const rentbtcMint = new PublicKey( - 'EK6iyvvqvQtsWYcySrZVHkXjCLX494r9PhnDWJaX1CPu', - ); - const wallet = useWallet(); - const connection = useConnection(); - const [ataa, setAtaa] = useState(''); - const [exists, setExists] = useState(false); - return ( - <> -
-
- - - renBTC MintKey --{' '} - - - - Wallet Address -- {wallet.publicKey?.toBase58()} - - - - {ataa} : {exists ? 'Already Created' : 'Not created yet'} - - - -
-
- - ); -}; diff --git a/packages/bridge/src/views/transfer/index.less b/packages/bridge/src/views/transfer/index.less deleted file mode 100644 index 6533620..0000000 --- a/packages/bridge/src/views/transfer/index.less +++ /dev/null @@ -1,7 +0,0 @@ - -.transfer-bg { - background-image: url('/transfer/background.svg'); - background-size: 100% auto; - background-color: #06101a; - background-repeat: no-repeat; -} diff --git a/packages/bridge/src/views/transfer/index.tsx b/packages/bridge/src/views/transfer/index.tsx deleted file mode 100644 index 568d961..0000000 --- a/packages/bridge/src/views/transfer/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import './index.less'; -import { Transfer } from '../../components/Transfer'; - -export const TransferView = () => { - return ( - <> -
- -
- - ); -}; diff --git a/packages/bridge/src/wallet-adapters/metamask.tsx b/packages/bridge/src/wallet-adapters/metamask.tsx deleted file mode 100644 index 69419e8..0000000 --- a/packages/bridge/src/wallet-adapters/metamask.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import EventEmitter from 'eventemitter3'; -import { PublicKey, Transaction } from '@solana/web3.js'; -import { notify, SignerWalletAdapter } from '@oyster/common'; -import { ethers } from 'ethers'; - -// @ts-ignore -export class MetamaskWalletAdapter - extends EventEmitter - implements SignerWalletAdapter { - _publicKey: PublicKey | null; - _onProcess: boolean; - _accounts: Array; - _chainID: number; - _provider: any; - constructor() { - super(); - this._publicKey = null; - this._provider = null; - this._accounts = []; - this._chainID = 0; - this._onProcess = false; - this.connect = this.connect.bind(this); - } - - get publicKey() { - return this._publicKey; - } - get provider() { - return this._provider; - } - get accounts() { - return this._accounts; - } - get chainID() { - return this._chainID; - } - - async signTransaction(transaction: Transaction) { - return (window as any).ethereum.signTransaction(transaction); - } - async signAllTransactions(transactions: Transaction[]) { - return transactions; - } - - async connect() { - if (this._onProcess) { - return; - } - - if ((window as any).ethereum === undefined) { - notify({ - message: 'Metamask Error', - description: 'Please install metamask wallet from Chrome ', - }); - return; - } - - this._onProcess = true; - // @ts-ignore - window.ethereum - .request({ method: 'eth_requestAccounts' }) - .then(() => { - // @ts-ignore - const provider = new ethers.providers.Web3Provider( - (window as any).ethereum, - ); - const signer = provider.getSigner(); - signer.getAddress().then(account => { - this._accounts = [account]; - provider.getNetwork().then(network => { - this._chainID = network.chainId; - this._provider = provider; - this.emit('connect'); - }); - }); - // @ts-ignore - window.ethereum.on('disconnect', error => { - this.emit('disconnect', error); - }); - // @ts-ignore - window.ethereum.on('accountsChanged', accounts => { - this.emit('accountsChanged', accounts); - }); - // @ts-ignore - window.ethereum.on('chainChanged', (chainId: string) => { - this.emit('chainChanged', chainId); - }); - }) - .catch(() => { - this.disconnect(); - }) - .finally(() => { - this._onProcess = false; - }); - } - - async disconnect() { - if (this._provider) { - this._publicKey = null; - this._provider = null; - this.emit('disconnect'); - } - } -} diff --git a/packages/bridge/src/wallet-adapters/wallet-connect.tsx b/packages/bridge/src/wallet-adapters/wallet-connect.tsx deleted file mode 100644 index 2c2fa94..0000000 --- a/packages/bridge/src/wallet-adapters/wallet-connect.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import EventEmitter from 'eventemitter3'; -import { PublicKey, Transaction } from '@solana/web3.js'; -import { SignerWalletAdapter } from '@oyster/common'; -import { ethers } from 'ethers'; -import WalletConnectProvider from '@walletconnect/web3-provider'; - -// @ts-ignore -export class WalletConnectWalletAdapter - extends EventEmitter - implements SignerWalletAdapter { - _publicKey: PublicKey | null; - _onProcess: boolean; - _accounts: Array; - _chainID: number; - _provider: any; - _walletProvider: any; - - constructor() { - super(); - this._publicKey = null; - this._provider = null; - this._walletProvider = null; - this._accounts = []; - this._chainID = 0; - this._onProcess = false; - this.connect = this.connect.bind(this); - } - - get publicKey() { - return this._publicKey; - } - get provider() { - return this._provider; - } - get accounts() { - return this._accounts; - } - get chainID() { - return this._chainID; - } - - async signTransaction(transaction: Transaction) { - return this._provider.signTransaction(transaction); - } - async signAllTransactions(transactions: Transaction[]) { - return transactions; - } - - async connect() { - if (this._onProcess) { - return; - } - - this._onProcess = true; - - // Create WalletConnect Provider - const walletConnectProvider = new WalletConnectProvider({ - infuraId: '535ab8649e9f40cface13cbded7d647e', - }); - walletConnectProvider - .enable() - .then(() => { - const provider = new ethers.providers.Web3Provider( - walletConnectProvider, - ); - const signer = provider.getSigner(); - signer.getAddress().then(account => { - this._accounts = [account]; - provider.getNetwork().then(network => { - this._chainID = network.chainId; - this._provider = provider; - this._walletProvider = walletConnectProvider; - this.emit('connect'); - }); - }); - // @ts-ignore - walletConnectProvider.on( - 'disconnect', - (code: number, reason: string) => { - this.emit('disconnect', { code, reason }); - }, - ); - // @ts-ignore - walletConnectProvider.on('accountsChanged', (accounts: string[]) => { - this.emit('accountsChanged', accounts); - }); - // @ts-ignore - walletConnectProvider.on('chainChanged', (chainId: number) => { - this.emit('chainChanged', chainId); - }); - }) - .catch(() => { - this.disconnect(); - }) - .finally(() => { - this._onProcess = false; - }); - } - - async disconnect() { - if (this._provider) { - this._publicKey = null; - this._walletProvider.disconnect(); - this.emit('disconnect'); - } - } -} diff --git a/packages/bridge/src/wdyr.ts b/packages/bridge/src/wdyr.ts deleted file mode 100644 index 33d506c..0000000 --- a/packages/bridge/src/wdyr.ts +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; - -if (process.env.NODE_ENV === 'development') { - // const whyDidYouRender = require('@welldone-software/why-did-you-render'); - // whyDidYouRender(React, { - // trackAllPureComponents: true, - // }); -} diff --git a/packages/bridge/tsconfig.json b/packages/bridge/tsconfig.json deleted file mode 100644 index 8ae8d0b..0000000 --- a/packages/bridge/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "module": "esnext", - "target": "es2019", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "resolveJsonModule": true, - "isolatedModules": true, - "downlevelIteration": true, - "noEmit": true, - "jsx": "react", - "typeRoots": ["types", "../../types", "../../node_modules/@types"], - "moduleResolution": "node" - }, - "include": ["src"] -} diff --git a/packages/bridge/types/buffer-layout.d.ts b/packages/bridge/types/buffer-layout.d.ts deleted file mode 100644 index 32e44d0..0000000 --- a/packages/bridge/types/buffer-layout.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module 'buffer-layout' { - const bl: any; - export = bl; -} - -declare module 'jazzicon' { - const jazzicon: any; - export = jazzicon; -} diff --git a/packages/common/.env.sample b/packages/common/.env.sample deleted file mode 100644 index 81ecd1f..0000000 --- a/packages/common/.env.sample +++ /dev/null @@ -1,2 +0,0 @@ -REACT_APP_MAINNET_RPC=https://explorer-api.mainnet-beta.solana.com -REACT_APP_DEVNET_RPC=https://explorer-api.devnet.solana.com \ No newline at end of file diff --git a/packages/common/package.json b/packages/common/package.json deleted file mode 100644 index 1499a0a..0000000 --- a/packages/common/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "@oyster/common", - "version": "0.0.2", - "description": "Oyster common utilities", - "main": "dist/lib/index.js", - "types": "dist/lib/index.d.ts", - "exports": { - ".": "./dist/lib/" - }, - "license": "Apache-2.0", - "publishConfig": { - "access": "public" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "build": "tsc && less-watch-compiler --run-once src/ dist/lib/", - "start": "npm-run-all --parallel watch watch-css watch-css-src", - "watch-css": "less-watch-compiler src/ dist/lib/", - "watch-css-src": "less-watch-compiler src/ src/", - "watch": "tsc --watch", - "test": "jest test", - "clean": "rm -rf dist", - "prepare": "run-s clean build" - }, - "dependencies": { - "@project-serum/serum": "^0.13.11", - "@solana/spl-token": "0.1.3", - "@solana/spl-token-swap": "0.1.0", - "@solana/wallet-adapter-base": "^0.6.0", - "@solana/wallet-adapter-react": "^0.12.6", - "@solana/wallet-adapter-wallets": "^0.10.1", - "@solana/web3.js": "^1", - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.5.0", - "@testing-library/user-event": "^7.2.1", - "@types/chart.js": "^2.9.29", - "@types/echarts": "^4.9.0", - "@types/react-router-dom": "^5.1.6", - "@welldone-software/why-did-you-render": "^6.0.5", - "antd": "^4.6.6", - "bignumber.js": "^9.0.1", - "bn.js": "^5.1.3", - "borsh": "^0.3.1", - "bs58": "^4.0.1", - "buffer-layout": "^1.2.0", - "eventemitter3": "^4.0.7", - "identicon.js": "^2.3.3", - "jazzicon": "^1.5.0", - "lodash": "^4.17.20", - "react": "16.13.1", - "react-dom": "16.13.1", - "typescript": "^4.1.3" - }, - "devDependencies": { - "@types/bn.js": "^5.1.0", - "@types/bs58": "^4.0.1", - "@types/identicon.js": "^2.3.0", - "@types/jest": "^24.9.1", - "@types/node": "^12.12.62", - "arweave-deploy": "^1.9.1", - "gh-pages": "^3.1.0", - "jest": "^27.4.7", - "less": "4.1.1", - "less-watch-compiler": "v1.14.6", - "prettier": "^2.1.2" - }, - "files": [ - "dist" - ], - "peerDependencies": { - "react": "*", - "react-dom": "*" - }, - "resolutions": { - "react": "16.13.1", - "react-dom": "16.13.1" - } -} \ No newline at end of file diff --git a/packages/common/src/actions/account.ts b/packages/common/src/actions/account.ts deleted file mode 100644 index aac8577..0000000 --- a/packages/common/src/actions/account.ts +++ /dev/null @@ -1,284 +0,0 @@ -import { AccountLayout, MintLayout, Token } from '@solana/spl-token'; -import { - Account, - PublicKey, - SystemProgram, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { - SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - TOKEN_PROGRAM_ID, - WRAPPED_SOL_MINT, -} from '../utils/ids'; -import { TokenAccount } from '../models/account'; -import { cache, TokenAccountParser } from '../contexts/accounts'; - -export function ensureSplAccount( - instructions: TransactionInstruction[], - cleanupInstructions: TransactionInstruction[], - toCheck: TokenAccount, - payer: PublicKey, - amount: number, - signers: Account[], -) { - if (!toCheck.info.isNative) { - return toCheck.pubkey; - } - - const account = createUninitializedAccount( - instructions, - payer, - amount, - signers, - ); - - instructions.push( - Token.createInitAccountInstruction( - TOKEN_PROGRAM_ID, - WRAPPED_SOL_MINT, - account, - payer, - ), - ); - - cleanupInstructions.push( - Token.createCloseAccountInstruction( - TOKEN_PROGRAM_ID, - account, - payer, - payer, - [], - ), - ); - - return account; -} - -export const DEFAULT_TEMP_MEM_SPACE = 65548; - -export function createTempMemoryAccount( - instructions: TransactionInstruction[], - payer: PublicKey, - signers: Account[], - owner: PublicKey, - space = DEFAULT_TEMP_MEM_SPACE, -) { - const account = new Account(); - instructions.push( - SystemProgram.createAccount({ - fromPubkey: payer, - newAccountPubkey: account.publicKey, - // 0 will evict/close account since it cannot pay rent - lamports: 0, - space: space, - programId: owner, - }), - ); - - signers.push(account); - - return account.publicKey; -} - -export function createUninitializedMint( - instructions: TransactionInstruction[], - payer: PublicKey, - amount: number, - signers: Account[], -) { - const account = new Account(); - instructions.push( - SystemProgram.createAccount({ - fromPubkey: payer, - newAccountPubkey: account.publicKey, - lamports: amount, - space: MintLayout.span, - programId: TOKEN_PROGRAM_ID, - }), - ); - - signers.push(account); - - return account.publicKey; -} - -export function createUninitializedAccount( - instructions: TransactionInstruction[], - payer: PublicKey, - amount: number, - signers: Account[], -) { - const account = new Account(); - instructions.push( - SystemProgram.createAccount({ - fromPubkey: payer, - newAccountPubkey: account.publicKey, - lamports: amount, - space: AccountLayout.span, - programId: TOKEN_PROGRAM_ID, - }), - ); - - signers.push(account); - - return account.publicKey; -} - -export function createAssociatedTokenAccountInstruction( - instructions: TransactionInstruction[], - associatedTokenAddress: PublicKey, - payer: PublicKey, - walletAddress: PublicKey, - splTokenMintAddress: PublicKey, -) { - const keys = [ - { - pubkey: payer, - isSigner: true, - isWritable: true, - }, - { - pubkey: associatedTokenAddress, - isSigner: false, - isWritable: true, - }, - { - pubkey: walletAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: splTokenMintAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: TOKEN_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - data: Buffer.from([]), - }), - ); -} - -export function createMint( - instructions: TransactionInstruction[], - payer: PublicKey, - mintRentExempt: number, - decimals: number, - owner: PublicKey, - freezeAuthority: PublicKey, - signers: Account[], -) { - const account = createUninitializedMint( - instructions, - payer, - mintRentExempt, - signers, - ); - - instructions.push( - Token.createInitMintInstruction( - TOKEN_PROGRAM_ID, - account, - decimals, - owner, - freezeAuthority, - ), - ); - - return account; -} - -export function createTokenAccount( - instructions: TransactionInstruction[], - payer: PublicKey, - accountRentExempt: number, - mint: PublicKey, - owner: PublicKey, - signers: Account[], -) { - const account = createUninitializedAccount( - instructions, - payer, - accountRentExempt, - signers, - ); - - instructions.push( - Token.createInitAccountInstruction(TOKEN_PROGRAM_ID, mint, account, owner), - ); - - return account; -} - -// TODO: check if one of to accounts needs to be native sol ... if yes unwrap it ... -export function findOrCreateAccountByMint( - payer: PublicKey, - owner: PublicKey, - instructions: TransactionInstruction[], - cleanupInstructions: TransactionInstruction[], - accountRentExempt: number, - mint: PublicKey, // use to identify same type - signers: Account[], - excluded?: Set, -): PublicKey { - const accountToFind = mint.toBase58(); - const account = cache - .byParser(TokenAccountParser) - .map(id => cache.get(id)) - .find( - acc => - acc !== undefined && - acc.info.mint.toBase58() === accountToFind && - acc.info.owner.toBase58() === owner.toBase58() && - (excluded === undefined || !excluded.has(acc.pubkey.toBase58())), - ); - const isWrappedSol = accountToFind === WRAPPED_SOL_MINT.toBase58(); - - let toAccount: PublicKey; - if (account && !isWrappedSol) { - toAccount = account.pubkey; - } else { - // creating depositor pool account - toAccount = createTokenAccount( - instructions, - payer, - accountRentExempt, - mint, - owner, - signers, - ); - - if (isWrappedSol) { - cleanupInstructions.push( - Token.createCloseAccountInstruction( - TOKEN_PROGRAM_ID, - toAccount, - payer, - payer, - [], - ), - ); - } - } - - return toAccount; -} diff --git a/packages/common/src/actions/auction.ts b/packages/common/src/actions/auction.ts deleted file mode 100644 index c972b07..0000000 --- a/packages/common/src/actions/auction.ts +++ /dev/null @@ -1,630 +0,0 @@ -import { - AccountInfo, - PublicKey, - SystemProgram, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { programIds } from '../utils/ids'; -import { deserializeBorsh } from './../utils/borsh'; -import { serialize } from 'borsh'; -import BN from 'bn.js'; -import { AccountParser, cache } from '../contexts'; - -export const AUCTION_PREFIX = 'auction'; -export const METADATA = 'metadata'; - -export enum AuctionState { - Created = 0, - Started, - Ended, -} - -export enum BidStateType { - EnglishAuction = 0, - OpenEdition = 1, -} - -export class Bid { - key: PublicKey; - amount: BN; - constructor(args: { key: PublicKey; amount: BN }) { - this.key = args.key; - this.amount = args.amount; - } -} - -export class BidState { - type: BidStateType; - bids: Bid[]; - max: BN; - - public getWinnerIndex(bidder: PublicKey): number | null { - if (!this.bids) return null; - console.log( - 'bids', - this.bids.map(b => b.key.toBase58()), - bidder.toBase58(), - ); - const index = this.bids.findIndex( - b => b.key.toBase58() == bidder.toBase58(), - ); - if (index != -1) return index; - else return null; - } - - constructor(args: { type: BidStateType; bids: Bid[]; max: BN }) { - this.type = args.type; - this.bids = args.bids; - this.max = args.max; - } -} - -export const AuctionParser: AccountParser = ( - pubkey: PublicKey, - account: AccountInfo, -) => ({ - pubkey, - account, - info: decodeAuction(account.data), -}); - -export const decodeAuction = (buffer: Buffer) => { - return deserializeBorsh(AUCTION_SCHEMA, AuctionData, buffer) as AuctionData; -}; - -export const BidderPotParser: AccountParser = ( - pubkey: PublicKey, - account: AccountInfo, -) => ({ - pubkey, - account, - info: decodeBidderPot(account.data), -}); - -export const decodeBidderPot = (buffer: Buffer) => { - return deserializeBorsh(AUCTION_SCHEMA, BidderPot, buffer) as BidderPot; -}; - -export const BidderMetadataParser: AccountParser = ( - pubkey: PublicKey, - account: AccountInfo, -) => ({ - pubkey, - account, - info: decodeBidderMetadata(account.data), -}); - -export const decodeBidderMetadata = (buffer: Buffer) => { - return deserializeBorsh( - AUCTION_SCHEMA, - BidderMetadata, - buffer, - ) as BidderMetadata; -}; - -export const BASE_AUCTION_DATA_SIZE = 32 + 32 + 32 + 8 + 8 + 1 + 9 + 9 + 9 + 9; - -export class AuctionData { - /// Pubkey of the authority with permission to modify this auction. - authority: PublicKey; - /// Pubkey of the resource being bid on. - resource: PublicKey; - /// Token mint for the SPL token being used to bid - tokenMint: PublicKey; - /// The time the last bid was placed, used to keep track of auction timing. - lastBid: BN | null; - /// Slot time the auction was officially ended by. - endedAt: BN | null; - /// End time is the cut-off point that the auction is forced to end by. - endAuctionAt: BN | null; - /// Gap time is the amount of time in slots after the previous bid at which the auction ends. - auctionGap: BN | null; - /// The state the auction is in, whether it has started or ended. - state: AuctionState; - /// Auction Bids, each user may have one bid open at a time. - bidState: BidState; - - /// Used for precalculation on the front end, not a backend key - auctionManagerKey?: PublicKey; - /// Used for precalculation on the front end, not a backend key - bidRedemptionKey?: PublicKey; - - constructor(args: { - authority: PublicKey; - resource: PublicKey; - tokenMint: PublicKey; - lastBid: BN | null; - endedAt: BN | null; - endAuctionAt: BN | null; - auctionGap: BN | null; - state: AuctionState; - bidState: BidState; - }) { - this.authority = args.authority; - this.resource = args.resource; - this.tokenMint = args.tokenMint; - this.lastBid = args.lastBid; - this.endedAt = args.endedAt; - this.endAuctionAt = args.endAuctionAt; - this.auctionGap = args.auctionGap; - this.state = args.state; - this.bidState = args.bidState; - } -} - -export const BIDDER_METADATA_LEN = 32 + 32 + 8 + 8 + 1; -export class BidderMetadata { - // Relationship with the bidder who's metadata this covers. - bidderPubkey: PublicKey; - // Relationship with the auction this bid was placed on. - auctionPubkey: PublicKey; - // Amount that the user bid. - lastBid: BN; - // Tracks the last time this user bid. - lastBidTimestamp: BN; - // Whether the last bid the user made was cancelled. This should also be enough to know if the - // user is a winner, as if cancelled it implies previous bids were also cancelled. - cancelled: boolean; - constructor(args: { - bidderPubkey: PublicKey; - auctionPubkey: PublicKey; - lastBid: BN; - lastBidTimestamp: BN; - cancelled: boolean; - }) { - this.bidderPubkey = args.bidderPubkey; - this.auctionPubkey = args.auctionPubkey; - this.lastBid = args.lastBid; - this.lastBidTimestamp = args.lastBidTimestamp; - this.cancelled = args.cancelled; - } -} - -export const BIDDER_POT_LEN = 32 + 32 + 32; -export class BidderPot { - /// Points at actual pot that is a token account - bidderPot: PublicKey; - bidderAct: PublicKey; - auctionAct: PublicKey; - constructor(args: { - bidderPot: PublicKey; - bidderAct: PublicKey; - auctionAct: PublicKey; - }) { - this.bidderPot = args.bidderPot; - this.bidderAct = args.bidderAct; - this.auctionAct = args.auctionAct; - } -} - -export enum WinnerLimitType { - Unlimited = 0, - Capped = 1, -} - -export class WinnerLimit { - type: WinnerLimitType; - usize: BN; - constructor(args: { type: WinnerLimitType; usize: BN }) { - this.type = args.type; - this.usize = args.usize; - } -} - -class CreateAuctionArgs { - instruction: number = 0; - /// How many winners are allowed for this auction. See AuctionData. - winners: WinnerLimit; - /// End time is the cut-off point that the auction is forced to end by. See AuctionData. - endAuctionAt: BN | null; - /// Gap time is how much time after the previous bid where the auction ends. See AuctionData. - auctionGap: BN | null; - /// Token mint for the SPL token used for bidding. - tokenMint: PublicKey; - /// Authority - authority: PublicKey; - /// The resource being auctioned. See AuctionData. - resource: PublicKey; - - constructor(args: { - winners: WinnerLimit; - endAuctionAt: BN | null; - auctionGap: BN | null; - tokenMint: PublicKey; - authority: PublicKey; - resource: PublicKey; - }) { - this.winners = args.winners; - this.endAuctionAt = args.endAuctionAt; - this.auctionGap = args.auctionGap; - this.tokenMint = args.tokenMint; - this.authority = args.authority; - this.resource = args.resource; - } -} - -class StartAuctionArgs { - instruction: number = 1; - resource: PublicKey; - - constructor(args: { resource: PublicKey }) { - this.resource = args.resource; - } -} - -class PlaceBidArgs { - instruction: number = 2; - resource: PublicKey; - amount: BN; - - constructor(args: { resource: PublicKey; amount: BN }) { - this.resource = args.resource; - this.amount = args.amount; - } -} - -export const AUCTION_SCHEMA = new Map([ - [ - CreateAuctionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['winners', WinnerLimit], - ['endAuctionAt', { kind: 'option', type: 'u64' }], - ['auctionGap', { kind: 'option', type: 'u64' }], - ['tokenMint', 'pubkey'], - ['authority', 'pubkey'], - ['resource', 'pubkey'], - ], - }, - ], - [ - WinnerLimit, - { - kind: 'struct', - fields: [ - ['type', 'u8'], - ['usize', 'u64'], - ], - }, - ], - [ - StartAuctionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['resource', 'pubkey'], - ], - }, - ], - [ - PlaceBidArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['amount', 'u64'], - ['resource', 'pubkey'], - ], - }, - ], - [ - AuctionData, - { - kind: 'struct', - fields: [ - ['authority', 'pubkey'], - ['resource', 'pubkey'], - ['tokenMint', 'pubkey'], - ['lastBid', { kind: 'option', type: 'u64' }], - ['endedAt', { kind: 'option', type: 'u64' }], - ['endAuctionAt', { kind: 'option', type: 'u64' }], - ['auctionGap', { kind: 'option', type: 'u64' }], - ['state', 'u8'], - ['bidState', BidState], - ], - }, - ], - [ - BidState, - { - kind: 'struct', - fields: [ - ['type', 'u8'], - ['bids', [Bid]], - ['max', 'u64'], - ], - }, - ], - [ - Bid, - { - kind: 'struct', - fields: [ - ['key', 'pubkey'], - ['amount', 'u64'], - ], - }, - ], - [ - BidderMetadata, - { - kind: 'struct', - fields: [ - ['bidderPubkey', 'pubkey'], - ['auctionPubkey', 'pubkey'], - ['lastBid', 'u64'], - ['lastBidTimestamp', 'u64'], - ['cancelled', 'u8'], - ], - }, - ], - [ - BidderPot, - { - kind: 'struct', - fields: [ - ['bidderPot', 'pubkey'], - ['bidderAct', 'pubkey'], - ['auctionAct', 'pubkey'], - ], - }, - ], -]); - -export const decodeAuctionData = (buffer: Buffer) => { - return deserializeBorsh(AUCTION_SCHEMA, AuctionData, buffer) as AuctionData; -}; - -export async function createAuction( - winners: WinnerLimit, - resource: PublicKey, - endAuctionAt: BN | null, - auctionGap: BN | null, - tokenMint: PublicKey, - authority: PublicKey, - creator: PublicKey, - instructions: TransactionInstruction[], -) { - const auctionProgramId = programIds().auction; - - const data = Buffer.from( - serialize( - AUCTION_SCHEMA, - new CreateAuctionArgs({ - winners, - resource, - endAuctionAt, - auctionGap, - tokenMint, - authority, - }), - ), - ); - - const auctionKey: PublicKey = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(AUCTION_PREFIX), - auctionProgramId.toBuffer(), - resource.toBuffer(), - ], - auctionProgramId, - ) - )[0]; - - const keys = [ - { - pubkey: creator, - isSigner: true, - isWritable: true, - }, - { - pubkey: auctionKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: auctionProgramId, - data: data, - }), - ); -} - -export async function startAuction( - resource: PublicKey, - creator: PublicKey, - instructions: TransactionInstruction[], -) { - const auctionProgramId = programIds().auction; - - const data = Buffer.from( - serialize( - AUCTION_SCHEMA, - new StartAuctionArgs({ - resource, - }), - ), - ); - - const auctionKey: PublicKey = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(AUCTION_PREFIX), - auctionProgramId.toBuffer(), - resource.toBuffer(), - ], - auctionProgramId, - ) - )[0]; - - const keys = [ - { - pubkey: creator, - isSigner: false, - isWritable: true, - }, - { - pubkey: auctionKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: auctionProgramId, - data: data, - }), - ); -} - -export async function placeBid( - bidderPubkey: PublicKey, - bidderPotTokenPubkey: PublicKey, - tokenMintPubkey: PublicKey, - transferAuthority: PublicKey, - payer: PublicKey, - resource: PublicKey, - amount: BN, - instructions: TransactionInstruction[], -) { - const auctionProgramId = programIds().auction; - - const data = Buffer.from( - serialize( - AUCTION_SCHEMA, - new PlaceBidArgs({ - resource, - amount, - }), - ), - ); - - const auctionKey: PublicKey = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(AUCTION_PREFIX), - auctionProgramId.toBuffer(), - resource.toBuffer(), - ], - auctionProgramId, - ) - )[0]; - - const bidderPotKey: PublicKey = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(AUCTION_PREFIX), - auctionProgramId.toBuffer(), - auctionKey.toBuffer(), - bidderPubkey.toBuffer(), - ], - auctionProgramId, - ) - )[0]; - const bidderMetaKey: PublicKey = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(AUCTION_PREFIX), - auctionProgramId.toBuffer(), - auctionKey.toBuffer(), - bidderPubkey.toBuffer(), - Buffer.from('metadata'), - ], - auctionProgramId, - ) - )[0]; - - const keys = [ - { - pubkey: bidderPubkey, - isSigner: false, - isWritable: true, - }, - { - pubkey: bidderPotKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: bidderPotTokenPubkey, - isSigner: false, - isWritable: true, - }, - { - pubkey: bidderMetaKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: auctionKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: tokenMintPubkey, - isSigner: false, - isWritable: true, - }, - { - pubkey: transferAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: false, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: auctionProgramId, - data: data, - }), - ); -} diff --git a/packages/common/src/actions/index.ts b/packages/common/src/actions/index.ts deleted file mode 100644 index f11ceca..0000000 --- a/packages/common/src/actions/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './account'; -export * from './metadata'; -export * from './vault'; -export * from './auction'; diff --git a/packages/common/src/actions/metadata.ts b/packages/common/src/actions/metadata.ts deleted file mode 100644 index ca86c3e..0000000 --- a/packages/common/src/actions/metadata.ts +++ /dev/null @@ -1,780 +0,0 @@ -import { - PublicKey, - SystemProgram, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { programIds } from '../utils/ids'; -import { deserializeBorsh } from './../utils/borsh'; -import { serialize } from 'borsh'; -import BN from 'bn.js'; -import { PublicKeyInput } from 'node:crypto'; -import { ParsedAccount } from '..'; - -export const METADATA_PREFIX = 'metadata'; -export const EDITION = 'edition'; - -export const MAX_NAME_LENGTH = 32; - -export const MAX_SYMBOL_LENGTH = 10; - -export const MAX_URI_LENGTH = 200; - -export const MAX_METADATA_LEN = - 1 + 32 + MAX_NAME_LENGTH + MAX_SYMBOL_LENGTH + MAX_URI_LENGTH + 200; - -export const MAX_NAME_SYMBOL_LEN = 1 + 32 + 8; -export const MAX_MASTER_EDITION_KEN = 1 + 9 + 8 + 32; - -export enum MetadataKey { - MetadataV1 = 0, - NameSymbolTupleV1 = 1, - EditionV1 = 2, - MasterEditionV1 = 3, -} - -export enum MetadataCategory { - Audio = 'audio', - Video = 'video', - Image = 'image', -} - -export interface IMetadataExtension { - name: string; - symbol: string; - description: string; - // preview image - image: string; - // stores link to item on meta - externalUrl: string; - royalty: number; - files?: File[]; - category: MetadataCategory; -} - -export class MasterEdition { - key: MetadataKey; - supply: BN; - maxSupply?: BN; - /// Can be used to mint tokens that give one-time permission to mint a single limited edition. - masterMint: PublicKey; - - constructor(args: { - key: MetadataKey; - supply: BN; - maxSupply?: BN; - /// Can be used to mint tokens that give one-time permission to mint a single limited edition. - masterMint: PublicKey; - }) { - this.key = MetadataKey.MasterEditionV1; - this.supply = args.supply; - this.maxSupply = args.maxSupply; - this.masterMint = args.masterMint; - } -} - -export class Edition { - key: MetadataKey; - /// Points at MasterEdition struct - parent: PublicKey; - /// Starting at 0 for master record, this is incremented for each edition minted. - edition: BN; - - constructor(args: { key: MetadataKey; parent: PublicKey; edition: BN }) { - this.key = MetadataKey.EditionV1; - this.parent = args.parent; - this.edition = args.edition; - } -} -export class Metadata { - key: MetadataKey; - nonUniqueSpecificUpdateAuthority?: PublicKey; - - mint: PublicKey; - name: string; - symbol: string; - uri: string; - - extended?: IMetadataExtension; - masterEdition?: PublicKey; - edition?: PublicKey; - nameSymbolTuple?: PublicKey; - - constructor(args: { - nonUniqueSpecificUpdateAuthority?: PublicKey; - mint: PublicKey; - name: string; - symbol: string; - uri: string; - }) { - this.key = MetadataKey.MetadataV1; - this.nonUniqueSpecificUpdateAuthority = - args.nonUniqueSpecificUpdateAuthority; - this.mint = args.mint; - this.name = args.name; - this.symbol = args.symbol; - this.uri = args.uri; - } -} - -export class NameSymbolTuple { - key: MetadataKey; - updateAuthority: PublicKey; - metadata: PublicKey; - - constructor(args: { updateAuthority: Buffer; metadata: Buffer }) { - this.key = MetadataKey.NameSymbolTupleV1; - this.updateAuthority = new PublicKey(args.updateAuthority); - this.metadata = new PublicKey(args.metadata); - } -} - -class CreateMetadataArgs { - instruction: number = 0; - allowDuplicates: boolean = false; - name: string; - symbol: string; - uri: string; - - constructor(args: { - name: string; - symbol: string; - uri: string; - allowDuplicates?: boolean; - }) { - this.name = args.name; - this.symbol = args.symbol; - this.uri = args.uri; - this.allowDuplicates = !!args.allowDuplicates; - } -} -class UpdateMetadataArgs { - instruction: number = 1; - uri: string; - // Not used by this app, just required for instruction - nonUniqueSpecificUpdateAuthority: PublicKey | null; - - constructor(args: { - uri: string; - nonUniqueSpecificUpdateAuthority?: string; - }) { - this.uri = args.uri; - this.nonUniqueSpecificUpdateAuthority = args.nonUniqueSpecificUpdateAuthority - ? new PublicKey(args.nonUniqueSpecificUpdateAuthority) - : null; - } -} - -class TransferUpdateAuthorityArgs { - instruction: number = 2; - constructor() {} -} - -class CreateMasterEditionArgs { - instruction: number = 3; - maxSupply: BN | null; - constructor(args: { maxSupply: BN | null }) { - this.maxSupply = args.maxSupply; - } -} - -export const METADATA_SCHEMA = new Map([ - [ - CreateMetadataArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['allowDuplicates', 'u8'], - ['name', 'string'], - ['symbol', 'string'], - ['uri', 'string'], - ], - }, - ], - [ - UpdateMetadataArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['uri', 'string'], - [ - 'nonUniqueSpecificUpdateAuthority', - { kind: 'option', type: 'pubkey' }, - ], - ], - }, - ], - [ - TransferUpdateAuthorityArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - CreateMasterEditionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['maxSupply', { kind: 'option', type: 'u64' }], - ], - }, - ], - [ - MasterEdition, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['supply', 'u64'], - ['maxSupply', { kind: 'option', type: 'u64' }], - ['masterMint', 'pubkey'], - ], - }, - ], - [ - Edition, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['parent', 'pubkey'], - ['edition', 'u64'], - ], - }, - ], - [ - Metadata, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - [ - 'nonUniqueSpecificUpdateAuthority', - { kind: 'option', type: 'pubkey' }, - ], - ['mint', 'pubkey'], - ['name', 'string'], - ['symbol', 'string'], - ['uri', 'string'], - ], - }, - ], - [ - NameSymbolTuple, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['updateAuthority', 'pubkey'], - ['metadata', 'pubkey'], - ], - }, - ], -]); - -export const decodeMetadata = async (buffer: Buffer): Promise => { - const metadata = deserializeBorsh( - METADATA_SCHEMA, - Metadata, - buffer, - ) as Metadata; - metadata.nameSymbolTuple = await getNameSymbol(metadata); - metadata.edition = await getEdition(metadata.mint); - metadata.masterEdition = await getEdition(metadata.mint); - return metadata; -}; - -export const decodeEdition = (buffer: Buffer) => { - return deserializeBorsh(METADATA_SCHEMA, Edition, buffer) as Edition; -}; - -export const decodeMasterEdition = (buffer: Buffer) => { - return deserializeBorsh( - METADATA_SCHEMA, - MasterEdition, - buffer, - ) as MasterEdition; -}; - -export const decodeNameSymbolTuple = (buffer: Buffer) => { - return deserializeBorsh( - METADATA_SCHEMA, - NameSymbolTuple, - buffer, - ) as NameSymbolTuple; -}; - -export async function transferUpdateAuthority( - account: PublicKey, - currentUpdateAuthority: PublicKey, - newUpdateAuthority: PublicKey, - instructions: TransactionInstruction[], -) { - const metadataProgramId = programIds().metadata; - - const data = Buffer.from( - serialize(METADATA_SCHEMA, new TransferUpdateAuthorityArgs()), - ); - - const keys = [ - { - pubkey: account, - isSigner: false, - isWritable: true, - }, - { - pubkey: currentUpdateAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: newUpdateAuthority, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: metadataProgramId, - data: data, - }), - ); -} - -export async function updateMetadata( - symbol: string, - name: string, - uri: string, - newNonUniqueSpecificUpdateAuthority: string | undefined, - mintKey: PublicKey, - updateAuthority: PublicKey, - instructions: TransactionInstruction[], - metadataAccount?: PublicKey, - nameSymbolAccount?: PublicKey, -) { - const metadataProgramId = programIds().metadata; - - metadataAccount = - metadataAccount || - ( - await PublicKey.findProgramAddress( - [ - Buffer.from('metadata'), - metadataProgramId.toBuffer(), - mintKey.toBuffer(), - ], - metadataProgramId, - ) - )[0]; - - nameSymbolAccount = - nameSymbolAccount || - ( - await PublicKey.findProgramAddress( - [ - Buffer.from('metadata'), - metadataProgramId.toBuffer(), - Buffer.from(name), - Buffer.from(symbol), - ], - metadataProgramId, - ) - )[0]; - - const value = new UpdateMetadataArgs({ - uri, - nonUniqueSpecificUpdateAuthority: !newNonUniqueSpecificUpdateAuthority - ? undefined - : newNonUniqueSpecificUpdateAuthority, - }); - const data = Buffer.from(serialize(METADATA_SCHEMA, value)); - const keys = [ - { - pubkey: metadataAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: updateAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: nameSymbolAccount, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: metadataProgramId, - data, - }), - ); - - return [metadataAccount, nameSymbolAccount]; -} - -export async function createMetadata( - symbol: string, - name: string, - uri: string, - allowDuplicates: boolean, - updateAuthority: PublicKey, - mintKey: PublicKey, - mintAuthorityKey: PublicKey, - instructions: TransactionInstruction[], - payer: PublicKey, -) { - const metadataProgramId = programIds().metadata; - - const metadataAccount = ( - await PublicKey.findProgramAddress( - [ - Buffer.from('metadata'), - metadataProgramId.toBuffer(), - mintKey.toBuffer(), - ], - metadataProgramId, - ) - )[0]; - - const nameSymbolAccount = ( - await PublicKey.findProgramAddress( - [ - Buffer.from('metadata'), - metadataProgramId.toBuffer(), - Buffer.from(name), - Buffer.from(symbol), - ], - metadataProgramId, - ) - )[0]; - - const value = new CreateMetadataArgs({ name, symbol, uri, allowDuplicates }); - const data = Buffer.from(serialize(METADATA_SCHEMA, value)); - - const keys = [ - { - pubkey: nameSymbolAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: metadataAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: mintKey, - isSigner: false, - isWritable: false, - }, - { - pubkey: mintAuthorityKey, - isSigner: true, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: false, - }, - { - pubkey: updateAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: metadataProgramId, - data, - }), - ); - - return [metadataAccount, nameSymbolAccount]; -} - -export async function createMasterEdition( - name: string, - symbol: string, - maxSupply: BN | undefined, - mintKey: PublicKey, - masterMintKey: PublicKey, - updateAuthorityKey: PublicKey, - mintAuthorityKey: PublicKey, - instructions: TransactionInstruction[], - payer: PublicKey, -) { - const metadataProgramId = programIds().metadata; - - const metadataAccount = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - metadataProgramId.toBuffer(), - mintKey.toBuffer(), - ], - metadataProgramId, - ) - )[0]; - - const nameSymbolAccount = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - metadataProgramId.toBuffer(), - Buffer.from(name), - Buffer.from(symbol), - ], - metadataProgramId, - ) - )[0]; - - const editionAccount = ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - metadataProgramId.toBuffer(), - mintKey.toBuffer(), - Buffer.from(EDITION), - ], - metadataProgramId, - ) - )[0]; - - const value = new CreateMasterEditionArgs({ maxSupply: maxSupply || null }); - const data = Buffer.from(serialize(METADATA_SCHEMA, value)); - - const keys = [ - { - pubkey: editionAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: mintKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: masterMintKey, - isSigner: false, - isWritable: false, - }, - { - pubkey: updateAuthorityKey, - isSigner: true, - isWritable: false, - }, - { - pubkey: mintAuthorityKey, - isSigner: true, - isWritable: false, - }, - { - pubkey: metadataAccount, - isSigner: false, - isWritable: false, - }, - { - pubkey: nameSymbolAccount, - isSigner: false, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: metadataProgramId, - data, - }), - ); -} - -export async function mintNewEditionFromMasterEditionViaToken( - newMint: PublicKey, - tokenMint: PublicKey, - newMintAuthority: PublicKey, - masterMint: PublicKey, - authorizationTokenHoldingAccount: PublicKey, - burnAuthority: PublicKey, - updateAuthorityOfMaster: PublicKey, - instructions: TransactionInstruction[], - payer: PublicKey, -) { - const metadataProgramId = programIds().metadata; - - const newMetadataKey = await getMetadata(newMint); - const masterMetadataKey = await getMetadata(tokenMint); - const newEdition = await getEdition(newMint); - const masterEdition = await getEdition(tokenMint); - - const data = Buffer.from([5]); - - const keys = [ - { - pubkey: newMetadataKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: newEdition, - isSigner: false, - isWritable: true, - }, - { - pubkey: masterEdition, - isSigner: false, - isWritable: true, - }, - { - pubkey: newMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: newMintAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: masterMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: authorizationTokenHoldingAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: burnAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: false, - }, - { - pubkey: updateAuthorityOfMaster, - isSigner: false, - isWritable: false, - }, - { - pubkey: masterMetadataKey, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: metadataProgramId, - data, - }), - ); -} - -export async function getNameSymbol(metadata: Metadata): Promise { - const PROGRAM_IDS = programIds(); - - return ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - PROGRAM_IDS.metadata.toBuffer(), - metadata.mint.toBuffer(), - Buffer.from(metadata.name), - Buffer.from(metadata.symbol), - ], - PROGRAM_IDS.metadata, - ) - )[0]; -} - -export async function getEdition(tokenMint: PublicKey): Promise { - const PROGRAM_IDS = programIds(); - - return ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - PROGRAM_IDS.metadata.toBuffer(), - tokenMint.toBuffer(), - Buffer.from(EDITION), - ], - PROGRAM_IDS.metadata, - ) - )[0]; -} - -export async function getMetadata(tokenMint: PublicKey): Promise { - const PROGRAM_IDS = programIds(); - - return ( - await PublicKey.findProgramAddress( - [ - Buffer.from(METADATA_PREFIX), - PROGRAM_IDS.metadata.toBuffer(), - tokenMint.toBuffer(), - ], - PROGRAM_IDS.metadata, - ) - )[0]; -} diff --git a/packages/common/src/actions/vault.ts b/packages/common/src/actions/vault.ts deleted file mode 100644 index ea993c8..0000000 --- a/packages/common/src/actions/vault.ts +++ /dev/null @@ -1,695 +0,0 @@ -import { - PublicKey, - SystemProgram, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { programIds } from '../utils/ids'; -import { deserializeBorsh } from './../utils/borsh'; -import { serialize } from 'borsh'; -import BN from 'bn.js'; - -export const VAULT_PREFIX = 'vault'; -export enum VaultKey { - VaultV1 = 0, - SafetyDepositBoxV1 = 1, - ExternalPriceAccountV1 = 2, -} - -export enum VaultState { - Inactive = 0, - Active = 1, - Combined = 2, - Deactivated = 3, -} - -export const MAX_VAULT_SIZE = - 1 + 32 + 32 + 32 + 32 + 1 + 32 + 1 + 32 + 1 + 1 + 8; - -export const MAX_EXTERNAL_ACCOUNT_SIZE = 1 + 8 + 32 + 1; -export class Vault { - key: VaultKey; - /// Store token program used - tokenProgram: PublicKey; - /// Mint that produces the fractional shares - fractionMint: PublicKey; - /// Authority who can make changes to the vault - authority: PublicKey; - /// treasury where fractional shares are held for redemption by authority - fractionTreasury: PublicKey; - /// treasury where monies are held for fractional share holders to redeem(burn) shares once buyout is made - redeemTreasury: PublicKey; - /// Can authority mint more shares from fraction_mint after activation - allowFurtherShareCreation: boolean; - - /// Must point at an ExternalPriceAccount, which gives permission and price for buyout. - pricingLookupAddress: PublicKey; - /// In inactive state, we use this to set the order key on Safety Deposit Boxes being added and - /// then we increment it and save so the next safety deposit box gets the next number. - /// In the Combined state during token redemption by authority, we use it as a decrementing counter each time - /// The authority of the vault withdrawals a Safety Deposit contents to count down how many - /// are left to be opened and closed down. Once this hits zero, and the fraction mint has zero shares, - /// then we can deactivate the vault. - tokenTypeCount: number; - state: VaultState; - - /// Once combination happens, we copy price per share to vault so that if something nefarious happens - /// to external price account, like price change, we still have the math 'saved' for use in our calcs - lockedPricePerShare: BN; - - constructor(args: { - tokenProgram: PublicKey; - fractionMint: PublicKey; - authority: PublicKey; - fractionTreasury: PublicKey; - redeemTreasury: PublicKey; - allowFurtherShareCreation: boolean; - pricingLookupAddress: PublicKey; - tokenTypeCount: number; - state: VaultState; - lockedPricePerShare: BN; - }) { - this.key = VaultKey.VaultV1; - this.tokenProgram = args.tokenProgram; - this.fractionMint = args.fractionMint; - this.authority = args.authority; - this.fractionTreasury = args.fractionTreasury; - this.redeemTreasury = args.redeemTreasury; - this.allowFurtherShareCreation = args.allowFurtherShareCreation; - this.pricingLookupAddress = args.pricingLookupAddress; - this.tokenTypeCount = args.tokenTypeCount; - this.state = args.state; - this.lockedPricePerShare = args.lockedPricePerShare; - } -} -export class SafetyDepositBox { - /// Each token type in a vault has it's own box that contains it's mint and a look-back - key: VaultKey; - /// VaultKey pointing to the parent vault - vault: PublicKey; - /// This particular token's mint - tokenMint: PublicKey; - /// Account that stores the tokens under management - store: PublicKey; - /// the order in the array of registries - order: number; - - constructor(args: { - vault: PublicKey; - tokenMint: PublicKey; - store: PublicKey; - order: number; - }) { - this.key = VaultKey.SafetyDepositBoxV1; - this.vault = args.vault; - this.tokenMint = args.tokenMint; - this.store = args.store; - this.order = args.order; - } -} - -export class ExternalPriceAccount { - key: VaultKey; - pricePerShare: BN; - /// Mint of the currency we are pricing the shares against, should be same as redeem_treasury. - /// Most likely will be USDC mint most of the time. - priceMint: PublicKey; - /// Whether or not combination has been allowed for this vault. - allowedToCombine: boolean; - - constructor(args: { - pricePerShare: BN; - priceMint: PublicKey; - allowedToCombine: boolean; - }) { - this.key = VaultKey.ExternalPriceAccountV1; - this.pricePerShare = args.pricePerShare; - this.priceMint = args.priceMint; - this.allowedToCombine = args.allowedToCombine; - } -} - -class InitVaultArgs { - instruction: number = 0; - allowFurtherShareCreation: boolean = false; - - constructor(args: { allowFurtherShareCreation: boolean }) { - this.allowFurtherShareCreation = args.allowFurtherShareCreation; - } -} - -class AmountArgs { - instruction: number; - amount: BN; - - constructor(args: { instruction: number; amount: BN }) { - this.instruction = args.instruction; - this.amount = args.amount; - } -} - -class NumberOfShareArgs { - instruction: number; - numberOfShares: BN; - - constructor(args: { instruction: number; numberOfShares: BN }) { - this.instruction = args.instruction; - this.numberOfShares = args.numberOfShares; - } -} - -class UpdateExternalPriceAccountArgs { - instruction: number = 9; - externalPriceAccount: ExternalPriceAccount; - - constructor(args: { externalPriceAccount: ExternalPriceAccount }) { - this.externalPriceAccount = args.externalPriceAccount; - } -} - -export const VAULT_SCHEMA = new Map([ - [ - InitVaultArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['allowFurtherShareCreation', 'u8'], - ], - }, - ], - [ - AmountArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['amount', 'u64'], - ], - }, - ], - [ - NumberOfShareArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['numberOfShares', 'u64'], - ], - }, - ], - [ - UpdateExternalPriceAccountArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['externalPriceAccount', ExternalPriceAccount], - ], - }, - ], - [ - Vault, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['tokenProgram', 'pubkey'], - ['fractionMint', 'pubkey'], - ['authority', 'pubkey'], - ['fractionTreasury', 'pubkey'], - ['redeemTreasury', 'pubkey'], - ['allowFurtherShareCreation', 'u8'], - ['pricingLookupAddress', 'u8'], - ['tokenTypeCount', 'u8'], - ['state', 'u8'], - ['lockedPricePerShare', 'u64'], - ], - }, - ], - [ - SafetyDepositBox, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['vault', 'pubkey'], - ['tokenMint', 'pubkey'], - ['store', 'pubkey'], - ['order', 'u8'], - ], - }, - ], - [ - ExternalPriceAccount, - { - kind: 'struct', - fields: [ - ['key', 'u8'], - ['pricePerShare', 'u64'], - ['priceMint', 'pubkey'], - ['allowedToCombine', 'u8'], - ], - }, - ], -]); - -export const decodeVault = (buffer: Buffer) => { - return deserializeBorsh(VAULT_SCHEMA, Vault, buffer) as Vault; -}; - -export const decodeSafetyDeposit = (buffer: Buffer) => { - return deserializeBorsh( - VAULT_SCHEMA, - SafetyDepositBox, - buffer, - ) as SafetyDepositBox; -}; - -export async function initVault( - allowFurtherShareCreation: boolean, - fractionalMint: PublicKey, - redeemTreasury: PublicKey, - fractionalTreasury: PublicKey, - vault: PublicKey, - vaultAuthority: PublicKey, - pricingLookupAddress: PublicKey, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const data = Buffer.from( - serialize(VAULT_SCHEMA, new InitVaultArgs({ allowFurtherShareCreation })), - ); - - const keys = [ - { - pubkey: fractionalMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: redeemTreasury, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionalTreasury, - isSigner: false, - isWritable: true, - }, - { - pubkey: vault, - isSigner: false, - isWritable: true, - }, - { - pubkey: vaultAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: pricingLookupAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data: data, - }), - ); -} - -export async function getSafetyDepositBox( - vault: PublicKey, - tokenMint: PublicKey, -): Promise { - const vaultProgramId = programIds().vault; - - return ( - await PublicKey.findProgramAddress( - [Buffer.from(VAULT_PREFIX), vault.toBuffer(), tokenMint.toBuffer()], - vaultProgramId, - ) - )[0]; -} - -export async function addTokenToInactiveVault( - amount: BN, - tokenMint: PublicKey, - tokenAccount: PublicKey, - tokenStoreAccount: PublicKey, - vault: PublicKey, - vaultAuthority: PublicKey, - payer: PublicKey, - transferAuthority: PublicKey, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const safetyDepositBox: PublicKey = await getSafetyDepositBox( - vault, - tokenMint, - ); - - const value = new AmountArgs({ - instruction: 1, - amount, - }); - - const data = Buffer.from(serialize(VAULT_SCHEMA, value)); - const keys = [ - { - pubkey: safetyDepositBox, - isSigner: false, - isWritable: true, - }, - { - pubkey: tokenAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: tokenStoreAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: vault, - isSigner: false, - isWritable: true, - }, - { - pubkey: vaultAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: payer, - isSigner: true, - isWritable: false, - }, - { - pubkey: transferAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data, - }), - ); -} - -export async function activateVault( - numberOfShares: BN, - vault: PublicKey, - fractionMint: PublicKey, - fractionTreasury: PublicKey, - vaultAuthority: PublicKey, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const fractionMintAuthority = ( - await PublicKey.findProgramAddress( - [Buffer.from(VAULT_PREFIX), vaultProgramId.toBuffer()], - vaultProgramId, - ) - )[0]; - - const value = new NumberOfShareArgs({ instruction: 2, numberOfShares }); - const data = Buffer.from(serialize(VAULT_SCHEMA, value)); - - const keys = [ - { - pubkey: vault, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionTreasury, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionMintAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: vaultAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data, - }), - ); -} - -export async function combineVault( - vault: PublicKey, - outstandingShareTokenAccount: PublicKey, - payingTokenAccount: PublicKey, - fractionMint: PublicKey, - fractionTreasury: PublicKey, - redeemTreasury: PublicKey, - newVaultAuthority: PublicKey | undefined, - vaultAuthority: PublicKey, - transferAuthority: PublicKey, - externalPriceAccount: PublicKey, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const burnAuthority = ( - await PublicKey.findProgramAddress( - [Buffer.from(VAULT_PREFIX), vaultProgramId.toBuffer()], - vaultProgramId, - ) - )[0]; - - const data = Buffer.from([3]); - - const keys = [ - { - pubkey: vault, - isSigner: false, - isWritable: true, - }, - { - pubkey: outstandingShareTokenAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: payingTokenAccount, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionTreasury, - isSigner: false, - isWritable: true, - }, - { - pubkey: redeemTreasury, - isSigner: false, - isWritable: true, - }, - { - pubkey: newVaultAuthority || vaultAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: vaultAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: transferAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: burnAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: externalPriceAccount, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data, - }), - ); -} - -export async function withdrawTokenFromSafetyDepositBox( - amount: BN, - destination: PublicKey, - safetyDepositBox: PublicKey, - storeKey: PublicKey, - vault: PublicKey, - fractionMint: PublicKey, - vaultAuthority: PublicKey, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const transferAuthority = ( - await PublicKey.findProgramAddress( - [Buffer.from(VAULT_PREFIX), vaultProgramId.toBuffer()], - vaultProgramId, - ) - )[0]; - - const value = new AmountArgs({ instruction: 5, amount }); - const data = Buffer.from(serialize(VAULT_SCHEMA, value)); - - const keys = [ - { - pubkey: destination, - isSigner: false, - isWritable: true, - }, - { - pubkey: safetyDepositBox, - isSigner: false, - isWritable: true, - }, - { - pubkey: storeKey, - isSigner: false, - isWritable: true, - }, - { - pubkey: vault, - isSigner: false, - isWritable: true, - }, - { - pubkey: fractionMint, - isSigner: false, - isWritable: true, - }, - { - pubkey: vaultAuthority, - isSigner: true, - isWritable: false, - }, - { - pubkey: transferAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: programIds().token, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data, - }), - ); -} - -export async function updateExternalPriceAccount( - externalPriceAccountKey: PublicKey, - externalPriceAccount: ExternalPriceAccount, - instructions: TransactionInstruction[], -) { - const vaultProgramId = programIds().vault; - - const value = new UpdateExternalPriceAccountArgs({ externalPriceAccount }); - const data = Buffer.from(serialize(VAULT_SCHEMA, value)); - console.log('Data', data); - - const keys = [ - { - pubkey: externalPriceAccountKey, - isSigner: false, - isWritable: true, - }, - ]; - instructions.push( - new TransactionInstruction({ - keys, - programId: vaultProgramId, - data, - }), - ); -} diff --git a/packages/common/src/components/ActionConfirmation/index.tsx b/packages/common/src/components/ActionConfirmation/index.tsx deleted file mode 100644 index 0e8fd50..0000000 --- a/packages/common/src/components/ActionConfirmation/index.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Button } from 'antd'; -import { LABELS } from '../../constants'; -import { Link } from 'react-router-dom'; -import './style.css'; - -export const ActionConfirmation = (props: { - className?: string; - onClose: () => void; -}) => { - return ( -
-

Congratulations!

-
Your action has been successfully executed
-
- - - - -
- ); -}; diff --git a/packages/common/src/components/ActionConfirmation/style.less b/packages/common/src/components/ActionConfirmation/style.less deleted file mode 100644 index 64d27b2..0000000 --- a/packages/common/src/components/ActionConfirmation/style.less +++ /dev/null @@ -1,5 +0,0 @@ -.success-icon { - background-image: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMwMHB4JyB3aWR0aD0nMzAwcHgnICBmaWxsPSIjNzBjMDQxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgdmlld0JveD0iMCAwIDY0IDY0IiB4PSIwcHgiIHk9IjBweCI+PHRpdGxlPmJ1c2luZXNzIGZpbmFuY2UgdXAgcmlzZSBhcnJvdyBkZW1hbmQ8L3RpdGxlPjxwYXRoIGQ9Ik01LDE0YTEsMSwwLDEsMC0xLTFINEExLDEsMCwwLDAsNSwxNFoiPjwvcGF0aD48cGF0aCBkPSJNNyw1Mkg1NWExLDEsMCwwLDAsMC0ySDUwVjI3YTEsMSwwLDAsMC0yLDBWNTBINDRWMzRhMSwxLDAsMCwwLTIsMFY1MEgzOFYzOWExLDEsMCwwLDAtMiwwVjUwSDMyVjQzYTEsMSwwLDAsMC0yLDB2N0gyNlY0NmExLDEsMCwwLDAtMiwwdjRIMjBWNDdhMSwxLDAsMCwwLTIsMHYzSDE0VjQ4YTEsMSwwLDAsMC0yLDB2Mkg3YTEsMSwwLDAsMS0xLTFWMTdhMSwxLDAsMCwwLTIsMFY0OUEzLDMsMCwwLDAsNyw1MloiPjwvcGF0aD48cGF0aCBkPSJNNTksNTBhMSwxLDAsMCwwLTEsMWgwYTEsMSwwLDEsMCwxLTFaIj48L3BhdGg+PHBhdGggZD0iTTExLDQ0aC4wN2E0OS4wNyw0OS4wNywwLDAsMCwyNS41Mi05LjE5QTQ4LjkxLDQ4LjkxLDAsMCwwLDQ5LjcsMjAuNTlMNTIuMzgsMjIsNTIsMTRsLTYuNzEsNC4zMSwyLjYzLDEuMzZBNDYuODEsNDYuODEsMCwwLDEsMzUuNDEsMzMuMTksNDYuOTQsNDYuOTQsMCwwLDEsMTAuOTMsNDIsMSwxLDAsMCwwLDExLDQ0WiI+PC9wYXRoPjwvc3ZnPg=='); - width: 280px; - height: 280px; -} diff --git a/packages/common/src/components/AppBar/index.tsx b/packages/common/src/components/AppBar/index.tsx deleted file mode 100644 index 68c5e92..0000000 --- a/packages/common/src/components/AppBar/index.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react'; -import { Button, Popover } from 'antd'; -import { CurrentUserBadge } from '../CurrentUserBadge'; -import { SettingOutlined } from '@ant-design/icons'; -import { Settings } from '../Settings'; -import { LABELS } from '../../constants/labels'; -import { ConnectButton } from '../ConnectButton'; -import { useWallet } from '../../contexts'; -import './style.css'; - -export const AppBar = (props: { - left?: JSX.Element; - right?: JSX.Element; - useWalletBadge?: boolean; - additionalSettings?: JSX.Element; -}) => { - const { connected } = useWallet(); - - const TopBar = ( -
- {props.left} - {connected ? ( - - ) : ( - - )} - } - trigger="click" - > -
- ); - - return TopBar; -}; diff --git a/packages/common/src/components/AppBar/style.less b/packages/common/src/components/AppBar/style.less deleted file mode 100644 index 0c8bfca..0000000 --- a/packages/common/src/components/AppBar/style.less +++ /dev/null @@ -1,57 +0,0 @@ -.App-Bar { - -webkit-box-pack: justify; - justify-content: space-between !important; - -webkit-box-align: center; - align-items: center; - flex-direction: row; - display: flex; - width: 100%; - top: 0px; - position: relative; - padding: 1rem; - z-index: 2; - - .ant-menu-horizontal { - border-bottom-color: transparent; - background-color: transparent; - line-height: inherit; - font-size: 16px; - margin: 0 10px; - - .ant-menu-item { - margin: 0 10px; - color: lightgrey; - height: 35px; - line-height: 35px; - border-width: 0px !important; - } - - .ant-menu-item:hover { - color: white; - border-width: 0px !important; - } - - .ant-menu-item-selected { - font-weight: bold; - } - } -} - -.App-Bar-left { - box-sizing: border-box; - margin: 0px; - min-width: 0px; - display: flex; - padding: 0px; - -webkit-box-align: center; - align-items: center; - width: fit-content; -} - -.App-Bar-right { - display: flex; - flex-direction: row; - -webkit-box-align: center; - align-items: center; - justify-self: flex-end; -} diff --git a/packages/common/src/components/BackButton/index.tsx b/packages/common/src/components/BackButton/index.tsx deleted file mode 100644 index 82ce886..0000000 --- a/packages/common/src/components/BackButton/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import { Button } from 'antd'; -import { LABELS } from '../../constants'; -import { useHistory } from 'react-router-dom'; - -export const BackButton = () => { - const history = useHistory(); - return ( - - ); -}; diff --git a/packages/common/src/components/ConnectButton/index.tsx b/packages/common/src/components/ConnectButton/index.tsx deleted file mode 100644 index 82ab7ed..0000000 --- a/packages/common/src/components/ConnectButton/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { Button, Dropdown, Menu } from 'antd'; -import { ButtonProps } from 'antd/lib/button'; -import React, { useCallback } from 'react'; -import { useWalletModal, useWallet } from "../../contexts"; - -export interface ConnectButtonProps - extends ButtonProps, - React.RefAttributes { - allowWalletChange?: boolean; -} - -export const ConnectButton = (props: ConnectButtonProps) => { - const { wallet, connected, connect } = useWallet(); - const { setVisible } = useWalletModal(); - const open = useCallback(() => setVisible(true), [setVisible]); - const { onClick, children, disabled, allowWalletChange, ...rest } = props; - - // only show if wallet selected or user connected - - if (!wallet || !allowWalletChange) { - return ( - - ); - } - - return ( - - - Change Wallet - - - } - > - Connect - - ); -}; diff --git a/packages/common/src/components/CurrentUserBadge/index.tsx b/packages/common/src/components/CurrentUserBadge/index.tsx deleted file mode 100644 index 62e5630..0000000 --- a/packages/common/src/components/CurrentUserBadge/index.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import React, { useMemo } from 'react'; -import { LAMPORTS_PER_SOL } from '@solana/web3.js'; -import { useNativeAccount, useWallet } from '../../contexts'; -import { formatNumber } from '../../utils'; -import './styles.css'; -import { Popover } from 'antd'; -import { Settings } from '../Settings'; - -export const CurrentUserBadge = (props: { - showBalance?: boolean; - showAddress?: boolean; - iconSize?: number; -}) => { - const { wallet, publicKey } = useWallet(); - const { account } = useNativeAccount(); - - const address = useMemo(() => { - if (publicKey) { - const base58 = publicKey.toBase58(); - return `${base58.slice(0, 4)}...${base58.slice(-4)}`; - } - }, [publicKey]) - - if (!wallet || !address) { - return null; - } - - const iconStyle: React.CSSProperties = props.showAddress - ? { - marginLeft: '0.5rem', - display: 'flex', - width: props.iconSize || 20, - borderRadius: 50, - } - : { - display: 'flex', - width: props.iconSize || 20, - paddingLeft: 0, - borderRadius: 50, - }; - - const baseWalletKey: React.CSSProperties = { - height: props.iconSize, - cursor: 'pointer', - userSelect: 'none', - }; - const walletKeyStyle: React.CSSProperties = props.showAddress - ? baseWalletKey - : { ...baseWalletKey, paddingLeft: 0 }; - - - return ( -
- {props.showBalance && ( - - {formatNumber.format((account?.lamports || 0) / LAMPORTS_PER_SOL)} SOL - - )} - - } - trigger="click" - > -
- {address} - -
-
-
- ); -}; diff --git a/packages/common/src/components/CurrentUserBadge/styles.less b/packages/common/src/components/CurrentUserBadge/styles.less deleted file mode 100644 index 5940a94..0000000 --- a/packages/common/src/components/CurrentUserBadge/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -.wallet-wrapper { - padding-left: 0.7rem; - border-radius: 0.5rem; - display: flex; - align-items: center; - white-space: nowrap; -} - -.wallet-key { - padding: 0.1rem 0.5rem 0.1rem 0.7rem; - margin-left: 0.3rem; - border-radius: 0.5rem; - display: flex; - align-items: center; -} diff --git a/packages/common/src/components/EtherscanLink/index.tsx b/packages/common/src/components/EtherscanLink/index.tsx deleted file mode 100644 index 745daf3..0000000 --- a/packages/common/src/components/EtherscanLink/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Typography } from 'antd'; -import { shortenAddress } from '../../utils/utils'; - -export const EtherscanLink = (props: { - address: string; - type: string; - code?: boolean; - style?: React.CSSProperties; - length?: number; -}) => { - const { type, code } = props; - - const address = props.address; - - if (!address) { - return null; - } - - const length = props.length ?? 9; - - return ( - - {code ? ( - - {shortenAddress(address, length)} - - ) : ( - shortenAddress(address, length) - )} - - ); -}; diff --git a/packages/common/src/components/ExplorerLink/index.tsx b/packages/common/src/components/ExplorerLink/index.tsx deleted file mode 100644 index f13ccc5..0000000 --- a/packages/common/src/components/ExplorerLink/index.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { Typography } from 'antd'; -import { shortenAddress } from '../../utils/utils'; -import { Connection, PublicKey } from '@solana/web3.js'; -import { useConnectionConfig } from '../../contexts'; - -import { getExplorerUrl } from '../../utils/explorer'; - -export const ExplorerLink = (props: { - address: string | PublicKey; - type: string; - code?: boolean; - style?: React.CSSProperties; - length?: number; - short?: boolean; - connection?: Connection; -}) => { - const { type, code, short } = props; - let { endpoint } = useConnectionConfig(); - - const address = - typeof props.address === 'string' - ? props.address - : props.address?.toBase58(); - - if (!address) { - return null; - } - - const displayAddress = - short || props.length - ? shortenAddress(address, props.length ?? 9) - : address; - - return ( - - {code ? ( - - {displayAddress} - - ) : ( - displayAddress - )} - - ); -}; diff --git a/packages/common/src/components/Icons/info.tsx b/packages/common/src/components/Icons/info.tsx deleted file mode 100644 index 6ef9758..0000000 --- a/packages/common/src/components/Icons/info.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Button, Popover } from 'antd'; -import React from 'react'; - -import { InfoCircleOutlined } from '@ant-design/icons'; - -export const Info = (props: { - text: React.ReactElement; - style?: React.CSSProperties; -}) => { - return ( - {props.text}
} - > - - - ); -}; diff --git a/packages/common/src/components/Identicon/index.tsx b/packages/common/src/components/Identicon/index.tsx deleted file mode 100644 index 55d824c..0000000 --- a/packages/common/src/components/Identicon/index.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React, { useEffect, useRef } from 'react'; - -import Jazzicon from 'jazzicon'; -import bs58 from 'bs58'; -import './style.css'; -import { PublicKey } from '@solana/web3.js'; - -export const Identicon = (props: { - address?: string | PublicKey; - style?: React.CSSProperties; - className?: string; -}) => { - const { style, className } = props; - const address = - typeof props.address === 'string' - ? props.address - : props.address?.toBase58(); - const ref = useRef(); - - useEffect(() => { - if (address && ref.current) { - try { - ref.current.innerHTML = ''; - ref.current.className = className || ''; - ref.current.appendChild( - Jazzicon( - style?.width || 16, - parseInt(bs58.decode(address).toString('hex').slice(5, 15), 16), - ), - ); - } catch (err) { - // TODO - } - } - }, [address, style, className]); - - return ( -
- ); -}; diff --git a/packages/common/src/components/Identicon/style.less b/packages/common/src/components/Identicon/style.less deleted file mode 100644 index 4b04246..0000000 --- a/packages/common/src/components/Identicon/style.less +++ /dev/null @@ -1,8 +0,0 @@ -.identicon-wrapper { - display: flex; - height: 1rem; - width: 1rem; - border-radius: 1.125rem; - margin: 0.2rem 0.2rem 0.2rem 0.1rem; - /* background-color: ${({ theme }) => theme.bg4}; */ -} diff --git a/packages/common/src/components/Input/numeric.tsx b/packages/common/src/components/Input/numeric.tsx deleted file mode 100644 index 84ebc77..0000000 --- a/packages/common/src/components/Input/numeric.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { Input } from 'antd'; - -export class NumericInput extends React.Component { - onChange = (e: any) => { - const { value } = e.target; - const reg = /^-?\d*(\.\d*)?$/; - if (reg.test(value) || value === '' || value === '-') { - this.props.onChange(value); - } - }; - - // '.' at the end or only '-' in the input box. - onBlur = () => { - const { value, onBlur, onChange } = this.props; - let valueTemp = value; - if (value === undefined || value === null) return; - if ( - value.charAt && - (value.charAt(value.length - 1) === '.' || value === '-') - ) { - valueTemp = value.slice(0, -1); - } - if (value.startsWith && (value.startsWith('.') || value.startsWith('-.'))) { - valueTemp = valueTemp.replace('.', '0.'); - } - if (valueTemp.replace) onChange?.(valueTemp.replace(/0*(\d+)/, '$1')); - if (onBlur) { - onBlur(); - } - }; - - render() { - return ( - - ); - } -} diff --git a/packages/common/src/components/Settings/index.tsx b/packages/common/src/components/Settings/index.tsx deleted file mode 100644 index 0366022..0000000 --- a/packages/common/src/components/Settings/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React, { useCallback } from 'react'; -import { Button, Select } from 'antd'; -import { ENDPOINTS, useConnectionConfig, useWallet, useWalletModal } from '../../contexts'; -import { notify, shortenAddress } from '../../utils'; -import { CopyOutlined } from '@ant-design/icons'; - -export const Settings = ({ - additionalSettings, -}: { - additionalSettings?: JSX.Element; -}) => { - const { connected, disconnect, publicKey } = useWallet(); - const { endpoint, setEndpoint } = useConnectionConfig(); - const { setVisible } = useWalletModal(); - const open = useCallback(() => setVisible(true), [setVisible]); - - return ( - <> -
- Network:{' '} - - {connected && ( - <> - Wallet: - {publicKey && ( - - )} - - - - - )} - {additionalSettings} -
- - ); -}; diff --git a/packages/common/src/components/TokenDisplay/index.tsx b/packages/common/src/components/TokenDisplay/index.tsx deleted file mode 100644 index 223dd81..0000000 --- a/packages/common/src/components/TokenDisplay/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React from 'react'; -import { useMint } from '../../contexts/accounts'; -import { useAccountByMint } from '../../hooks'; -import { TokenIcon } from '../TokenIcon'; - -export const TokenDisplay = (props: { - name: string; - mintAddress: string; - icon?: JSX.Element; - showBalance?: boolean; -}) => { - const { showBalance, mintAddress, name, icon } = props; - const tokenMint = useMint(mintAddress); - const tokenAccount = useAccountByMint(mintAddress); - - let balance: number = 0; - let hasBalance: boolean = false; - if (showBalance) { - if (tokenAccount && tokenMint) { - balance = - tokenAccount.info.amount.toNumber() / Math.pow(10, tokenMint.decimals); - hasBalance = balance > 0; - } - } - - return ( - <> -
-
- {icon || } - {name} -
- {showBalance ? ( - -  {' '} - {hasBalance - ? balance < 0.001 - ? '<0.001' - : balance.toFixed(3) - : '-'} - - ) : null} -
- - ); -}; diff --git a/packages/common/src/components/TokenIcon/index.tsx b/packages/common/src/components/TokenIcon/index.tsx deleted file mode 100644 index d6a205a..0000000 --- a/packages/common/src/components/TokenIcon/index.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import React, { useState } from 'react'; -import { PublicKey } from '@solana/web3.js'; -import { getTokenIcon, KnownTokenMap } from '../../utils'; -import { useConnectionConfig } from '../../contexts/connection'; -import { Identicon } from '../Identicon'; - -export const TokenIcon = (props: { - mintAddress?: string | PublicKey; - style?: React.CSSProperties; - size?: number; - className?: string; - tokenMap?: KnownTokenMap; -}) => { - const [showIcon, setShowIcon] = useState(true); - - let icon: string | undefined = ''; - if (props.tokenMap) { - icon = getTokenIcon(props.tokenMap, props.mintAddress); - } else { - const { tokenMap } = useConnectionConfig(); - icon = getTokenIcon(tokenMap, props.mintAddress); - } - - const size = props.size || 20; - - if (showIcon && icon) { - return ( - Token icon setShowIcon(false)} - /> - ); - } - return ( - - ); -}; - -export const PoolIcon = (props: { - mintA: string; - mintB: string; - style?: React.CSSProperties; - className?: string; -}) => { - return ( -
- - -
- ); -}; diff --git a/packages/common/src/components/index.tsx b/packages/common/src/components/index.tsx deleted file mode 100644 index 78c3fb9..0000000 --- a/packages/common/src/components/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export { ExplorerLink } from './ExplorerLink/index'; -export { ConnectButton } from './ConnectButton/index'; -export { CurrentUserBadge } from './CurrentUserBadge/index'; -export { Identicon } from './Identicon/index'; -export { Info } from './Icons/info'; -export { NumericInput } from './Input/numeric'; -export { AppBar } from './AppBar/index'; -export { Settings } from './Settings/index'; -export { ActionConfirmation } from './ActionConfirmation/index'; -export { BackButton } from './BackButton/index'; -export { TokenIcon } from './TokenIcon'; -export { TokenDisplay } from './TokenDisplay'; -export { EtherscanLink } from './EtherscanLink'; diff --git a/packages/common/src/constants/index.ts b/packages/common/src/constants/index.ts deleted file mode 100644 index 7d6bf06..0000000 --- a/packages/common/src/constants/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './math'; -export * from './labels'; diff --git a/packages/common/src/constants/labels.ts b/packages/common/src/constants/labels.ts deleted file mode 100644 index be5c639..0000000 --- a/packages/common/src/constants/labels.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const LABELS = { - CONNECT_LABEL: 'Connect Wallet', - AUDIT_WARNING: - 'Oyster is an unaudited software project used for internal purposes at the Solana Foundation. This app is not for public use.', - FOOTER: - 'This page was produced by the Solana Foundation ("SF") for internal educational and inspiration purposes only. SF does not encourage, induce or sanction the deployment, integration or use of Oyster or any similar application (including its code) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. Anyone using this code or a derivation thereof must comply with applicable laws and regulations when releasing related software.', - MENU_HOME: 'Home', - MENU_DASHBOARD: 'Dashboard', - CONNECT_BUTTON: 'Connect', - WALLET_TOOLTIP: 'Wallet public key', - WALLET_BALANCE: 'Wallet balance', - SETTINGS_TOOLTIP: 'Settings', - DASHBOARD_ACTION: 'Go to dashboard', - GO_BACK_ACTION: 'Go back', -}; diff --git a/packages/common/src/constants/math.ts b/packages/common/src/constants/math.ts deleted file mode 100644 index 6e06293..0000000 --- a/packages/common/src/constants/math.ts +++ /dev/null @@ -1,7 +0,0 @@ -import BN from 'bn.js'; - -export const TEN = new BN(10); -export const HALF_WAD = TEN.pow(new BN(18)); -export const WAD = TEN.pow(new BN(18)); -export const RAY = TEN.pow(new BN(27)); -export const ZERO = new BN(0); diff --git a/packages/common/src/contexts/accounts.tsx b/packages/common/src/contexts/accounts.tsx deleted file mode 100644 index 164b4d1..0000000 --- a/packages/common/src/contexts/accounts.tsx +++ /dev/null @@ -1,666 +0,0 @@ -import React, { - useCallback, - useContext, - useEffect, - useMemo, - useState, -} from 'react'; -import { useConnection, useWallet } from '../contexts'; -import { AccountInfo, Connection, PublicKey } from '@solana/web3.js'; -import { AccountLayout, MintInfo, MintLayout, u64 } from '@solana/spl-token'; -import { TokenAccount } from '../models'; -import { chunks } from '../utils/utils'; -import { EventEmitter } from '../utils/eventEmitter'; -import { useUserAccounts } from '../hooks/useUserAccounts'; -import { - WRAPPED_SOL_MINT, - programIds, - LEND_HOST_FEE_ADDRESS, -} from '../utils/ids'; - -const AccountsContext = React.createContext(null); - -const pendingCalls = new Map>(); -const genericCache = new Map(); -const pendingMintCalls = new Map>(); -const mintCache = new Map(); - -export interface ParsedAccountBase { - pubkey: PublicKey; - account: AccountInfo; - info: any; // TODO: change to unkown -} - -export type AccountParser = ( - pubkey: PublicKey, - data: AccountInfo, -) => ParsedAccountBase | undefined; - -export interface ParsedAccount extends ParsedAccountBase { - info: T; -} - -const getMintInfo = async (connection: Connection, pubKey: PublicKey) => { - const info = await connection.getAccountInfo(pubKey); - if (info === null) { - throw new Error('Failed to find mint account'); - } - - const data = Buffer.from(info.data); - - return deserializeMint(data); -}; - -export const MintParser = (pubKey: PublicKey, info: AccountInfo) => { - const buffer = Buffer.from(info.data); - - const data = deserializeMint(buffer); - - const details = { - pubkey: pubKey, - account: { - ...info, - }, - info: data, - } as ParsedAccountBase; - - return details; -}; - -export const TokenAccountParser = ( - pubKey: PublicKey, - info: AccountInfo, -) => { - const buffer = Buffer.from(info.data); - const data = deserializeAccount(buffer); - - const details = { - pubkey: pubKey, - account: { - ...info, - }, - info: data, - } as TokenAccount; - - return details; -}; - -export const GenericAccountParser = ( - pubKey: PublicKey, - info: AccountInfo, -) => { - const buffer = Buffer.from(info.data); - - const details = { - pubkey: pubKey, - account: { - ...info, - }, - info: buffer, - } as ParsedAccountBase; - - return details; -}; - -export const keyToAccountParser = new Map(); - -export const cache = { - emitter: new EventEmitter(), - query: async ( - connection: Connection, - pubKey: string | PublicKey, - parser?: AccountParser, - ) => { - let id: PublicKey; - if (typeof pubKey === 'string') { - id = new PublicKey(pubKey); - } else { - id = pubKey; - } - - const address = id.toBase58(); - - let account = genericCache.get(address); - if (account) { - return account; - } - - // Note: If the request to get the account fails the error is captured as a rejected Promise and would stay in pendingCalls forever - // It means if the first request fails for a transient reason it would never recover from the state and account would never be returned - // TODO: add logic to detect transient errors and remove the Promises from pendingCalls - let query = pendingCalls.get(address); - if (query) { - return query; - } - - // TODO: refactor to use multiple accounts query with flush like behavior - query = connection.getAccountInfo(id).then(data => { - if (!data) { - throw new Error(`Account ${id.toBase58()} not found`); - } - - return cache.add(id, data, parser); - }) as Promise; - pendingCalls.set(address, query as any); - - return query; - }, - add: ( - id: PublicKey | string, - obj: AccountInfo, - parser?: AccountParser, - ) => { - if (obj.data.length === 0) { - return; - } - - const address = typeof id === 'string' ? id : id?.toBase58(); - const deserialize = parser ? parser : keyToAccountParser.get(address); - if (!deserialize) { - throw new Error( - 'Deserializer needs to be registered or passed as a parameter', - ); - } - - cache.registerParser(id, deserialize); - pendingCalls.delete(address); - const account = deserialize(new PublicKey(address), obj); - if (!account) { - return; - } - - const isNew = !genericCache.has(address); - - genericCache.set(address, account); - cache.emitter.raiseCacheUpdated(address, isNew, deserialize); - return account; - }, - get: (pubKey: string | PublicKey) => { - let key: string; - if (typeof pubKey !== 'string') { - key = pubKey.toBase58(); - } else { - key = pubKey; - } - - return genericCache.get(key); - }, - delete: (pubKey: string | PublicKey) => { - let key: string; - if (typeof pubKey !== 'string') { - key = pubKey.toBase58(); - } else { - key = pubKey; - } - - if (genericCache.get(key)) { - genericCache.delete(key); - cache.emitter.raiseCacheDeleted(key); - return true; - } - return false; - }, - - byParser: (parser: AccountParser) => { - const result: string[] = []; - for (const id of keyToAccountParser.keys()) { - if (keyToAccountParser.get(id) === parser) { - result.push(id); - } - } - - return result; - }, - registerParser: (pubkey: PublicKey | string, parser: AccountParser) => { - if (pubkey) { - const address = typeof pubkey === 'string' ? pubkey : pubkey?.toBase58(); - keyToAccountParser.set(address, parser); - } - - return pubkey; - }, - queryMint: async (connection: Connection, pubKey: string | PublicKey) => { - let id: PublicKey; - if (typeof pubKey === 'string') { - id = new PublicKey(pubKey); - } else { - id = pubKey; - } - - const address = id.toBase58(); - let mint = mintCache.get(address); - if (mint) { - return mint; - } - - // Note: If the request to get the mint fails the error is captured as a rejected Promise and would stay in pendingMintCalls forever - // It means if the first request fails for a transient reason it would never recover from the state and mint would never be returned - // TODO: add logic to detect transient errors and remove the Promises from pendingMintCalls - let query = pendingMintCalls.get(address); - if (query) { - return query; - } - - query = getMintInfo(connection, id).then(data => { - pendingMintCalls.delete(address); - - mintCache.set(address, data); - return data; - }) as Promise; - pendingMintCalls.set(address, query as any); - - return query; - }, - getMint: (pubKey: string | PublicKey) => { - let key: string; - if (typeof pubKey !== 'string') { - key = pubKey.toBase58(); - } else { - key = pubKey; - } - - return mintCache.get(key); - }, - addMint: (pubKey: PublicKey, obj: AccountInfo) => { - const mint = deserializeMint(obj.data); - const id = pubKey.toBase58(); - mintCache.set(id, mint); - return mint; - }, -}; - -export const useAccountsContext = () => { - const context = useContext(AccountsContext); - - return context; -}; - -function wrapNativeAccount( - pubkey: PublicKey, - account?: AccountInfo, -): TokenAccount | undefined { - if (!account) { - return undefined; - } - - return { - pubkey: pubkey, - account, - info: { - address: pubkey, - mint: WRAPPED_SOL_MINT, - owner: pubkey, - amount: new u64(account.lamports), - delegate: null, - delegatedAmount: new u64(0), - isInitialized: true, - isFrozen: false, - isNative: true, - rentExemptReserve: null, - closeAuthority: null, - }, - }; -} - -export const getCachedAccount = ( - predicate: (account: TokenAccount) => boolean, -) => { - for (const account of genericCache.values()) { - if (predicate(account)) { - return account as TokenAccount; - } - } -}; - -const UseNativeAccount = () => { - const connection = useConnection(); - const { publicKey } = useWallet(); - - const [nativeAccount, setNativeAccount] = useState>(); - - const updateCache = useCallback( - account => { - if (publicKey) { - const wrapped = wrapNativeAccount(publicKey, account); - const id = publicKey.toBase58(); - cache.registerParser(id, TokenAccountParser); - genericCache.set(id, wrapped as TokenAccount); - cache.emitter.raiseCacheUpdated(id, false, TokenAccountParser); - } - }, - [publicKey], - ); - - useEffect(() => { - let subId = 0; - const updateAccount = (account: AccountInfo | null) => { - if (account) { - updateCache(account); - setNativeAccount(account); - } - }; - - (async () => { - if (!connection || !publicKey) { - return; - } - - const account = await connection.getAccountInfo(publicKey); - updateAccount(account); - - subId = connection.onAccountChange(publicKey, updateAccount); - })(); - - return () => { - if (subId) { - connection.removeAccountChangeListener(subId); - } - }; - }, [setNativeAccount, publicKey, connection, updateCache]); - - return { nativeAccount }; -}; - -const PRECACHED_OWNERS = new Set(); -const precacheUserTokenAccounts = async ( - connection: Connection, - owner?: PublicKey, -) => { - if (!owner) { - return; - } - - // used for filtering account updates over websocket - PRECACHED_OWNERS.add(owner.toBase58()); - - // user accounts are updated via ws subscription - const accounts = await connection.getTokenAccountsByOwner(owner, { - programId: programIds().token, - }); - accounts.value.forEach(info => { - cache.add(info.pubkey.toBase58(), info.account, TokenAccountParser); - }); -}; - -export function AccountsProvider({ children = null as any }) { - const connection = useConnection(); - const { publicKey } = useWallet(); - const [tokenAccounts, setTokenAccounts] = useState([]); - const [userAccounts, setUserAccounts] = useState([]); - const { nativeAccount } = UseNativeAccount(); - - const selectUserAccounts = useCallback(() => { - return cache - .byParser(TokenAccountParser) - .map(id => cache.get(id)) - .filter( - a => a && a.info.owner.toBase58() === publicKey?.toBase58(), - ) - .map(a => a as TokenAccount); - }, [publicKey]); - - useEffect(() => { - const accounts = selectUserAccounts().filter( - a => a !== undefined, - ) as TokenAccount[]; - setUserAccounts(accounts); - }, [nativeAccount, tokenAccounts, selectUserAccounts]); - - useEffect(() => { - const subs: number[] = []; - cache.emitter.onCache(args => { - if (args.isNew) { - let id = args.id; - let deserialize = args.parser; - connection.onAccountChange(new PublicKey(id), info => { - cache.add(id, info, deserialize); - }); - } - }); - - return () => { - subs.forEach(id => connection.removeAccountChangeListener(id)); - }; - }, [connection]); - - useEffect(() => { - if (!connection || !publicKey) { - setTokenAccounts([]); - } else { - precacheUserTokenAccounts(connection, LEND_HOST_FEE_ADDRESS); - - precacheUserTokenAccounts(connection, publicKey).then(() => { - setTokenAccounts(selectUserAccounts()); - }); - - // This can return different types of accounts: token-account, mint, multisig - // TODO: web3.js expose ability to filter. - // this should use only filter syntax to only get accounts that are owned by user - const tokenSubID = connection.onProgramAccountChange( - programIds().token, - info => { - // TODO: fix type in web3.js - const id = info.accountId as unknown as string; - // TODO: do we need a better way to identify layout (maybe a enum identifing type?) - if (info.accountInfo.data.length === AccountLayout.span) { - const data = deserializeAccount(info.accountInfo.data); - - if (PRECACHED_OWNERS.has(data.owner.toBase58())) { - cache.add(id, info.accountInfo, TokenAccountParser); - setTokenAccounts(selectUserAccounts()); - } - } - }, - 'singleGossip', - ); - - return () => { - connection.removeProgramAccountChangeListener(tokenSubID); - }; - } - }, [connection, publicKey, selectUserAccounts]); - - return ( - - {children} - - ); -} - -export function useNativeAccount() { - const context = useContext(AccountsContext); - return { - account: context.nativeAccount as AccountInfo, - }; -} - -export const getMultipleAccounts = async ( - connection: any, - keys: string[], - commitment: string, -) => { - const result = await Promise.all( - chunks(keys, 99).map(chunk => - getMultipleAccountsCore(connection, chunk, commitment), - ), - ); - - const array = result - .map( - a => - a.array.map(acc => { - if (!acc) { - return undefined; - } - - const { data, ...rest } = acc; - const obj = { - ...rest, - data: Buffer.from(data[0], 'base64'), - } as AccountInfo; - return obj; - }) as AccountInfo[], - ) - .flat(); - return { keys, array }; -}; - -const getMultipleAccountsCore = async ( - connection: any, - keys: string[], - commitment: string, -) => { - const args = connection._buildArgs([keys], commitment, 'base64'); - - const unsafeRes = await connection._rpcRequest('getMultipleAccounts', args); - if (unsafeRes.error) { - throw new Error( - 'failed to get info about account ' + unsafeRes.error.message, - ); - } - - if (unsafeRes.result.value) { - const array = unsafeRes.result.value as AccountInfo[]; - return { keys, array }; - } - - // TODO: fix - throw new Error(); -}; - -export function useMint(key?: string | PublicKey) { - const connection = useConnection(); - const [mint, setMint] = useState(); - - const id = typeof key === 'string' ? key : key?.toBase58(); - - useEffect(() => { - if (!id) { - return; - } - - cache - .query(connection, id, MintParser) - .then(acc => setMint(acc.info as any)) - .catch(err => console.log(err)); - - const dispose = cache.emitter.onCache(e => { - const event = e; - if (event.id === id) { - cache - .query(connection, id, MintParser) - .then(mint => setMint(mint.info as any)); - } - }); - return () => { - dispose(); - }; - }, [connection, id]); - - return mint; -} - -export function useAccount(pubKey?: PublicKey) { - const connection = useConnection(); - const [account, setAccount] = useState(); - - const key = pubKey?.toBase58(); - useEffect(() => { - const query = async () => { - try { - if (!key) { - return; - } - - const acc = await cache - .query(connection, key, TokenAccountParser) - .catch(err => console.log(err)); - if (acc) { - setAccount(acc); - } - } catch (err) { - console.error(err); - } - }; - - query(); - - const dispose = cache.emitter.onCache(e => { - const event = e; - if (event.id === key) { - query(); - } - }); - return () => { - dispose(); - }; - }, [connection, key]); - - return account; -} - -// TODO: expose in spl package -export const deserializeAccount = (data: Buffer) => { - const accountInfo = AccountLayout.decode(data); - accountInfo.mint = new PublicKey(accountInfo.mint); - accountInfo.owner = new PublicKey(accountInfo.owner); - accountInfo.amount = u64.fromBuffer(accountInfo.amount); - - if (accountInfo.delegateOption === 0) { - accountInfo.delegate = null; - accountInfo.delegatedAmount = new u64(0); - } else { - accountInfo.delegate = new PublicKey(accountInfo.delegate); - accountInfo.delegatedAmount = u64.fromBuffer(accountInfo.delegatedAmount); - } - - accountInfo.isInitialized = accountInfo.state !== 0; - accountInfo.isFrozen = accountInfo.state === 2; - - if (accountInfo.isNativeOption === 1) { - accountInfo.rentExemptReserve = u64.fromBuffer(accountInfo.isNative); - accountInfo.isNative = true; - } else { - accountInfo.rentExemptReserve = null; - accountInfo.isNative = false; - } - - if (accountInfo.closeAuthorityOption === 0) { - accountInfo.closeAuthority = null; - } else { - accountInfo.closeAuthority = new PublicKey(accountInfo.closeAuthority); - } - - return accountInfo; -}; - -// TODO: expose in spl package -export const deserializeMint = (data: Buffer) => { - if (data.length !== MintLayout.span) { - throw new Error('Not a valid Mint'); - } - - const mintInfo = MintLayout.decode(data); - - if (mintInfo.mintAuthorityOption === 0) { - mintInfo.mintAuthority = null; - } else { - mintInfo.mintAuthority = new PublicKey(mintInfo.mintAuthority); - } - - mintInfo.supply = u64.fromBuffer(mintInfo.supply); - mintInfo.isInitialized = mintInfo.isInitialized !== 0; - - if (mintInfo.freezeAuthorityOption === 0) { - mintInfo.freezeAuthority = null; - } else { - mintInfo.freezeAuthority = new PublicKey(mintInfo.freezeAuthority); - } - - return mintInfo as MintInfo; -}; diff --git a/packages/common/src/contexts/connection.tsx b/packages/common/src/contexts/connection.tsx deleted file mode 100644 index 462372b..0000000 --- a/packages/common/src/contexts/connection.tsx +++ /dev/null @@ -1,721 +0,0 @@ -import { sleep, useLocalStorageState } from '../utils/utils'; -import { - Account, - BlockhashAndFeeCalculator, - clusterApiUrl, - Commitment, - Connection, - RpcResponseAndContext, - SignatureStatus, - SimulatedTransactionResponse, - Transaction, - TransactionInstruction, - TransactionSignature, -} from '@solana/web3.js'; -import React, { useContext, useEffect, useMemo, useState } from 'react'; -import { notify } from '../utils/notifications'; -import { ExplorerLink } from '../components/ExplorerLink'; -import { setProgramIds } from '../utils/ids'; -import { - TokenInfo, - TokenListProvider, - ENV as ChainId, -} from '@solana/spl-token-registry'; -import { - SendTransactionError, - SignTransactionError, - TransactionTimeoutError, -} from '../utils/errors'; -import { WalletSigner, WalletNotConnectedError } from './wallet'; - -export type ENV = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet'; - -export const ENDPOINTS = [ - { - name: 'mainnet-beta' as ENV, - endpoint: - process.env.REACT_APP_MAINNET_RPC || 'https://ssc-dao.genesysgo.net', - ChainId: ChainId.MainnetBeta, - }, - { - name: 'testnet' as ENV, - endpoint: clusterApiUrl('testnet'), - ChainId: ChainId.Testnet, - }, - { - name: 'devnet' as ENV, - endpoint: - process.env.REACT_APP_DEVNET_RPC || - 'https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899', - ChainId: ChainId.Devnet, - }, - { - name: 'localnet' as ENV, - endpoint: 'http://127.0.0.1:8899', - ChainId: ChainId.Devnet, - }, -]; - -const DEFAULT = ENDPOINTS[0].endpoint; -const DEFAULT_SLIPPAGE = 0.25; - -interface ConnectionConfig { - connection: Connection; - sendConnection: Connection; - endpoint: string; - slippage: number; - setSlippage: (val: number) => void; - env: ENV; - setEndpoint: (val: string) => void; - tokens: TokenInfo[]; - tokenMap: Map; -} - -const ConnectionContext = React.createContext({ - endpoint: DEFAULT, - setEndpoint: () => { }, - slippage: DEFAULT_SLIPPAGE, - setSlippage: (val: number) => { }, - connection: new Connection(DEFAULT, 'recent'), - sendConnection: new Connection(DEFAULT, 'recent'), - env: ENDPOINTS[0].name, - tokens: [], - tokenMap: new Map(), -}); - -enum ASSET_CHAIN { - Solana = 1, - Ethereum = 2, -} - -export function ConnectionProvider({ children = undefined as any }) { - const [endpoint, setEndpoint] = useLocalStorageState( - 'connectionEndpoint', - ENDPOINTS[0].endpoint, - ); - - const [slippage, setSlippage] = useLocalStorageState( - 'slippage', - DEFAULT_SLIPPAGE.toString(), - ); - - const connection = useMemo( - () => new Connection(endpoint, 'recent'), - [endpoint], - ); - const sendConnection = useMemo( - () => new Connection(endpoint, 'recent'), - [endpoint], - ); - - const env = - ENDPOINTS.find(end => end.endpoint === endpoint)?.name || ENDPOINTS[0].name; - - const [tokens, setTokens] = useState([]); - const [tokenMap, setTokenMap] = useState>(new Map()); - useEffect(() => { - // fetch token files - new TokenListProvider().resolve().then(container => { - const list = container - .excludeByTag('nft') - .filterByChainId( - ENDPOINTS.find(end => end.endpoint === endpoint)?.ChainId || - ChainId.MainnetBeta, - ) - .getList(); - - // WORMHOLE TOKEN NEEDED - list.push({ - address: '66CgfJQoZkpkrEgC1z4vFJcSFc4V6T5HqbjSSNuqcNJz', - chainId: ASSET_CHAIN.Solana, - decimals: 9, - logoURI: - 'https://assets.coingecko.com/coins/images/15500/thumb/ibbtc.png?1621077589', - name: 'Interest Bearing Bitcoin (Wormhole)', - symbol: 'IBBTC', - extensions: { - address: '0xc4e15973e6ff2a35cc804c2cf9d2a1b817a8b40f', - }, - }); - const knownMints = [...list].reduce((map, item) => { - map.set(item.address, item); - return map; - }, new Map()); - - setTokenMap(knownMints); - setTokens(list); - }); - }, [env]); - - setProgramIds(env); - - // The websocket library solana/web3.js uses closes its websocket connection when the subscription list - // is empty after opening its first time, preventing subsequent subscriptions from receiving responses. - // This is a hack to prevent the list from every getting empty - useEffect(() => { - const id = connection.onAccountChange(new Account().publicKey, () => { }); - return () => { - connection.removeAccountChangeListener(id); - }; - }, [connection]); - - useEffect(() => { - const id = connection.onSlotChange(() => null); - return () => { - connection.removeSlotChangeListener(id); - }; - }, [connection]); - - useEffect(() => { - const id = sendConnection.onAccountChange( - new Account().publicKey, - () => { }, - ); - return () => { - sendConnection.removeAccountChangeListener(id); - }; - }, [sendConnection]); - - useEffect(() => { - const id = sendConnection.onSlotChange(() => null); - return () => { - sendConnection.removeSlotChangeListener(id); - }; - }, [sendConnection]); - - return ( - setSlippage(val.toString()), - connection, - sendConnection, - tokens, - tokenMap, - env, - }} - > - {children} - - ); -} - -export function useConnection() { - return useContext(ConnectionContext).connection as Connection; -} - -export function useSendConnection() { - return useContext(ConnectionContext)?.sendConnection; -} - -export function useConnectionConfig() { - const context = useContext(ConnectionContext); - return { - endpoint: context.endpoint, - setEndpoint: context.setEndpoint, - env: context.env, - tokens: context.tokens, - tokenMap: context.tokenMap, - }; -} - -export function useSlippageConfig() { - const { slippage, setSlippage } = useContext(ConnectionContext); - return { slippage, setSlippage }; -} - -export const getErrorForTransaction = async ( - connection: Connection, - txid: string, -) => { - // wait for all confirmation before geting transaction - - await connection.confirmTransaction(txid, 'max'); - - const tx = await connection.getParsedConfirmedTransaction(txid); - - const errors: string[] = []; - if (tx?.meta && tx.meta.logMessages) { - tx.meta.logMessages.forEach(log => { - const regex = /Error: (.*)/gm; - let m; - while ((m = regex.exec(log)) !== null) { - // This is necessary to avoid infinite loops with zero-width matches - if (m.index === regex.lastIndex) { - regex.lastIndex++; - } - - if (m.length > 1) { - errors.push(m[1]); - } - } - }); - } - - return errors; -}; - -export enum SequenceType { - Sequential, - Parallel, - StopOnFailure, -} - -export const sendTransactions = async ( - connection: Connection, - wallet: WalletSigner, - instructionSet: TransactionInstruction[][], - signersSet: Account[][], - sequenceType: SequenceType = SequenceType.Parallel, - commitment: Commitment = 'singleGossip', - successCallback: (txid: string, ind: number) => void = (txid, ind) => { }, - failCallback: (reason: string, ind: number) => boolean = (txid, ind) => false, - block?: BlockhashAndFeeCalculator, -): Promise => { - if (!wallet.publicKey) throw new WalletNotConnectedError(); - - const unsignedTxns: Transaction[] = []; - - if (!block) { - block = await connection.getRecentBlockhash(commitment); - } - - for (let i = 0; i < instructionSet.length; i++) { - const instructions = instructionSet[i]; - const signers = signersSet[i]; - - if (instructions.length === 0) { - continue; - } - - let transaction = new Transaction(); - instructions.forEach(instruction => transaction.add(instruction)); - transaction.recentBlockhash = block.blockhash; - transaction.setSigners( - // fee payed by the wallet owner - wallet.publicKey, - ...signers.map(s => s.publicKey), - ); - - if (signers.length > 0) { - transaction.partialSign(...signers); - } - - unsignedTxns.push(transaction); - } - - const signedTxns = await wallet.signAllTransactions(unsignedTxns); - - const pendingTxns: Promise<{ txid: string; slot: number }>[] = []; - - let breakEarlyObject = { breakEarly: false }; - for (let i = 0; i < signedTxns.length; i++) { - const signedTxnPromise = sendSignedTransaction({ - connection, - signedTransaction: signedTxns[i], - }); - - signedTxnPromise - .then(({ txid, slot }) => { - successCallback(txid, i); - }) - .catch(reason => { - // @ts-ignore - failCallback(signedTxns[i], i); - if (sequenceType == SequenceType.StopOnFailure) { - breakEarlyObject.breakEarly = true; - } - }); - - if (sequenceType != SequenceType.Parallel) { - await signedTxnPromise; - if (breakEarlyObject.breakEarly) { - return i; // REturn the txn we failed on by index - } - } else { - pendingTxns.push(signedTxnPromise); - } - } - - if (sequenceType != SequenceType.Parallel) { - await Promise.all(pendingTxns); - } - - return signedTxns.length; -}; - -export const sendTransaction = async ( - connection: Connection, - wallet: WalletSigner, - instructions: TransactionInstruction[], - signers: Account[], - awaitConfirmation = true, - commitment: Commitment = 'singleGossip', - includesFeePayer: boolean = false, - block?: BlockhashAndFeeCalculator, -) => { - if (!wallet.publicKey) throw new WalletNotConnectedError(); - - let transaction = new Transaction(); - instructions.forEach(instruction => transaction.add(instruction)); - transaction.recentBlockhash = ( - block || (await connection.getRecentBlockhash(commitment)) - ).blockhash; - - if (includesFeePayer) { - transaction.setSigners(...signers.map(s => s.publicKey)); - } else { - transaction.setSigners( - // fee payed by the wallet owner - wallet.publicKey, - ...signers.map(s => s.publicKey), - ); - } - - if (signers.length > 0) { - transaction.partialSign(...signers); - } - - if (!includesFeePayer) { - try { - transaction = await wallet.signTransaction(transaction); - } catch (ex) { - throw new SignTransactionError(JSON.stringify(ex)); - } - } - - const rawTransaction = transaction.serialize(); - let options = { - skipPreflight: true, - commitment, - }; - - const txid = await connection.sendRawTransaction(rawTransaction, options); - let slot = 0; - - if (awaitConfirmation) { - const confirmationStatus = await awaitTransactionSignatureConfirmation( - txid, - DEFAULT_TIMEOUT, - connection, - commitment, - ); - - slot = confirmationStatus?.slot || 0; - - if (confirmationStatus?.err) { - let errors: string[] = []; - try { - // TODO: This call always throws errors and delays error feedback - // It needs to be investigated but for now I'm commenting it out - // errors = await getErrorForTransaction(connection, txid); - } catch (ex) { - console.error('getErrorForTransaction() error', ex); - } - - if ('timeout' in (confirmationStatus.err as any)) { - notify({ - message: `Transaction hasn't been confirmed within ${DEFAULT_TIMEOUT / 1000 - }s. Please check on Solana Explorer`, - description: ( - <> - - - ), - type: 'warn', - }); - throw new TransactionTimeoutError(txid); - } - - notify({ - message: 'Transaction error', - description: ( - <> - {errors.map(err => ( -
{err}
- ))} - - - ), - type: 'error', - }); - - throw new SendTransactionError( - `Transaction ${txid} failed (${JSON.stringify(confirmationStatus)})`, - txid, - confirmationStatus.err, - ); - } - } - - return { txid, slot }; -}; - -export const sendTransactionWithRetry = async ( - connection: Connection, - wallet: WalletSigner, - instructions: TransactionInstruction[], - signers: Account[], - commitment: Commitment = 'singleGossip', - includesFeePayer: boolean = false, - block?: BlockhashAndFeeCalculator, - beforeSend?: () => void, -) => { - if (!wallet.publicKey) throw new WalletNotConnectedError(); - - let transaction = new Transaction(); - instructions.forEach(instruction => transaction.add(instruction)); - transaction.recentBlockhash = ( - block || (await connection.getRecentBlockhash(commitment)) - ).blockhash; - - if (includesFeePayer) { - transaction.setSigners(...signers.map(s => s.publicKey)); - } else { - transaction.setSigners( - // fee payed by the wallet owner - wallet.publicKey, - ...signers.map(s => s.publicKey), - ); - } - - if (signers.length > 0) { - transaction.partialSign(...signers); - } - if (!includesFeePayer) { - transaction = await wallet.signTransaction(transaction); - } - - if (beforeSend) { - beforeSend(); - } - - const { txid, slot } = await sendSignedTransaction({ - connection, - signedTransaction: transaction, - }); - - return { txid, slot }; -}; - -export const getUnixTs = () => { - return new Date().getTime() / 1000; -}; - -const DEFAULT_TIMEOUT = 30000; - -export async function sendSignedTransaction({ - signedTransaction, - connection, - timeout = DEFAULT_TIMEOUT, -}: { - signedTransaction: Transaction; - connection: Connection; - sendingMessage?: string; - sentMessage?: string; - successMessage?: string; - timeout?: number; -}): Promise<{ txid: string; slot: number }> { - const rawTransaction = signedTransaction.serialize(); - const startTime = getUnixTs(); - let slot = 0; - const txid: TransactionSignature = await connection.sendRawTransaction( - rawTransaction, - { - skipPreflight: true, - }, - ); - - console.log('Started awaiting confirmation for', txid); - - let done = false; - (async () => { - while (!done && getUnixTs() - startTime < timeout) { - connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }); - await sleep(500); - } - })(); - try { - const confirmation = await awaitTransactionSignatureConfirmation( - txid, - timeout, - connection, - 'recent', - true, - ); - - if (confirmation.err) { - console.error(confirmation.err); - throw new Error('Transaction failed: Custom instruction error'); - } - - slot = confirmation?.slot || 0; - } catch (err) { - if ((err as any).timeout) { - throw new Error('Timed out awaiting confirmation on transaction'); - } - let simulateResult: SimulatedTransactionResponse | null = null; - try { - simulateResult = ( - await simulateTransaction(connection, signedTransaction, 'single') - ).value; - } catch (e) { } - if (simulateResult && simulateResult.err) { - if (simulateResult.logs) { - for (let i = simulateResult.logs.length - 1; i >= 0; --i) { - const line = simulateResult.logs[i]; - if (line.startsWith('Program log: ')) { - throw new Error( - 'Transaction failed: ' + line.slice('Program log: '.length), - ); - } - } - } - throw new Error(JSON.stringify(simulateResult.err)); - } - // throw new Error('Transaction failed'); - } finally { - done = true; - } - - console.log('Latency', txid, getUnixTs() - startTime); - return { txid, slot }; -} - -export async function simulateTransaction( - connection: Connection, - transaction: Transaction, - commitment: Commitment, -): Promise> { - // @ts-ignore - transaction.recentBlockhash = await connection._recentBlockhash( - // @ts-ignore - connection._disableBlockhashCaching, - ); - - const signData = transaction.serializeMessage(); - // @ts-ignore - const wireTransaction = transaction._serialize(signData); - const encodedTransaction = wireTransaction.toString('base64'); - const config: any = { encoding: 'base64', commitment }; - const args = [encodedTransaction, config]; - - // @ts-ignore - const res = await connection._rpcRequest('simulateTransaction', args); - if (res.error) { - throw new Error('failed to simulate transaction: ' + res.error.message); - } - return res.result; -} - -async function awaitTransactionSignatureConfirmation( - txid: TransactionSignature, - timeout: number, - connection: Connection, - commitment: Commitment = 'recent', - queryStatus = false, -) { - let done = false; - let status: SignatureStatus | null = { - slot: 0, - confirmations: 0, - err: null, - }; - let subId = 0; - await new Promise((resolve, reject) => { - (async () => { - setTimeout(() => { - if (done) { - return; - } - done = true; - reject({ timeout: true }); - }, timeout); - try { - subId = connection.onSignature( - txid, - (result, context) => { - done = true; - status = { - err: result.err, - slot: context.slot, - confirmations: 0, - }; - if (result.err) { - console.log('Rejected via websocket', result.err); - reject(result.err); - } else { - console.log('Resolved via websocket', result); - resolve(result); - } - }, - commitment, - ); - } catch (e) { - done = true; - console.error('WS error in setup', txid, e); - } - while (!done && queryStatus) { - // eslint-disable-next-line no-loop-func - (async () => { - try { - const signatureStatuses = await connection.getSignatureStatuses([ - txid, - ]); - status = signatureStatuses && signatureStatuses.value[0]; - if (!done) { - if (!status) { - console.log('REST null result for', txid, status); - } else if (status.err) { - console.log('REST error for', txid, status); - done = true; - reject(status.err); - } else if (!status.confirmations) { - console.log('REST no confirmations for', txid, status); - } else { - console.log('REST confirmation for', txid, status); - done = true; - resolve(status); - } - } - } catch (e) { - if (!done) { - console.log('REST connection error: txid', txid, e); - } - } - })(); - await sleep(2000); - } - })(); - }) - .catch(err => { - if (err.timeout && status) { - status.err = { timeout: true }; - } - - //@ts-ignore - if (connection._signatureSubscriptions[subId]) - connection.removeSignatureListener(subId); - }) - .then(_ => { - //@ts-ignore - if (connection._signatureSubscriptions[subId]) - connection.removeSignatureListener(subId); - }); - done = true; - return status; -} diff --git a/packages/common/src/contexts/index.tsx b/packages/common/src/contexts/index.tsx deleted file mode 100644 index c155b7e..0000000 --- a/packages/common/src/contexts/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export * as Accounts from './accounts'; -export * from './accounts'; -export * as Connection from './connection'; -export * from './connection'; -export * as Wallet from './wallet'; -export * from './wallet'; diff --git a/packages/common/src/contexts/wallet.tsx b/packages/common/src/contexts/wallet.tsx deleted file mode 100644 index e159fd0..0000000 --- a/packages/common/src/contexts/wallet.tsx +++ /dev/null @@ -1,217 +0,0 @@ -import { - MessageSignerWalletAdapterProps, - SignerWalletAdapter, - SignerWalletAdapterProps, - WalletAdapterNetwork, - WalletAdapterProps, - WalletError, - WalletNotConnectedError, -} from '@solana/wallet-adapter-base'; -import { - useWallet as useWalletBase, - WalletProvider as BaseWalletProvider, -} from '@solana/wallet-adapter-react'; -import { - getLedgerWallet, - getPhantomWallet, - getSlopeWallet, - getSolflareWallet, - getSolletWallet, - getSolletExtensionWallet, - getTorusWallet, - Wallet, - WalletName, -} from '@solana/wallet-adapter-wallets'; -import { Button, Modal } from 'antd'; -import React, { - createContext, - FC, - ReactNode, - useCallback, - useContext, - useEffect, - useMemo, - useState, -} from 'react'; -import { notify } from '../utils'; -import { useConnectionConfig } from './connection'; - -export interface WalletContextState extends WalletAdapterProps { - wallets: Wallet[]; - autoConnect: boolean; - - wallet: Wallet | null; - adapter: SignerWalletAdapter | MessageSignerWalletAdapterProps | null; - disconnecting: boolean; - - select(walletName: WalletName): void; - - signTransaction: SignerWalletAdapterProps['signTransaction']; - signAllTransactions: SignerWalletAdapterProps['signAllTransactions']; - - signMessage: MessageSignerWalletAdapterProps['signMessage'] | undefined; -} - -export function useWallet(): WalletContextState { - return useWalletBase() as WalletContextState; -} - -export { SignerWalletAdapter, WalletNotConnectedError }; - -export type WalletSigner = Pick< - SignerWalletAdapter, - 'publicKey' | 'signTransaction' | 'signAllTransactions' ->; - -export interface WalletModalContextState { - visible: boolean; - setVisible: (open: boolean) => void; -} - -export const WalletModalContext = createContext( - {} as WalletModalContextState, -); - -export function useWalletModal(): WalletModalContextState { - return useContext(WalletModalContext); -} - -export const WalletModal = () => { - const { wallets, wallet: selected, select } = useWallet(); - const { visible, setVisible } = useWalletModal(); - const close = useCallback(() => setVisible(false), [setVisible]); - - return ( - - {wallets.map(wallet => { - return ( - - ); - })} - - ); -}; - -export const WalletModalProvider = ({ children }: { children: ReactNode }) => { - const { publicKey } = useWallet(); - const [connected, setConnected] = useState(!!publicKey); - const [visible, setVisible] = useState(false); - - useEffect(() => { - if (publicKey) { - const base58 = publicKey.toBase58(); - const keyToDisplay = - base58.length > 20 - ? `${base58.substring(0, 7)}.....${base58.substring( - base58.length - 7, - base58.length, - )}` - : base58; - - notify({ - message: 'Wallet update', - description: 'Connected to wallet ' + keyToDisplay, - }); - } - }, [publicKey]); - - useEffect(() => { - if (!publicKey && connected) { - notify({ - message: 'Wallet update', - description: 'Disconnected from wallet', - }); - } - setConnected(!!publicKey); - }, [publicKey, connected, setConnected]); - - return ( - - {children} - - - ); -}; - -export const WalletProvider = ({ children }: { children: ReactNode }) => { - const { env } = useConnectionConfig(); - - const network = useMemo(() => { - switch (env) { - case 'mainnet-beta': - return WalletAdapterNetwork.Mainnet; - case 'testnet': - return WalletAdapterNetwork.Testnet; - case 'devnet': - case 'localnet': - default: - return WalletAdapterNetwork.Devnet; - } - }, [env]); - - const wallets = useMemo( - () => [ - getPhantomWallet(), - getSlopeWallet(), - getSolflareWallet(), - getTorusWallet({ - options: { clientId: 'Get a client ID @ https://developer.tor.us' }, - }), - getLedgerWallet(), - getSolletWallet({ network }), - getSolletExtensionWallet({ network }), - ], - [], - ); - - const onError = useCallback((error: WalletError) => { - console.error(error); - notify({ - message: 'Wallet error', - description: error.message, - }); - }, []); - - return ( - - {children} - - ); -}; diff --git a/packages/common/src/contracts/token.ts b/packages/common/src/contracts/token.ts deleted file mode 100644 index d14e421..0000000 --- a/packages/common/src/contracts/token.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { MintLayout, AccountLayout, Token } from '@solana/spl-token'; -import { - SignerWalletAdapter, - WalletNotConnectedError, -} from '../contexts/wallet'; -import { - Connection, - PublicKey, - Transaction, - Account, - SystemProgram, -} from '@solana/web3.js'; - -export const mintNFT = async ( - connection: Connection, - wallet: SignerWalletAdapter, - // SOL account - owner: PublicKey, -) => { - if (!wallet.publicKey) throw new WalletNotConnectedError(); - - const TOKEN_PROGRAM_ID = new PublicKey( - 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', - ); - const SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = new PublicKey( - 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', - ); - const mintAccount = new Account(); - const tokenAccount = new Account(); - - // Allocate memory for the account - const mintRent = await connection.getMinimumBalanceForRentExemption( - MintLayout.span, - ); - - const accountRent = await connection.getMinimumBalanceForRentExemption( - MintLayout.span, - ); - - let transaction = new Transaction(); - const signers = [mintAccount, tokenAccount]; - transaction.recentBlockhash = ( - await connection.getRecentBlockhash('max') - ).blockhash; - - transaction.add( - SystemProgram.createAccount({ - fromPubkey: wallet.publicKey, - newAccountPubkey: mintAccount.publicKey, - lamports: mintRent, - space: MintLayout.span, - programId: TOKEN_PROGRAM_ID, - }), - ); - - transaction.add( - SystemProgram.createAccount({ - fromPubkey: wallet.publicKey, - newAccountPubkey: tokenAccount.publicKey, - lamports: accountRent, - space: AccountLayout.span, - programId: TOKEN_PROGRAM_ID, - }), - ); - - transaction.add( - Token.createInitMintInstruction( - TOKEN_PROGRAM_ID, - mintAccount.publicKey, - 0, - wallet.publicKey, - wallet.publicKey, - ), - ); - transaction.add( - Token.createInitAccountInstruction( - TOKEN_PROGRAM_ID, - mintAccount.publicKey, - tokenAccount.publicKey, - owner, - ), - ); - transaction.add( - Token.createMintToInstruction( - TOKEN_PROGRAM_ID, - mintAccount.publicKey, - tokenAccount.publicKey, - wallet.publicKey, - [], - 1, - ), - ); - transaction.add( - Token.createSetAuthorityInstruction( - TOKEN_PROGRAM_ID, - mintAccount.publicKey, - null, - 'MintTokens', - wallet.publicKey, - [], - ), - ); - - transaction.setSigners(wallet.publicKey, ...signers.map(s => s.publicKey)); - if (signers.length > 0) { - transaction.partialSign(...signers); - } - transaction = await wallet.signTransaction(transaction); - const rawTransaction = transaction.serialize(); - let options = { - skipPreflight: true, - commitment: 'singleGossip', - }; - - const txid = await connection.sendRawTransaction(rawTransaction, options); - - return { txid, mint: mintAccount.publicKey, account: tokenAccount.publicKey }; -}; diff --git a/packages/common/src/hooks/index.ts b/packages/common/src/hooks/index.ts deleted file mode 100644 index 24aa229..0000000 --- a/packages/common/src/hooks/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './useUserAccounts'; -export * from './useAccountByMint'; -export * from './useTokenName'; -export * from './useThatState'; diff --git a/packages/common/src/hooks/useAccountByMint.ts b/packages/common/src/hooks/useAccountByMint.ts deleted file mode 100644 index 0271d94..0000000 --- a/packages/common/src/hooks/useAccountByMint.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { useUserAccounts } from '../hooks/useUserAccounts'; - -export const useAccountByMint = (mint?: string | PublicKey) => { - const { userAccounts } = useUserAccounts(); - const mintAddress = typeof mint === 'string' ? mint : mint?.toBase58(); - - const index = userAccounts.findIndex( - acc => acc.info.mint.toBase58() === mintAddress, - ); - - if (index !== -1) { - return userAccounts[index]; - } - - return; -}; diff --git a/packages/common/src/hooks/useThatState.ts b/packages/common/src/hooks/useThatState.ts deleted file mode 100644 index 86ecf10..0000000 --- a/packages/common/src/hooks/useThatState.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { useState } from 'react'; - -// Extends useState() hook with async getThatState getter which can be used to get state value in contexts (ex. async callbacks) where up to date state is not available -export function useThatState(initialState: T) { - const [state, setState] = useState(initialState); - const getThatState = () => - new Promise(resolve => { - // Use NOP setState call to retrieve current state value - setState(s => { - resolve(s); - return s; - }); - }); - - return [state, setState, getThatState] as const; -} diff --git a/packages/common/src/hooks/useTokenName.ts b/packages/common/src/hooks/useTokenName.ts deleted file mode 100644 index b4a6b60..0000000 --- a/packages/common/src/hooks/useTokenName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { useConnectionConfig } from '../contexts/connection'; -import { getTokenName } from '../utils/utils'; - -export function useTokenName(mintAddress?: string | PublicKey) { - const { tokenMap } = useConnectionConfig(); - const address = - typeof mintAddress === 'string' ? mintAddress : mintAddress?.toBase58(); - return getTokenName(tokenMap, address); -} diff --git a/packages/common/src/hooks/useUserAccounts.ts b/packages/common/src/hooks/useUserAccounts.ts deleted file mode 100644 index 5e1c8ff..0000000 --- a/packages/common/src/hooks/useUserAccounts.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TokenAccount } from '../models'; -import { useAccountsContext } from '../contexts/accounts'; - -export function useUserAccounts() { - const context = useAccountsContext(); - return { - userAccounts: context.userAccounts as TokenAccount[], - }; -} diff --git a/packages/common/src/index.tsx b/packages/common/src/index.tsx deleted file mode 100644 index dbff96b..0000000 --- a/packages/common/src/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export * as actions from './actions'; -export * from './actions'; -export * as components from './components'; -export * from './components'; -export * as constants from './constants'; -export * from './constants'; -export * as hooks from './hooks'; -export * from './hooks'; -export * as contexts from './contexts'; -export * from './contexts'; -export * as models from './models'; -export * from './models'; -export * as utils from './utils'; -export * from './utils'; diff --git a/packages/common/src/models/account.ts b/packages/common/src/models/account.ts deleted file mode 100644 index 441a02e..0000000 --- a/packages/common/src/models/account.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { - Account, - AccountInfo, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; - -import { AccountInfo as TokenAccountInfo, Token, u64 } from '@solana/spl-token'; -import { TOKEN_PROGRAM_ID } from '../utils/ids'; -import BufferLayout from 'buffer-layout'; -import BN from 'bn.js'; - -export interface TokenAccount { - pubkey: PublicKey; - account: AccountInfo; - info: TokenAccountInfo; -} - -export interface ParsedDataAccount { - amount: number; - rawAmount: string; - parsedAssetAddress: string; - parsedAccount: any; - assetDecimals: number; - assetIcon: any; - name: string; - symbol: string; - sourceAddress: string; - targetAddress: string; - amountInUSD: number; -} - -export const ParsedDataLayout = BufferLayout.struct([ - BufferLayout.blob(32, 'amount'), - BufferLayout.u8('toChain'), - BufferLayout.blob(32, 'sourceAddress'), - BufferLayout.blob(32, 'targetAddress'), - BufferLayout.blob(32, 'assetAddress'), - BufferLayout.u8('assetChain'), - BufferLayout.u8('assetDecimals'), - BufferLayout.seq(BufferLayout.u8(), 1), // 4 byte alignment because a u32 is following - BufferLayout.u32('nonce'), - BufferLayout.blob(1001, 'vaa'), - BufferLayout.seq(BufferLayout.u8(), 3), // 4 byte alignment because a u32 is following - BufferLayout.u32('vaaTime'), - BufferLayout.u32('lockupTime'), - BufferLayout.u8('pokeCounter'), - BufferLayout.blob(32, 'signatureAccount'), - BufferLayout.u8('initialized'), -]); - -export function approve( - instructions: TransactionInstruction[], - cleanupInstructions: TransactionInstruction[], - account: PublicKey, - owner: PublicKey, - amount: number | u64, - autoRevoke = true, - - // if delegate is not passed ephemeral transfer authority is used - delegate?: PublicKey, - existingTransferAuthority?: Account, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -): Account { - - const transferAuthority = existingTransferAuthority || new Account(); - const delegateKey = delegate ?? transferAuthority.publicKey; - - // Coerce amount to u64 in case it's deserialized as BN which differs by buffer conversion functions only - // Without the coercion createApproveInstruction would fail because it won't be able to serialize it - if (typeof amount !== 'number') { - amount = new u64(amount.toArray()); - } - - instructions.push( - Token.createApproveInstruction( - tokenProgram, - account, - delegate ?? transferAuthority.publicKey, - owner, - [], - amount, - ), - ); - - if (autoRevoke) { - cleanupInstructions.push( - Token.createRevokeInstruction(tokenProgram, account, owner, []), - ); - } - - return transferAuthority; -} diff --git a/packages/common/src/models/index.ts b/packages/common/src/models/index.ts deleted file mode 100644 index b1673cd..0000000 --- a/packages/common/src/models/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './account'; -export * from './tokenSwap'; diff --git a/packages/common/src/models/tokenSwap.ts b/packages/common/src/models/tokenSwap.ts deleted file mode 100644 index a5017ab..0000000 --- a/packages/common/src/models/tokenSwap.ts +++ /dev/null @@ -1,84 +0,0 @@ -import * as BufferLayout from 'buffer-layout'; -import { publicKey, uint64 } from '../utils/layout'; - -export { TokenSwap } from '@solana/spl-token-swap'; - -const FEE_LAYOUT = BufferLayout.struct( - [ - BufferLayout.nu64('tradeFeeNumerator'), - BufferLayout.nu64('tradeFeeDenominator'), - BufferLayout.nu64('ownerTradeFeeNumerator'), - BufferLayout.nu64('ownerTradeFeeDenominator'), - BufferLayout.nu64('ownerWithdrawFeeNumerator'), - BufferLayout.nu64('ownerWithdrawFeeDenominator'), - BufferLayout.nu64('hostFeeNumerator'), - BufferLayout.nu64('hostFeeDenominator'), - ], - 'fees', -); - -export const TokenSwapLayoutLegacyV0 = BufferLayout.struct([ - BufferLayout.u8('isInitialized'), - BufferLayout.u8('nonce'), - publicKey('tokenAccountA'), - publicKey('tokenAccountB'), - publicKey('tokenPool'), - uint64('feesNumerator'), - uint64('feesDenominator'), -]); - -export const TokenSwapLayoutV1: typeof BufferLayout.Structure = BufferLayout.struct( - [ - BufferLayout.u8('isInitialized'), - BufferLayout.u8('nonce'), - publicKey('tokenProgramId'), - publicKey('tokenAccountA'), - publicKey('tokenAccountB'), - publicKey('tokenPool'), - publicKey('mintA'), - publicKey('mintB'), - publicKey('feeAccount'), - BufferLayout.u8('curveType'), - uint64('tradeFeeNumerator'), - uint64('tradeFeeDenominator'), - uint64('ownerTradeFeeNumerator'), - uint64('ownerTradeFeeDenominator'), - uint64('ownerWithdrawFeeNumerator'), - uint64('ownerWithdrawFeeDenominator'), - BufferLayout.blob(16, 'padding'), - ], -); - -const CURVE_NODE = BufferLayout.union( - BufferLayout.u8(), - BufferLayout.blob(32), - 'curve', -); -CURVE_NODE.addVariant(0, BufferLayout.struct([]), 'constantProduct'); -CURVE_NODE.addVariant( - 1, - BufferLayout.struct([BufferLayout.nu64('token_b_price')]), - 'constantPrice', -); -CURVE_NODE.addVariant(2, BufferLayout.struct([]), 'stable'); -CURVE_NODE.addVariant( - 3, - BufferLayout.struct([BufferLayout.nu64('token_b_offset')]), - 'offset', -); - -export const TokenSwapLayout: typeof BufferLayout.Structure = BufferLayout.struct( - [ - BufferLayout.u8('isInitialized'), - BufferLayout.u8('nonce'), - publicKey('tokenProgramId'), - publicKey('tokenAccountA'), - publicKey('tokenAccountB'), - publicKey('tokenPool'), - publicKey('mintA'), - publicKey('mintB'), - publicKey('feeAccount'), - FEE_LAYOUT, - CURVE_NODE, - ], -); diff --git a/packages/common/src/types/buffer-layout.d.ts b/packages/common/src/types/buffer-layout.d.ts deleted file mode 100644 index 32e44d0..0000000 --- a/packages/common/src/types/buffer-layout.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module 'buffer-layout' { - const bl: any; - export = bl; -} - -declare module 'jazzicon' { - const jazzicon: any; - export = jazzicon; -} diff --git a/packages/common/src/types/u64.d.ts b/packages/common/src/types/u64.d.ts deleted file mode 100644 index 6c349cf..0000000 --- a/packages/common/src/types/u64.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import BN from 'bn.js'; - -export class u64 extends BN { - toBuffer(): Buffer; - static fromBuffer(buffer: Buffer): u64; -} diff --git a/packages/common/src/utils/borsh.ts b/packages/common/src/utils/borsh.ts deleted file mode 100644 index 7b72b12..0000000 --- a/packages/common/src/utils/borsh.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { - serialize, - BinaryReader, - Schema, - BorshError, - BinaryWriter, -} from 'borsh'; - -(BinaryReader.prototype as any).readPubkey = function () { - const reader = (this as unknown) as BinaryReader; - const array = reader.readFixedArray(32); - return new PublicKey(array); -}; - -(BinaryWriter.prototype as any).writePubkey = function (value: PublicKey) { - const writer = (this as unknown) as BinaryWriter; - writer.writeFixedArray(value.toBuffer()); -}; - -function capitalizeFirstLetter(string: string): string { - return string.charAt(0).toUpperCase() + string.slice(1); -} - -function deserializeField( - schema: Schema, - fieldName: string, - fieldType: any, - reader: BinaryReader, -): any { - try { - if (typeof fieldType === 'string') { - return (reader as any)[`read${capitalizeFirstLetter(fieldType)}`](); - } - - if (fieldType instanceof Array) { - if (typeof fieldType[0] === 'number') { - return reader.readFixedArray(fieldType[0]); - } - - return reader.readArray(() => - deserializeField(schema, fieldName, fieldType[0], reader), - ); - } - - if (fieldType.kind === 'option') { - const option = reader.readU8(); - if (option) { - return deserializeField(schema, fieldName, fieldType.type, reader); - } - - return undefined; - } - - return deserializeStruct(schema, fieldType, reader); - } catch (error) { - if (error instanceof BorshError) { - error.addToFieldPath(fieldName); - } - throw error; - } -} - -function deserializeStruct( - schema: Schema, - classType: any, - reader: BinaryReader, -) { - const structSchema = schema.get(classType); - if (!structSchema) { - throw new BorshError(`Class ${classType.name} is missing in schema`); - } - - if (structSchema.kind === 'struct') { - const result: any = {}; - for (const [fieldName, fieldType] of schema.get(classType).fields) { - result[fieldName] = deserializeField( - schema, - fieldName, - fieldType, - reader, - ); - } - return new classType(result); - } - - if (structSchema.kind === 'enum') { - const idx = reader.readU8(); - if (idx >= structSchema.values.length) { - throw new BorshError(`Enum index: ${idx} is out of range`); - } - const [fieldName, fieldType] = structSchema.values[idx]; - const fieldValue = deserializeField(schema, fieldName, fieldType, reader); - return new classType({ [fieldName]: fieldValue }); - } - - throw new BorshError( - `Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`, - ); -} - -/// Deserializes object from bytes using schema. -export function deserializeBorsh( - schema: Schema, - classType: any, - buffer: Buffer, -): any { - const reader = new BinaryReader(buffer); - return deserializeStruct(schema, classType, reader); -} diff --git a/packages/common/src/utils/errors.ts b/packages/common/src/utils/errors.ts deleted file mode 100644 index 93d27b3..0000000 --- a/packages/common/src/utils/errors.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { TransactionError } from '@solana/web3.js'; - -export class SendTransactionError extends Error { - txError: TransactionError | undefined; - txId: string; - constructor(message: string, txId: string, txError?: TransactionError) { - super(message); - - this.txError = txError; - this.txId = txId; - } -} - -export function isSendTransactionError( - error: any, -): error is SendTransactionError { - return error instanceof SendTransactionError; -} - -export class SignTransactionError extends Error { - constructor(message: string) { - super(message); - } -} - -export function isSignTransactionError( - error: any, -): error is SignTransactionError { - return error instanceof SignTransactionError; -} - -export class TransactionTimeoutError extends Error { - txId: string; - constructor(txId: string) { - super(`Transaction has timed out`); - - this.txId = txId; - } -} - -export function isTransactionTimeoutError( - error: any, -): error is TransactionTimeoutError { - return error instanceof TransactionTimeoutError; -} diff --git a/packages/common/src/utils/eventEmitter.ts b/packages/common/src/utils/eventEmitter.ts deleted file mode 100644 index ee31a71..0000000 --- a/packages/common/src/utils/eventEmitter.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { EventEmitter as Emitter } from 'eventemitter3'; - -export class CacheUpdateEvent { - static type = 'CacheUpdate'; - id: string; - parser: any; - isNew: boolean; - constructor(id: string, isNew: boolean, parser: any) { - this.id = id; - this.parser = parser; - this.isNew = isNew; - } -} - -export class CacheDeleteEvent { - static type = 'CacheUpdate'; - id: string; - constructor(id: string) { - this.id = id; - } -} - -export class MarketUpdateEvent { - static type = 'MarketUpdate'; - ids: Set; - constructor(ids: Set) { - this.ids = ids; - } -} - -export class EventEmitter { - private emitter = new Emitter(); - - onMarket(callback: (args: MarketUpdateEvent) => void) { - this.emitter.on(MarketUpdateEvent.type, callback); - - return () => this.emitter.removeListener(MarketUpdateEvent.type, callback); - } - - onCache(callback: (args: CacheUpdateEvent) => void) { - this.emitter.on(CacheUpdateEvent.type, callback); - - return () => this.emitter.removeListener(CacheUpdateEvent.type, callback); - } - - raiseMarketUpdated(ids: Set) { - this.emitter.emit(MarketUpdateEvent.type, new MarketUpdateEvent(ids)); - } - - raiseCacheUpdated(id: string, isNew: boolean, parser: any) { - this.emitter.emit( - CacheUpdateEvent.type, - new CacheUpdateEvent(id, isNew, parser), - ); - } - - raiseCacheDeleted(id: string) { - this.emitter.emit(CacheDeleteEvent.type, new CacheDeleteEvent(id)); - } -} diff --git a/packages/common/src/utils/explorer.ts b/packages/common/src/utils/explorer.ts deleted file mode 100644 index 57274eb..0000000 --- a/packages/common/src/utils/explorer.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Connection, PublicKey, Transaction } from '@solana/web3.js'; -import { ENDPOINTS } from '../contexts'; -import { ENV as ChainId } from '@solana/spl-token-registry'; -import base58 from 'bs58'; - -export function getExplorerUrl( - viewTypeOrItemAddress: string | PublicKey, - endpoint: string, - itemType: string = 'address', - connection?: Connection, -) { - const getClusterUrlParam = () => { - // If ExplorerLink (or any other component)is used outside of ConnectionContext, ex. in notifications, then useConnectionConfig() won't return the current endpoint - // It would instead return the default ENDPOINT which is not that useful to us - // If connection is provided then we can use it instead of the hook to resolve the endpoint - if (connection) { - // Endpoint is stored as internal _rpcEndpoint prop - endpoint = (connection as any)._rpcEndpoint ?? endpoint; - } - - const env = ENDPOINTS.find(end => end.endpoint === endpoint); - - let cluster; - - if (env?.ChainId == ChainId.Testnet) { - cluster = 'testnet'; - } else if (env?.ChainId == ChainId.Devnet) { - if (env?.name === 'localnet') { - cluster = `custom&customUrl=${encodeURIComponent( - 'http://127.0.0.1:8899', - )}`; - } else { - cluster = 'devnet'; - } - } - - return cluster ? `?cluster=${cluster}` : ''; - }; - - return `https://explorer.solana.com/${itemType}/${viewTypeOrItemAddress}${getClusterUrlParam()}`; -} - -/// Returns explorer inspector URL for the given transaction -export function getExplorerInspectorUrl( - endpoint: string, - transaction: Transaction, - connection?: Connection, -) { - const SIGNATURE_LENGTH = 64; - - const explorerUrl = new URL( - getExplorerUrl('inspector', endpoint, 'tx', connection), - ); - - const signatures = transaction.signatures.map(s => - base58.encode(s.signature ?? Buffer.alloc(SIGNATURE_LENGTH)), - ); - explorerUrl.searchParams.append('signatures', JSON.stringify(signatures)); - - const message = transaction.serializeMessage(); - explorerUrl.searchParams.append('message', message.toString('base64')); - - return explorerUrl.toString(); -} diff --git a/packages/common/src/utils/ids.ts b/packages/common/src/utils/ids.ts deleted file mode 100644 index dd6dca8..0000000 --- a/packages/common/src/utils/ids.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { TokenSwapLayout, TokenSwapLayoutV1 } from '../models/tokenSwap'; - -export const WRAPPED_SOL_MINT = new PublicKey( - 'So11111111111111111111111111111111111111112', -); -export let TOKEN_PROGRAM_ID = new PublicKey( - 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', -); - -export let TOKEN_2022_PROGRAM_ID = new PublicKey( - 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', -); - -export let LENDING_PROGRAM_ID = new PublicKey( - 'LendZqTs7gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi', -); - -export let SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = new PublicKey( - 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', -); -export let BPF_UPGRADE_LOADER_ID = new PublicKey( - 'BPFLoaderUpgradeab1e11111111111111111111111', -); -export let METADATA_PROGRAM_ID = new PublicKey( - 'metaTA73sFPqA8whreUbBsbn3SLJH2vhrW9fP5dmfdC', -); - -export const MEMO_ID = new PublicKey( - 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr', -); - -export const VAULT_ID = new PublicKey( - '94wRaYAQdC2gYF76AUTYSugNJ3rAC4EimjAMPwM7uYry', -); - -export const AUCTION_ID = new PublicKey( - 'C9nHkL6BfGx9M9MyYrJqAD5hPsGJd1fHpp1uAJA6vTCn', -); - -export const METAPLEX_ID = new PublicKey( - 'EPtpKdKW8qciGVd1UFyGjgbBHTbSAyvbY61h9uQGVgeu', -); - -export let SYSTEM = new PublicKey('11111111111111111111111111111111'); - -let WORMHOLE_BRIDGE: { - pubkey: PublicKey; - bridge: string; - wrappedMaster: string; -}; - -let SWAP_PROGRAM_ID: PublicKey; -let SWAP_PROGRAM_LEGACY_IDS: PublicKey[]; -let SWAP_PROGRAM_LAYOUT: any; - -export const LEND_HOST_FEE_ADDRESS = process.env.REACT_APP_LEND_HOST_FEE_ADDRESS - ? new PublicKey(`${process.env.REACT_APP_LEND_HOST_FEE_ADDRESS}`) - : undefined; - -console.debug(`Lend host fee address: ${LEND_HOST_FEE_ADDRESS?.toBase58()}`); - -export const ENABLE_FEES_INPUT = false; - -// legacy pools are used to show users contributions in those pools to allow for withdrawals of funds -export const PROGRAM_IDS = [ - { - name: 'mainnet-beta', - - wormhole: () => ({ - pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'), - bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678', - wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae', - }), - swap: () => ({ - current: { - pubkey: new PublicKey('9qvG1zUp8xF1Bi4m6UdRNby1BAAuaDrUxSpv4CmRRMjL'), - layout: TokenSwapLayoutV1, - }, - legacy: [ - // TODO: uncomment to enable legacy contract - // new PublicKey("9qvG1zUp8xF1Bi4m6UdRNby1BAAuaDrUxSpv4CmRRMjL"), - ], - }), - }, - { - name: 'testnet', - - wormhole: () => ({ - pubkey: new PublicKey('5gQf5AUhAgWYgUCt9ouShm9H7dzzXUsLdssYwe5krKhg'), - bridge: '0x251bBCD91E84098509beaeAfF0B9951859af66D3', - wrappedMaster: 'E39f0b145C0aF079B214c5a8840B2B01eA14794c', - }), - swap: () => ({ - current: { - pubkey: new PublicKey('2n2dsFSgmPcZ8jkmBZLGUM2nzuFqcBGQ3JEEj6RJJcEg'), - layout: TokenSwapLayoutV1, - }, - legacy: [], - }), - }, - - { - name: 'devnet', - - wormhole: () => ({ - pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'), - bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678', - wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae', - }), - swap: () => ({ - current: { - pubkey: new PublicKey('6Cust2JhvweKLh4CVo1dt21s2PJ86uNGkziudpkNPaCj'), - layout: TokenSwapLayout, - }, - legacy: [new PublicKey('BSfTAcBdqmvX5iE2PW88WFNNp2DHhLUaBKk5WrnxVkcJ')], - }), - }, - { - name: 'localnet', - - wormhole: () => ({ - pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'), - bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678', - wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae', - }), - swap: () => ({ - current: { - pubkey: new PublicKey('369YmCWHGxznT7GGBhcLZDRcRoGWmGKFWdmtiPy78yj7'), - layout: TokenSwapLayoutV1, - }, - legacy: [], - }), - }, -]; - -export const setProgramIds = (envName: string) => { - let instance = PROGRAM_IDS.find(env => envName.indexOf(env.name) >= 0); - if (!instance) { - return; - } - - WORMHOLE_BRIDGE = instance.wormhole(); - - let swap = instance.swap(); - - SWAP_PROGRAM_ID = swap.current.pubkey; - SWAP_PROGRAM_LAYOUT = swap.current.layout; - SWAP_PROGRAM_LEGACY_IDS = swap.legacy; - - if (envName === 'mainnet-beta') { - LENDING_PROGRAM_ID = new PublicKey( - 'LendZqTs7gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi', - ); - } -}; - -export const programIds = () => { - return { - token: TOKEN_PROGRAM_ID, - token_2022: TOKEN_2022_PROGRAM_ID, - swap: SWAP_PROGRAM_ID, - swap_legacy: SWAP_PROGRAM_LEGACY_IDS, - swapLayout: SWAP_PROGRAM_LAYOUT, - lending: LENDING_PROGRAM_ID, - wormhole: WORMHOLE_BRIDGE, - - associatedToken: SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - bpf_upgrade_loader: BPF_UPGRADE_LOADER_ID, - system: SYSTEM, - metadata: METADATA_PROGRAM_ID, - memo: MEMO_ID, - vault: VAULT_ID, - auction: AUCTION_ID, - metaplex: METAPLEX_ID, - }; -}; diff --git a/packages/common/src/utils/index.tsx b/packages/common/src/utils/index.tsx deleted file mode 100644 index 8464d61..0000000 --- a/packages/common/src/utils/index.tsx +++ /dev/null @@ -1,10 +0,0 @@ -export * from './eventEmitter'; -export * from './ids'; -export * as Layout from './layout'; -export * from './notifications'; -export * from './utils'; -export * from './strings'; -export * as shortvec from './shortvec'; -export * from './borsh'; -export * from './errors'; -export * from './explorer'; diff --git a/packages/common/src/utils/layout.ts b/packages/common/src/utils/layout.ts deleted file mode 100644 index 38931a4..0000000 --- a/packages/common/src/utils/layout.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import * as BufferLayout from 'buffer-layout'; - -/** - * Layout for a public key - */ -export const publicKey = (property = 'publicKey'): unknown => { - const publicKeyLayout = BufferLayout.blob(32, property); - - const _decode = publicKeyLayout.decode.bind(publicKeyLayout); - const _encode = publicKeyLayout.encode.bind(publicKeyLayout); - - publicKeyLayout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new PublicKey(data); - }; - - publicKeyLayout.encode = (key: PublicKey, buffer: Buffer, offset: number) => { - return _encode(key.toBuffer(), buffer, offset); - }; - - return publicKeyLayout; -}; - -/** - * Layout for a 64bit unsigned value - */ -export const uint64 = (property = 'uint64'): unknown => { - const layout = BufferLayout.blob(8, property); - - const _decode = layout.decode.bind(layout); - const _encode = layout.encode.bind(layout); - - layout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new BN( - [...data] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - }; - - layout.encode = (num: BN, buffer: Buffer, offset: number) => { - const a = num.toArray().reverse(); - let b = Buffer.from(a); - if (b.length !== 8) { - const zeroPad = Buffer.alloc(8); - b.copy(zeroPad); - b = zeroPad; - } - return _encode(b, buffer, offset); - }; - - return layout; -}; - -// TODO: wrap in BN (what about decimals?) -export const uint128 = (property = 'uint128'): unknown => { - const layout = BufferLayout.blob(16, property); - - const _decode = layout.decode.bind(layout); - const _encode = layout.encode.bind(layout); - - layout.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return new BN( - [...data] - .reverse() - .map(i => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16, - ); - }; - - layout.encode = (num: BN, buffer: Buffer, offset: number) => { - const a = num.toArray().reverse(); - let b = Buffer.from(a); - if (b.length !== 16) { - const zeroPad = Buffer.alloc(16); - b.copy(zeroPad); - b = zeroPad; - } - - return _encode(b, buffer, offset); - }; - - return layout; -}; - -/** - * Layout for a Rust String type - */ -export const rustString = (property = 'string'): unknown => { - const rsl = BufferLayout.struct( - [ - BufferLayout.u32('length'), - BufferLayout.u32('lengthPadding'), - BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'), - ], - property, - ); - const _decode = rsl.decode.bind(rsl); - const _encode = rsl.encode.bind(rsl); - - rsl.decode = (buffer: Buffer, offset: number) => { - const data = _decode(buffer, offset); - return data.chars.toString('utf8'); - }; - - rsl.encode = (str: string, buffer: Buffer, offset: number) => { - const data = { - chars: Buffer.from(str, 'utf8'), - }; - return _encode(data, buffer, offset); - }; - - return rsl; -}; diff --git a/packages/common/src/utils/notifications.tsx b/packages/common/src/utils/notifications.tsx deleted file mode 100644 index a6d2ad8..0000000 --- a/packages/common/src/utils/notifications.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { notification } from 'antd'; -// import Link from '../components/Link'; - -export function notify({ - message = '', - description = undefined as any, - txid = '', - type = 'info', - placement = 'bottomLeft', -}) { - if (txid) { - // - // View transaction {txid.slice(0, 8)}...{txid.slice(txid.length - 8)} - // - - description = <>; - } - (notification as any)[type]({ - message: {message}, - description: ( - {description} - ), - placement, - style: { - backgroundColor: 'white', - }, - }); -} diff --git a/packages/common/src/utils/shortvec.ts b/packages/common/src/utils/shortvec.ts deleted file mode 100644 index 14b539d..0000000 --- a/packages/common/src/utils/shortvec.ts +++ /dev/null @@ -1,30 +0,0 @@ -export function decodeLength(bytes: Array): number { - let len = 0; - let size = 0; - for (;;) { - let elem = bytes.shift(); - //@ts-ignore - len |= (elem & 0x7f) << (size * 7); - size += 1; - //@ts-ignore - if ((elem & 0x80) === 0) { - break; - } - } - return len; -} - -export function encodeLength(bytes: Array, len: number) { - let rem_len = len; - for (;;) { - let elem = rem_len & 0x7f; - rem_len >>= 7; - if (rem_len == 0) { - bytes.push(elem); - break; - } else { - elem |= 0x80; - bytes.push(elem); - } - } -} diff --git a/packages/common/src/utils/strings.ts b/packages/common/src/utils/strings.ts deleted file mode 100644 index 28a7356..0000000 --- a/packages/common/src/utils/strings.ts +++ /dev/null @@ -1,74 +0,0 @@ -// credit https://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array -export function toUTF8Array(str: string) { - let utf8 = []; - for (let i = 0; i < str.length; i++) { - let charcode = str.charCodeAt(i); - if (charcode < 0x80) utf8.push(charcode); - else if (charcode < 0x800) { - utf8.push(0xc0 | (charcode >> 6), 0x80 | (charcode & 0x3f)); - } else if (charcode < 0xd800 || charcode >= 0xe000) { - utf8.push( - 0xe0 | (charcode >> 12), - 0x80 | ((charcode >> 6) & 0x3f), - 0x80 | (charcode & 0x3f), - ); - } - // surrogate pair - else { - i++; - // UTF-16 encodes 0x10000-0x10FFFF by - // subtracting 0x10000 and splitting the - // 20 bits of 0x0-0xFFFFF into two halves - charcode = - 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff)); - utf8.push( - 0xf0 | (charcode >> 18), - 0x80 | ((charcode >> 12) & 0x3f), - 0x80 | ((charcode >> 6) & 0x3f), - 0x80 | (charcode & 0x3f), - ); - } - } - return utf8; -} - -//courtesy https://gist.github.com/joni/3760795 -export function fromUTF8Array(data: number[]) { - // array of bytes - let str = '', - i; - - for (i = 0; i < data.length; i++) { - const value = data[i]; - - if (value < 0x80) { - str += String.fromCharCode(value); - } else if (value > 0xbf && value < 0xe0) { - str += String.fromCharCode(((value & 0x1f) << 6) | (data[i + 1] & 0x3f)); - i += 1; - } else if (value > 0xdf && value < 0xf0) { - str += String.fromCharCode( - ((value & 0x0f) << 12) | - ((data[i + 1] & 0x3f) << 6) | - (data[i + 2] & 0x3f), - ); - i += 2; - } else { - // surrogate pair - const charCode = - (((value & 0x07) << 18) | - ((data[i + 1] & 0x3f) << 12) | - ((data[i + 2] & 0x3f) << 6) | - (data[i + 3] & 0x3f)) - - 0x010000; - - str += String.fromCharCode( - (charCode >> 10) | 0xd800, - (charCode & 0x03ff) | 0xdc00, - ); - i += 3; - } - } - - return str; -} diff --git a/packages/common/src/utils/utils.ts b/packages/common/src/utils/utils.ts deleted file mode 100644 index 85c3d25..0000000 --- a/packages/common/src/utils/utils.ts +++ /dev/null @@ -1,261 +0,0 @@ -import { useCallback, useState } from 'react'; -import { MintInfo } from '@solana/spl-token'; - -import { TokenAccount } from './../models'; -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import { WAD, ZERO } from '../constants'; -import { TokenInfo } from '@solana/spl-token-registry'; - -export type KnownTokenMap = Map; - -export const formatPriceNumber = new Intl.NumberFormat('en-US', { - style: 'decimal', - minimumFractionDigits: 2, - maximumFractionDigits: 8, -}); - -export function useLocalStorageState(key: string, defaultState?: string) { - const [state, setState] = useState(() => { - // NOTE: Not sure if this is ok - const storedState = localStorage.getItem(key); - if (storedState) { - return JSON.parse(storedState); - } - return defaultState; - }); - - const setLocalStorageState = useCallback( - newState => { - const changed = state !== newState; - if (!changed) { - return; - } - setState(newState); - if (newState === null) { - localStorage.removeItem(key); - } else { - localStorage.setItem(key, JSON.stringify(newState)); - } - }, - [state, key], - ); - - return [state, setLocalStorageState]; -} - -// shorten the checksummed version of the input address to have 4 characters at start and end -export function shortenAddress(address: string, chars = 4): string { - return `${address.slice(0, chars)}...${address.slice(-chars)}`; -} - -export function getTokenName( - map: KnownTokenMap, - mint?: string | PublicKey, - shorten = true, -): string { - const mintAddress = typeof mint === 'string' ? mint : mint?.toBase58(); - - if (!mintAddress) { - return 'N/A'; - } - - const knownSymbol = map.get(mintAddress)?.symbol; - if (knownSymbol) { - return knownSymbol; - } - - return shorten ? `${mintAddress.substring(0, 5)}...` : mintAddress; -} -export function getVerboseTokenName( - map: KnownTokenMap, - mint?: string | PublicKey, - shorten = true, -): string { - const mintAddress = typeof mint === 'string' ? mint : mint?.toBase58(); - - if (!mintAddress) { - return 'N/A'; - } - - const knownName = map.get(mintAddress)?.name; - if (knownName) { - return knownName; - } - - return shorten ? `${mintAddress.substring(0, 5)}...` : mintAddress; -} - -export function getTokenByName(tokenMap: KnownTokenMap, name: string) { - let token: TokenInfo | null = null; - for (const val of tokenMap.values()) { - if (val.symbol === name) { - token = val; - break; - } - } - return token; -} - -export function getTokenIcon( - map: KnownTokenMap, - mintAddress?: string | PublicKey, -): string | undefined { - const address = - typeof mintAddress === 'string' ? mintAddress : mintAddress?.toBase58(); - if (!address) { - return; - } - - return map.get(address)?.logoURI; -} - -export function isKnownMint(map: KnownTokenMap, mintAddress: string) { - return !!map.get(mintAddress); -} - -export const STABLE_COINS = new Set(['USDC', 'wUSDC', 'USDT']); - -export function chunks(array: T[], size: number): T[][] { - return Array.apply( - 0, - new Array(Math.ceil(array.length / size)), - ).map((_, index) => array.slice(index * size, (index + 1) * size)); -} - -export function toLamports( - account?: TokenAccount | number, - mint?: MintInfo, -): number { - if (!account) { - return 0; - } - - const amount = - typeof account === 'number' ? account : account.info.amount?.toNumber(); - - const precision = Math.pow(10, mint?.decimals || 0); - return Math.floor(amount * precision); -} - -export function wadToLamports(amount?: BN): BN { - return amount?.div(WAD) || ZERO; -} - -export function fromLamports( - account?: TokenAccount | number | BN, - mint?: MintInfo, - rate: number = 1.0, -): number { - if (!account) { - return 0; - } - - const amount = Math.floor( - typeof account === 'number' - ? account - : BN.isBN(account) - ? account.toNumber() - : account.info.amount.toNumber(), - ); - - const precision = Math.pow(10, mint?.decimals || 0); - return (amount / precision) * rate; -} - -export const tryParseKey = (key: string): PublicKey | null => { - try { - return new PublicKey(key); - } catch (error) { - return null; - } -}; - -var SI_SYMBOL = ['', 'k', 'M', 'G', 'T', 'P', 'E']; - -const abbreviateNumber = (number: number, precision: number) => { - let tier = (Math.log10(number) / 3) | 0; - let scaled = number; - let suffix = SI_SYMBOL[tier]; - if (tier !== 0) { - let scale = Math.pow(10, tier * 3); - scaled = number / scale; - } - - return scaled.toFixed(precision) + suffix; -}; - -export const formatAmount = ( - val: number, - precision: number = 6, - abbr: boolean = true, -) => (abbr ? abbreviateNumber(val, precision) : val.toFixed(precision)); - -export function formatTokenAmount( - account?: TokenAccount, - mint?: MintInfo, - rate: number = 1.0, - prefix = '', - suffix = '', - precision = 6, - abbr = false, -): string { - if (!account) { - return ''; - } - - return `${[prefix]}${formatAmount( - fromLamports(account, mint, rate), - precision, - abbr, - )}${suffix}`; -} - -export const formatUSD = new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD', -}); - -const numberFormater = new Intl.NumberFormat('en-US', { - style: 'decimal', - minimumFractionDigits: 2, - maximumFractionDigits: 2, -}); - -export const formatNumber = { - format: (val?: number) => { - if (!val) { - return '--'; - } - - return numberFormater.format(val); - }, -}; - -export const formatPct = new Intl.NumberFormat('en-US', { - style: 'percent', - minimumFractionDigits: 2, - maximumFractionDigits: 2, -}); - -export function convert( - account?: TokenAccount | number, - mint?: MintInfo, - rate: number = 1.0, -): number { - if (!account) { - return 0; - } - - const amount = - typeof account === 'number' ? account : account.info.amount?.toNumber(); - - const precision = Math.pow(10, mint?.decimals || 0); - let result = (amount / precision) * rate; - - return result; -} - -export function sleep(ms: number): Promise { - return new Promise(resolve => setTimeout(resolve, ms)); -} diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json deleted file mode 100644 index 4d65d0b..0000000 --- a/packages/common/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2019", - - "outDir": "./dist/lib", - "rootDir": "./src", - - "composite": true, - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "jsx": "react", - "strict": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "typeRoots": ["types", "../../types", "../../node_modules/@types"] - }, - "include": ["src/**/*"], - "exclude": ["src/**/*.test.ts", "**/node_modules"] -} diff --git a/packages/governance-sdk/README.md b/packages/governance-sdk/README.md deleted file mode 100644 index 7dcfd34..0000000 --- a/packages/governance-sdk/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# `spl-governance SDK` - -SPL Governance Client API for spl-governance program - -## Installation - -`(npm|pnpm|yarn) add @solana/spl-governance @solana/web3.js` - -## Usage - -```typescript -import { getRealms } from '@solana/spl-governance'; -import { Connection, PublicKey } from '@solana/web3.js'; - -const connection = new Connection("https://api.mainnet-beta.solana.com", 'recent'); -const programId = new PublicKey('GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw'); - -const realms = getRealms(connection, programId); - diff --git a/packages/governance-sdk/package.json b/packages/governance-sdk/package.json deleted file mode 100644 index 7e77adb..0000000 --- a/packages/governance-sdk/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@realms-today/spl-governance", - "version": "0.3.30", - "description": "SPL Governance Client API", - "author": "Solana Maintainers ", - "homepage": "https://github.com/solana-labs/oyster/blob/main/packages/governance-sdk/README.md", - "license": "MIT", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "directories": { - "lib": "lib" - }, - "files": [ - "lib" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/solana-labs/oyster.git" - }, - "sideEffects": false, - "scripts": { - "build": "tsc", - "test": "jest", - "start": "npm-run-all --parallel watch", - "watch": "tsc --watch" - }, - "bugs": { - "url": "https://github.com/solana-labs/oyster/issues" - }, - "dependencies": { - "@solana/web3.js": "=1.98.0", - "bignumber.js": "^9.0.1", - "bn.js": "^5.1.3", - "borsh": "^0.3.1", - "bs58": "^4.0.1", - "superstruct": "^0.15.2", - "axios": "^1.1.3" - }, - "devDependencies": { - "esbuild": "^0.14.11", - "esbuild-jest": "^0.5.0", - "jest": "^29.2.0", - "typescript": "^5.3.3", - "@solana/spl-token": "*", - "ts-jest": "29.0.3", - "@types/jest": "29.2.0" - }, - "jest": { - "testTimeout": 20000, - "transform": { - "^.+\\.tsx?$": "esbuild-jest" - }, - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ] - } -} \ No newline at end of file diff --git a/packages/governance-sdk/src/addins/accounts.ts b/packages/governance-sdk/src/addins/accounts.ts deleted file mode 100644 index 3f0f1bd..0000000 --- a/packages/governance-sdk/src/addins/accounts.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; - -export type GovernanceAddinAccountClass = - | typeof VoterWeightRecord - | MaxVoterWeightRecord; - -export enum VoterWeightAction { - CastVote, - CommentProposal, - CreateGovernance, - CreateProposal, - SignOffProposal, -} - -export class VoterWeightRecord { - accountDiscriminator = new Uint8Array([50, 101, 102, 57, 57, 98, 52, 98]); - - realm: PublicKey; - - governingTokenMint: PublicKey; - - governingTokenOwner: PublicKey; - - voterWeight: BN; - - voterWeightExpiry: BN; - - weightAction: VoterWeightAction | undefined; - - weightActionTarget: PublicKey | undefined; - - constructor(args: { - realm: PublicKey; - governingTokenMint: PublicKey; - governingTokenOwner: PublicKey; - voterWeight: BN; - voterWeightExpiry: BN; - weightAction: VoterWeightAction | undefined; - weightActionTarget: PublicKey | undefined; - }) { - this.realm = args.realm; - this.governingTokenMint = args.governingTokenMint; - this.governingTokenOwner = args.governingTokenOwner; - this.voterWeight = args.voterWeight; - this.voterWeightExpiry = args.voterWeightExpiry; - this.weightAction = args.weightAction; - this.weightActionTarget = args.weightActionTarget; - } -} - -/** - * Returns the default address for VoterWeightRecord - * Note: individual addins are not required to use the default address and it can vary between different implementations - **/ -export async function getVoterWeightRecordAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, -) { - const [voterWeightRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('voter-weight-record'), - realm.toBuffer(), - governingTokenMint.toBuffer(), - governingTokenOwner.toBuffer(), - ], - programId, - ); - - return voterWeightRecordAddress; -} - -export class MaxVoterWeightRecord { - accountDiscriminator = new Uint8Array([57, 100, 53, 102, 102, 50, 57, 55]); - - realm: PublicKey; - - governingTokenMint: PublicKey; - - maxVoterWeight: BN; - - maxVoterWeightExpiry: BN; - - constructor(args: { - realm: PublicKey; - governingTokenMint: PublicKey; - maxVoterWeight: BN; - maxVoterWeightExpiry: BN; - }) { - this.realm = args.realm; - this.governingTokenMint = args.governingTokenMint; - this.maxVoterWeight = args.maxVoterWeight; - this.maxVoterWeightExpiry = args.maxVoterWeightExpiry; - } -} - -/** - * Returns the default address for MaxVoterWeightRecord - * Note: individual addins are not required to use the default address and it can vary between different implementations - **/ -export async function getMaxVoterWeightRecordAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, -) { - const [maxVoterWeightRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('max-voter-weight-record'), - realm.toBuffer(), - governingTokenMint.toBuffer(), - ], - programId, - ); - - return maxVoterWeightRecordAddress; -} diff --git a/packages/governance-sdk/src/addins/api.ts b/packages/governance-sdk/src/addins/api.ts deleted file mode 100644 index a092c46..0000000 --- a/packages/governance-sdk/src/addins/api.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js'; -import { ProgramAccount } from '../tools/sdk/runtime'; -import { MaxVoterWeightRecord, VoterWeightRecord } from './accounts'; -import { GovernanceAddinAccountParser } from './serialisation'; - -export async function getMaxVoterWeightRecord( - connection: Connection, - maxVoterWeightRecordPk: PublicKey, -) { - return getGovernanceAddinAccount( - connection, - maxVoterWeightRecordPk, - MaxVoterWeightRecord, - ); -} - -export async function getVoterWeightRecord( - connection: Connection, - voterWeightRecordPk: PublicKey, -) { - return getGovernanceAddinAccount( - connection, - voterWeightRecordPk, - VoterWeightRecord, - ); -} - -export async function getGovernanceAddinAccount( - connection: Connection, - accountPk: PublicKey, - accountClass: new (args: any) => TAccount, -) { - const accountInfo = await connection.getAccountInfo(accountPk); - - if (!accountInfo) { - throw new Error( - `Account ${accountPk} of type ${accountClass.name} not found`, - ); - } - - return GovernanceAddinAccountParser(accountClass as any)( - accountPk, - accountInfo, - ) as ProgramAccount; -} diff --git a/packages/governance-sdk/src/addins/index.ts b/packages/governance-sdk/src/addins/index.ts deleted file mode 100644 index 7aacc42..0000000 --- a/packages/governance-sdk/src/addins/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './accounts'; -export * from './api'; -export * from './serialisation'; diff --git a/packages/governance-sdk/src/addins/serialisation.ts b/packages/governance-sdk/src/addins/serialisation.ts deleted file mode 100644 index 8e7b4aa..0000000 --- a/packages/governance-sdk/src/addins/serialisation.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - GovernanceAddinAccountClass, - MaxVoterWeightRecord, - VoterWeightRecord, -} from './accounts'; -import { BorshAccountParser } from '../core/serialisation'; - -export const GOVERNANCE_ADDINS_SCHEMA = new Map([ - [ - MaxVoterWeightRecord, - { - kind: 'struct', - fields: [ - ['accountDiscriminator', [8]], - ['realm', 'pubkey'], - ['governingTokenMint', 'pubkey'], - ['maxVoterWeight', 'u64'], - ['maxVoterWeightExpiry', { kind: 'option', type: 'u64' }], - ], - }, - ], - [ - VoterWeightRecord, - { - kind: 'struct', - fields: [ - ['accountDiscriminator', [8]], - ['realm', 'pubkey'], - ['governingTokenMint', 'pubkey'], - ['governingTokenOwner', 'pubkey'], - ['voterWeight', 'u64'], - ['voterWeightExpiry', { kind: 'option', type: 'u64' }], - ['weightAction', { kind: 'option', type: 'u8' }], - ['weightActionTarget', { kind: 'option', type: 'pubkey' }], - ], - }, - ], -]); - -export const GovernanceAddinAccountParser = ( - classType: GovernanceAddinAccountClass, -) => BorshAccountParser(classType, _ => GOVERNANCE_ADDINS_SCHEMA); diff --git a/packages/governance-sdk/src/chat/accounts.ts b/packages/governance-sdk/src/chat/accounts.ts deleted file mode 100644 index b5ec463..0000000 --- a/packages/governance-sdk/src/chat/accounts.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; - -export const GOVERNANCE_CHAT_PROGRAM_ID = new PublicKey( - 'gCHAtYKrUUktTVzE4hEnZdLV4LXrdBf6Hh9qMaJALET', -); - -export enum GovernanceChatAccountType { - Uninitialized = 0, - ChatMessage = 1, -} - -export interface GovernanceChatAccount { - accountType: GovernanceChatAccountType; -} - -export type GovernanceChatAccountClass = typeof ChatMessage; - -export enum ChatMessageBodyType { - Text = 0, - Reaction = 1, -} - -export class ChatMessageBody { - type: ChatMessageBodyType; - value: string; - isReply: boolean; - - constructor(args: { - type: ChatMessageBodyType; - value: string; - isReply?: boolean; - }) { - this.type = args.type; - this.value = args.value; - this.isReply = args.isReply ?? false; - } -} - -export class ChatMessage { - accountType = GovernanceChatAccountType.ChatMessage; - - proposal: PublicKey; - author: PublicKey; - postedAt: BN; - replyTo: PublicKey | undefined; - body: ChatMessageBody; - - constructor(args: { - proposal: PublicKey; - author: PublicKey; - postedAt: BN; - replyTo: PublicKey | undefined; - body: ChatMessageBody; - }) { - this.proposal = args.proposal; - this.author = args.author; - this.postedAt = args.postedAt; - this.replyTo = args.replyTo; - this.body = args.body; - } -} diff --git a/packages/governance-sdk/src/chat/api.ts b/packages/governance-sdk/src/chat/api.ts deleted file mode 100644 index 0aa1e65..0000000 --- a/packages/governance-sdk/src/chat/api.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js'; - -import { - getBorshProgramAccounts, - MemcmpFilter, - pubkeyFilter, -} from '../core/api'; -import { ChatMessage, GOVERNANCE_CHAT_PROGRAM_ID } from './accounts'; - -import { GOVERNANCE_CHAT_SCHEMA } from './serialisation'; - -export function getGovernanceChatMessages( - connection: Connection, - chatProgramId: PublicKey, - proposal: PublicKey, -) { - return getBorshProgramAccounts( - connection, - chatProgramId, - _ => GOVERNANCE_CHAT_SCHEMA, - ChatMessage, - [pubkeyFilter(1, proposal) as MemcmpFilter], - ); -} - -export function getGovernanceChatMessagesByVoter( - connection: Connection, - chatProgramId: PublicKey, - voter: PublicKey, -) { - return getBorshProgramAccounts( - connection, - chatProgramId, - _ => GOVERNANCE_CHAT_SCHEMA, - ChatMessage, - [pubkeyFilter(33, voter) as MemcmpFilter], - ); -} diff --git a/packages/governance-sdk/src/chat/index.ts b/packages/governance-sdk/src/chat/index.ts deleted file mode 100644 index fd2a76f..0000000 --- a/packages/governance-sdk/src/chat/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './accounts'; -export * from './api'; -export * from './instructions'; -export * from './serialisation'; -export * from './withPostChatMessage'; diff --git a/packages/governance-sdk/src/chat/instructions.ts b/packages/governance-sdk/src/chat/instructions.ts deleted file mode 100644 index 1c0336b..0000000 --- a/packages/governance-sdk/src/chat/instructions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ChatMessageBody } from './accounts'; - -export enum GovernanceChatInstruction { - PostMessage = 0, -} - -export class PostChatMessageArgs { - instruction: GovernanceChatInstruction = - GovernanceChatInstruction.PostMessage; - body: ChatMessageBody; - - constructor(args: { body: ChatMessageBody }) { - this.body = args.body; - } -} diff --git a/packages/governance-sdk/src/chat/serialisation.ts b/packages/governance-sdk/src/chat/serialisation.ts deleted file mode 100644 index 475a9d5..0000000 --- a/packages/governance-sdk/src/chat/serialisation.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - ChatMessage, - GovernanceChatAccountClass, - ChatMessageBody, -} from './accounts'; -import { BorshAccountParser } from '../core/serialisation'; -import { PostChatMessageArgs } from './instructions'; - -export const GOVERNANCE_CHAT_SCHEMA = new Map([ - [ - ChatMessageBody, - { - kind: 'struct', - fields: [ - ['type', 'u8'], - ['value', 'string'], - ['isReply', 'u8'], - ], - }, - ], - [ - ChatMessage, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['author', 'pubkey'], - ['postedAt', 'u64'], - ['replyTo', { kind: 'option', type: 'pubkey' }], - ['body', ChatMessageBody], - ], - }, - ], - [ - PostChatMessageArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['body', ChatMessageBody], - ], - }, - ], -]); - -export const ChatAccountParser = (classType: GovernanceChatAccountClass) => - BorshAccountParser(classType, _ => GOVERNANCE_CHAT_SCHEMA); diff --git a/packages/governance-sdk/src/chat/withPostChatMessage.ts b/packages/governance-sdk/src/chat/withPostChatMessage.ts deleted file mode 100644 index fdd9afb..0000000 --- a/packages/governance-sdk/src/chat/withPostChatMessage.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { GOVERNANCE_CHAT_SCHEMA } from './serialisation'; -import { serialize } from 'borsh'; -import { PostChatMessageArgs } from './instructions'; -import { GOVERNANCE_CHAT_PROGRAM_ID, ChatMessageBody } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { withRealmConfigPluginAccounts } from '../governance/withRealmConfigPluginAccounts'; - -export async function withPostChatMessage( - instructions: TransactionInstruction[], - signers: Keypair[], - chatProgramId: PublicKey, - governanceProgramId: PublicKey, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - payer: PublicKey, - replyTo: PublicKey | undefined, - body: ChatMessageBody, - voterWeightRecord?: PublicKey, -) { - const args = new PostChatMessageArgs({ - body, - }); - - const data = Buffer.from(serialize(GOVERNANCE_CHAT_SCHEMA, args)); - - const chatMessage = new Keypair(); - signers.push(chatMessage); - - let keys = [ - { - pubkey: governanceProgramId, - isWritable: false, - isSigner: false, - }, - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governance, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: false, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: chatMessage.publicKey, - isWritable: true, - isSigner: true, - }, - { - pubkey: payer, - isWritable: false, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - ]; - - if (replyTo) { - keys.push({ - pubkey: replyTo, - isWritable: false, - isSigner: false, - }); - } - - await withRealmConfigPluginAccounts( - keys, - governanceProgramId, - realm, - voterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId: chatProgramId, - data, - }), - ); - - return chatMessage.publicKey; -} diff --git a/packages/governance-sdk/src/core/api.ts b/packages/governance-sdk/src/core/api.ts deleted file mode 100644 index cfd2b70..0000000 --- a/packages/governance-sdk/src/core/api.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js'; -import bs58 from 'bs58'; - -import { ProgramAccountWithType } from '../core/accounts'; -import { Schema } from 'borsh'; -import { getErrorMessage } from '../tools/script'; -import { ProgramAccount } from '../tools/sdk/runtime'; -import { deserializeBorsh } from '../tools/borsh'; -import { WalletNotConnectedError, WalletSigner } from '../tools/walletAdapter'; - -// Context to make RPC calls for given clone programId, current connection, endpoint and wallet -export class RpcContext { - programId: PublicKey; - programVersion: number; - wallet: WalletSigner; - connection: Connection; - endpoint: string; - - constructor( - programId: PublicKey, - programVersion: number, - wallet: WalletSigner, - connection: Connection, - endpoint: string, - ) { - this.programId = programId; - this.wallet = wallet; - this.connection = connection; - this.endpoint = endpoint; - this.programVersion = programVersion; - } - - get walletPubkey() { - if (!this.wallet?.publicKey) { - throw new WalletNotConnectedError(); - } - - return this.wallet.publicKey; - } - - get programIdBase58() { - return this.programId.toBase58(); - } -} - -export class MemcmpFilter { - offset: number; - bytes: Buffer; - - constructor(offset: number, bytes: Buffer) { - this.offset = offset; - this.bytes = bytes; - } - - isMatch(buffer: Buffer) { - if (this.offset + this.bytes.length > buffer.length) { - return false; - } - - for (let i = 0; i < this.bytes.length; i++) { - if (this.bytes[i] !== buffer[this.offset + i]) return false; - } - - return true; - } -} - -// PublicKey MemcmpFilter -export const pubkeyFilter = ( - offset: number, - pubkey: PublicKey | undefined | null, -) => (!pubkey ? undefined : new MemcmpFilter(offset, pubkey.toBuffer())); - -// Boolean MemcmpFilter -export const booleanFilter = (offset: number, value: boolean) => - new MemcmpFilter(offset, Buffer.from(value ? [1] : [0])); - -export async function getBorshProgramAccounts< - TAccount extends ProgramAccountWithType, ->( - connection: Connection, - programId: PublicKey, - getSchema: (accountType: number) => Schema, - accountFactory: new (args: any) => TAccount, - filters: MemcmpFilter[] = [], - accountType?: number, -) { - accountType = accountType ?? new accountFactory({}).accountType; - - const programAccounts = await connection.getProgramAccounts(programId, { - commitment: connection.commitment, - filters: [ - { - memcmp: { - offset: 0, - bytes: bs58.encode([accountType]), - }, - }, - ...filters.map(f => ({ - memcmp: { offset: f.offset, bytes: bs58.encode(f.bytes) }, - })), - ], - }); - - let accounts: ProgramAccount[] = []; - - for (let rawAccount of programAccounts) { - try { - const data = rawAccount.account.data; - const accountType = data[0]; - - const account: ProgramAccount = { - pubkey: new PublicKey(rawAccount.pubkey), - account: deserializeBorsh(getSchema(accountType), accountFactory, data), - owner: rawAccount.account.owner, - }; - - accounts.push(account); - } catch (ex) { - console.info( - `Can't deserialize ${accountFactory.name} @ ${rawAccount.pubkey}.`, - getErrorMessage(ex), - ); - } - } - - return accounts; -} diff --git a/packages/governance-sdk/src/core/index.ts b/packages/governance-sdk/src/core/index.ts deleted file mode 100644 index 7aacc42..0000000 --- a/packages/governance-sdk/src/core/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './accounts'; -export * from './api'; -export * from './serialisation'; diff --git a/packages/governance-sdk/src/core/serialisation.ts b/packages/governance-sdk/src/core/serialisation.ts deleted file mode 100644 index 4a8a451..0000000 --- a/packages/governance-sdk/src/core/serialisation.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { AccountInfo, PublicKey } from '@solana/web3.js'; - -import { Schema } from 'borsh'; -import { deserializeBorsh } from '../tools/borsh'; -import { ProgramAccount } from '../tools/sdk/runtime'; - -export function BorshAccountParser( - classFactory: any, - getSchema: (accountType: number) => Schema, -): (pubKey: PublicKey, info: AccountInfo) => ProgramAccount { - return (pubKey: PublicKey, info: AccountInfo) => { - const buffer = Buffer.from(info.data); - const data = deserializeBorsh( - getSchema(info.data[0]), - classFactory, - buffer, - ); - - return { - pubkey: pubKey, - owner: info.owner, - account: data, - } as ProgramAccount; - }; -} diff --git a/packages/governance-sdk/src/governance/accounts.ts b/packages/governance-sdk/src/governance/accounts.ts deleted file mode 100644 index c1ae124..0000000 --- a/packages/governance-sdk/src/governance/accounts.ts +++ /dev/null @@ -1,1823 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import BigNumber from 'bignumber.js'; -import { Vote, VoteKind } from './instructions'; -import { - ACCOUNT_VERSION_V1, - ACCOUNT_VERSION_V2, - PROGRAM_VERSION_V1, -} from '../registry/constants'; - -/// Seed prefix for Governance Program PDAs -export const GOVERNANCE_PROGRAM_SEED = 'governance'; - -export enum GovernanceAccountType { - Uninitialized = 0, - RealmV1 = 1, - TokenOwnerRecordV1 = 2, - GovernanceV1 = 3, - ProgramGovernanceV1 = 4, - ProposalV1 = 5, - SignatoryRecordV1 = 6, - VoteRecordV1 = 7, - ProposalInstructionV1 = 8, - MintGovernanceV1 = 9, - TokenGovernanceV1 = 10, - RealmConfig = 11, - VoteRecordV2 = 12, - ProposalTransactionV2 = 13, - ProposalV2 = 14, - ProgramMetadata = 15, - RealmV2 = 16, - TokenOwnerRecordV2 = 17, - GovernanceV2 = 18, - ProgramGovernanceV2 = 19, - MintGovernanceV2 = 20, - TokenGovernanceV2 = 21, - SignatoryRecordV2 = 22, - ProposalDeposit = 23, - RequiredSignatory = 24, - ProposalVersionedTransaction = 25, - ProposalTransactionBuffer = 26 -} - -export interface GovernanceAccount { - accountType: GovernanceAccountType; -} - -export type GovernanceAccountClass = - | typeof Realm - | typeof TokenOwnerRecord - | typeof Governance - | typeof Proposal - | typeof SignatoryRecord - | typeof VoteRecord - | typeof ProposalTransaction - | typeof ProposalVersionedTransaction - | typeof ProposalTransactionBuffer - | typeof RealmConfigAccount - | typeof ProgramMetadata - | typeof ProposalDeposit; - -export function getAccountTypes(accountClass: GovernanceAccountClass) { - switch (accountClass) { - case Realm: - return [GovernanceAccountType.RealmV1, GovernanceAccountType.RealmV2]; - case TokenOwnerRecord: - return [ - GovernanceAccountType.TokenOwnerRecordV1, - GovernanceAccountType.TokenOwnerRecordV2, - ]; - case Proposal: - return [ - GovernanceAccountType.ProposalV1, - GovernanceAccountType.ProposalV2, - ]; - case ProposalDeposit: - return [GovernanceAccountType.ProposalDeposit]; - case SignatoryRecord: - return [ - GovernanceAccountType.SignatoryRecordV1, - GovernanceAccountType.SignatoryRecordV2, - ]; - case VoteRecord: - return [ - GovernanceAccountType.VoteRecordV1, - GovernanceAccountType.VoteRecordV2, - ]; - case ProposalTransaction: - return [ - GovernanceAccountType.ProposalInstructionV1, - GovernanceAccountType.ProposalTransactionV2, - ]; - case ProposalVersionedTransaction: - return [ - GovernanceAccountType.ProposalVersionedTransaction, - GovernanceAccountType.ProposalTransactionBuffer, - ]; - case RealmConfigAccount: - return [GovernanceAccountType.RealmConfig]; - case Governance: - return [ - GovernanceAccountType.GovernanceV1, - GovernanceAccountType.ProgramGovernanceV1, - GovernanceAccountType.MintGovernanceV1, - GovernanceAccountType.TokenGovernanceV1, - GovernanceAccountType.GovernanceV2, - GovernanceAccountType.ProgramGovernanceV2, - GovernanceAccountType.MintGovernanceV2, - GovernanceAccountType.TokenGovernanceV2, - ]; - case ProgramMetadata: - return [GovernanceAccountType.ProgramMetadata]; - default: - throw Error(`${accountClass} account is not supported`); - } -} - -export function getGovernanceAccountVersion( - accountType: GovernanceAccountType, -) { - switch (accountType) { - case GovernanceAccountType.VoteRecordV2: - case GovernanceAccountType.ProposalTransactionV2: - case GovernanceAccountType.ProposalV2: - case GovernanceAccountType.RealmV2: - case GovernanceAccountType.TokenOwnerRecordV2: - case GovernanceAccountType.GovernanceV2: - case GovernanceAccountType.ProgramGovernanceV2: - case GovernanceAccountType.MintGovernanceV2: - case GovernanceAccountType.TokenGovernanceV2: - case GovernanceAccountType.SignatoryRecordV2: - case GovernanceAccountType.ProposalTransactionBuffer: - case GovernanceAccountType.ProposalVersionedTransaction: - return ACCOUNT_VERSION_V2; - default: - return ACCOUNT_VERSION_V1; - } -} - -export enum VoteThresholdType { - // Approval Quorum - YesVotePercentage = 0, - // Not supported in the current version - QuorumPercentage = 1, - // Supported for VERSION >= 3 - Disabled = 2, -} - -export class VoteThreshold { - type: VoteThresholdType; - value: number | undefined; - - constructor(args: { type: VoteThresholdType; value?: number | undefined }) { - this.type = args.type; - this.value = args.value; - } -} - -export enum VoteTipping { - Strict, - Early, // V2 Only - Disabled, // V2 Only -} - -export enum InstructionExecutionStatus { - None, - Success, - Error, -} - -export enum InstructionExecutionFlags { - None, - Ordered, - UseTransaction, -} - -export enum MintMaxVoteWeightSourceType { - SupplyFraction = 0, - Absolute = 1, -} - -export class MintMaxVoteWeightSource { - type: MintMaxVoteWeightSourceType; - value: BN; - - constructor(args: { type: MintMaxVoteWeightSourceType; value: BN }) { - this.type = args.type; - this.value = args.value; - } - - static SUPPLY_FRACTION_BASE = new BN(10000000000); - static SUPPLY_FRACTION_DECIMALS = 10; - - static FULL_SUPPLY_FRACTION = new MintMaxVoteWeightSource({ - type: MintMaxVoteWeightSourceType.SupplyFraction, - value: MintMaxVoteWeightSource.SUPPLY_FRACTION_BASE, - }); - - isFullSupply() { - return ( - this.type === MintMaxVoteWeightSourceType.SupplyFraction && - this.value.cmp(MintMaxVoteWeightSource.SUPPLY_FRACTION_BASE) === 0 - ); - } - getSupplyFraction() { - if (this.type !== MintMaxVoteWeightSourceType.SupplyFraction) { - throw new Error('Max vote weight is not fraction'); - } - - return this.value; - } - fmtSupplyFractionPercentage() { - return new BigNumber(this.getSupplyFraction() as any) - .shiftedBy(-MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS + 2) - .toFormat(); - } -} - -export enum VoteTypeKind { - SingleChoice = 0, - MultiChoice = 1, -} - -export enum MultiChoiceType { - FullWeight = 0, - Weighted = 1, -} - -export class VoteType { - type: VoteTypeKind; - choiceType: MultiChoiceType | undefined; - minVoterOptions: number | undefined; - maxVoterOptions: number | undefined; - maxWinningOptions: number | undefined; - - constructor(args: { - type: VoteTypeKind; - choiceType: MultiChoiceType | undefined; - minVoterOptions: number | undefined; - maxVoterOptions: number | undefined; - maxWinningOptions: number | undefined; - }) { - this.type = args.type; - this.choiceType = args.choiceType; - this.minVoterOptions = args.minVoterOptions; - this.maxVoterOptions = args.maxVoterOptions; - this.maxWinningOptions = args.maxWinningOptions; - } - - static SINGLE_CHOICE = new VoteType({ - type: VoteTypeKind.SingleChoice, - choiceType: undefined, - minVoterOptions: undefined, - maxVoterOptions: undefined, - maxWinningOptions: undefined, - }); - - static MULTI_CHOICE = ( - choiceType: MultiChoiceType, - minVoterOptions: number, - maxVoterOptions: number, - maxWinningOptions: number, - ) => - new VoteType({ - type: VoteTypeKind.MultiChoice, - choiceType, - minVoterOptions, - maxVoterOptions, - maxWinningOptions, - }); - - isSingleChoice() { - return this.type === VoteTypeKind.SingleChoice; - } -} - -export class RealmConfigArgs { - useCouncilMint: boolean; - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource; - minCommunityTokensToCreateGovernance: BN; - - // Version == 2 - useCommunityVoterWeightAddin: boolean; - useMaxCommunityVoterWeightAddin: boolean; - - // Versions >= 3 - communityTokenConfigArgs: GoverningTokenConfigArgs; - councilTokenConfigArgs: GoverningTokenConfigArgs; - - constructor(args: { - useCouncilMint: boolean; - - minCommunityTokensToCreateGovernance: BN; - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource; - - // Version == 2 - useCommunityVoterWeightAddin: boolean; - useMaxCommunityVoterWeightAddin: boolean; - - // Versions >= 3 - communityTokenConfigArgs: GoverningTokenConfigArgs; - councilTokenConfigArgs: GoverningTokenConfigArgs; - }) { - this.useCouncilMint = !!args.useCouncilMint; - this.communityMintMaxVoteWeightSource = - args.communityMintMaxVoteWeightSource; - this.minCommunityTokensToCreateGovernance = - args.minCommunityTokensToCreateGovernance; - - this.useCommunityVoterWeightAddin = args.useCommunityVoterWeightAddin; - this.useMaxCommunityVoterWeightAddin = args.useMaxCommunityVoterWeightAddin; - - this.communityTokenConfigArgs = args.communityTokenConfigArgs; - this.councilTokenConfigArgs = args.councilTokenConfigArgs; - } -} - -export enum GoverningTokenType { - Liquid = 0, - Membership = 1, - Dormant = 2, -} - -export class GoverningTokenConfigArgs { - useVoterWeightAddin: boolean; - useMaxVoterWeightAddin: boolean; - tokenType: GoverningTokenType; - - constructor(args: { - useVoterWeightAddin: boolean; - useMaxVoterWeightAddin: boolean; - tokenType: GoverningTokenType; - }) { - this.useVoterWeightAddin = args.useVoterWeightAddin; - this.useMaxVoterWeightAddin = args.useMaxVoterWeightAddin; - this.tokenType = args.tokenType; - } -} - -export class GoverningTokenConfigAccountArgs { - voterWeightAddin: PublicKey | undefined; - maxVoterWeightAddin: PublicKey | undefined; - tokenType: GoverningTokenType; - - constructor(args: { - voterWeightAddin: PublicKey | undefined; - maxVoterWeightAddin: PublicKey | undefined; - tokenType: GoverningTokenType; - }) { - this.voterWeightAddin = args.voterWeightAddin; - this.maxVoterWeightAddin = args.maxVoterWeightAddin; - this.tokenType = args.tokenType; - } -} - -export class RealmConfig { - councilMint: PublicKey | undefined; - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource; - minCommunityTokensToCreateGovernance: BN; - - // VERSION == 2 - useCommunityVoterWeightAddin: boolean; - useMaxCommunityVoterWeightAddin: boolean; - - reserved: Uint8Array; - - constructor(args: { - councilMint: PublicKey | undefined; - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource; - minCommunityTokensToCreateGovernance: BN; - reserved: Uint8Array; - useCommunityVoterWeightAddin: boolean; - useMaxCommunityVoterWeightAddin: boolean; - }) { - this.councilMint = args.councilMint; - this.communityMintMaxVoteWeightSource = - args.communityMintMaxVoteWeightSource; - this.minCommunityTokensToCreateGovernance = - args.minCommunityTokensToCreateGovernance; - this.useCommunityVoterWeightAddin = !!args.useCommunityVoterWeightAddin; - this.useMaxCommunityVoterWeightAddin = !!args.useMaxCommunityVoterWeightAddin; - this.reserved = args.reserved; - } -} - -export class Realm { - accountType = GovernanceAccountType.RealmV1; - - communityMint: PublicKey; - - config: RealmConfig; - - reserved: Uint8Array; - - // Not used in versions >= V3 / legacy1 - votingProposalCount: number; - - authority: PublicKey | undefined; - - name: string; - - constructor(args: { - communityMint: PublicKey; - reserved: Uint8Array; - config: RealmConfig; - votingProposalCount: number; - authority: PublicKey | undefined; - name: string; - }) { - this.communityMint = args.communityMint; - this.config = args.config; - this.reserved = args.reserved; - this.votingProposalCount = args.votingProposalCount; - this.authority = args.authority; - this.name = args.name; - } -} - -export async function getTokenHoldingAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, -) { - const [tokenHoldingAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - ], - programId, - ); - - return tokenHoldingAddress; -} - -export class GoverningTokenConfig { - voterWeightAddin: PublicKey | undefined; - maxVoterWeightAddin: PublicKey | undefined; - tokenType: GoverningTokenType; - reserved: Uint8Array; - - constructor(args: { - voterWeightAddin: PublicKey | undefined; - maxVoterWeightAddin: PublicKey | undefined; - tokenType: GoverningTokenType; - reserved: Uint8Array; - }) { - this.voterWeightAddin = args.voterWeightAddin; - this.maxVoterWeightAddin = args.maxVoterWeightAddin; - this.tokenType = args.tokenType; - this.reserved = args.reserved; - } -} - -export class RealmConfigAccount { - accountType = GovernanceAccountType.RealmConfig; - - realm: PublicKey; - communityTokenConfig: GoverningTokenConfig; - councilTokenConfig: GoverningTokenConfig; - - reserved: Uint8Array; - - constructor(args: { - realm: PublicKey; - communityTokenConfig: GoverningTokenConfig; - councilTokenConfig: GoverningTokenConfig; - reserved: Uint8Array; - }) { - this.realm = args.realm; - this.communityTokenConfig = args.communityTokenConfig; - this.councilTokenConfig = args.councilTokenConfig; - this.reserved = args.reserved; - } -} - -export async function getRealmConfigAddress( - programId: PublicKey, - realm: PublicKey, -) { - const [realmConfigAddress] = await PublicKey.findProgramAddress( - [Buffer.from('realm-config'), realm.toBuffer()], - programId, - ); - - return realmConfigAddress; -} - -export class GovernanceConfig { - communityVoteThreshold: VoteThreshold; - - minCommunityTokensToCreateProposal: BN; - minInstructionHoldUpTime: number; - baseVotingTime: number; - communityVoteTipping: VoteTipping; - minCouncilTokensToCreateProposal: BN; - - // VERSION >= 3 - councilVoteThreshold: VoteThreshold; - councilVetoVoteThreshold: VoteThreshold; - communityVetoVoteThreshold: VoteThreshold; - councilVoteTipping: VoteTipping; - votingCoolOffTime: number; - depositExemptProposalCount: number; - - constructor(args: { - communityVoteThreshold: VoteThreshold; - minCommunityTokensToCreateProposal: BN; - minInstructionHoldUpTime: number; - baseVotingTime: number; - communityVoteTipping?: VoteTipping; - minCouncilTokensToCreateProposal: BN; - - // VERSION >= 3 - // For versions < 3 must be set to YesVotePercentage(0) - councilVoteThreshold: VoteThreshold; - councilVetoVoteThreshold: VoteThreshold; - communityVetoVoteThreshold: VoteThreshold; - councilVoteTipping: VoteTipping; - votingCoolOffTime: number; - depositExemptProposalCount: number; - }) { - this.communityVoteThreshold = args.communityVoteThreshold; - this.minCommunityTokensToCreateProposal = - args.minCommunityTokensToCreateProposal; - this.minInstructionHoldUpTime = args.minInstructionHoldUpTime; - this.baseVotingTime = args.baseVotingTime; - this.communityVoteTipping = args.communityVoteTipping ?? VoteTipping.Strict; - this.minCouncilTokensToCreateProposal = - args.minCouncilTokensToCreateProposal; - - // VERSION >= 3 - this.councilVoteThreshold = - args.councilVoteThreshold ?? args.communityVoteThreshold; - this.councilVetoVoteThreshold = - args.councilVetoVoteThreshold ?? args.communityVoteThreshold; - - this.communityVetoVoteThreshold = - args.communityVetoVoteThreshold ?? - new VoteThreshold({ type: VoteThresholdType.Disabled }); - - this.councilVoteTipping = - args.councilVoteTipping ?? this.communityVoteTipping; - - this.votingCoolOffTime = args.votingCoolOffTime; - this.depositExemptProposalCount = args.depositExemptProposalCount; - } -} - -export class Governance { - accountType: GovernanceAccountType; - realm: PublicKey; - governedAccount: PublicKey; - config: GovernanceConfig; - // proposalCount is not used for >= V3 - proposalCount: number; - reserved?: Uint8Array; - - // V3 - activeProposalCount: BN; - - constructor(args: { - realm: PublicKey; - governedAccount: PublicKey; - accountType: number; - config: GovernanceConfig; - reserved?: Uint8Array; - proposalCount: number; - activeProposalCount: BN; - }) { - this.accountType = args.accountType; - this.realm = args.realm; - this.governedAccount = args.governedAccount; - this.config = args.config; - this.reserved = args.reserved; - this.proposalCount = args.proposalCount; - this.activeProposalCount = args.activeProposalCount; - } - - isProgramGovernance() { - return ( - this.accountType === GovernanceAccountType.ProgramGovernanceV1 || - this.accountType === GovernanceAccountType.ProgramGovernanceV2 - ); - } - - isAccountGovernance() { - return ( - this.accountType === GovernanceAccountType.GovernanceV1 || - this.accountType === GovernanceAccountType.GovernanceV2 - ); - } - - isMintGovernance() { - return ( - this.accountType === GovernanceAccountType.MintGovernanceV1 || - this.accountType === GovernanceAccountType.MintGovernanceV2 - ); - } - - isTokenGovernance() { - return ( - this.accountType === GovernanceAccountType.TokenGovernanceV1 || - this.accountType === GovernanceAccountType.TokenGovernanceV2 - ); - } -} - -export class TokenOwnerRecord { - accountType = GovernanceAccountType.TokenOwnerRecordV1; - - realm: PublicKey; - - governingTokenMint: PublicKey; - - governingTokenOwner: PublicKey; - - governingTokenDepositAmount: BN; - - unrelinquishedVotesCount: number; - - // Not used in versions >= V3 / I'ts the upper 4 bytes of unrelinquishedVotesCount - totalVotesCount: number; - - outstandingProposalCount: number; - - reserved: Uint8Array; - - governanceDelegate?: PublicKey; - - // V3 - version: number; - - constructor(args: { - realm: PublicKey; - governingTokenMint: PublicKey; - governingTokenOwner: PublicKey; - governingTokenDepositAmount: BN; - unrelinquishedVotesCount: number; - totalVotesCount: number; - outstandingProposalCount: number; - reserved: Uint8Array; - governanceDelegate: PublicKey | undefined; - version: number; - }) { - this.realm = args.realm; - this.governingTokenMint = args.governingTokenMint; - this.governingTokenOwner = args.governingTokenOwner; - this.governingTokenDepositAmount = args.governingTokenDepositAmount; - this.unrelinquishedVotesCount = args.unrelinquishedVotesCount; - this.totalVotesCount = args.totalVotesCount; - this.outstandingProposalCount = args.outstandingProposalCount; - this.reserved = args.reserved; - this.governanceDelegate = args.governanceDelegate; - this.version = args.version; - } -} - -export async function getTokenOwnerRecordAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, -) { - const [tokenOwnerRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - governingTokenOwner.toBuffer(), - ], - programId, - ); - - return tokenOwnerRecordAddress; -} - -export enum ProposalState { - Draft, - - SigningOff, - - Voting, - - Succeeded, - - Executing, - - Completed, - - Cancelled, - - Defeated, - - ExecutingWithErrors, - - Vetoed, -} - -export enum OptionVoteResult { - None, - Succeeded, - Defeated, -} - -export class ProposalOption { - label: string; - voteWeight: BN; - voteResult: OptionVoteResult; - - instructionsExecutedCount: number; - instructionsCount: number; - instructionsNextIndex: number; - - constructor(args: { - label: string; - voteWeight: BN; - voteResult: OptionVoteResult; - instructionsExecutedCount: number; - instructionsCount: number; - instructionsNextIndex: number; - }) { - this.label = args.label; - this.voteWeight = args.voteWeight; - this.voteResult = args.voteResult; - this.instructionsExecutedCount = args.instructionsExecutedCount; - this.instructionsCount = args.instructionsCount; - this.instructionsNextIndex = args.instructionsNextIndex; - } -} - -export class Proposal { - accountType: GovernanceAccountType; - - governance: PublicKey; - - governingTokenMint: PublicKey; - - state: ProposalState; - - tokenOwnerRecord: PublicKey; - - signatoriesCount: number; - - signatoriesSignedOffCount: number; - - // V1 ----------------------------- - yesVotesCount: BN; - noVotesCount: BN; - instructionsExecutedCount: number; - instructionsCount: number; - instructionsNextIndex: number; - // -------------------------------- - - // V2 ----------------------------- - voteType: VoteType; - options: ProposalOption[]; - denyVoteWeight: BN | undefined; - reserved1: number; - abstainVoteWeight: BN | undefined; - startVotingAt: BN | null; - maxVotingTime: number | null; - // -------------------------------- - - draftAt: BN; - - signingOffAt: BN | null; - - votingAt: BN | null; - - votingAtSlot: BN | null; - - votingCompletedAt: BN | null; - - executingAt: BN | null; - - closedAt: BN | null; - - executionFlags: InstructionExecutionFlags; - - maxVoteWeight: BN | null; - voteThreshold: VoteThreshold | null; - - name: string; - - descriptionLink: string; - - // V3 - vetoVoteWeight: BN; - - constructor(args: { - accountType: GovernanceAccountType; - governance: PublicKey; - governingTokenMint: PublicKey; - state: ProposalState; - tokenOwnerRecord: PublicKey; - signatoriesCount: number; - signatoriesSignedOffCount: number; - descriptionLink: string; - name: string; - // V1 - yesVotesCount: BN; - noVotesCount: BN; - instructionsExecutedCount: number; - instructionsCount: number; - instructionsNextIndex: number; - // - - // V2 - voteType: VoteType; - options: ProposalOption[]; - denyVoteWeight: BN | undefined; - reserved1: number; - abstainVoteWeight: BN | undefined; - startVotingAt: BN | null; - maxVotingTime: number | null; - // - - draftAt: BN; - signingOffAt: BN | null; - votingAt: BN | null; - votingAtSlot: BN | null; - votingCompletedAt: BN | null; - executingAt: BN | null; - closedAt: BN | null; - - executionFlags: InstructionExecutionFlags; - maxVoteWeight: BN | null; - voteThreshold: VoteThreshold | null; - - // V3 - vetoVoteWeight: BN; - }) { - this.accountType = args.accountType; - this.governance = args.governance; - this.governingTokenMint = args.governingTokenMint; - this.state = args.state; - this.tokenOwnerRecord = args.tokenOwnerRecord; - this.signatoriesCount = args.signatoriesCount; - this.signatoriesSignedOffCount = args.signatoriesSignedOffCount; - this.descriptionLink = args.descriptionLink; - this.name = args.name; - - // V1 - this.yesVotesCount = args.yesVotesCount; - this.noVotesCount = args.noVotesCount; - this.instructionsExecutedCount = args.instructionsExecutedCount; - this.instructionsCount = args.instructionsCount; - this.instructionsNextIndex = args.instructionsNextIndex; - // - - // V2 - this.voteType = args.voteType; - this.options = args.options; - this.denyVoteWeight = args.denyVoteWeight; - this.reserved1 = args.reserved1; - this.abstainVoteWeight = args.abstainVoteWeight; - - this.startVotingAt = args.startVotingAt; - this.maxVotingTime = args.maxVotingTime; - - this.draftAt = args.draftAt; - this.signingOffAt = args.signingOffAt; - this.votingAt = args.votingAt; - this.votingAtSlot = args.votingAtSlot; - this.votingCompletedAt = args.votingCompletedAt; - this.executingAt = args.executingAt; - this.closedAt = args.closedAt; - - this.executionFlags = args.executionFlags; - this.maxVoteWeight = args.maxVoteWeight; - this.voteThreshold = args.voteThreshold; - - // V3 - this.vetoVoteWeight = args.vetoVoteWeight; - } - - /// Returns true if Proposal is in state when no voting can happen any longer - isVoteFinalized(): boolean { - switch (this.state) { - case ProposalState.Succeeded: - case ProposalState.Executing: - case ProposalState.Completed: - case ProposalState.Cancelled: - case ProposalState.Defeated: - case ProposalState.ExecutingWithErrors: - case ProposalState.Vetoed: - return true; - case ProposalState.Draft: - case ProposalState.SigningOff: - case ProposalState.Voting: - return false; - } - } - - isFinalState(): boolean { - // 1) ExecutingWithErrors is not really a final state, it's undefined. - // However it usually indicates none recoverable execution error so we treat is as final for the ui purposes - // 2) Succeeded with no instructions is also treated as final since it can't transition any longer - // It really doesn't make any sense but until it's solved in the program we have to consider it as final in the ui - switch (this.state) { - case ProposalState.Completed: - case ProposalState.Cancelled: - case ProposalState.Defeated: - case ProposalState.ExecutingWithErrors: - case ProposalState.Vetoed: - return true; - case ProposalState.Succeeded: - return this.instructionsCount === 0; - case ProposalState.Executing: - case ProposalState.Draft: - case ProposalState.SigningOff: - case ProposalState.Voting: - return false; - } - } - - getStateTimestamp(): number { - switch (this.state) { - case ProposalState.Succeeded: - case ProposalState.Defeated: - case ProposalState.Vetoed: - return this.votingCompletedAt ? this.votingCompletedAt.toNumber() : 0; - case ProposalState.Completed: - case ProposalState.Cancelled: - return this.closedAt ? this.closedAt.toNumber() : 0; - case ProposalState.Executing: - case ProposalState.ExecutingWithErrors: - return this.executingAt ? this.executingAt.toNumber() : 0; - case ProposalState.Draft: - return this.draftAt.toNumber(); - case ProposalState.SigningOff: - return this.signingOffAt ? this.signingOffAt.toNumber() : 0; - case ProposalState.Voting: - return this.votingAt ? this.votingAt.toNumber() : 0; - } - } - - getStateSortRank(): number { - // Always show proposals in voting state at the top - if (this.state === ProposalState.Voting) { - return 2; - } - // Then show proposals in pending state and finalized at the end - return this.isFinalState() ? 0 : 1; - } - - /// Returns true if Proposal has not been voted on yet - isPreVotingState() { - return !this.votingAtSlot; - } - - getYesVoteOption() { - if (this.options.length !== 1 && !this.voteType.isSingleChoice()) { - throw new Error('Proposal is not Yes/No vote'); - } - - return this.options[0]; - } - - getYesVoteCount() { - switch (this.accountType) { - case GovernanceAccountType.ProposalV1: - return this.yesVotesCount; - case GovernanceAccountType.ProposalV2: - return this.getYesVoteOption().voteWeight; - default: - throw new Error(`Invalid account type ${this.accountType}`); - } - } - - getNoVoteCount() { - switch (this.accountType) { - case GovernanceAccountType.ProposalV1: - return this.noVotesCount; - case GovernanceAccountType.ProposalV2: - return this.denyVoteWeight as BN; - default: - throw new Error(`Invalid account type ${this.accountType}`); - } - } - - getTimeToVoteEnd(governance: Governance) { - const unixTimestampInSeconds = Date.now() / 1000; - - const baseVotingTime = this.isPreVotingState() - ? governance.config.baseVotingTime - : (this.votingAt?.toNumber() ?? 0) + - governance.config.baseVotingTime - - unixTimestampInSeconds; - - return baseVotingTime + governance.config.votingCoolOffTime; - } - - hasVoteTimeEnded(governance: Governance) { - return this.getTimeToVoteEnd(governance) <= 0; - } - - canCancel(governance: Governance) { - if ( - this.state === ProposalState.Draft || - this.state === ProposalState.SigningOff - ) { - return true; - } - - if ( - this.state === ProposalState.Voting && - !this.hasVoteTimeEnded(governance) - ) { - return true; - } - - return false; - } - - canWalletCancel( - governance: Governance, - proposalOwner: TokenOwnerRecord, - walletPk: PublicKey, - ) { - if (!this.canCancel(governance)) { - return false; - } - return ( - proposalOwner.governingTokenOwner.equals(walletPk) || - proposalOwner.governanceDelegate?.equals(walletPk) - ); - } -} - -export class ProposalDeposit { - accountType: GovernanceAccountType = GovernanceAccountType.ProposalDeposit; - proposal: PublicKey; - depositPayer: PublicKey; - - constructor(args: { proposal: PublicKey; depositPayer: PublicKey }) { - this.proposal = args.proposal; - this.depositPayer = args.depositPayer; - } -} - -export class SignatoryRecord { - accountType: GovernanceAccountType = GovernanceAccountType.SignatoryRecordV1; - proposal: PublicKey; - signatory: PublicKey; - signedOff: boolean; - - constructor(args: { - proposal: PublicKey; - signatory: PublicKey; - signedOff: boolean; - }) { - this.proposal = args.proposal; - this.signatory = args.signatory; - this.signedOff = !!args.signedOff; - } -} - -export async function getSignatoryRecordAddress( - programId: PublicKey, - proposal: PublicKey, - signatory: PublicKey, -) { - const [signatoryRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - signatory.toBuffer(), - ], - programId, - ); - - return signatoryRecordAddress; -} - -export class VoteWeight { - yes: BN; - no: BN; - - constructor(args: { yes: BN; no: BN }) { - this.yes = args.yes; - this.no = args.no; - } -} - -export class VoteRecord { - accountType: GovernanceAccountType; - proposal: PublicKey; - governingTokenOwner: PublicKey; - isRelinquished: boolean; - - // V1 - voteWeight: VoteWeight | undefined; - - // V2 ------------------------------- - voterWeight: BN | undefined; - vote: Vote | undefined; - // ------------------------------- - - constructor(args: { - accountType: GovernanceAccountType; - proposal: PublicKey; - governingTokenOwner: PublicKey; - isRelinquished: boolean; - // V1 - voteWeight: VoteWeight | undefined; - // V2 ------------------------------- - voterWeight: BN | undefined; - vote: Vote | undefined; - // ------------------------------- - }) { - this.accountType = args.accountType; - this.proposal = args.proposal; - this.governingTokenOwner = args.governingTokenOwner; - this.isRelinquished = !!args.isRelinquished; - // V1 - this.voteWeight = args.voteWeight; - // V2 ------------------------------- - this.voterWeight = args.voterWeight; - this.vote = args.vote; - // ------------------------------- - } - - getNoVoteWeight() { - switch (this.accountType) { - case GovernanceAccountType.VoteRecordV1: { - return this.voteWeight?.no; - } - case GovernanceAccountType.VoteRecordV2: { - switch (this.vote?.voteType) { - case VoteKind.Approve: { - return undefined; - } - case VoteKind.Deny: { - return this.voterWeight; - } - default: - throw new Error('Invalid voteKind'); - } - } - default: - throw new Error(`Invalid account type ${this.accountType} `); - } - } - getYesVoteWeight() { - switch (this.accountType) { - case GovernanceAccountType.VoteRecordV1: { - return this.voteWeight?.yes; - } - case GovernanceAccountType.VoteRecordV2: { - switch (this.vote?.voteType) { - case VoteKind.Approve: { - return this.voterWeight; - } - case VoteKind.Deny: { - return undefined; - } - default: - throw new Error('Invalid voteKind'); - } - } - default: - throw new Error(`Invalid account type ${this.accountType} `); - } - } -} - -export async function getVoteRecordAddress( - programId: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, -) { - const [voteRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - tokenOwnerRecord.toBuffer(), - ], - programId, - ); - - return voteRecordAddress; -} - -export class AccountMetaData { - pubkey: PublicKey; - isSigner: boolean; - isWritable: boolean; - - constructor(args: { - pubkey: PublicKey; - isSigner: boolean; - isWritable: boolean; - }) { - this.pubkey = args.pubkey; - this.isSigner = !!args.isSigner; - this.isWritable = !!args.isWritable; - } -} - -export class InstructionData { - programId: PublicKey; - accounts: AccountMetaData[]; - data: Uint8Array; - - constructor(args: { - programId: PublicKey; - accounts: AccountMetaData[]; - data: Uint8Array; - }) { - this.programId = args.programId; - this.accounts = args.accounts; - this.data = args.data; - } -} - -export class ProposalTransaction { - accountType; - proposal: PublicKey; - instructionIndex: number; - - // V1 - instruction: InstructionData; - - // V2 - optionIndex: number; - instructions: InstructionData[]; - - holdUpTime: number; - - executedAt: BN | null; - executionStatus: InstructionExecutionStatus; - - constructor(args: { - accountType: GovernanceAccountType; - proposal: PublicKey; - instructionIndex: number; - optionIndex: number; - holdUpTime: number; - instruction: InstructionData; - executedAt: BN | null; - executionStatus: InstructionExecutionStatus; - instructions: InstructionData[]; - }) { - this.accountType = args.accountType; - this.proposal = args.proposal; - this.instructionIndex = args.instructionIndex; - this.optionIndex = args.optionIndex; - this.holdUpTime = args.holdUpTime; - this.instruction = args.instruction; - this.executedAt = args.executedAt; - this.executionStatus = args.executionStatus; - this.instructions = args.instructions; - } - - getSingleInstruction() { - if (this.accountType === GovernanceAccountType.ProposalInstructionV1) { - return this.instruction; - } - - if (this.instructions.length === 0) { - throw new Error(`Transaction has no instructions`); - } - if (this.instructions.length > 1) { - throw new Error(`Transaction has multiple instructions`); - } - - return this.instructions[0]; - } - - getAllInstructions() { - if (this.accountType === GovernanceAccountType.ProposalInstructionV1) { - return [this.instruction]; - } - - return this.instructions; - } -} - - -export class ProposalTransactionBuffer { - accountType: GovernanceAccountType; - proposal: PublicKey; - creator: PublicKey; - bufferIndex: number; - finalBufferHash: Uint8Array; - finalBufferSize: number; - buffer: Uint8Array; - - constructor(args: { - accountType: GovernanceAccountType; - proposal: PublicKey; - creator: PublicKey; - bufferIndex: number; - finalBufferHash: Uint8Array; - finalBufferSize: number; - buffer: Uint8Array; - }) { - // Validate buffer hash length - if (args.finalBufferHash.length !== 32) { - throw new Error('Final buffer hash must be 32 bytes'); - } - - this.accountType = args.accountType; - this.proposal = args.proposal; - this.creator = args.creator; - this.bufferIndex = args.bufferIndex; - this.finalBufferHash = args.finalBufferHash; - this.finalBufferSize = args.finalBufferSize; - this.buffer = args.buffer; - } - - validateBuffer(): boolean { - return this.buffer.length === this.finalBufferSize; - } - - // Method to serialize the buffer for on-chain storage - serialize(): Uint8Array { - // Implementation would depend on your specific serialization needs - // This is a basic example - const serialized = new Uint8Array(this.buffer.length + 40); // 40 bytes for metadata - let offset = 0; - - // Write metadata - serialized.set([this.accountType], offset); - offset += 1; - - serialized.set(this.proposal.toBytes(), offset); - offset += 32; - - serialized.set([this.bufferIndex], offset); - offset += 1; - - serialized.set(new Uint8Array(new Uint16Array([this.finalBufferSize]).buffer), offset); - offset += 2; - - // Write buffer content - serialized.set(this.buffer, offset); - - return serialized; - } -} - -// Enum for transaction execution status -export enum TransactionExecutionStatus { - None = 'None', - Success = 'Success', - Error = 'Error' -} - -// // Interface for address table lookups -// export interface VersionedTransactionMessageAddressTableLookup { -// accountKey: PublicKey; -// writableIndexes: number[]; -// readonlyIndexes: number[]; -// } - -export class VersionedTransactionMessageAddressTableLookup { - accountKey: PublicKey; - writableIndexes: number[]; - readonlyIndexes: number[]; - - constructor(args: { - accountKey: PublicKey; - writableIndexes: number[]; - readonlyIndexes: number[]; - }) { - this.accountKey = args.accountKey; - this.writableIndexes = args.writableIndexes; - this.readonlyIndexes = args.readonlyIndexes; - } -} - -export class ProposalCompiledInstruction { - programIdIndex: number; - accountIndexes: number[]; - data: Uint8Array; - - constructor(args: { - programIdIndex: number; - accountIndexes: number[]; - data: Uint8Array; - }) { - args.accountIndexes.forEach(index => { - if (index > 255) { - throw new Error('Account indexes must be u8 (0-255)'); - } - }); - this.programIdIndex = args.programIdIndex; - this.accountIndexes = args.accountIndexes; - this.data = args.data; - } - - getProgramIdIndex(): number { - return this.programIdIndex; - } - - getAccountIndexes(): number[] { - return this.accountIndexes; - } - - getData(): Uint8Array { - return this.data; - } - - serialize(): Uint8Array { - // Layout: - // 1 byte - programIdIndex (u8) - // 4 bytes - accountIndexes length (u32) - // N bytes - accountIndexes array - // 4 bytes - data length (u32) - // M bytes - data array - const buffer = new Uint8Array(1 + 4 + this.accountIndexes.length + 4 + this.data.length); - let offset = 0; - - // Write programIdIndex - buffer[offset] = this.programIdIndex; - offset += 1; - - // Write accountIndexes length (u32) - buffer[offset++] = this.accountIndexes.length & 0xff; - buffer[offset++] = (this.accountIndexes.length >> 8) & 0xff; - buffer[offset++] = (this.accountIndexes.length >> 16) & 0xff; - buffer[offset++] = (this.accountIndexes.length >> 24) & 0xff; - - // Write accountIndexes - buffer.set(this.accountIndexes, offset); - offset += this.accountIndexes.length; - - // Write data length (u32) - buffer[offset++] = this.data.length & 0xff; - buffer[offset++] = (this.data.length >> 8) & 0xff; - buffer[offset++] = (this.data.length >> 16) & 0xff; - buffer[offset++] = (this.data.length >> 24) & 0xff; - - // Write data - buffer.set(this.data, offset); - - return buffer; - } -} - -// Class for transaction message -export class ProposalTransactionMessage { - numSigners: number; - numWritableSigners: number; - numWritableNonSigners: number; - accountKeys: PublicKey[]; - instructions: ProposalCompiledInstruction[]; - addressTableLookups: VersionedTransactionMessageAddressTableLookup[]; - - constructor(args: { - numSigners: number, - numWritableSigners: number, - numWritableNonSigners: number, - accountKeys: PublicKey[], - instructions: ProposalCompiledInstruction[], - addressTableLookups: VersionedTransactionMessageAddressTableLookup[] - }) { - if (args.numSigners > 255) throw new Error('Number of signers must be a u8 (0-255)'); - if (args.numWritableSigners > 255) throw new Error('Number of writable signers must be a u8 (0-255)'); - if (args.numWritableNonSigners > 255) throw new Error('Number of writable non-signers must be a u8 (0-255)'); - this.numSigners = args.numSigners; - this.numWritableSigners = args.numWritableSigners; - this.numWritableNonSigners = args.numWritableNonSigners; - this.accountKeys = args.accountKeys; - this.instructions = args.instructions; - this.addressTableLookups = args.addressTableLookups; - } - getNumSigners(): number { return this.numSigners; } - getNumWritableSigners(): number { return this.numWritableSigners; } - getNumWritableNonSigners(): number { return this.numWritableNonSigners; } - getAccountKeys(): PublicKey[] { return this.accountKeys; } - getInstructions(): ProposalCompiledInstruction[] { return this.instructions; } - getAddressTableLookups(): VersionedTransactionMessageAddressTableLookup[] { return this.addressTableLookups; } - - serialize(): Uint8Array { - // Calculate total size needed - const accountKeysSize = this.accountKeys.length * 32; // Each PublicKey is 32 bytes - const instructionsSize = this.instructions.reduce( - (sum, instruction) => sum + instruction.serialize().length, - 0 - ); - const addressTableLookupsSize = this.addressTableLookups.reduce( - (sum, lookup) => sum + 32 + 4 + lookup.writableIndexes.length + 4 + lookup.readonlyIndexes.length, - 0 - ); - - // 3 bytes for the header numbers (numSigners, numWritableSigners, numWritableNonSigners) - // 4 bytes for number of account keys - // 4 bytes for number of instructions - // 4 bytes for number of address table lookups - const headerSize = 3 + 4 + 4 + 4; - const totalSize = headerSize + accountKeysSize + instructionsSize + addressTableLookupsSize; - - const buffer = new Uint8Array(totalSize); - let offset = 0; - - // Write header - buffer[offset++] = this.numSigners; - buffer[offset++] = this.numWritableSigners; - buffer[offset++] = this.numWritableNonSigners; - - // Write account keys length (u32) - buffer[offset++] = this.accountKeys.length & 0xff; - buffer[offset++] = (this.accountKeys.length >> 8) & 0xff; - buffer[offset++] = (this.accountKeys.length >> 16) & 0xff; - buffer[offset++] = (this.accountKeys.length >> 24) & 0xff; - - // Write account keys - for (const key of this.accountKeys) { - buffer.set(key.toBytes(), offset); - offset += 32; - } - - // Write instructions length (u32) - buffer[offset++] = this.instructions.length & 0xff; - buffer[offset++] = (this.instructions.length >> 8) & 0xff; - buffer[offset++] = (this.instructions.length >> 16) & 0xff; - buffer[offset++] = (this.instructions.length >> 24) & 0xff; - - // Write instructions - for (const instruction of this.instructions) { - const serializedInstruction = instruction.serialize(); - buffer.set(serializedInstruction, offset); - offset += serializedInstruction.length; - } - - // Write address table lookups length (u32) - buffer[offset++] = this.addressTableLookups.length & 0xff; - buffer[offset++] = this.addressTableLookups.length >> 8 & 0xff; - buffer[offset++] = this.addressTableLookups.length >> 16 & 0xff; - buffer[offset++] = this.addressTableLookups.length >> 24 & 0xff; - - // Write address table lookups - for (const lookup of this.addressTableLookups) { - // Write account key - buffer.set(lookup.accountKey.toBytes(), offset); - offset += 32; - - // Write writable indexes - buffer[offset++] = lookup.writableIndexes.length & 0xff; - buffer[offset++] = (lookup.writableIndexes.length >> 8) & 0xff; - buffer[offset++] = (lookup.writableIndexes.length >> 16) & 0xff; - buffer[offset++] = (lookup.writableIndexes.length >> 24) & 0xff; - buffer.set(new Uint8Array(lookup.writableIndexes), offset); - offset += lookup.writableIndexes.length; - - // Write readonly indexes - buffer[offset++] = lookup.readonlyIndexes.length & 0xff; - buffer[offset++] = (lookup.readonlyIndexes.length >> 8) & 0xff; - buffer[offset++] = (lookup.readonlyIndexes.length >> 16) & 0xff; - buffer[offset++] = (lookup.readonlyIndexes.length >> 24) & 0xff; - buffer.set(new Uint8Array(lookup.readonlyIndexes), offset); - offset += lookup.readonlyIndexes.length; - } - - return buffer; - } -} - -// Main class for versioned transaction -export class ProposalVersionedTransaction { - accountType: GovernanceAccountType; - proposal: PublicKey; - optionIndex: number; - transactionIndex: number; - executionIndex: number; - executedAt: number | null; - executionStatus: TransactionExecutionStatus; - ephemeralSignerBumps: number[]; - message: ProposalTransactionMessage; - - constructor(args: { - accountType: GovernanceAccountType, - proposal: PublicKey, - optionIndex: number, - transactionIndex: number, - executionIndex: number, - executedAt: number | null, - executionStatus: TransactionExecutionStatus, - ephemeralSignerBumps: number[], - message: ProposalTransactionMessage - }) { - if (args.optionIndex > 255) throw new Error('Option index must be a u8 (0-255)'); - if (args.transactionIndex > 65535) throw new Error('Transaction index must be a u16 (0-65535)'); - if (args.executionIndex > 255) throw new Error('Execution index must be a u8 (0-255)'); - - args.ephemeralSignerBumps.forEach(bump => { - if (bump > 255) throw new Error('Ephemeral signer bumps must be u8 (0-255)'); - }); - this.accountType = args.accountType; - this.proposal = args.proposal; - this.optionIndex = args.optionIndex; - this.transactionIndex = args.transactionIndex; - this.executionIndex = args.executionIndex; - this.executedAt = args.executedAt; - this.executionStatus = args.executionStatus; - this.ephemeralSignerBumps = args.ephemeralSignerBumps; - this.message = args.message; - } - - getAccountType(): GovernanceAccountType { return this.accountType; } - getProposal(): PublicKey { return this.proposal; } - getOptionIndex(): number { return this.optionIndex; } - getTransactionIndex(): number { return this.transactionIndex; } - getExecutionIndex(): number { return this.executionIndex; } - getExecutedAt(): number | null { return this.executedAt; } - getExecutionStatus(): TransactionExecutionStatus { return this.executionStatus; } - getEphemeralSignerBumps(): number[] { return this.ephemeralSignerBumps; } - getMessage(): ProposalTransactionMessage { return this.message; } - - isExecuted(): boolean { - return this.executionStatus === TransactionExecutionStatus.Success; - } - - hasError(): boolean { - return this.executionStatus === TransactionExecutionStatus.Error; - } - - getAllSigners(): PublicKey[] { - return this.message.getAccountKeys().slice(0, this.message.getNumSigners()); - } - - getWritableAccounts(): PublicKey[] { - const writableCount = this.message.getNumWritableSigners() + - this.message.getNumWritableNonSigners(); - return this.message.getAccountKeys().slice(0, writableCount); - } -} - -export async function getProposalTransactionAddress( - programId: PublicKey, - programVersion: number, - proposal: PublicKey, - optionIndex: number, - transactionIndex: number, -) { - let optionIndexBuffer = Buffer.alloc(1); - optionIndexBuffer.writeUInt8(optionIndex); - - let instructionIndexBuffer = Buffer.alloc(2); - instructionIndexBuffer.writeInt16LE(transactionIndex, 0); - - const seeds = - programVersion === PROGRAM_VERSION_V1 - ? [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - instructionIndexBuffer, - ] - : [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - proposal.toBuffer(), - optionIndexBuffer, - instructionIndexBuffer, - ]; - - const [instructionAddress] = await PublicKey.findProgramAddress( - seeds, - programId, - ); - - return instructionAddress; -} - -export class ProgramMetadata { - accountType = GovernanceAccountType.ProgramMetadata; - - updatedAt: BN; - - version: string; - - reserved: Uint8Array; - - constructor(args: { - updatedAt: BN; - reserved: Uint8Array; - - version: string; - }) { - this.updatedAt = args.updatedAt; - this.reserved = args.reserved; - this.version = args.version; - } -} - -export async function getProgramMetadataAddress(programId: PublicKey) { - const [signatoryRecordAddress] = await PublicKey.findProgramAddress( - [Buffer.from('metadata')], - programId, - ); - - return signatoryRecordAddress; -} - -export async function getNativeTreasuryAddress( - programId: PublicKey, - governance: PublicKey, -) { - const [signatoryRecordAddress] = await PublicKey.findProgramAddress( - [Buffer.from('native-treasury'), governance.toBuffer()], - programId, - ); - - return signatoryRecordAddress; -} - -export async function getGoverningTokenHoldingAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, -) { - const [governingTokenHoldingAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - ], - programId, - ); - - return governingTokenHoldingAddress; -} - -export async function getProposalDepositAddress( - programId: PublicKey, - proposal: PublicKey, - proposalDepositPayer: PublicKey, -) { - const [proposalDepositAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('proposal-deposit'), - proposal.toBuffer(), - proposalDepositPayer.toBuffer(), - ], - programId, - ); - - return proposalDepositAddress; -} - - -export function getEphemeralSignerPda({ - transactionProposalPda, - transactionIndex, - ephemeralSignerIndex, - programId, -}: { - transactionProposalPda: PublicKey; - transactionIndex: number; - ephemeralSignerIndex: number; - programId: PublicKey; -}): [PublicKey, number] { - let transactionIndexBuffer = Buffer.alloc(2); - transactionIndexBuffer.writeInt16LE(transactionIndex, 0); - - let ephemeralSignerIndexBuffer = Buffer.alloc(1); - ephemeralSignerIndexBuffer.writeUInt8(ephemeralSignerIndex); - - return PublicKey.findProgramAddressSync( - [ - Buffer.from("version_transaction"), - transactionProposalPda.toBytes(), - Buffer.from("ephemeral_signer"), - transactionIndexBuffer, - ephemeralSignerIndexBuffer, - ], - programId - ); -} - -export async function getProposalVersionedTransactionAddress( - programId: PublicKey, - proposal: PublicKey, - optionIndex: number, - transactionIndex: number, -) { - let optionIndexBuffer = Buffer.alloc(1); - optionIndexBuffer.writeUInt8(optionIndex); - - let transactionIndexBuffer = Buffer.alloc(2); - transactionIndexBuffer.writeInt16LE(transactionIndex, 0); - - const seeds = [ - Buffer.from("version_transaction"), - proposal.toBuffer(), - optionIndexBuffer, - transactionIndexBuffer, - ]; - - const [instructionAddress] = await PublicKey.findProgramAddress( - seeds, - programId, - ); - - return instructionAddress; -} - -export async function getProposalTransactionBufferAddress( - programId: PublicKey, - proposal: PublicKey, - creator: PublicKey, - bufferIndex: number, -) { - let bufferIndexBuffer = Buffer.alloc(1); - bufferIndexBuffer.writeUInt8(bufferIndex, 0); - - const seeds = [ - Buffer.from("transaction_buffer"), - proposal.toBuffer(), - creator.toBuffer(), - bufferIndexBuffer, - ]; - - const [transactionBufferAddress] = await PublicKey.findProgramAddress( - seeds, - programId, - ); - - return transactionBufferAddress; -} \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/api.ts b/packages/governance-sdk/src/governance/api.ts deleted file mode 100644 index a28b778..0000000 --- a/packages/governance-sdk/src/governance/api.ts +++ /dev/null @@ -1,386 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js'; - -import { - getGovernanceSchemaForAccount, - GovernanceAccountParser, -} from './serialisation'; -import { - getAccountTypes, - getTokenOwnerRecordAddress, - Governance, - GovernanceAccount, - GovernanceAccountClass, - Proposal, - Realm, - TokenOwnerRecord, - VoteRecord, - RealmConfigAccount, - getRealmConfigAddress, - ProposalDeposit, -} from './accounts'; - -import { - getBorshProgramAccounts, - MemcmpFilter, - pubkeyFilter, -} from '../core/api'; -import { ProgramAccount } from '../tools/sdk/runtime'; -import bs58 from 'bs58'; -import axios from 'axios'; -import { deserializeBorsh } from '../tools/borsh'; -import { getErrorMessage } from '../tools'; - -export async function getRealm(connection: Connection, realm: PublicKey) { - return getGovernanceAccount(connection, realm, Realm); -} - -export async function getRealms( - connection: Connection, - programIds: PublicKey | PublicKey[], -) { - if (programIds instanceof PublicKey) { - return getGovernanceAccounts(connection, programIds, Realm); - } - - return _getRealms(connection, programIds); -} - -async function _getRealms(connection: Connection, programIds: PublicKey[]) { - const accountTypes = getAccountTypes( - (Realm as any) as GovernanceAccountClass, - ); - const rpcEndpoint = (connection as any)._rpcEndpoint; - - const rawProgramAccounts = []; - - for (const accountType of accountTypes) { - const programAccountsJson = await axios.request({ - url: rpcEndpoint, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: JSON.stringify([ - ...programIds.map(x => { - return { - jsonrpc: '2.0', - id: x.toBase58(), - method: 'getProgramAccounts', - params: [ - x.toBase58(), - { - commitment: connection.commitment, - encoding: 'base64', - filters: [ - { - memcmp: { - offset: 0, - bytes: bs58.encode([accountType]), - }, - }, - ], - }, - ], - }; - }), - ]), - }); - - rawProgramAccounts.push( - ...programAccountsJson?.data - ?.filter((x: any) => x.result) - .flatMap((x: any) => x.result), - ); - } - - let accounts: ProgramAccount[] = []; - - for (let rawAccount of rawProgramAccounts) { - try { - const data = Buffer.from(rawAccount.account.data[0], 'base64'); - const accountType = data[0]; - - const account: ProgramAccount = { - pubkey: new PublicKey(rawAccount.pubkey), - account: deserializeBorsh( - getGovernanceSchemaForAccount(accountType), - Realm, - data, - ), - owner: rawAccount.account.owner, - }; - - accounts.push(account); - } catch (ex) { - console.info( - `Can't deserialize Realm @ ${rawAccount.pubkey}.`, - getErrorMessage(ex), - ); - } - } - return accounts; -} - -// Realm config -export async function tryGetRealmConfig( - connection: Connection, - programId: PublicKey, - realmPk: PublicKey, -) { - try { - const realmConfigPk = await getRealmConfigAddress(programId, realmPk); - return await getGovernanceAccount( - connection, - realmConfigPk, - RealmConfigAccount, - ); - } catch { - // RealmConfigAccount didn't exist in V1 and was optional in V2 and hence it doesn't have to exist - } -} - -export async function getRealmConfig( - connection: Connection, - realmConfigPk: PublicKey, -) { - return getGovernanceAccount(connection, realmConfigPk, RealmConfigAccount); -} - -// VoteRecords - -export async function getVoteRecord( - connection: Connection, - voteRecordPk: PublicKey, -) { - return getGovernanceAccount(connection, voteRecordPk, VoteRecord); -} - -export async function getVoteRecordsByVoter( - connection: Connection, - programId: PublicKey, - voter: PublicKey, -) { - return getGovernanceAccounts(connection, programId, VoteRecord, [ - pubkeyFilter(33, voter)!, - ]); -} - -// TokenOwnerRecords - -export async function getTokenOwnerRecordForRealm( - connection: Connection, - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, -) { - const tokenOwnerRecordPk = await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - governingTokenOwner, - ); - - return getGovernanceAccount(connection, tokenOwnerRecordPk, TokenOwnerRecord); -} - -export async function getTokenOwnerRecord( - connection: Connection, - tokenOwnerRecordPk: PublicKey, -) { - return getGovernanceAccount(connection, tokenOwnerRecordPk, TokenOwnerRecord); -} - -/** - * Returns TokenOwnerRecords for the given token owner (voter) - * Note: The function returns TokenOwnerRecords for both council and community token holders - * - * @param connection - * @param programId - * @param governingTokenOwner - * @returns - */ -export async function getTokenOwnerRecordsByOwner( - connection: Connection, - programId: PublicKey, - governingTokenOwner: PublicKey, -) { - return getGovernanceAccounts(connection, programId, TokenOwnerRecord, [ - pubkeyFilter(1 + 32 + 32, governingTokenOwner)!, - ]); -} - -/** - * Returns all TokenOwnerRecords for all members for the given Realm - * Note: The function returns TokenOwnerRecords for both council and community token holders - * - * @param connection - * @param programId - * @param realmPk - * @returns - */ -export async function getAllTokenOwnerRecords( - connection: Connection, - programId: PublicKey, - realmPk: PublicKey, -) { - return getGovernanceAccounts(connection, programId, TokenOwnerRecord, [ - pubkeyFilter(1, realmPk)!, - ]); -} - -// Governances - -export async function getGovernance( - connection: Connection, - governance: PublicKey, -) { - return getGovernanceAccount(connection, governance, Governance); -} - -/** - * Returns all governances for the given program instance and realm - * - * @param connection - * @param programId - * @param realmPk - * @returns - */ -export async function getAllGovernances( - connection: Connection, - programId: PublicKey, - realmPk: PublicKey, -) { - return getGovernanceAccounts(connection, programId, Governance, [ - pubkeyFilter(1, realmPk)!, - ]); -} - -// Proposal - -export async function getProposal(connection: Connection, proposal: PublicKey) { - return getGovernanceAccount(connection, proposal, Proposal); -} - -/** - * Returns all Proposals for the given Governance - * - * @param connection - * @param programId - * @param governancePk - * @returns - */ -export async function getProposalsByGovernance( - connection: Connection, - programId: PublicKey, - governancePk: PublicKey, -) { - return getGovernanceAccounts(connection, programId, Proposal, [ - pubkeyFilter(1, governancePk)!, - ]); -} - -/** - * Returns all Proposals for the given Realm - * - * @param connection - * @param programId - * @param realmPk - * @returns - */ -export async function getAllProposals( - connection: Connection, - programId: PublicKey, - realmPk: PublicKey, -) { - return getAllGovernances(connection, programId, realmPk).then(gs => - Promise.all( - gs.map(g => getProposalsByGovernance(connection, programId, g.pubkey)), - ), - ); -} - -// ProposalDeposit api - -/** - * Returns all ProposalDeposits for the given deposit payer - * @param connection - * @param programId - * @param depositPayer - * @returns - */ -export async function getProposalDepositsByDepositPayer( - connection: Connection, - programId: PublicKey, - depositPayer: PublicKey, -) { - return getGovernanceAccounts(connection, programId, ProposalDeposit, [ - pubkeyFilter(1 + 32, depositPayer)!, - ]); -} - -// Generic API - -export async function getGovernanceAccounts( - connection: Connection, - programId: PublicKey, - accountClass: new (args: any) => TAccount, - filters: MemcmpFilter[] = [], -) { - const accountTypes = getAccountTypes( - (accountClass as any) as GovernanceAccountClass, - ); - - let all: ProgramAccount[] = []; - - for (const accountType of accountTypes) { - let accounts = await getBorshProgramAccounts( - connection, - programId, - at => getGovernanceSchemaForAccount(at), - accountClass, - filters, - accountType, - ); - - all.push(...accounts); - } - - return all; -} - -export async function getGovernanceAccount( - connection: Connection, - accountPk: PublicKey, - accountClass: new (args: any) => TAccount, -) { - const accountInfo = await connection.getAccountInfo(accountPk); - - if (!accountInfo) { - throw new Error( - `Account ${accountPk} of type ${accountClass.name} not found`, - ); - } - - return GovernanceAccountParser(accountClass as any)( - accountPk, - accountInfo, - ) as ProgramAccount; -} - -export async function tryGetGovernanceAccount< - TAccount extends GovernanceAccount ->( - connection: Connection, - accountPk: PublicKey, - accountClass: new (args: any) => TAccount | undefined, -) { - const accountInfo = await connection.getAccountInfo(accountPk); - - if (accountInfo) { - return GovernanceAccountParser(accountClass as any)( - accountPk, - accountInfo, - ) as ProgramAccount; - } -} diff --git a/packages/governance-sdk/src/governance/createRevokeGoverningTokens.ts b/packages/governance-sdk/src/governance/createRevokeGoverningTokens.ts deleted file mode 100644 index e7ac0a9..0000000 --- a/packages/governance-sdk/src/governance/createRevokeGoverningTokens.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import BN from 'bn.js'; -import { withRevokeGoverningTokens } from './withRevokeGoverningTokens'; - -export async function createRevokeGoverningTokens( - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenOwner: PublicKey, - governingTokenMint: PublicKey, - revokeAuthority: PublicKey, - amount: BN, -) { - const instructions: TransactionInstruction[] = []; - await withRevokeGoverningTokens( - instructions, - programId, - programVersion, - realm, - governingTokenOwner, - governingTokenMint, - revokeAuthority, - amount, - ); - - return instructions[0]; -} diff --git a/packages/governance-sdk/src/governance/createSetGovernanceConfig.ts b/packages/governance-sdk/src/governance/createSetGovernanceConfig.ts deleted file mode 100644 index 3e6fb61..0000000 --- a/packages/governance-sdk/src/governance/createSetGovernanceConfig.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { GovernanceConfig } from './accounts'; -import { SetGovernanceConfigArgs } from './instructions'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; - -export function createSetGovernanceConfig( - programId: PublicKey, - programVersion: number, - governance: PublicKey, - governanceConfig: GovernanceConfig, -) { - const args = new SetGovernanceConfigArgs({ config: governanceConfig }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - if (args.config.baseVotingTime < 3600) { - throw new Error('baseVotingTime should be at least 1 hour'); - } - - const keys = [ - { - pubkey: governance, - isWritable: true, - isSigner: true, - }, - ]; - - return new TransactionInstruction({ - keys, - programId, - data, - }); -} diff --git a/packages/governance-sdk/src/governance/createSetRealmAuthority.ts b/packages/governance-sdk/src/governance/createSetRealmAuthority.ts deleted file mode 100644 index 826a26d..0000000 --- a/packages/governance-sdk/src/governance/createSetRealmAuthority.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { SetRealmAuthorityAction } from './instructions'; -import { withSetRealmAuthority } from './withSetRealmAuthority'; - -export function createSetRealmAuthority( - programId: PublicKey, - programVersion: number, - realm: PublicKey, - realmAuthority: PublicKey, - newRealmAuthority: PublicKey | undefined, - action: SetRealmAuthorityAction | undefined, -) { - const instructions: TransactionInstruction[] = []; - - withSetRealmAuthority( - instructions, - programId, - programVersion, - realm, - realmAuthority, - newRealmAuthority, - action, - ); - - return instructions[0]; -} diff --git a/packages/governance-sdk/src/governance/createSetRealmConfig.ts b/packages/governance-sdk/src/governance/createSetRealmConfig.ts deleted file mode 100644 index 4100036..0000000 --- a/packages/governance-sdk/src/governance/createSetRealmConfig.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { - GoverningTokenConfigAccountArgs, - MintMaxVoteWeightSource, -} from './accounts'; -import BN from 'bn.js'; -import { withSetRealmConfig } from './withSetRealmConfig'; - -export async function createSetRealmConfig( - programId: PublicKey, - programVersion: number, - realm: PublicKey, - realmAuthority: PublicKey, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityTokensToCreateGovernance: BN, - communityTokenConfig: GoverningTokenConfigAccountArgs | undefined, - councilTokenConfig: GoverningTokenConfigAccountArgs | undefined, - payer: PublicKey | undefined, -) { - const instructions: TransactionInstruction[] = []; - await withSetRealmConfig( - instructions, - programId, - programVersion, - realm, - realmAuthority, - councilMint, - communityMintMaxVoteWeightSource, - minCommunityTokensToCreateGovernance, - communityTokenConfig, - councilTokenConfig, - payer, - ); - - return instructions[0]; -} diff --git a/packages/governance-sdk/src/governance/enums.ts b/packages/governance-sdk/src/governance/enums.ts deleted file mode 100644 index 9f490f1..0000000 --- a/packages/governance-sdk/src/governance/enums.ts +++ /dev/null @@ -1,11 +0,0 @@ -export enum GoverningTokenRole { - Community, - Council, -} - -export enum GovernanceType { - Account, - Program, - Mint, - Token, -} diff --git a/packages/governance-sdk/src/governance/errors.ts b/packages/governance-sdk/src/governance/errors.ts deleted file mode 100644 index f1e28b5..0000000 --- a/packages/governance-sdk/src/governance/errors.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { SendTransactionError } from '../tools/sdk/runtime'; - -export const GovernanceError = [ - 'Invalid instruction passed to program', // InvalidInstruction - 'Realm with the given name and governing mints already exists', // RealmAlreadyExists - 'Invalid realm', // InvalidRealm - 'Invalid Governing Token Mint', // InvalidGoverningTokenMint - 'Governing Token Owner must sign transaction', // GoverningTokenOwnerMustSign - 'Governing Token Owner or Delegate must sign transaction', // GoverningTokenOwnerOrDelegateMustSign - 'All votes must be relinquished to withdraw governing tokens', // AllVotesMustBeRelinquishedToWithdrawGoverningTokens - 'Invalid Token Owner Record account address', // InvalidTokenOwnerRecordAccountAddress - 'Invalid GoverningMint for TokenOwnerRecord', // InvalidGoverningMintForTokenOwnerRecord - 'Invalid Realm for TokenOwnerRecord', // InvalidRealmForTokenOwnerRecord - 'Invalid Proposal for ProposalTransaction', // InvalidProposalForProposalTransaction - 'Invalid Signatory account address', // InvalidSignatoryAddress - 'Signatory already signed off', // SignatoryAlreadySignedOff - 'Signatory must sign', // SignatoryMustSign - 'Invalid Proposal Owner', //InvalidProposalOwnerAccount - 'Invalid Proposal for VoterRecord', // InvalidProposalForVoterRecord - 'Invalid GoverningTokenOwner for VoteRecord', // InvalidGoverningTokenOwnerForVoteRecord - 'Invalid Governance config: Vote threshold percentage out of range', // InvalidVoteThresholdPercentage - 'Proposal for the given Governance, Governing Token Mint and index already exists', // ProposalAlreadyExists - 'Token Owner already voted on the Proposal', // VoteAlreadyExists - "Owner doesn't have enough governing tokens to create Proposal", // NotEnoughTokensToCreateProposal - "Invalid State: Can't edit Signatories", // InvalidStateCannotEditSignatories - 'Invalid Proposal state', // InvalidProposalState - "Invalid State: Can't edit instructions", // InvalidStateCannotEditInstructions - "Invalid State: Can't execute instruction", // InvalidStateCannotExecuteInstruction - "Can't execute instruction within its hold up time", // CannotExecuteInstructionWithinHoldUpTime - 'Instruction already executed', // InstructionAlreadyExecuted - 'Invalid Instruction index', // InvalidInstructionIndex - 'Instruction hold up time is below the min specified by Governance', // InstructionHoldUpTimeBelowRequiredMin - 'Instruction at the given index for the Proposal already exists', // InstructionAlreadyExists - "Invalid State: Can't sign off", // InvalidStateCannotSignOff - "Invalid State: Can't vote", // InvalidStateCannotVote - "Invalid State: Can't finalize vote", // InvalidStateCannotFinalize - "Invalid State: Can't cancel Proposal", // InvalidStateCannotCancelProposal - 'Vote already relinquished', // VoteAlreadyRelinquished - "Can't finalize vote. Voting still in progress", // CannotFinalizeVotingInProgress - 'Proposal voting time expired', // ProposalVotingTimeExpired - 'Invalid Signatory Mint', // InvalidSignatoryMint - 'Proposal does not belong to the given Governance', // InvalidGovernanceForProposal - 'Proposal does not belong to given Governing Mint', // InvalidGoverningMintForProposal - 'Current mint authority must sign transaction', // MintAuthorityMustSign - 'Invalid mint authority', // InvalidMintAuthority - 'Mint has no authority', // MintHasNoAuthority - 'Invalid Token account owner', // SplTokenAccountWithInvalidOwner - 'Invalid Mint account owner', // SplTokenMintWithInvalidOwner - 'Token Account is not initialized', // SplTokenAccountNotInitialized - "Token Account doesn't exist", // SplTokenAccountDoesNotExist - 'Token account data is invalid', // SplTokenInvalidTokenAccountData - 'Token mint account data is invalid', // SplTokenInvalidMintAccountData - 'Token Mint account is not initialized', // SplTokenMintNotInitialized - "Token Mint account doesn't exist", // SplTokenMintDoesNotExist - 'Invalid ProgramData account address', // InvalidProgramDataAccountAddress - 'Invalid ProgramData account Data', // InvalidProgramDataAccountData - "Provided upgrade authority doesn't match current program upgrade authority", // InvalidUpgradeAuthority - 'Current program upgrade authority must sign transaction', // UpgradeAuthorityMustSign - 'Given program is not upgradable', //ProgramNotUpgradable - 'Invalid token owner', //InvalidTokenOwner - 'Current token owner must sign transaction', // TokenOwnerMustSign - 'Given VoteThresholdType is not supported', //VoteThresholdTypeNotSupported - 'Given VoteWeightSource is not supported', //VoteWeightSourceNotSupported - 'Legacy1', // Legacy1 - 'Governance PDA must sign', // GovernancePdaMustSign - 'Instruction already flagged with error', // InstructionAlreadyFlaggedWithError - 'Invalid Realm for Governance', // InvalidRealmForGovernance - 'Invalid Authority for Realm', // InvalidAuthorityForRealm - 'Realm has no authority', // RealmHasNoAuthority - 'Realm authority must sign', // RealmAuthorityMustSign - 'Invalid governing token holding account', // InvalidGoverningTokenHoldingAccount - 'Realm council mint change is not supported', // RealmCouncilMintChangeIsNotSupported - 'Not supported mint max vote weight source', // MintMaxVoteWeightSourceNotSupported - 'Invalid max vote weight supply fraction', // InvalidMaxVoteWeightSupplyFraction - "Owner doesn't have enough governing tokens to create Governance", // NotEnoughTokensToCreateGovernance - 'Too many outstanding proposals', // TooManyOutstandingProposals - 'All proposals must be finalized to withdraw governing tokens', // AllProposalsMustBeFinalisedToWithdrawGoverningTokens - 'Invalid VoterWeightRecord for Realm', // InvalidVoterWeightRecordForRealm - 'Invalid VoterWeightRecord for GoverningTokenMint', // InvalidVoterWeightRecordForGoverningTokenMint - 'Invalid VoterWeightRecord for TokenOwner', // InvalidVoterWeightRecordForTokenOwner - 'VoterWeightRecord expired', // VoterWeightRecordExpired - 'Invalid RealmConfig for Realm', // InvalidRealmConfigForRealm - 'TokenOwnerRecord already exists', // TokenOwnerRecordAlreadyExists - 'Governing token deposits not allowed', // GoverningTokenDepositsNotAllowed - 'Invalid vote choice weight percentage', // InvalidVoteChoiceWeightPercentage - 'Vote type not supported', // VoteTypeNotSupported - 'Invalid proposal options', // InvalidProposalOptions - 'Proposal is not not executable', // ProposalIsNotExecutable - 'Invalid vote', // InvalidVote - 'Cannot execute defeated option', // CannotExecuteDefeatedOption - - 'VoterWeightRecord invalid action', // VoterWeightRecordInvalidAction - 'VoterWeightRecord invalid action target', // VoterWeightRecordInvalidActionTarget - 'Invalid MaxVoterWeightRecord for Realm', // InvalidMaxVoterWeightRecordForRealm - 'MaxVoterWeightRecord expired', // InvalidMaxVoterWeightRecordForGoverningTokenMint - 'Cannot execute defeated option', // MaxVoterWeightRecordExpired - 'Not supported VoteType', // NotSupportedVoteType - 'RealmConfig change not allowed', // RealmConfigChangeNotAllowed - 'At least one VoteThreshold is required', // AtLeastOneVoteThresholdRequired - 'Reserved buffer must be empty', // ReservedBufferMustBeEmpty - - 'Cannot Relinquish in Finalizing state', // CannotRelinquishInFinalizingState - - 'Invalid RealmConfig account address', // InvalidRealmConfigAddress - 'Cannot deposit dormant tokens', // CannotDepositDormantTokens - 'Cannot withdraw membership tokens', // CannotWithdrawMembershipTokens - 'Cannot revoke GoverningTokens', // CannotRevokeGoverningTokens - 'Invalid Revoke amount', // InvalidRevokeAmount - 'Invalid GoverningToken source', // InvalidGoverningTokenSource - 'Cannot change community TokenType to Membership', // CannotChangeCommunityTokenTypeToMembership - - 'Voter weight threshold disabled', // VoterWeightThresholdDisabled - 'Vote not allowed in cool off time', // VoteNotAllowedInCoolOffTime - 'Cannot refund ProposalDeposit', // CannotRefundProposalDeposit - - 'Invalid Proposal for ProposalDeposit', // InvalidProposalForProposalDeposit - 'Invalid deposit_exempt_proposal_count', // InvalidDepositExemptProposalCount - 'Invalid GoverningTokenMint not allowed to vote', // GoverningTokenMintNotAllowedToVote - 'Invalid deposit Payer for ProposalDeposit', // InvalidDepositPayerForProposalDeposit -] as const; - -export const TokenError = [ - 'Lamport balance below rent-exempt threshold', // NotRentExempt - 'Insufficient funds', // InsufficientFunds - 'Invalid Mint', // InvalidMint - 'Account not associated with this Mint', // MintMismatch, - 'Owner does not match', // OwnerMismatch, - 'Fixed supply', // FixedSupply, - 'Already in use', // AlreadyInUse, - 'Invalid number of provided signers', // InvalidNumberOfProvidedSigners, - 'Invalid number of required signers', // InvalidNumberOfRequiredSigners, - 'State is uninitialized', // UninitializedState, - 'Instruction does not support native tokens', // NativeNotSupported, - 'Non-native account can only be closed if its balance is zero', // NonNativeHasBalance, - 'Invalid instruction', // InvalidInstruction, - 'State is invalid for requested operation', // InvalidState, - 'Operation overflowed', // Overflow, - 'Account does not support specified authority type', // AuthorityTypeNotSupported, - 'This token mint cannot freeze accounts', // MintCannotFreeze, - 'Account is frozen', // AccountFrozen, - 'The provided decimals value different from the Mint decimals', // MintDecimalsMismatch, -] as const; - -export const GovernanceToolsError = [ - 'Account already initialized', // AccountAlreadyInitialized - "Account doesn't exist", // AccountDoesNotExist - 'Invalid account owner', // InvalidAccountOwner - 'Invalid account type', // InvalidAccountType - 'Invalid new account size', // InvalidNewAccountSize -] as const; - -const governanceErrorOffset = 500; -const governanceToolsErrorOffset = 1100; - -export function getTransactionErrorMsg(error: SendTransactionError) { - try { - const instructionError = (error.txError as any).InstructionError[1]; - - if (instructionError.Custom !== undefined) { - if (instructionError.Custom >= governanceToolsErrorOffset) { - return GovernanceToolsError[ - instructionError.Custom - governanceToolsErrorOffset - ]; - } else if (instructionError.Custom >= governanceErrorOffset) { - return GovernanceError[instructionError.Custom - governanceErrorOffset]; - } else { - // If the error is not from the Governance error space then it's ambiguous because the custom errors share the same space - // And we can only use some heuristics here to guess what program returned the error - // For now the most common scenario is an error returned from the token program so I'm mapping the custom errors to it with the 'possible' warning - return `Possible error: ${TokenError[instructionError.Custom]}`; - } - } else { - return instructionError; - } - } catch { - return JSON.stringify(error); - } -} diff --git a/packages/governance-sdk/src/governance/index.ts b/packages/governance-sdk/src/governance/index.ts deleted file mode 100644 index 9476b09..0000000 --- a/packages/governance-sdk/src/governance/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -export * from './accounts'; -export * from './api'; -export * from './createRevokeGoverningTokens'; -export * from './createSetGovernanceConfig'; -export * from './createSetRealmConfig'; -export * from './createSetRealmAuthority'; -export * from './enums'; -export * from './errors'; -export * from './instructions'; -export * from './serialisation'; -export * from './tools'; -export * from './withAddSignatory'; -export * from './version'; -export * from './withCancelProposal'; -export * from './withCastVote'; -export * from './withCreateGovernance'; -export * from './withCreateMintGovernance'; -export * from './withCreateNativeTreasury'; -export * from './withCreateProgramGovernance'; -export * from './withCreateProposal'; -export * from './withCreateRealm'; -export * from './withCreateTokenGovernance'; -export * from './withCreateTokenOwnerRecord'; -export * from './withDepositGoverningTokens'; -export * from './withExecuteTransaction'; -export * from './withFinalizeVote'; -export * from './withFlagTransactionError'; -export * from './withInsertTransaction'; -export * from './withRefundProposalDeposit'; -export * from './withRelinquishVote'; -export * from './withRemoveTransaction'; -export * from './withRevokeGoverningTokens'; -export * from './withSetRealmAuthority'; -export * from './withSetRealmConfig'; -export * from './withSetGovernanceDelegate'; -export * from './withSignOffProposal'; -export * from './withUpdateProgramMetadata'; -export * from './withWithdrawGoverningTokens'; -export * from './withCloseTransactionBuffer'; -export * from './withCreateTransactionBuffer'; -export * from './withExecuteVersionedTransaction'; -export * from './withExtendTransactionBuffer'; -export * from './withInsertVersionedTransaction'; -export * from './withInsertVersionedTransactionFromBuffer'; diff --git a/packages/governance-sdk/src/governance/instructions.ts b/packages/governance-sdk/src/governance/instructions.ts deleted file mode 100644 index 96b9703..0000000 --- a/packages/governance-sdk/src/governance/instructions.ts +++ /dev/null @@ -1,485 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; - -import { - RealmConfigArgs, - GovernanceConfig, - InstructionData, - VoteType, -} from './accounts'; - -export enum GovernanceInstruction { - CreateRealm = 0, - DepositGoverningTokens = 1, - WithdrawGoverningTokens = 2, - SetGovernanceDelegate = 3, // -- - CreateGovernance = 4, - CreateProgramGovernance = 5, - - CreateProposal = 6, - AddSignatory = 7, - RemoveSignatory = 8, - - InsertTransaction = 9, - RemoveTransaction = 10, - CancelProposal = 11, - SignOffProposal = 12, - CastVote = 13, - FinalizeVote = 14, - RelinquishVote = 15, - ExecuteTransaction = 16, - - CreateMintGovernance = 17, - CreateTokenGovernance = 18, - SetGovernanceConfig = 19, - FlagTransactionError = 20, - SetRealmAuthority = 21, - SetRealmConfig = 22, - CreateTokenOwnerRecord = 23, - UpdateProgramMetadata = 24, - CreateNativeTreasury = 25, - RevokeGoverningTokens = 26, - RefundProposalDeposit = 27, - CompleteProposal = 28, - AddRequiredSignatory = 29, - RemoveRequiredSignatory = 30, - CreateTransactionBuffer = 31, - ExtendTransactionBuffer = 32, - CloseTransactionBuffer = 33, - InsertVersionedTransactionFromBuffer = 34, - InsertVersionedTransaction = 35, - ExecuteVersionedTransaction = 36, - RemoveVersionedTransaction = 37 -} - -export class CreateRealmArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CreateRealm; - configArgs: RealmConfigArgs; - name: string; - - constructor(args: { name: string; configArgs: RealmConfigArgs }) { - this.name = args.name; - this.configArgs = args.configArgs; - } -} - -export class DepositGoverningTokensArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.DepositGoverningTokens; - amount: BN; - - constructor(args: { amount: BN }) { - this.amount = args.amount; - } -} - -export class WithdrawGoverningTokensArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.WithdrawGoverningTokens; -} - -export class CreateGovernanceArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CreateGovernance; - config: GovernanceConfig; - - constructor(args: { config: GovernanceConfig }) { - this.config = args.config; - } -} - -export class CreateProgramGovernanceArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.CreateProgramGovernance; - config: GovernanceConfig; - transferUpgradeAuthority: boolean; - - constructor(args: { - config: GovernanceConfig; - transferUpgradeAuthority: boolean; - }) { - this.config = args.config; - this.transferUpgradeAuthority = !!args.transferUpgradeAuthority; - } -} - -export class CreateMintGovernanceArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.CreateMintGovernance; - config: GovernanceConfig; - transferMintAuthorities: boolean; - - constructor(args: { - config: GovernanceConfig; - transferMintAuthorities: boolean; - }) { - this.config = args.config; - this.transferMintAuthorities = !!args.transferMintAuthorities; - } -} - -export class CreateTokenGovernanceArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.CreateTokenGovernance; - config: GovernanceConfig; - transferTokenOwner: boolean; - - constructor(args: { config: GovernanceConfig; transferTokenOwner: boolean }) { - this.config = args.config; - this.transferTokenOwner = !!args.transferTokenOwner; - } -} - -export class SetGovernanceConfigArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.SetGovernanceConfig; - config: GovernanceConfig; - - constructor(args: { config: GovernanceConfig }) { - this.config = args.config; - } -} - -export class CreateProposalArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CreateProposal; - name: string; - descriptionLink: string; - - // V1 ----------------------------- - governingTokenMint: PublicKey; - // -------------------------------- - - // V2 ----------------------------- - voteType: VoteType; - options: string[]; - useDenyOption: boolean; - // -------------------------------- - - // V3 ----------------------------- - proposalSeed: PublicKey; - - constructor(args: { - name: string; - descriptionLink: string; - governingTokenMint: PublicKey; - voteType: VoteType; - options: string[]; - useDenyOption: boolean; - proposalSeed: PublicKey; - }) { - this.name = args.name; - this.descriptionLink = args.descriptionLink; - this.governingTokenMint = args.governingTokenMint; - this.voteType = args.voteType; - this.options = args.options; - this.useDenyOption = args.useDenyOption; - this.proposalSeed = args.proposalSeed; - } -} - -export class AddSignatoryArgs { - instruction: GovernanceInstruction = GovernanceInstruction.AddSignatory; - signatory: PublicKey; - - constructor(args: { signatory: PublicKey }) { - this.signatory = args.signatory; - } -} - -export class SignOffProposalArgs { - instruction: GovernanceInstruction = GovernanceInstruction.SignOffProposal; -} - -export class CancelProposalArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CancelProposal; -} - -export enum YesNoVote { - Yes, - No, -} - -export class VoteChoice { - rank: number; - weightPercentage: number; - - constructor(args: { rank: number; weightPercentage: number }) { - this.rank = args.rank; - this.weightPercentage = args.weightPercentage; - } -} - -export enum VoteKind { - Approve, - Deny, - Abstain, - Veto, -} - -export class Vote { - voteType: VoteKind; - approveChoices: VoteChoice[] | undefined; - deny: boolean | undefined; - veto: boolean | undefined; - - constructor(args: { - voteType: VoteKind; - approveChoices: VoteChoice[] | undefined; - deny: boolean | undefined; - veto: boolean | undefined; - }) { - this.voteType = args.voteType; - this.approveChoices = args.approveChoices; - this.deny = args.deny; - this.veto = args.veto; - } - - toYesNoVote() { - switch (this.voteType) { - case VoteKind.Deny: { - return YesNoVote.No; - } - case VoteKind.Approve: { - return YesNoVote.Yes; - } - } - } - - static fromYesNoVote(yesNoVote: YesNoVote) { - switch (yesNoVote) { - case YesNoVote.Yes: { - return new Vote({ - voteType: VoteKind.Approve, - approveChoices: [new VoteChoice({ rank: 0, weightPercentage: 100 })], - deny: undefined, - veto: undefined, - }); - } - case YesNoVote.No: { - return new Vote({ - voteType: VoteKind.Deny, - approveChoices: undefined, - deny: true, - veto: undefined, - }); - } - } - } -} - -export class CastVoteArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CastVote; - - // V1 - yesNoVote: YesNoVote | undefined; - - // V2 - vote: Vote | undefined; - - constructor(args: { - yesNoVote: YesNoVote | undefined; - vote: Vote | undefined; - }) { - this.yesNoVote = args.yesNoVote; - this.vote = args.vote; - } -} - -export class RelinquishVoteArgs { - instruction: GovernanceInstruction = GovernanceInstruction.RelinquishVote; -} - -export class FinalizeVoteArgs { - instruction: GovernanceInstruction = GovernanceInstruction.FinalizeVote; -} - -export class InsertTransactionArgs { - instruction: GovernanceInstruction = GovernanceInstruction.InsertTransaction; - index: number; - optionIndex: number; - holdUpTime: number; - - // V1 - instructionData: InstructionData | undefined; - - // V2 - instructions: InstructionData[] | undefined; - - constructor(args: { - index: number; - optionIndex: number; - holdUpTime: number; - // V1 - instructionData: InstructionData | undefined; - // V2 - instructions: InstructionData[] | undefined; - }) { - this.index = args.index; - this.optionIndex = args.optionIndex; - this.holdUpTime = args.holdUpTime; - // V1 - this.instructionData = args.instructionData; - // V2 - this.instructions = args.instructions; - } -} - -export class RemoveTransactionArgs { - instruction: GovernanceInstruction = GovernanceInstruction.RemoveTransaction; -} - -export class ExecuteTransactionArgs { - instruction: GovernanceInstruction = GovernanceInstruction.ExecuteTransaction; -} - -export class FlagTransactionErrorArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.FlagTransactionError; -} - -export enum SetRealmAuthorityAction { - SetUnchecked, - SetChecked, - Remove, -} - -export class SetRealmAuthorityArgs { - instruction: GovernanceInstruction = GovernanceInstruction.SetRealmAuthority; - - // V1 - newRealmAuthority: PublicKey | undefined; - - // V2 - action: SetRealmAuthorityAction | undefined; - - constructor(args: { - newRealmAuthority: PublicKey | undefined; - action: SetRealmAuthorityAction | undefined; - }) { - // V1 - this.newRealmAuthority = args.newRealmAuthority; - - // V2 - this.action = args.action; - } -} - -export class SetRealmConfigArgs { - instruction: GovernanceInstruction = GovernanceInstruction.SetRealmConfig; - configArgs: RealmConfigArgs; - - constructor(args: { configArgs: RealmConfigArgs }) { - this.configArgs = args.configArgs; - } -} - -export class CreateTokenOwnerRecordArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.CreateTokenOwnerRecord; -} - -export class UpdateProgramMetadataArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.UpdateProgramMetadata; -} - -export class CreateNativeTreasuryArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.CreateNativeTreasury; -} - -export class SetGovernanceDelegateArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.SetGovernanceDelegate; - - newGovernanceDelegate: PublicKey | undefined; - - constructor(args: { newGovernanceDelegate: PublicKey | undefined }) { - this.newGovernanceDelegate = args.newGovernanceDelegate; - } -} - -export class RevokeGoverningTokensArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.RevokeGoverningTokens; - amount: BN; - - constructor(args: { amount: BN }) { - this.amount = args.amount; - } -} - -export class RefundProposalDepositArgs { - instruction: GovernanceInstruction = - GovernanceInstruction.RefundProposalDeposit; -} - - -// Argument Classes -export class CreateTransactionBufferArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CreateTransactionBuffer; - bufferIndex: number; - finalBufferHash: Uint8Array; - finalBufferSize: number; - buffer: Uint8Array; - - constructor(args: { bufferIndex: number; finalBufferHash: Uint8Array; finalBufferSize: number; buffer: Uint8Array }) { - this.bufferIndex = args.bufferIndex; - this.finalBufferHash = args.finalBufferHash; - this.finalBufferSize = args.finalBufferSize; - this.buffer = args.buffer; - } -} - -export class ExtendTransactionBufferArgs { - instruction: GovernanceInstruction = GovernanceInstruction.ExtendTransactionBuffer; - bufferIndex: number; - buffer: Uint8Array; - - constructor(args: { bufferIndex: number; buffer: Uint8Array }) { - this.bufferIndex = args.bufferIndex; - this.buffer = args.buffer; - } -} - -export class CloseTransactionBufferArgs { - instruction: GovernanceInstruction = GovernanceInstruction.CloseTransactionBuffer; - bufferIndex: number; - - constructor(args: { bufferIndex: number }) { - this.bufferIndex = args.bufferIndex; - } -} - -export class InsertVersionedTransactionFromBufferArgs { - instruction: GovernanceInstruction = GovernanceInstruction.InsertVersionedTransactionFromBuffer; - optionIndex: number; - ephemeralSigners: number; - transactionIndex: number; - bufferIndex: number; - - constructor(args: { optionIndex: number; ephemeralSigners: number; transactionIndex: number; bufferIndex: number }) { - this.optionIndex = args.optionIndex; - this.ephemeralSigners = args.ephemeralSigners; - this.transactionIndex = args.transactionIndex; - this.bufferIndex = args.bufferIndex; - } -} - -export class InsertVersionedTransactionArgs { - instruction: GovernanceInstruction = GovernanceInstruction.InsertVersionedTransaction; - optionIndex: number; - ephemeralSigners: number; - transactionIndex: number; - transactionMessage: Uint8Array; - - constructor(args: { optionIndex: number; ephemeralSigners: number; transactionIndex: number; transactionMessage: Uint8Array }) { - this.optionIndex = args.optionIndex; - this.ephemeralSigners = args.ephemeralSigners; - this.transactionIndex = args.transactionIndex; - this.transactionMessage = args.transactionMessage; - } -} - -export class ExecuteVersionedTransactionArgs { - instruction: GovernanceInstruction = GovernanceInstruction.ExecuteVersionedTransaction; -} \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/serialisation.ts b/packages/governance-sdk/src/governance/serialisation.ts deleted file mode 100644 index 460b62c..0000000 --- a/packages/governance-sdk/src/governance/serialisation.ts +++ /dev/null @@ -1,1126 +0,0 @@ -import { TransactionInstruction } from '@solana/web3.js'; - -import { BinaryReader, BinaryWriter } from 'borsh'; -import { - AddSignatoryArgs, - CancelProposalArgs, - CastVoteArgs, - CloseTransactionBufferArgs, - CreateGovernanceArgs, - CreateMintGovernanceArgs, - CreateNativeTreasuryArgs, - CreateProgramGovernanceArgs, - CreateProposalArgs, - CreateRealmArgs, - CreateTokenGovernanceArgs, - CreateTokenOwnerRecordArgs, - CreateTransactionBufferArgs, - DepositGoverningTokensArgs, - ExecuteTransactionArgs, - ExecuteVersionedTransactionArgs, - ExtendTransactionBufferArgs, - FinalizeVoteArgs, - FlagTransactionErrorArgs, - InsertTransactionArgs, - InsertVersionedTransactionArgs, - InsertVersionedTransactionFromBufferArgs, - RefundProposalDepositArgs, - RelinquishVoteArgs, - RemoveTransactionArgs, - RevokeGoverningTokensArgs, - SetGovernanceConfigArgs, - SetGovernanceDelegateArgs, - SetRealmAuthorityArgs, - SetRealmConfigArgs, - SignOffProposalArgs, - UpdateProgramMetadataArgs, - Vote, - VoteChoice, - VoteKind, - WithdrawGoverningTokensArgs, -} from './instructions'; -import { - AccountMetaData, - RealmConfigArgs, - Governance, - GovernanceConfig, - InstructionData, - MintMaxVoteWeightSource, - Proposal, - ProposalTransaction, - Realm, - RealmConfig, - SignatoryRecord, - TokenOwnerRecord, - VoteRecord, - VoteThreshold, - VoteWeight, - RealmConfigAccount, - GovernanceAccountClass, - VoteType, - VoteTypeKind, - ProposalOption, - GovernanceAccountType, - getGovernanceAccountVersion, - ProgramMetadata, - VoteThresholdType, - GoverningTokenConfigArgs, - GoverningTokenConfig, - ProposalDeposit, - ProposalTransactionBuffer, - ProposalTransactionMessage, - ProposalCompiledInstruction, - VersionedTransactionMessageAddressTableLookup, - ProposalVersionedTransaction -} from './accounts'; -import { serialize } from 'borsh'; -import { BorshAccountParser } from '../core/serialisation'; -import { - ACCOUNT_VERSION_V1, - ACCOUNT_VERSION_V2, - PROGRAM_VERSION_V1, - PROGRAM_VERSION_V2, - PROGRAM_VERSION_V3, -} from '../registry/constants'; -import { deserializeBorsh } from '../tools/borsh'; - -// ------------ u16 ------------ - -// Temp. workaround to support u16. -(BinaryReader.prototype as any).readU16 = function () { - const reader = (this as unknown) as BinaryReader; - const value = reader.buf.readUInt16LE(reader.offset); - reader.offset += 2; - return value; -}; - -// Temp. workaround to support u16. -(BinaryWriter.prototype as any).writeU16 = function (value: number) { - const writer = (this as unknown) as BinaryWriter; - writer.maybeResize(); - writer.buf.writeUInt16LE(value, writer.length); - writer.length += 2; -}; - -// ------------ VoteType ------------ - -(BinaryReader.prototype as any).readVoteType = function () { - const reader = (this as unknown) as BinaryReader; - const value = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - - if (value === VoteTypeKind.SingleChoice) { - return VoteType.SINGLE_CHOICE; - } - - const choiceType = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - const minVoterOptions = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - const maxVoterOptions = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - const maxWinningOptions = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - - return VoteType.MULTI_CHOICE( - choiceType, - minVoterOptions, - maxVoterOptions, - maxWinningOptions, - ); -}; - -(BinaryWriter.prototype as any).writeVoteType = function (value: VoteType) { - const writer = (this as unknown) as BinaryWriter; - writer.maybeResize(); - writer.buf.writeUInt8(value.type, writer.length); - writer.length += 1; - - if (value.type === VoteTypeKind.MultiChoice) { - writer.buf.writeUInt8(value.choiceType!, writer.length); - writer.length += 1; - writer.buf.writeUInt8(value.minVoterOptions!, writer.length); - writer.length += 1; - writer.buf.writeUInt8(value.maxVoterOptions!, writer.length); - writer.length += 1; - writer.buf.writeUInt8(value.maxWinningOptions!, writer.length); - writer.length += 1; - } -}; - -// ------------ Vote ------------ - -(BinaryReader.prototype as any).readVote = function () { - const reader = (this as unknown) as BinaryReader; - const value = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - - if (value === VoteKind.Deny) { - return new Vote({ - voteType: value, - approveChoices: undefined, - deny: true, - veto: false, - }); - } - - if (value === VoteKind.Veto) { - return new Vote({ - voteType: value, - approveChoices: undefined, - deny: false, - veto: true, - }); - } - - let approveChoices: VoteChoice[] = []; - - reader.readArray(() => { - const rank = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - const weightPercentage = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - - approveChoices.push( - new VoteChoice({ rank: rank, weightPercentage: weightPercentage }), - ); - }); - - return new Vote({ - voteType: value, - approveChoices: approveChoices, - deny: undefined, - veto: undefined, - }); -}; - -(BinaryWriter.prototype as any).writeVote = function (value: Vote) { - const writer = (this as unknown) as BinaryWriter; - writer.maybeResize(); - writer.buf.writeUInt8(value.voteType, writer.length); - writer.length += 1; - - if (value.voteType === VoteKind.Approve) { - writer.writeArray(value.approveChoices as any[], (item: VoteChoice) => { - writer.buf.writeUInt8(item.rank, writer.length); - writer.length += 1; - writer.buf.writeUInt8(item.weightPercentage, writer.length); - writer.length += 1; - }); - } -}; - -// ------------ VoteThreshold ------------ - -(BinaryReader.prototype as any).readVoteThreshold = function () { - const reader = (this as unknown) as BinaryReader; - - // Read VoteThreshold and advance the reader by 1 - const type = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - - // Read VoteThresholds with u8 value - if ( - type === VoteThresholdType.YesVotePercentage || - type === VoteThresholdType.QuorumPercentage - ) { - const percentage = reader.buf.readUInt8(reader.offset); - reader.offset += 1; - return new VoteThreshold({ type: type, value: percentage }); - } - - // Read VoteThresholds without value - if (type === VoteThresholdType.Disabled) { - return new VoteThreshold({ type: type, value: undefined }); - } - - throw new Error(`VoteThresholdType ${type} is not supported`); -}; - -(BinaryWriter.prototype as any).writeVoteThreshold = function ( - value: VoteThreshold, -) { - const writer = (this as unknown) as BinaryWriter; - writer.maybeResize(); - writer.buf.writeUInt8(value.type, writer.length); - writer.length += 1; - - // Write value for VoteThresholds with u8 value - if ( - value.type === VoteThresholdType.YesVotePercentage || - value.type === VoteThresholdType.QuorumPercentage - ) { - writer.buf.writeUInt8(value.value!, writer.length); - writer.length += 1; - } -}; - -// Serializes sdk instruction into InstructionData and encodes it as base64 which then can be entered into the UI form -export const serializeInstructionToBase64 = ( - instruction: TransactionInstruction, -) => { - let data = createInstructionData(instruction); - - return Buffer.from( - serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V1, data), - ).toString('base64'); -}; - -// Converts TransactionInstruction to InstructionData format -export const createInstructionData = (instruction: TransactionInstruction) => { - return new InstructionData({ - programId: instruction.programId, - data: instruction.data, - accounts: instruction.keys.map( - k => - new AccountMetaData({ - pubkey: k.pubkey, - isSigner: k.isSigner, - isWritable: k.isWritable, - }), - ), - }); -}; - -// Instruction schemas -export const GOVERNANCE_INSTRUCTION_SCHEMA_V1 = createGovernanceInstructionSchema( - 1, -); -export const GOVERNANCE_INSTRUCTION_SCHEMA_V2 = createGovernanceInstructionSchema( - 2, -); -export const GOVERNANCE_INSTRUCTION_SCHEMA_V3 = createGovernanceInstructionSchema( - 3, -); - -export function getGovernanceInstructionSchema(programVersion: number) { - switch (programVersion) { - case 1: - return GOVERNANCE_INSTRUCTION_SCHEMA_V1; - case 2: - return GOVERNANCE_INSTRUCTION_SCHEMA_V2; - case 3: - return GOVERNANCE_INSTRUCTION_SCHEMA_V3; - default: - throw new Error( - `Account schema for program version: ${programVersion} doesn't exist`, - ); - } -} - -/// Creates serialisation schema for spl-gov structs used for instructions and accounts -function createGovernanceStructSchema( - programVersion: number | undefined, - accountVersion: number | undefined, -) { - return new Map([ - [ - VoteChoice, - { - kind: 'struct', - fields: [ - ['rank', 'u8'], - ['weightPercentage', 'u8'], - ], - }, - ], - [ - InstructionData, - { - kind: 'struct', - fields: [ - ['programId', 'pubkey'], - ['accounts', [AccountMetaData]], - ['data', ['u8']], - ], - }, - ], - [ - AccountMetaData, - { - kind: 'struct', - fields: [ - ['pubkey', 'pubkey'], - ['isSigner', 'u8'], - ['isWritable', 'u8'], - ], - }, - ], - [ - MintMaxVoteWeightSource, - { - kind: 'struct', - fields: [ - ['type', 'u8'], - ['value', 'u64'], - ], - }, - ], - [ - GovernanceConfig, - { - kind: 'struct', - fields: [ - ['communityVoteThreshold', 'VoteThreshold'], - ['minCommunityTokensToCreateProposal', 'u64'], - ['minInstructionHoldUpTime', 'u32'], - ['baseVotingTime', 'u32'], - ['communityVoteTipping', 'u8'], - ['councilVoteThreshold', 'VoteThreshold'], - ['councilVetoVoteThreshold', 'VoteThreshold'], - ['minCouncilTokensToCreateProposal', 'u64'], - // Pass the extra fields to instruction if programVersion >= 3 - // The additional fields can't be passed to instructions for programVersion <= 2 because they were added in V3 - // and would override the transferAuthority param which follows it - ...((programVersion && programVersion >= PROGRAM_VERSION_V3) || - // The account layout is backward compatible and we can read the extra fields for accountVersion >= 2 - (accountVersion && accountVersion >= ACCOUNT_VERSION_V2) - ? [ - ['councilVoteTipping', 'u8'], - ['communityVetoVoteThreshold', 'VoteThreshold'], - ['votingCoolOffTime', 'u32'], - ['depositExemptProposalCount', 'u8'], - ] - : []), - ], - }, - ], - ]); -} - -/// Creates serialisation schema for spl-gov instructions for the given program version number -function createGovernanceInstructionSchema(programVersion: number) { - return new Map([ - [ - RealmConfigArgs, - { - kind: 'struct', - fields: [ - ['useCouncilMint', 'u8'], - ['minCommunityTokensToCreateGovernance', 'u64'], - ['communityMintMaxVoteWeightSource', MintMaxVoteWeightSource], - // V1 of the program used restrictive instruction deserialisation which didn't allow additional data - ...(programVersion == PROGRAM_VERSION_V2 - ? [ - ['useCommunityVoterWeightAddin', 'u8'], - ['useMaxCommunityVoterWeightAddin', 'u8'], - ] - : programVersion >= PROGRAM_VERSION_V3 - ? [ - ['communityTokenConfigArgs', GoverningTokenConfigArgs], - ['councilTokenConfigArgs', GoverningTokenConfigArgs], - ] - : []), - ], - }, - ], - [ - CreateRealmArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['name', 'string'], - ['configArgs', RealmConfigArgs], - ], - }, - ], - [ - GoverningTokenConfigArgs, - { - kind: 'struct', - fields: [ - ['useVoterWeightAddin', 'u8'], - ['useMaxVoterWeightAddin', 'u8'], - ['tokenType', 'u8'], - ], - }, - ], - [ - DepositGoverningTokensArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - // V1 of the program used restrictive instruction deserialisation which didn't allow additional data - programVersion >= PROGRAM_VERSION_V2 ? ['amount', 'u64'] : undefined, - ].filter(Boolean), - }, - ], - [ - RevokeGoverningTokensArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['amount', 'u64'], - ], - }, - ], - [ - WithdrawGoverningTokensArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - SetGovernanceDelegateArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['newGovernanceDelegate', { kind: 'option', type: 'pubkey' }], - ], - }, - ], - [ - CreateGovernanceArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['config', GovernanceConfig], - ], - }, - ], - [ - CreateProgramGovernanceArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['config', GovernanceConfig], - ['transferUpgradeAuthority', 'u8'], - ], - }, - ], - [ - CreateMintGovernanceArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['config', GovernanceConfig], - ['transferMintAuthorities', 'u8'], - ], - }, - ], - [ - CreateTokenGovernanceArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['config', GovernanceConfig], - ['transferTokenOwner', 'u8'], - ], - }, - ], - [ - SetGovernanceConfigArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['config', GovernanceConfig], - ], - }, - ], - [ - CreateProposalArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['name', 'string'], - ['descriptionLink', 'string'], - - ...(programVersion === PROGRAM_VERSION_V1 - ? [['governingTokenMint', 'pubkey']] - : [ - ['voteType', 'voteType'], - ['options', ['string']], - ['useDenyOption', 'u8'], - ]), - - programVersion >= PROGRAM_VERSION_V3 - ? ['proposalSeed', 'pubkey'] - : undefined, - ].filter(Boolean), - }, - ], - [ - AddSignatoryArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['signatory', 'pubkey'], - ], - }, - ], - [ - SignOffProposalArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - CancelProposalArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - RelinquishVoteArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - FinalizeVoteArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - CastVoteArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - programVersion === PROGRAM_VERSION_V1 - ? ['yesNoVote', 'u8'] - : ['vote', 'vote'], - ], - }, - ], - [ - InsertTransactionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - programVersion >= PROGRAM_VERSION_V2 - ? ['optionIndex', 'u8'] - : undefined, - ['index', 'u16'], - ['holdUpTime', 'u32'], - - programVersion >= PROGRAM_VERSION_V2 - ? ['instructions', [InstructionData]] - : ['instructionData', InstructionData], - ].filter(Boolean), - }, - ], - [ - RemoveTransactionArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - ExecuteTransactionArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - FlagTransactionErrorArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - SetRealmAuthorityArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ...(programVersion === PROGRAM_VERSION_V1 - ? [['newRealmAuthority', { kind: 'option', type: 'pubkey' }]] - : [['action', 'u8']]), - ], - }, - ], - [ - SetRealmConfigArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['configArgs', RealmConfigArgs], - ], - }, - ], - [ - CreateTokenOwnerRecordArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - UpdateProgramMetadataArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - CreateNativeTreasuryArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - RefundProposalDepositArgs, - { - kind: 'struct', - fields: [['instruction', 'u8']], - }, - ], - [ - CreateTransactionBufferArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['bufferIndex', 'u8'], - ['finalBufferHash', [32]], // 32-byte array - ['finalBufferSize', 'u16'], - ['buffer', ['u8']], // Vector of bytes - ], - }, - ], - [ - ExtendTransactionBufferArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['bufferIndex', 'u8'], - ['buffer', ['u8']], // Vector of bytes - ], - }, - ], - [ - CloseTransactionBufferArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['bufferIndex', 'u8'], - ], - }, - ], - [ - InsertVersionedTransactionFromBufferArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['optionIndex', 'u8'], - ['ephemeralSigners', 'u8'], - ['transactionIndex', 'u16'], - ['bufferIndex', 'u8'], - ], - }, - ], - [ - InsertVersionedTransactionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ['optionIndex', 'u8'], - ['ephemeralSigners', 'u8'], - ['transactionIndex', 'u16'], - ['transactionMessage', ['u8']], // Vector of bytes - ], - }, - ], - [ - ExecuteVersionedTransactionArgs, - { - kind: 'struct', - fields: [ - ['instruction', 'u8'], - ], - }, - ], - ...createGovernanceStructSchema(programVersion, undefined), - ]); -} - -// Accounts schemas -export const GOVERNANCE_ACCOUNT_SCHEMA_V1 = createGovernanceAccountSchema(1); -export const GOVERNANCE_ACCOUNT_SCHEMA_V2 = createGovernanceAccountSchema(2); - -export function getGovernanceAccountSchema(accountVersion: number) { - switch (accountVersion) { - case 1: - return GOVERNANCE_ACCOUNT_SCHEMA_V1; - case 2: - return GOVERNANCE_ACCOUNT_SCHEMA_V2; - default: - throw new Error( - `Account schema for account version: ${accountVersion} doesn't exist`, - ); - } -} - -/// Creates serialisation schema for spl-gov accounts for the given account version number -function createGovernanceAccountSchema(accountVersion: number) { - return new Map([ - [ - RealmConfig, - { - kind: 'struct', - fields: [ - ['useCommunityVoterWeightAddin', 'u8'], - ['useMaxCommunityVoterWeightAddin', 'u8'], - ['reserved', [6]], - ['minCommunityTokensToCreateGovernance', 'u64'], - ['communityMintMaxVoteWeightSource', MintMaxVoteWeightSource], - ['councilMint', { kind: 'option', type: 'pubkey' }], - ], - }, - ], - [ - Realm, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['communityMint', 'pubkey'], - ['config', RealmConfig], - ['reserved', [6]], - ['votingProposalCount', 'u16'], - ['authority', { kind: 'option', type: 'pubkey' }], - ['name', 'string'], - ], - }, - ], - [ - RealmConfigAccount, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['realm', 'pubkey'], - ['communityTokenConfig', GoverningTokenConfig], - ['councilTokenConfig', GoverningTokenConfig], - ['reserved', [110]], - ], - }, - ], - [ - GoverningTokenConfig, - { - kind: 'struct', - fields: [ - ['voterWeightAddin', { kind: 'option', type: 'pubkey' }], - ['maxVoterWeightAddin', { kind: 'option', type: 'pubkey' }], - ['tokenType', 'u8'], - ['reserved', [8]], - ], - }, - ], - [ - Governance, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['realm', 'pubkey'], - ['governedAccount', 'pubkey'], - ['proposalCount', 'u32'], - ['config', GovernanceConfig], - ...(accountVersion >= ACCOUNT_VERSION_V2 - ? [ - ['reserved', [120]], - ['activeProposalCount', 'u64'], - ] - : []), - ], - }, - ], - [ - TokenOwnerRecord, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['realm', 'pubkey'], - ['governingTokenMint', 'pubkey'], - ['governingTokenOwner', 'pubkey'], - ['governingTokenDepositAmount', 'u64'], - // unrelinquishedVotesCount is u64 in V3 but for backward compatibility the sdk reads it as u32 - ['unrelinquishedVotesCount', 'u32'], - ['totalVotesCount', 'u32'], - ['outstandingProposalCount', 'u8'], - ['version', 'u8'], - ['reserved', [6]], - ['governanceDelegate', { kind: 'option', type: 'pubkey' }], - ], - }, - ], - [ - ProposalOption, - { - kind: 'struct', - fields: [ - ['label', 'string'], - ['voteWeight', 'u64'], - ['voteResult', 'u8'], - ['instructionsExecutedCount', 'u16'], - ['instructionsCount', 'u16'], - ['instructionsNextIndex', 'u16'], - ], - }, - ], - [ - Proposal, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['governance', 'pubkey'], - ['governingTokenMint', 'pubkey'], - ['state', 'u8'], - ['tokenOwnerRecord', 'pubkey'], - ['signatoriesCount', 'u8'], - ['signatoriesSignedOffCount', 'u8'], - - ...(accountVersion === ACCOUNT_VERSION_V1 - ? [ - ['yesVotesCount', 'u64'], - ['noVotesCount', 'u64'], - ['instructionsExecutedCount', 'u16'], - ['instructionsCount', 'u16'], - ['instructionsNextIndex', 'u16'], - ] - : [ - ['voteType', 'voteType'], - ['options', [ProposalOption]], - ['denyVoteWeight', { kind: 'option', type: 'u64' }], - ['reserved1', 'u8'], - ['abstainVoteWeight', { kind: 'option', type: 'u64' }], - ['startVotingAt', { kind: 'option', type: 'u64' }], - ]), - - ['draftAt', 'u64'], - ['signingOffAt', { kind: 'option', type: 'u64' }], - ['votingAt', { kind: 'option', type: 'u64' }], - ['votingAtSlot', { kind: 'option', type: 'u64' }], - ['votingCompletedAt', { kind: 'option', type: 'u64' }], - ['executingAt', { kind: 'option', type: 'u64' }], - ['closedAt', { kind: 'option', type: 'u64' }], - ['executionFlags', 'u8'], - ['maxVoteWeight', { kind: 'option', type: 'u64' }], - - ...(accountVersion === ACCOUNT_VERSION_V1 - ? [] - : [['maxVotingTime', { kind: 'option', type: 'u32' }]]), - - ['voteThreshold', { kind: 'option', type: 'VoteThreshold' }], - - ...(accountVersion === ACCOUNT_VERSION_V1 - ? [] - : [['reserved', [64]]]), - - ['name', 'string'], - ['descriptionLink', 'string'], - - ...(accountVersion === ACCOUNT_VERSION_V1 - ? [] - : [['vetoVoteWeight', 'u64']]), - ], - }, - ], - [ - ProposalDeposit, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['depositPayer', 'pubkey'], - ], - }, - ], - [ - SignatoryRecord, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['signatory', 'pubkey'], - ['signedOff', 'u8'], - ], - }, - ], - [ - VoteWeight, - { - kind: 'enum', - values: [ - ['yes', 'u64'], - ['no', 'u64'], - ], - }, - ], - [ - VoteRecord, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['governingTokenOwner', 'pubkey'], - ['isRelinquished', 'u8'], - - ...(accountVersion === ACCOUNT_VERSION_V1 - ? [['voteWeight', VoteWeight]] - : [ - ['voterWeight', 'u64'], - ['vote', 'vote'], - ]), - ], - }, - ], - [ - ProposalTransaction, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - accountVersion >= ACCOUNT_VERSION_V2 - ? ['optionIndex', 'u8'] - : undefined, - ['instructionIndex', 'u16'], - ['holdUpTime', 'u32'], - accountVersion >= ACCOUNT_VERSION_V2 - ? ['instructions', [InstructionData]] - : ['instruction', InstructionData], - ['executedAt', { kind: 'option', type: 'u64' }], - ['executionStatus', 'u8'], - ].filter(Boolean), - }, - ], - [ - ProgramMetadata, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['updatedAt', 'u64'], - ['version', 'string'], - ['reserved', [64]], - ], - }, - ],[ - ProposalTransactionBuffer, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['creator', 'pubkey'], - ['bufferIndex', 'u8'], - ['finalBufferHash', [32]], - ['finalBufferSize', 'u16'], - ['buffer', ['u8']] - ], - }, - ], - [ - ProposalCompiledInstruction, - { - kind: 'struct', - fields: [ - ['programIdIndex', 'u8'], - ['accountIndexes', ['u8']], // Vector of u8 - ['data', ['u8']], // Vector of u8 (Uint8Array) - ], - }, - ], - [ - VersionedTransactionMessageAddressTableLookup, - { - kind: 'struct', - fields: [ - ['accountKey', 'pubkey'], - ['writableIndexes', ['u8']], // Vector of u8 - ['readonlyIndexes', ['u8']], // Vector of u8 - ], - }, - ], - [ - ProposalTransactionMessage, - { - kind: 'struct', - fields: [ - ['numSigners', 'u8'], - ['numWritableSigners', 'u8'], - ['numWritableNonSigners', 'u8'], - ['accountKeys', ['pubkey']], // Vector of pubkeys - ['instructions', [ProposalCompiledInstruction]], // Vector of instructions - ['addressTableLookups', [VersionedTransactionMessageAddressTableLookup]], // Vector of lookups - ], - }, - ], - [ - ProposalVersionedTransaction, - { - kind: 'struct', - fields: [ - ['accountType', 'u8'], - ['proposal', 'pubkey'], - ['optionIndex', 'u8'], - ['transactionIndex', 'u16'], - ['executionIndex', 'u8'], - ['executedAt', { kind: 'option', type: 'u64' }], // Using option for null possibility - ['executionStatus', 'u8'], // Using u8 to match enum pattern - ['ephemeralSignerBumps', ['u8']], // Vector of u8 - ['message', ProposalTransactionMessage], - ], - }, - ], - ...createGovernanceStructSchema(undefined, accountVersion), - ]); -} - -export function getGovernanceSchemaForAccount( - accountType: GovernanceAccountType, -) { - return getGovernanceAccountSchema(getGovernanceAccountVersion(accountType)); -} - -export const GovernanceAccountParser = (classType: GovernanceAccountClass) => - BorshAccountParser(classType, (accountType: GovernanceAccountType) => - getGovernanceSchemaForAccount(accountType), - ); - -export function getInstructionDataFromBase64(instructionDataBase64: string) { - const instructionDataBin = Buffer.from(instructionDataBase64, 'base64'); - const instructionData: InstructionData = deserializeBorsh( - GOVERNANCE_INSTRUCTION_SCHEMA_V1, - InstructionData, - instructionDataBin, - ); - - return instructionData; -} diff --git a/packages/governance-sdk/src/governance/tools.ts b/packages/governance-sdk/src/governance/tools.ts deleted file mode 100644 index 7c187e3..0000000 --- a/packages/governance-sdk/src/governance/tools.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { AccountMeta, PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import { PROGRAM_VERSION_V2, PROGRAM_VERSION_V3 } from '../registry/constants'; -import { - getRealmConfigAddress, - GoverningTokenConfigAccountArgs, - GoverningTokenConfigArgs, - GoverningTokenType, - MintMaxVoteWeightSource, - RealmConfigArgs, -} from './accounts'; -import { GoverningTokenRole } from './enums'; - -function assertValidTokenConfigArgs( - programVersion: number, - tokenConfigArgs: GoverningTokenConfigAccountArgs | undefined, - tokenKind: GoverningTokenRole, -) { - if (tokenConfigArgs) { - if (programVersion < PROGRAM_VERSION_V2) { - throw new Error( - `Governing token config is not supported in version ${programVersion}`, - ); - } else if (programVersion == PROGRAM_VERSION_V2) { - if (tokenKind == GoverningTokenRole.Council) { - throw new Error( - `Council token config is not supported in version ${programVersion}`, - ); - } - - if (tokenConfigArgs.tokenType != GoverningTokenType.Liquid) { - throw new Error( - `Community token type ${tokenConfigArgs.tokenType} is not supported in veriosn ${programVersion}`, - ); - } - } - } -} - -export function createRealmConfigArgs( - programVersion: number, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityWeightToCreateGovernance: BN, - communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, - councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, -) { - assertValidTokenConfigArgs( - programVersion, - communityTokenConfig, - GoverningTokenRole.Community, - ); - assertValidTokenConfigArgs( - programVersion, - councilTokenConfig, - GoverningTokenRole.Council, - ); - - return new RealmConfigArgs({ - useCouncilMint: councilMint !== undefined, - minCommunityTokensToCreateGovernance: minCommunityWeightToCreateGovernance, - communityMintMaxVoteWeightSource, - - // VERSION == 2 - useCommunityVoterWeightAddin: - communityTokenConfig?.voterWeightAddin !== undefined, - useMaxCommunityVoterWeightAddin: - communityTokenConfig?.maxVoterWeightAddin !== undefined, - - // VERSION >= 3 - communityTokenConfigArgs: new GoverningTokenConfigArgs({ - useVoterWeightAddin: communityTokenConfig?.voterWeightAddin !== undefined, - useMaxVoterWeightAddin: - communityTokenConfig?.maxVoterWeightAddin !== undefined, - tokenType: communityTokenConfig?.tokenType ?? GoverningTokenType.Liquid, - }), - councilTokenConfigArgs: new GoverningTokenConfigArgs({ - useVoterWeightAddin: councilTokenConfig?.voterWeightAddin !== undefined, - useMaxVoterWeightAddin: - councilTokenConfig?.maxVoterWeightAddin !== undefined, - tokenType: councilTokenConfig?.tokenType ?? GoverningTokenType.Liquid, - }), - }); -} - -export function withTokenConfigAccounts( - keys: Array, - communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, - councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, -) { - if (communityTokenConfig?.voterWeightAddin) { - keys.push({ - pubkey: communityTokenConfig.voterWeightAddin, - isWritable: false, - isSigner: false, - }); - } - - if (communityTokenConfig?.maxVoterWeightAddin) { - keys.push({ - pubkey: communityTokenConfig.maxVoterWeightAddin, - isWritable: false, - isSigner: false, - }); - } - - if (councilTokenConfig?.voterWeightAddin) { - keys.push({ - pubkey: councilTokenConfig.voterWeightAddin, - isWritable: false, - isSigner: false, - }); - } - - if (councilTokenConfig?.maxVoterWeightAddin) { - keys.push({ - pubkey: councilTokenConfig.maxVoterWeightAddin, - isWritable: false, - isSigner: false, - }); - } -} - -export async function withV3RealmConfigAccount( - keys: Array, - programId: PublicKey, - programVersion: number, - realm: PublicKey, -) { - if (programVersion >= PROGRAM_VERSION_V3) { - const realmConfigMeta = { - pubkey: await getRealmConfigAddress(programId, realm), - isSigner: false, - isWritable: true, - }; - - keys.push(realmConfigMeta); - } -} diff --git a/packages/governance-sdk/src/governance/version.ts b/packages/governance-sdk/src/governance/version.ts deleted file mode 100644 index 97b506f..0000000 --- a/packages/governance-sdk/src/governance/version.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { - Connection, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js'; -import BN from 'bn.js'; -import { - PROGRAM_VERSION, - PROGRAM_VERSION_V1, - PROGRAM_VERSION_V2, -} from '../registry/constants'; -import { BN_ZERO } from '../tools/numbers'; -import { getProgramDataAccount } from '../tools/sdk/bpfUpgradeableLoader'; -import { ProgramAccount, simulateTransaction } from '../tools/sdk/runtime'; -import { parseVersion } from '../tools/version'; -import { getProgramMetadataAddress, ProgramMetadata } from './accounts'; -import { GovernanceAccountParser } from './serialisation'; -import { withUpdateProgramMetadata } from './withUpdateProgramMetadata'; - -export async function getGovernanceProgramVersion( - connection: Connection, - programId: PublicKey, - env?: string, -) { - // Try get program metadata - const programMetadataPk = await getProgramMetadataAddress(programId); - - try { - const programMetadataInfo = await connection.getAccountInfo( - programMetadataPk, - ); - - // If ProgramMetadata exists then use it to get latest updated version - if (programMetadataInfo) { - const programMetadata = GovernanceAccountParser(ProgramMetadata)( - programMetadataPk, - programMetadataInfo, - ) as ProgramAccount; - - let deploySlot = BN_ZERO; - - try { - const programData = await getProgramDataAccount( - connection, - new PublicKey(programId), - ); - deploySlot = new BN(programData.slot); - } catch { - // If the program is not upgradable for example on localnet then there is no ProgramData account - // and Metadata must be more recent - } - - // Check if ProgramMetadata is not stale - if (programMetadata.account.updatedAt.gte(deploySlot)) { - const version = parseVersion(programMetadata.account.version); - console.log('Program version (metadata)', version); - return version.major; - } - } - } catch { - // nop, let's try simulation - } - - try { - // If we don't have the programMetadata info then simulate UpdateProgramMetadata - let instructions: TransactionInstruction[] = []; - // The wallet can be any existing account for the simulation - // Note: when running a local validator ensure the account is copied from devnet: --clone ENmcpFCpxN1CqyUjuog9yyUVfdXBKF3LVCwLr7grJZpk -ud - let walletPk = new PublicKey( - 'ENmcpFCpxN1CqyUjuog9yyUVfdXBKF3LVCwLr7grJZpk', - ); - - await withUpdateProgramMetadata(instructions, programId, 2, walletPk); - - const transaction = new Transaction({ feePayer: walletPk }); - transaction.add(...instructions); - - // TODO: Once return values are supported change the simulation call to the actual one - const getVersion = await connection.simulateTransaction( - transaction, - ); - - if (getVersion.value.logs) { - const prefix = 'PROGRAM-VERSION:"'; - - const simVersion = getVersion.value.logs - .filter(l => l.includes(prefix)) - .map(l => { - const versionStart = l.indexOf(prefix); - - return parseVersion( - l.substring(versionStart + prefix.length, l.length - 1), - ); - })[0]; - - if (simVersion) { - console.log('Program version (simulation)', simVersion); - return simVersion.major; - } - } - } catch (ex) { - console.log("Can't determine program version", ex); - } - - // If we can't determine the version using the program instance and running localnet then use the latest version - if (env === 'localnet') { - return PROGRAM_VERSION; - } - - // Default to V1 which doesn't support ProgramMetadata - console.log('Program version (default)', PROGRAM_VERSION_V1); - return PROGRAM_VERSION_V1; -} diff --git a/packages/governance-sdk/src/governance/withAddSignatory.ts b/packages/governance-sdk/src/governance/withAddSignatory.ts deleted file mode 100644 index 5d49deb..0000000 --- a/packages/governance-sdk/src/governance/withAddSignatory.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { AddSignatoryArgs } from './instructions'; -import { getSignatoryRecordAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withAddSignatory = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - signatory: PublicKey, - payer: PublicKey, -) => { - const args = new AddSignatoryArgs({ signatory }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const signatoryRecordAddress = await getSignatoryRecordAddress( - programId, - proposal, - signatory, - ); - - const keys = [ - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: signatoryRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return signatoryRecordAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCancelProposal.ts b/packages/governance-sdk/src/governance/withCancelProposal.ts deleted file mode 100644 index 2396e96..0000000 --- a/packages/governance-sdk/src/governance/withCancelProposal.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - AccountMeta, - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CancelProposalArgs } from './instructions'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withCancelProposal = ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - proposalOwnerRecord: PublicKey, - governanceAuthority: PublicKey, -) => { - const args = new CancelProposalArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let keys: AccountMeta[] = []; - - if (programVersion > PROGRAM_VERSION_V1) { - keys.push( - { - pubkey: realm, - isWritable: true, - isSigner: false, - }, - { - pubkey: governance, - isWritable: true, - isSigner: false, - }, - ); - } - - keys.push( - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: proposalOwnerRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - ); - - if (programVersion == PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withCastVote.ts b/packages/governance-sdk/src/governance/withCastVote.ts deleted file mode 100644 index fd05c9b..0000000 --- a/packages/governance-sdk/src/governance/withCastVote.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CastVoteArgs, Vote } from './instructions'; -import { getVoteRecordAddress } from './accounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; - -export const withCastVote = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - proposalOwnerRecord: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - voteGoverningTokenMint: PublicKey, - vote: Vote, - payer: PublicKey, - voterWeightRecord?: PublicKey, - maxVoterWeightRecord?: PublicKey, -) => { - const args = new CastVoteArgs( - programVersion === PROGRAM_VERSION_V1 - ? { yesNoVote: vote.toYesNoVote(), vote: undefined } - : { yesNoVote: undefined, vote: vote }, - ); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const voteRecordAddress = await getVoteRecordAddress( - programId, - proposal, - tokenOwnerRecord, - ); - - const [realmIsWritable, governanceIsWritable] = - programVersion === PROGRAM_VERSION_V1 ? [false, false] : [true, true]; - - const keys = [ - { - pubkey: realm, - isWritable: realmIsWritable, - isSigner: false, - }, - { - pubkey: governance, - isWritable: governanceIsWritable, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: proposalOwnerRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: voteRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: voteGoverningTokenMint, - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push( - { - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }, - ); - } - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - maxVoterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return voteRecordAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts b/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts deleted file mode 100644 index 5a38f0d..0000000 --- a/packages/governance-sdk/src/governance/withCloseTransactionBuffer.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { CloseTransactionBufferArgs } from './instructions'; -import { getProposalTransactionBufferAddress } from './accounts'; - -export const withCloseTransactionBuffer = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - beneficiary: PublicKey, - bufferIndex: number, -) => { - const args = new CloseTransactionBufferArgs({ bufferIndex }); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - - const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( - programId, - proposal, - beneficiary, - bufferIndex, - ); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: true, isSigner: false }, - { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, - { pubkey: governanceAuthority, isWritable: false, isSigner: true }, - { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, - { pubkey: beneficiary, isWritable: true, isSigner: true }, - ]; - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalTransactionBufferAddress; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withCreateGovernance.ts b/packages/governance-sdk/src/governance/withCreateGovernance.ts deleted file mode 100644 index 5ef87c4..0000000 --- a/packages/governance-sdk/src/governance/withCreateGovernance.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - Keypair, - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { GovernanceConfig } from './accounts'; -import { CreateGovernanceArgs } from './instructions'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withCreateGovernance = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governedAccount: PublicKey | undefined, - config: GovernanceConfig, - tokenOwnerRecord: PublicKey, - payer: PublicKey, - createAuthority: PublicKey, - voterWeightRecord?: PublicKey, -) => { - const args = new CreateGovernanceArgs({ config }); - - if (args.config.baseVotingTime < 3600) { - throw new Error('baseVotingTime should be at least 1 hour'); - } - - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - governedAccount = governedAccount ?? new Keypair().publicKey; - - const [governanceAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('account-governance'), - realm.toBuffer(), - governedAccount.toBuffer(), - ], - programId, - ); - - let keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governedAccount, - isWritable: false, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - keys.push({ - pubkey: createAuthority, - isWritable: false, - isSigner: true, - }); - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return governanceAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateMintGovernance.ts b/packages/governance-sdk/src/governance/withCreateMintGovernance.ts deleted file mode 100644 index f32162d..0000000 --- a/packages/governance-sdk/src/governance/withCreateMintGovernance.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { GovernanceConfig } from './accounts'; -import { CreateMintGovernanceArgs } from './instructions'; -import { TOKEN_PROGRAM_ID } from '../tools/sdk/splToken'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -/** @deprecated */ -export const withCreateMintGovernance = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governedMint: PublicKey, - config: GovernanceConfig, - transferMintAuthorities: boolean, - mintAuthority: PublicKey, - tokenOwnerRecord: PublicKey, - payer: PublicKey, - governanceAuthority: PublicKey, - voterWeightRecord?: PublicKey, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const args = new CreateMintGovernanceArgs({ - config, - transferMintAuthorities: transferMintAuthorities, - }); - - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [governanceAddress] = await PublicKey.findProgramAddress( - [Buffer.from('mint-governance'), realm.toBuffer(), governedMint.toBuffer()], - programId, - ); - - const keys = [ - { - pubkey: realm, // 0 - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAddress, // 1 - isWritable: true, - isSigner: false, - }, - { - pubkey: governedMint, // 2 - isWritable: true, - isSigner: false, - }, - { - pubkey: mintAuthority, // 3 - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecord, // 4 - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, // 5 - isWritable: true, - isSigner: true, - }, - { - pubkey: tokenProgram, // 6 - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSTEM_PROGRAM_ID, // 7 - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - keys.push({ - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }); - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return governanceAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateNativeTreasury.ts b/packages/governance-sdk/src/governance/withCreateNativeTreasury.ts deleted file mode 100644 index af9628c..0000000 --- a/packages/governance-sdk/src/governance/withCreateNativeTreasury.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CreateNativeTreasuryArgs } from './instructions'; -import { getNativeTreasuryAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; - -export const withCreateNativeTreasury = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - governancePk: PublicKey, - payer: PublicKey, -) => { - const args = new CreateNativeTreasuryArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const nativeTreasuryAddress = await getNativeTreasuryAddress( - programId, - governancePk, - ); - - const keys = [ - { - pubkey: governancePk, - isWritable: false, - isSigner: false, - }, - { - pubkey: nativeTreasuryAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return nativeTreasuryAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateProgramGovernance.ts b/packages/governance-sdk/src/governance/withCreateProgramGovernance.ts deleted file mode 100644 index 512229c..0000000 --- a/packages/governance-sdk/src/governance/withCreateProgramGovernance.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { GovernanceConfig } from './accounts'; -import { CreateProgramGovernanceArgs } from './instructions'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { BPF_UPGRADE_LOADER_ID } from '../tools/sdk/bpfUpgradeableLoader'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -/** @deprecated */ -export const withCreateProgramGovernance = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governedProgram: PublicKey, - config: GovernanceConfig, - transferUpgradeAuthority: boolean, - programUpgradeAuthority: PublicKey, - tokenOwnerRecord: PublicKey, - payer: PublicKey, - governanceAuthority: PublicKey, - voterWeightRecord?: PublicKey, -) => { - const args = new CreateProgramGovernanceArgs({ - config, - transferUpgradeAuthority, - }); - - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [governanceAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('program-governance'), - realm.toBuffer(), - governedProgram.toBuffer(), - ], - programId, - ); - - const [programDataAddress] = await PublicKey.findProgramAddress( - [governedProgram.toBuffer()], - BPF_UPGRADE_LOADER_ID, - ); - - const keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governedProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: programDataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: programUpgradeAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: BPF_UPGRADE_LOADER_ID, - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - keys.push({ - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }); - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return governanceAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateProposal.ts b/packages/governance-sdk/src/governance/withCreateProposal.ts deleted file mode 100644 index 85a0b12..0000000 --- a/packages/governance-sdk/src/governance/withCreateProposal.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { - Keypair, - PublicKey, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CreateProposalArgs } from './instructions'; -import { - getProposalDepositAddress, - getRealmConfigAddress, - GOVERNANCE_PROGRAM_SEED, - VoteType, -} from './accounts'; -import { - PROGRAM_VERSION_V1, - PROGRAM_VERSION_V2, - PROGRAM_VERSION_V3, -} from '../registry/constants'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; - -export const withCreateProposal = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - tokenOwnerRecord: PublicKey, - name: string, - descriptionLink: string, - governingTokenMint: PublicKey, - governanceAuthority: PublicKey, - // Proposal index is not used from V3 - proposalIndex: number | undefined, - voteType: VoteType, - options: string[], - useDenyOption: boolean, - payer: PublicKey, - voterWeightRecord?: PublicKey, - proposalSeed?: PublicKey -) => { - const optionalProposalSeed = proposalSeed ?? new Keypair().publicKey; - - const args = new CreateProposalArgs({ - name, - descriptionLink, - governingTokenMint, - voteType, - options, - useDenyOption, - proposalSeed: optionalProposalSeed, - }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let proposalSeedBuffer = optionalProposalSeed.toBuffer(); - - if (programVersion <= PROGRAM_VERSION_V2) { - if (proposalIndex === undefined) { - throw new Error( - `proposalIndex is required for version: ${programVersion}`, - ); - } - proposalSeedBuffer = Buffer.alloc(4); - proposalSeedBuffer.writeInt32LE(proposalIndex, 0); - } - - const [proposalAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - governance.toBuffer(), - governingTokenMint.toBuffer(), - proposalSeedBuffer, - ], - programId, - ); - - let keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposalAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governance, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: true, - isSigner: false, - }, - ...(programVersion > PROGRAM_VERSION_V1 - ? [ - { - pubkey: governingTokenMint, - isWritable: false, - isSigner: false, - }, - ] - : []), - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - keys.push({ - pubkey: SYSVAR_CLOCK_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - ); - - if (programVersion >= PROGRAM_VERSION_V3) { - const proposalDepositAddress = await getProposalDepositAddress( - programId, - proposalAddress, - payer, - ); - keys.push({ - pubkey: proposalDepositAddress, - isWritable: true, - isSigner: false, - }); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return proposalAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateRealm.ts b/packages/governance-sdk/src/governance/withCreateRealm.ts deleted file mode 100644 index cf4b579..0000000 --- a/packages/governance-sdk/src/governance/withCreateRealm.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CreateRealmArgs } from './instructions'; -import { - RealmConfigArgs, - GOVERNANCE_PROGRAM_SEED, - MintMaxVoteWeightSource, - getTokenHoldingAddress, - getRealmConfigAddress, - GoverningTokenConfigArgs, - GoverningTokenType, - GoverningTokenConfigAccountArgs, -} from './accounts'; -import BN from 'bn.js'; -import { PROGRAM_VERSION_V2, PROGRAM_VERSION_V3 } from '../registry/constants'; -import { SYSTEM_PROGRAM_ID, TOKEN_PROGRAM_ID } from '../tools/sdk'; -import { createRealmConfigArgs, withTokenConfigAccounts } from './tools'; - -export async function withCreateRealm( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - name: string, - realmAuthority: PublicKey, - communityMint: PublicKey, - payer: PublicKey, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityWeightToCreateGovernance: BN, - communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined, - councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) { - const configArgs = createRealmConfigArgs( - programVersion, - councilMint, - communityMintMaxVoteWeightSource, - minCommunityWeightToCreateGovernance, - communityTokenConfig, - councilTokenConfig, - ); - - const args = new CreateRealmArgs({ - configArgs, - name, - }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [realmAddress] = await PublicKey.findProgramAddress( - [Buffer.from(GOVERNANCE_PROGRAM_SEED), Buffer.from(args.name)], - programId, - ); - - const communityTokenHoldingAddress = await getTokenHoldingAddress( - programId, - realmAddress, - communityMint, - ); - - let keys = [ - { - pubkey: realmAddress, - isSigner: false, - isWritable: true, - }, - { - pubkey: realmAuthority, - isSigner: false, - isWritable: false, - }, - { - pubkey: communityMint, - isSigner: false, - isWritable: false, - }, - { - pubkey: communityTokenHoldingAddress, - isSigner: false, - isWritable: true, - }, - { - pubkey: payer, - isSigner: true, - isWritable: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - { - pubkey: tokenProgram, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - - if (councilMint) { - const councilTokenHoldingAddress = await getTokenHoldingAddress( - programId, - realmAddress, - councilMint, - ); - - keys = [ - ...keys, - { - pubkey: councilMint, - isSigner: false, - isWritable: false, - }, - { - pubkey: councilTokenHoldingAddress, - isSigner: false, - isWritable: true, - }, - ]; - } - - const realmConfigMeta = { - pubkey: await getRealmConfigAddress(programId, realmAddress), - isSigner: false, - isWritable: true, - }; - - if (programVersion >= PROGRAM_VERSION_V3) { - keys.push(realmConfigMeta); - } - - withTokenConfigAccounts(keys, communityTokenConfig, councilTokenConfig); - - if ( - programVersion == PROGRAM_VERSION_V2 && - (communityTokenConfig?.voterWeightAddin || - communityTokenConfig?.maxVoterWeightAddin) - ) { - keys.push(realmConfigMeta); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return realmAddress; -} diff --git a/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts b/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts deleted file mode 100644 index d1b5021..0000000 --- a/packages/governance-sdk/src/governance/withCreateTokenGovernance.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { GovernanceConfig } from './accounts'; -import { CreateTokenGovernanceArgs } from './instructions'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { TOKEN_PROGRAM_ID } from '../tools/sdk/splToken'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -/** @deprecated */ -export const withCreateTokenGovernance = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governedToken: PublicKey, - config: GovernanceConfig, - transferAccountAuthorities: boolean, - tokenOwner: PublicKey, - tokenOwnerRecord: PublicKey, - payer: PublicKey, - governanceAuthority: PublicKey, - voterWeightRecord?: PublicKey, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const args = new CreateTokenGovernanceArgs({ - config, - transferTokenOwner: transferAccountAuthorities, - }); - - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [governanceAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from('token-governance'), - realm.toBuffer(), - governedToken.toBuffer(), - ], - programId, - ); - - const keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governedToken, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwner, - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: tokenProgram, - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - keys.push({ - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }); - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - voterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return governanceAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateTokenOwnerRecord.ts b/packages/governance-sdk/src/governance/withCreateTokenOwnerRecord.ts deleted file mode 100644 index 20dcd28..0000000 --- a/packages/governance-sdk/src/governance/withCreateTokenOwnerRecord.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { CreateTokenOwnerRecordArgs } from './instructions'; -import { getTokenOwnerRecordAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; - -export const withCreateTokenOwnerRecord = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenOwner: PublicKey, - governingTokenMint: PublicKey, - payer: PublicKey, -) => { - const args = new CreateTokenOwnerRecordArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - governingTokenOwner, - ); - - const keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governingTokenOwner, - isWritable: false, - isSigner: false, - }, - { - pubkey: tokenOwnerRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenMint, - isWritable: false, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return tokenOwnerRecordAddress; -}; diff --git a/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts b/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts deleted file mode 100644 index 65712f2..0000000 --- a/packages/governance-sdk/src/governance/withCreateTransactionBuffer.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { CreateTransactionBufferArgs } from './instructions'; -import { - getProposalTransactionBufferAddress, -} from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools'; - -export const withCreateTransactionBuffer = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - payer: PublicKey, - bufferIndex: number, - finalBufferHash: Uint8Array, - finalBufferSize: number, - buffer: Uint8Array, -) => { - const args = new CreateTransactionBufferArgs({ - bufferIndex, - finalBufferHash, - finalBufferSize, - buffer, - }); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( - programId, - proposal, - payer, - bufferIndex, - ); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: true, isSigner: false }, - { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, - { pubkey: governanceAuthority, isWritable: false, isSigner: true }, - { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, - { pubkey: payer, isWritable: true, isSigner: true }, - { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, - { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, - ]; - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalTransactionBufferAddress; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts b/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts deleted file mode 100644 index e13df40..0000000 --- a/packages/governance-sdk/src/governance/withDepositGoverningTokens.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { DepositGoverningTokensArgs } from './instructions'; -import { - getTokenOwnerRecordAddress, - GOVERNANCE_PROGRAM_SEED, -} from './accounts'; -import BN from 'bn.js'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { TOKEN_PROGRAM_ID } from '../tools/sdk/splToken'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; -import { withV3RealmConfigAccount } from './tools'; - -export const withDepositGoverningTokens = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenSource: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, - governingTokenSourceAuthority: PublicKey, - payer: PublicKey, - amount: BN, - governingTokenOwnerIsSigner?: boolean, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const args = new DepositGoverningTokensArgs({ amount }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - governingTokenOwner, - ); - - governingTokenOwnerIsSigner = - governingTokenOwnerIsSigner ?? - // If we are minting the tokens directly into the DAO then governingTokenOwner doesn't have to sign the tx - !governingTokenSource.equals(governingTokenMint); - - const [governingTokenHoldingAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - ], - programId, - ); - - const keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governingTokenHoldingAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenSource, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenOwner, - isWritable: false, - isSigner: governingTokenOwnerIsSigner, - }, - { - pubkey: governingTokenSourceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isWritable: false, - isSigner: false, - }, - { - pubkey: tokenProgram, - isWritable: false, - isSigner: false, - }, - ]; - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }); - } - - await withV3RealmConfigAccount(keys, programId, programVersion, realm); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return tokenOwnerRecordAddress; -}; diff --git a/packages/governance-sdk/src/governance/withExecuteTransaction.ts b/packages/governance-sdk/src/governance/withExecuteTransaction.ts deleted file mode 100644 index 19926da..0000000 --- a/packages/governance-sdk/src/governance/withExecuteTransaction.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { ExecuteTransactionArgs } from './instructions'; -import { - AccountMetaData, - getNativeTreasuryAddress, - InstructionData, -} from './accounts'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withExecuteTransaction = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - governance: PublicKey, - proposal: PublicKey, - transactionAddress: PublicKey, - transactionInstructions: InstructionData[], -) => { - const args = new ExecuteTransactionArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const nativeTreasury = await getNativeTreasuryAddress(programId, governance); - - let keys = [ - { - pubkey: governance, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: transactionAddress, - isWritable: true, - isSigner: false, - }, - ]; - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }); - } - - for (let instruction of transactionInstructions) { - // When an instruction needs to be signed by the Governance PDA or the Native treasury then its isSigner flag has to be reset on AccountMeta - // because the signature will be required during cpi call invoke_signed() and not when we send ExecuteInstruction - instruction.accounts = instruction.accounts.map(a => - (a.pubkey.toBase58() === governance.toBase58() || - a.pubkey.toBase58() === nativeTreasury.toBase58()) && - a.isSigner - ? new AccountMetaData({ - pubkey: a.pubkey, - isWritable: a.isWritable, - isSigner: false, - }) - : a, - ); - - keys.push( - { - pubkey: instruction.programId, - isWritable: false, - isSigner: false, - }, - ...instruction.accounts, - ); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts b/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts deleted file mode 100644 index b9f7157..0000000 --- a/packages/governance-sdk/src/governance/withExecuteVersionedTransaction.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { ExecuteVersionedTransactionArgs } from './instructions'; - -export const withExecuteVersionedTransaction = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - proposalTransaction: PublicKey, - remainingAccountKeys: AccountMeta[], -) => { - const args = new ExecuteVersionedTransactionArgs(); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: true, isSigner: false }, - { pubkey: proposalTransaction, isWritable: true, isSigner: false }, - ]; - keys.push(...remainingAccountKeys); - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalTransaction; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts b/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts deleted file mode 100644 index 4f8bdaf..0000000 --- a/packages/governance-sdk/src/governance/withExtendTransactionBuffer.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { ExtendTransactionBufferArgs } from './instructions'; -import { getProposalTransactionBufferAddress } from './accounts'; - -export const withExtendTransactionBuffer = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - creator: PublicKey, - bufferIndex: number, - buffer: Uint8Array, -) => { - const args = new ExtendTransactionBufferArgs({ bufferIndex, buffer }); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - - const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( - programId, - proposal, - creator, - bufferIndex, - ); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: false, isSigner: false }, - { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, - { pubkey: creator, isWritable: false, isSigner: true }, - ]; - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalTransactionBufferAddress; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withFinalizeVote.ts b/packages/governance-sdk/src/governance/withFinalizeVote.ts deleted file mode 100644 index d045401..0000000 --- a/packages/governance-sdk/src/governance/withFinalizeVote.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { FinalizeVoteArgs } from './instructions'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; -import { withRealmConfigPluginAccounts } from './withRealmConfigPluginAccounts'; - -export const withFinalizeVote = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - proposalOwnerRecord: PublicKey, - governingTokenMint: PublicKey, - maxVoterWeightRecord?: PublicKey, -) => { - const args = new FinalizeVoteArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [realmIsWritable, governanceIsWritable] = - programVersion === PROGRAM_VERSION_V1 ? [false, false] : [true, true]; - - let keys = [ - { - pubkey: realm, - isWritable: realmIsWritable, - isSigner: false, - }, - { - pubkey: governance, - isWritable: governanceIsWritable, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: proposalOwnerRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenMint, - isWritable: false, - isSigner: false, - }, - ]; - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }); - } - - await withRealmConfigPluginAccounts( - keys, - programId, - realm, - undefined, - maxVoterWeightRecord, - ); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withFlagTransactionError.ts b/packages/governance-sdk/src/governance/withFlagTransactionError.ts deleted file mode 100644 index 30d11b8..0000000 --- a/packages/governance-sdk/src/governance/withFlagTransactionError.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { FlagTransactionErrorArgs } from './instructions'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withFlagTransactionError = ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - proposalTransaction: PublicKey, -) => { - const args = new FlagTransactionErrorArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const keys = [ - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: proposalTransaction, - isWritable: true, - isSigner: false, - }, - ]; - if (programVersion === PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withInsertTransaction.ts b/packages/governance-sdk/src/governance/withInsertTransaction.ts deleted file mode 100644 index b7ba1e3..0000000 --- a/packages/governance-sdk/src/governance/withInsertTransaction.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { InsertTransactionArgs } from './instructions'; -import { getProposalTransactionAddress, InstructionData } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { PROGRAM_VERSION_V1, PROGRAM_VERSION_V2 } from '../registry/constants'; - -export const withInsertTransaction = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - index: number, - optionIndex: number, - holdUpTime: number, - transactionInstructions: InstructionData[], - payer: PublicKey, -) => { - const args = new InsertTransactionArgs({ - index, - optionIndex, - holdUpTime, - instructionData: - programVersion === PROGRAM_VERSION_V1 - ? transactionInstructions[0] - : undefined, - instructions: - programVersion >= PROGRAM_VERSION_V2 - ? transactionInstructions - : undefined, - }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const proposalTransactionAddress = await getProposalTransactionAddress( - programId, - programVersion, - proposal, - optionIndex, - index, - ); - - const keys = [ - { - pubkey: governance, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: proposalTransactionAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); - - return proposalTransactionAddress; -}; diff --git a/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts b/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts deleted file mode 100644 index 92f007f..0000000 --- a/packages/governance-sdk/src/governance/withInsertVersionedTransaction.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { InsertVersionedTransactionArgs } from './instructions'; -import { getProposalVersionedTransactionAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools'; - -export const withInsertVersionedTransaction = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - payer: PublicKey, - optionIndex: number, - ephemeralSigners: number, - transactionIndex: number, - transactionMessage: Uint8Array, -) => { - const args = new InsertVersionedTransactionArgs({ - optionIndex, - ephemeralSigners, - transactionIndex, - transactionMessage, - }); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - - const proposalVersionedTxAddress = await getProposalVersionedTransactionAddress( - programId, - proposal, - optionIndex, - transactionIndex, - ); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: true, isSigner: false }, - { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, - { pubkey: governanceAuthority, isWritable: false, isSigner: true }, - { pubkey: proposalVersionedTxAddress, isWritable: true, isSigner: false }, - { pubkey: payer, isWritable: true, isSigner: true }, - { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, - { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, - ]; - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalVersionedTxAddress; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts b/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts deleted file mode 100644 index ebbdfb0..0000000 --- a/packages/governance-sdk/src/governance/withInsertVersionedTransactionFromBuffer.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - PublicKey, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { GOVERNANCE_INSTRUCTION_SCHEMA_V3 } from './serialisation'; -import { serialize } from 'borsh'; -import { InsertVersionedTransactionFromBufferArgs } from './instructions'; -import { getProposalTransactionBufferAddress, getProposalVersionedTransactionAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools'; - - -export const withInsertVersionedTransactionFromBuffer = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - payer: PublicKey, - optionIndex: number, - ephemeralSigners: number, - transactionIndex: number, - bufferIndex: number, -) => { - const args = new InsertVersionedTransactionFromBufferArgs({ - optionIndex, - ephemeralSigners, - transactionIndex, - bufferIndex, - }); - const data = Buffer.from(serialize(GOVERNANCE_INSTRUCTION_SCHEMA_V3, args)); - - const proposalVersionedTxAddress = await getProposalVersionedTransactionAddress( - programId, - proposal, - optionIndex, - transactionIndex, - ); - const proposalTransactionBufferAddress = await getProposalTransactionBufferAddress( - programId, - proposal, - payer, - bufferIndex, - ); - - const keys = [ - { pubkey: governance, isWritable: false, isSigner: false }, - { pubkey: proposal, isWritable: true, isSigner: false }, - { pubkey: tokenOwnerRecord, isWritable: false, isSigner: false }, - { pubkey: governanceAuthority, isWritable: false, isSigner: true }, - { pubkey: proposalVersionedTxAddress, isWritable: true, isSigner: false }, - { pubkey: proposalTransactionBufferAddress, isWritable: true, isSigner: false }, - { pubkey: payer, isWritable: true, isSigner: true }, - { pubkey: SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false }, - { pubkey: SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false }, - ]; - - instructions.push(new TransactionInstruction({ keys, programId, data })); - return proposalVersionedTxAddress; -}; \ No newline at end of file diff --git a/packages/governance-sdk/src/governance/withRealmConfigPluginAccounts.ts b/packages/governance-sdk/src/governance/withRealmConfigPluginAccounts.ts deleted file mode 100644 index 657f7a4..0000000 --- a/packages/governance-sdk/src/governance/withRealmConfigPluginAccounts.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { AccountMeta, PublicKey } from '@solana/web3.js'; -import { getRealmConfigAddress } from './accounts'; - -export async function withRealmConfigPluginAccounts( - keys: AccountMeta[], - programId: PublicKey, - realm: PublicKey, - voterWeightRecord?: PublicKey | undefined, - maxVoterWeightRecord?: PublicKey | undefined, -) { - const realmConfigAddress = await getRealmConfigAddress(programId, realm); - - keys.push({ - pubkey: realmConfigAddress, - isWritable: false, - isSigner: false, - }); - - if (voterWeightRecord) { - keys.push({ - pubkey: voterWeightRecord, - isWritable: false, - isSigner: false, - }); - } - - if (maxVoterWeightRecord) { - keys.push({ - pubkey: maxVoterWeightRecord, - isWritable: false, - isSigner: false, - }); - } -} diff --git a/packages/governance-sdk/src/governance/withRefundProposalDeposit.ts b/packages/governance-sdk/src/governance/withRefundProposalDeposit.ts deleted file mode 100644 index 0555de0..0000000 --- a/packages/governance-sdk/src/governance/withRefundProposalDeposit.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { RefundProposalDepositArgs } from './instructions'; -import { getProposalDepositAddress } from './accounts'; - -export const withRefundProposalDeposit = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - proposalPk: PublicKey, - proposalDepositPayerPk: PublicKey, -) => { - const args = new RefundProposalDepositArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const proposalDepositAddress = await getProposalDepositAddress( - programId, - proposalPk, - proposalDepositPayerPk, - ); - - const keys = [ - { - pubkey: proposalPk, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposalDepositAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: proposalDepositPayerPk, - isWritable: true, - isSigner: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withRelinquishVote.ts b/packages/governance-sdk/src/governance/withRelinquishVote.ts deleted file mode 100644 index de4ee72..0000000 --- a/packages/governance-sdk/src/governance/withRelinquishVote.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { RelinquishVoteArgs } from './instructions'; -import { PROGRAM_VERSION_V3 } from '../registry/constants'; - -export const withRelinquishVote = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governingTokenMint: PublicKey, - voteRecord: PublicKey, - governanceAuthority: PublicKey | undefined, - beneficiary: PublicKey | undefined, -) => { - const args = new RelinquishVoteArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let v3Keys = - programVersion >= PROGRAM_VERSION_V3 - ? [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - ] - : []; - - let keys = [ - { - pubkey: governance, - isWritable: false, - isSigner: false, - }, - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: voteRecord, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenMint, - isWritable: false, - isSigner: false, - }, - ]; - - const existingVoteKeys = - governanceAuthority && beneficiary - ? [ - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: beneficiary, - isWritable: true, - isSigner: false, - }, - ] - : []; - - instructions.push( - new TransactionInstruction({ - keys: [...v3Keys, ...keys, ...existingVoteKeys], - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withRemoveTransaction.ts b/packages/governance-sdk/src/governance/withRemoveTransaction.ts deleted file mode 100644 index 8ce90ed..0000000 --- a/packages/governance-sdk/src/governance/withRemoveTransaction.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { RemoveTransactionArgs } from './instructions'; - -export const withRemoveTransaction = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - proposal: PublicKey, - tokenOwnerRecord: PublicKey, - governanceAuthority: PublicKey, - proposalTransaction: PublicKey, - beneficiary: PublicKey, -) => { - const args = new RemoveTransactionArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const keys = [ - { - pubkey: proposal, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecord, - isWritable: false, - isSigner: false, - }, - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: proposalTransaction, - isWritable: true, - isSigner: false, - }, - { - pubkey: beneficiary, - isWritable: true, - isSigner: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts b/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts deleted file mode 100644 index d78185e..0000000 --- a/packages/governance-sdk/src/governance/withRevokeGoverningTokens.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { RevokeGoverningTokensArgs } from './instructions'; -import { - getGoverningTokenHoldingAddress, - getRealmConfigAddress, - getTokenOwnerRecordAddress, -} from './accounts'; -import BN from 'bn.js'; -import { TOKEN_PROGRAM_ID } from '../tools/sdk/splToken'; - -export const withRevokeGoverningTokens = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenOwner: PublicKey, - governingTokenMint: PublicKey, - revokeAuthority: PublicKey, - amount: BN, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const args = new RevokeGoverningTokensArgs({ amount }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - governingTokenOwner, - ); - - const governingTokenHoldingAddress = await getGoverningTokenHoldingAddress( - programId, - realm, - governingTokenMint, - ); - - const realmConfigAddress = await getRealmConfigAddress(programId, realm); - - const keys = [ - { - pubkey: realm, - isWritable: false, - isSigner: false, - }, - { - pubkey: governingTokenHoldingAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenOwnerRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenMint, - isWritable: true, - isSigner: false, - }, - { - pubkey: revokeAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: realmConfigAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: tokenProgram, - isWritable: false, - isSigner: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withSetGovernanceDelegate.ts b/packages/governance-sdk/src/governance/withSetGovernanceDelegate.ts deleted file mode 100644 index 3f7fefd..0000000 --- a/packages/governance-sdk/src/governance/withSetGovernanceDelegate.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { SetGovernanceDelegateArgs } from './instructions'; -import { getTokenOwnerRecordAddress } from './accounts'; - -export const withSetGovernanceDelegate = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, - governanceAuthority: PublicKey, - newGovernanceDelegate: PublicKey | undefined, -) => { - const args = new SetGovernanceDelegateArgs({ - newGovernanceDelegate: newGovernanceDelegate, - }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - governingTokenOwner, - ); - - let keys = [ - { - pubkey: governanceAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecordAddress, - isWritable: true, - isSigner: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withSetRealmAuthority.ts b/packages/governance-sdk/src/governance/withSetRealmAuthority.ts deleted file mode 100644 index 971f1bb..0000000 --- a/packages/governance-sdk/src/governance/withSetRealmAuthority.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { SetRealmAuthorityAction, SetRealmAuthorityArgs } from './instructions'; -import { PROGRAM_VERSION_V1 } from '../registry'; - -export const withSetRealmAuthority = ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - realmAuthority: PublicKey, - newRealmAuthority: PublicKey | undefined, - action: SetRealmAuthorityAction | undefined, -) => { - const args = new SetRealmAuthorityArgs({ - newRealmAuthority: newRealmAuthority, // V1 - action: action, // V2 - }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let keys = [ - { - pubkey: realm, - isWritable: true, - isSigner: false, - }, - { - pubkey: realmAuthority, - isWritable: false, - isSigner: true, - }, - ]; - - if (programVersion > PROGRAM_VERSION_V1) { - keys.push({ - pubkey: newRealmAuthority!, - isWritable: false, - isSigner: false, - }); - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withSetRealmConfig.ts b/packages/governance-sdk/src/governance/withSetRealmConfig.ts deleted file mode 100644 index 4358adf..0000000 --- a/packages/governance-sdk/src/governance/withSetRealmConfig.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { - getRealmConfigAddress, - getTokenHoldingAddress, - GoverningTokenConfigAccountArgs, - MintMaxVoteWeightSource, -} from './accounts'; -import { SetRealmConfigArgs } from './instructions'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import BN from 'bn.js'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; -import { PROGRAM_VERSION_V1, PROGRAM_VERSION_V3 } from '../registry/constants'; -import { createRealmConfigArgs, withTokenConfigAccounts } from './tools'; - -export async function withSetRealmConfig( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - realmAuthority: PublicKey, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityWeightToCreateGovernance: BN, - communityTokenConfig: GoverningTokenConfigAccountArgs | undefined, - councilTokenConfig: GoverningTokenConfigAccountArgs | undefined, - payer: PublicKey | undefined, -) { - const configArgs = createRealmConfigArgs( - programVersion, - councilMint, - communityMintMaxVoteWeightSource, - minCommunityWeightToCreateGovernance, - communityTokenConfig, - councilTokenConfig, - ); - - const args = new SetRealmConfigArgs({ configArgs }); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let keys = [ - { - pubkey: realm, - isWritable: true, - isSigner: false, - }, - - { - pubkey: realmAuthority, - isWritable: false, - isSigner: true, - }, - ]; - - if (councilMint) { - const councilTokenHoldingAddress = await getTokenHoldingAddress( - programId, - realm, - councilMint, - ); - - keys = [ - ...keys, - { - pubkey: councilMint, - isSigner: false, - isWritable: false, - }, - { - pubkey: councilTokenHoldingAddress, - isSigner: false, - isWritable: true, - }, - ]; - } - - if (programVersion > PROGRAM_VERSION_V1) { - keys.push({ - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }); - - const realmConfigAddress = await getRealmConfigAddress(programId, realm); - - keys.push({ - pubkey: realmConfigAddress, - isSigner: false, - isWritable: true, - }); - - withTokenConfigAccounts(keys, communityTokenConfig, councilTokenConfig); - - if ( - payer && - (programVersion >= PROGRAM_VERSION_V3 || - communityTokenConfig?.voterWeightAddin || - communityTokenConfig?.maxVoterWeightAddin) - ) { - keys.push({ - pubkey: payer, - isSigner: true, - isWritable: true, - }); - } - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -} diff --git a/packages/governance-sdk/src/governance/withSignOffProposal.ts b/packages/governance-sdk/src/governance/withSignOffProposal.ts deleted file mode 100644 index fe824a2..0000000 --- a/packages/governance-sdk/src/governance/withSignOffProposal.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { - AccountMeta, - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { SignOffProposalArgs } from './instructions'; -import { PROGRAM_VERSION_V1 } from '../registry/constants'; - -export const withSignOffProposal = ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governance: PublicKey, - proposal: PublicKey, - signatory: PublicKey, - signatoryRecord: PublicKey | undefined, - proposalOwnerRecord: PublicKey | undefined, -) => { - const args = new SignOffProposalArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - let keys: AccountMeta[] = []; - - if (programVersion > PROGRAM_VERSION_V1) { - keys.push( - { - pubkey: realm, - isWritable: true, - isSigner: false, - }, - { - pubkey: governance, - isWritable: true, - isSigner: false, - }, - ); - } - - keys.push({ - pubkey: proposal, - isWritable: true, - isSigner: false, - }); - - if (programVersion === PROGRAM_VERSION_V1) { - keys.push( - { - pubkey: signatoryRecord!, - isWritable: true, - isSigner: false, - }, - { - pubkey: signatory, - isWritable: false, - isSigner: true, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isSigner: false, - isWritable: false, - }, - ); - } else { - keys.push({ - pubkey: signatory, - isWritable: false, - isSigner: true, - }); - - if (proposalOwnerRecord) { - keys.push({ - pubkey: proposalOwnerRecord, - isWritable: false, - isSigner: false, - }); - } else { - keys.push({ - pubkey: signatoryRecord!, - isWritable: true, - isSigner: false, - }); - } - } - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withUpdateProgramMetadata.ts b/packages/governance-sdk/src/governance/withUpdateProgramMetadata.ts deleted file mode 100644 index a941990..0000000 --- a/packages/governance-sdk/src/governance/withUpdateProgramMetadata.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { UpdateProgramMetadataArgs } from './instructions'; -import { getProgramMetadataAddress } from './accounts'; -import { SYSTEM_PROGRAM_ID } from '../tools/sdk/runtime'; - -export const withUpdateProgramMetadata = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - - payer: PublicKey, -) => { - const args = new UpdateProgramMetadataArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const programMetadataAddress = await getProgramMetadataAddress(programId); - - const keys = [ - { - pubkey: programMetadataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: payer, - isWritable: true, - isSigner: true, - }, - { - pubkey: SYSTEM_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ]; - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts b/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts deleted file mode 100644 index 9fc95a9..0000000 --- a/packages/governance-sdk/src/governance/withWithdrawGoverningTokens.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { getGovernanceInstructionSchema } from './serialisation'; -import { serialize } from 'borsh'; -import { WithdrawGoverningTokensArgs } from './instructions'; -import { GOVERNANCE_PROGRAM_SEED } from './accounts'; -import { TOKEN_PROGRAM_ID } from '../tools/sdk/splToken'; -import { withV3RealmConfigAccount } from './tools'; - -export const withWithdrawGoverningTokens = async ( - instructions: TransactionInstruction[], - programId: PublicKey, - programVersion: number, - realm: PublicKey, - governingTokenDestination: PublicKey, - governingTokenMint: PublicKey, - governingTokenOwner: PublicKey, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const args = new WithdrawGoverningTokensArgs(); - const data = Buffer.from( - serialize(getGovernanceInstructionSchema(programVersion), args), - ); - - const [tokenOwnerRecordAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - governingTokenOwner.toBuffer(), - ], - programId, - ); - - const [governingTokenHoldingAddress] = await PublicKey.findProgramAddress( - [ - Buffer.from(GOVERNANCE_PROGRAM_SEED), - realm.toBuffer(), - governingTokenMint.toBuffer(), - ], - programId, - ); - - const keys = [ - { pubkey: realm, isWritable: false, isSigner: false }, - { - pubkey: governingTokenHoldingAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenDestination, - isWritable: true, - isSigner: false, - }, - { - pubkey: governingTokenOwner, - isWritable: false, - isSigner: true, - }, - { - pubkey: tokenOwnerRecordAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: tokenProgram, - isWritable: false, - isSigner: false, - }, - ]; - - await withV3RealmConfigAccount(keys, programId, programVersion, realm); - - instructions.push( - new TransactionInstruction({ - keys, - programId, - data, - }), - ); -}; diff --git a/packages/governance-sdk/src/index.ts b/packages/governance-sdk/src/index.ts deleted file mode 100644 index cb59559..0000000 --- a/packages/governance-sdk/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './addins'; -export * from './chat'; -export * from './core'; -export * from './governance'; -export * from './registry'; -export * from './tools'; diff --git a/packages/governance-sdk/src/registry/index.ts b/packages/governance-sdk/src/registry/index.ts deleted file mode 100644 index c94f80f..0000000 --- a/packages/governance-sdk/src/registry/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './constants'; diff --git a/packages/governance-sdk/src/tools/borsh.ts b/packages/governance-sdk/src/tools/borsh.ts deleted file mode 100644 index 569954a..0000000 --- a/packages/governance-sdk/src/tools/borsh.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { BinaryReader, Schema, BorshError, BinaryWriter } from 'borsh'; - -(BinaryReader.prototype as any).readPubkey = function () { - const reader = this as unknown as BinaryReader; - const array = reader.readFixedArray(32); - return new PublicKey(array); -}; - -(BinaryWriter.prototype as any).writePubkey = function (value: PublicKey) { - const writer = this as unknown as BinaryWriter; - writer.writeFixedArray(value.toBuffer()); -}; - -function capitalizeFirstLetter(string: string): string { - return string.charAt(0).toUpperCase() + string.slice(1); -} - -function deserializeField( - schema: Schema, - fieldName: string, - fieldType: any, - reader: BinaryReader, -): any { - try { - if (typeof fieldType === 'string') { - return (reader as any)[`read${capitalizeFirstLetter(fieldType)}`](); - } - - if (fieldType instanceof Array) { - if (typeof fieldType[0] === 'number') { - return reader.readFixedArray(fieldType[0]); - } - return reader.readArray(() => - deserializeField(schema, fieldName, fieldType[0], reader), - ); - } - - if (fieldType.kind === 'option') { - const option = reader.readU8(); - if (option) { - return deserializeField(schema, fieldName, fieldType.type, reader); - } - - return undefined; - } - return deserializeStruct(schema, fieldType, reader); - } catch (error) { - if (error instanceof BorshError) { - error.addToFieldPath(fieldName); - } - throw error; - } -} - -function deserializeStruct( - schema: Schema, - classType: any, - reader: BinaryReader, -) { - const structSchema = schema.get(classType); - if (!structSchema) { - throw new BorshError(`Class ${classType.name} is missing in schema`); - } - - if (structSchema.kind === 'struct') { - const result: any = {}; - for (const [fieldName, fieldType] of schema.get(classType).fields) { - result[fieldName] = deserializeField( - schema, - fieldName, - fieldType, - reader, - ); - } - return new classType(result); - } - - if (structSchema.kind === 'enum') { - const idx = reader.readU8(); - if (idx >= structSchema.values.length) { - throw new BorshError(`Enum index: ${idx} is out of range`); - } - const [fieldName, fieldType] = structSchema.values[idx]; - const fieldValue = deserializeField(schema, fieldName, fieldType, reader); - return new classType({ [fieldName]: fieldValue }); - } - - throw new BorshError( - `Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`, - ); -} - -/// Deserializes object from bytes using schema. -export function deserializeBorsh( - schema: Schema, - classType: any, - buffer: Buffer, -): any { - const reader = new BinaryReader(buffer); - return deserializeStruct(schema, classType, reader); -} diff --git a/packages/governance-sdk/src/tools/index.ts b/packages/governance-sdk/src/tools/index.ts deleted file mode 100644 index b3e78af..0000000 --- a/packages/governance-sdk/src/tools/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './sdk'; -export * from './borsh'; -export * from './numbers'; -export * from './script'; -export * from './version'; -export * from './walletAdapter'; -export * from './versionedTransaction'; diff --git a/packages/governance-sdk/src/tools/invariant.ts b/packages/governance-sdk/src/tools/invariant.ts deleted file mode 100644 index fdee313..0000000 --- a/packages/governance-sdk/src/tools/invariant.ts +++ /dev/null @@ -1,48 +0,0 @@ -const isProduction: boolean = process.env.NODE_ENV === 'production'; -const prefix: string = 'Invariant failed'; - -/** - * `invariant` is used to [assert](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions) that the `condition` is [truthy](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy). - * - * 💥 `invariant` will `throw` an `Error` if the `condition` is [falsey](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy) - * - * 🤏 `message`s are not displayed in production environments to help keep bundles small - * - * @example - * - * ```ts - * const value: Person | null = { name: 'Alex' }; - * invariant(value, 'Expected value to be a person'); - * // type of `value`` has been narrowed to `Person` - * ``` - */ -export default function invariant( - condition: any, - // Not providing an inline default argument for message as the result is smaller - /** - * Can provide a string, or a function that returns a string for cases where - * the message takes a fair amount of effort to compute - */ - message?: string | (() => string), -): asserts condition { - if (condition) { - return; - } - // Condition not passed - - // In production we strip the message but still throw - if (isProduction) { - throw new Error(prefix); - } - - // When not in production we allow the message to pass through - // *This block will be removed in production builds* - - const provided: string | undefined = typeof message === 'function' ? message() : message; - - // Options: - // 1. message provided: `${prefix}: ${provided}` - // 2. message not provided: prefix - const value: string = provided ? `${prefix}: ${provided}` : prefix; - throw new Error(value); -} \ No newline at end of file diff --git a/packages/governance-sdk/src/tools/script.ts b/packages/governance-sdk/src/tools/script.ts deleted file mode 100644 index 8480fbd..0000000 --- a/packages/governance-sdk/src/tools/script.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function getErrorMessage(ex: any) { - if (ex instanceof Error) { - return ex.message; - } - - return JSON.stringify(ex); -} diff --git a/packages/governance-sdk/src/tools/sdk/bpfUpgradeableLoader.ts b/packages/governance-sdk/src/tools/sdk/bpfUpgradeableLoader.ts deleted file mode 100644 index d7df095..0000000 --- a/packages/governance-sdk/src/tools/sdk/bpfUpgradeableLoader.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js'; -import { create } from 'superstruct'; - -export const BPF_UPGRADE_LOADER_ID = new PublicKey( - 'BPFLoaderUpgradeab1e11111111111111111111111', -); - -// Copied from Explorer code https://github.com/solana-labs/solana/blob/master/explorer/src/validators/accounts/upgradeable-program.ts -import { type, number, nullable, Infer } from 'superstruct'; -import { coerce, instance, string } from 'superstruct'; - -export const PublicKeyFromString = coerce( - instance(PublicKey), - string(), - value => new PublicKey(value), -); - -export type ProgramDataAccountInfo = Infer; -export const ProgramDataAccountInfo = type({ - authority: nullable(PublicKeyFromString), - // don't care about data yet - slot: number(), -}); - -export async function getProgramDataAddress(programId: PublicKey) { - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - BPF_UPGRADE_LOADER_ID, - ); - - return programDataAddress; -} - -export async function getProgramDataAccount( - connection: Connection, - programId: PublicKey, -) { - const programDataAddress = await getProgramDataAddress(programId); - const account = await connection.getParsedAccountInfo(programDataAddress); - - if (!account || !account.value) { - throw new Error( - `Program data account ${programDataAddress.toBase58()} for program ${programId.toBase58()} not found`, - ); - } - - const accountInfo = account.value; - - if ( - !( - 'parsed' in accountInfo.data && - accountInfo.data.program === 'bpf-upgradeable-loader' - ) - ) { - throw new Error( - `Invalid program data account ${programDataAddress.toBase58()} for program ${programId.toBase58()}`, - ); - } - - let programData = create( - accountInfo.data.parsed.info, - ProgramDataAccountInfo, - ); - return programData; -} diff --git a/packages/governance-sdk/src/tools/sdk/index.ts b/packages/governance-sdk/src/tools/sdk/index.ts deleted file mode 100644 index ad2e03e..0000000 --- a/packages/governance-sdk/src/tools/sdk/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './bpfUpgradeableLoader'; -export * from './runtime'; -export * from './splToken'; diff --git a/packages/governance-sdk/src/tools/sdk/runtime.ts b/packages/governance-sdk/src/tools/sdk/runtime.ts deleted file mode 100644 index 922fc5e..0000000 --- a/packages/governance-sdk/src/tools/sdk/runtime.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - Commitment, - Connection, - PublicKey, - RpcResponseAndContext, - SimulatedTransactionResponse, - Transaction, - TransactionError, -} from '@solana/web3.js'; - -export const SYSTEM_PROGRAM_ID = new PublicKey( - '11111111111111111111111111111111', -); - -export type ProgramAccount = { - pubkey: PublicKey; - account: T; - owner: PublicKey; -}; - -export async function simulateTransaction( - connection: Connection, - transaction: Transaction, - commitment: Commitment, -): Promise> { - const latestBlockhash = await connection.getRecentBlockhash(); - //@ts-ignore - transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight; - transaction.recentBlockhash = latestBlockhash.blockhash; - - const signData = transaction.serializeMessage(); - // @ts-ignore - const wireTransaction = transaction._serialize(signData); - const encodedTransaction = wireTransaction.toString('base64'); - const config: any = { encoding: 'base64', commitment }; - const args = [encodedTransaction, config]; - - // @ts-ignore - const res = await connection._rpcRequest('simulateTransaction', args); - if (res.error) { - throw new Error('failed to simulate transaction: ' + res.error.message); - } - return res.result; -} - -export class SendTransactionError extends Error { - txError: TransactionError | undefined; - txId: string; - constructor(message: string, txId: string, txError?: TransactionError) { - super(message); - - this.txError = txError; - this.txId = txId; - } -} diff --git a/packages/governance-sdk/src/tools/sdk/splToken.ts b/packages/governance-sdk/src/tools/sdk/splToken.ts deleted file mode 100644 index e27cc3a..0000000 --- a/packages/governance-sdk/src/tools/sdk/splToken.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -export const TOKEN_PROGRAM_ID = new PublicKey( - 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', -); diff --git a/packages/governance-sdk/src/tools/version.ts b/packages/governance-sdk/src/tools/version.ts deleted file mode 100644 index 8fa1580..0000000 --- a/packages/governance-sdk/src/tools/version.ts +++ /dev/null @@ -1,13 +0,0 @@ -export function parseVersion(version: string) { - var arr = version.split('.'); - - // parse int or default to 0 - var major = parseInt(arr[0]) || 0; - var minor = parseInt(arr[1]) || 0; - var patch = parseInt(arr[2]) || 0; - return { - major, - minor, - patch, - }; -} diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts b/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts deleted file mode 100644 index 33fe644..0000000 --- a/packages/governance-sdk/src/tools/versionedTransaction/compileToWrappedMessageV0.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - AccountKeysFromLookups, - AddressLookupTableAccount, - MessageAccountKeys, - MessageAddressTableLookup, - MessageV0, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; -import { CompiledKeys } from "./compiledKeys"; - -export function compileToWrappedMessageV0({ - payerKey, - recentBlockhash, - instructions, - addressLookupTableAccounts, -}: { - payerKey: PublicKey; - recentBlockhash: string; - instructions: TransactionInstruction[]; - addressLookupTableAccounts?: AddressLookupTableAccount[]; -}) { - const compiledKeys = CompiledKeys.compile(instructions, payerKey); - - const addressTableLookups = new Array(); - const accountKeysFromLookups: AccountKeysFromLookups = { - writable: [], - readonly: [], - }; - const lookupTableAccounts = addressLookupTableAccounts || []; - for (const lookupTable of lookupTableAccounts) { - const extractResult = compiledKeys.extractTableLookup(lookupTable); - if (extractResult !== undefined) { - const [addressTableLookup, { writable, readonly }] = extractResult; - addressTableLookups.push(addressTableLookup); - accountKeysFromLookups.writable.push(...writable); - accountKeysFromLookups.readonly.push(...readonly); - } - } - - const [header, staticAccountKeys] = compiledKeys.getMessageComponents(); - const accountKeys = new MessageAccountKeys( - staticAccountKeys, - accountKeysFromLookups - ); - const compiledInstructions = accountKeys.compileInstructions(instructions); - return new MessageV0({ - header, - staticAccountKeys, - recentBlockhash, - compiledInstructions, - addressTableLookups, - }); -} diff --git a/packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts b/packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts deleted file mode 100644 index 6e96a35..0000000 --- a/packages/governance-sdk/src/tools/versionedTransaction/compiledKeys.ts +++ /dev/null @@ -1,179 +0,0 @@ -import assert from "assert"; -import { - MessageHeader, - MessageAddressTableLookup, - AccountKeysFromLookups, - AddressLookupTableAccount, - TransactionInstruction, - PublicKey, -} from "@solana/web3.js"; - -export type CompiledKeyMeta = { - isSigner: boolean; - isWritable: boolean; - isInvoked: boolean; -}; - -type KeyMetaMap = Map; - -/** - * This is almost completely copy-pasted from solana-web3.js and slightly adapted to work with "wrapped" transaction messaged such as in VaultTransaction. - * @see https://github.com/solana-labs/solana-web3.js/blob/87d33ac68e2453b8a01cf8c425aa7623888434e8/packages/library-legacy/src/message/compiled-keys.ts - */ -export class CompiledKeys { - payer: PublicKey; - keyMetaMap: KeyMetaMap; - - constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) { - this.payer = payer; - this.keyMetaMap = keyMetaMap; - } - - /** - * The only difference between this and the original is that we don't mark the instruction programIds as invoked. - * It makes sense to do because the instructions will be called via CPI, so the programIds can come from Address Lookup Tables. - * This allows to compress the message size and avoid hitting the tx size limit during vault_transaction_create instruction calls. - */ - static compile( - instructions: Array, - payer: PublicKey - ): CompiledKeys { - const keyMetaMap: KeyMetaMap = new Map(); - const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => { - const address = pubkey.toBase58(); - let keyMeta = keyMetaMap.get(address); - if (keyMeta === undefined) { - keyMeta = { - isSigner: false, - isWritable: false, - isInvoked: false, - }; - keyMetaMap.set(address, keyMeta); - } - return keyMeta; - }; - - const payerKeyMeta = getOrInsertDefault(payer); - payerKeyMeta.isSigner = true; - payerKeyMeta.isWritable = true; - - for (const ix of instructions) { - // This is the only difference from the original. - // getOrInsertDefault(ix.programId).isInvoked = true; - getOrInsertDefault(ix.programId).isInvoked = false; - for (const accountMeta of ix.keys) { - const keyMeta = getOrInsertDefault(accountMeta.pubkey); - keyMeta.isSigner ||= accountMeta.isSigner; - keyMeta.isWritable ||= accountMeta.isWritable; - } - } - - return new CompiledKeys(payer, keyMetaMap); - } - - getMessageComponents(): [MessageHeader, Array] { - const mapEntries = [...this.keyMetaMap.entries()]; - assert(mapEntries.length <= 256, "Max static account keys length exceeded"); - - const writableSigners = mapEntries.filter( - ([, meta]) => meta.isSigner && meta.isWritable - ); - const readonlySigners = mapEntries.filter( - ([, meta]) => meta.isSigner && !meta.isWritable - ); - const writableNonSigners = mapEntries.filter( - ([, meta]) => !meta.isSigner && meta.isWritable - ); - const readonlyNonSigners = mapEntries.filter( - ([, meta]) => !meta.isSigner && !meta.isWritable - ); - - const header: MessageHeader = { - numRequiredSignatures: writableSigners.length + readonlySigners.length, - numReadonlySignedAccounts: readonlySigners.length, - numReadonlyUnsignedAccounts: readonlyNonSigners.length, - }; - - // sanity checks - { - assert( - writableSigners.length > 0, - "Expected at least one writable signer key" - ); - const [payerAddress] = writableSigners[0]; - assert( - payerAddress === this.payer.toBase58(), - "Expected first writable signer key to be the fee payer" - ); - } - - const staticAccountKeys = [ - ...writableSigners.map(([address]) => new PublicKey(address)), - ...readonlySigners.map(([address]) => new PublicKey(address)), - ...writableNonSigners.map(([address]) => new PublicKey(address)), - ...readonlyNonSigners.map(([address]) => new PublicKey(address)), - ]; - - return [header, staticAccountKeys]; - } - - extractTableLookup( - lookupTable: AddressLookupTableAccount - ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined { - const [writableIndexes, drainedWritableKeys] = - this.drainKeysFoundInLookupTable( - lookupTable.state.addresses, - (keyMeta) => - !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable - ); - const [readonlyIndexes, drainedReadonlyKeys] = - this.drainKeysFoundInLookupTable( - lookupTable.state.addresses, - (keyMeta) => - !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable - ); - - // Don't extract lookup if no keys were found - if (writableIndexes.length === 0 && readonlyIndexes.length === 0) { - return; - } - - return [ - { - accountKey: lookupTable.key, - writableIndexes, - readonlyIndexes, - }, - { - writable: drainedWritableKeys, - readonly: drainedReadonlyKeys, - }, - ]; - } - - /** @internal */ - private drainKeysFoundInLookupTable( - lookupTableEntries: Array, - keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean - ): [Array, Array] { - const lookupTableIndexes = new Array(); - const drainedKeys = new Array(); - - for (const [address, keyMeta] of this.keyMetaMap.entries()) { - if (keyMetaFilter(keyMeta)) { - const key = new PublicKey(address); - const lookupTableIndex = lookupTableEntries.findIndex((entry) => - entry.equals(key) - ); - if (lookupTableIndex >= 0) { - assert(lookupTableIndex < 256, "Max lookup table index exceeded"); - lookupTableIndexes.push(lookupTableIndex); - drainedKeys.push(key); - this.keyMetaMap.delete(address); - } - } - } - - return [lookupTableIndexes, drainedKeys]; - } -} diff --git a/packages/governance-sdk/src/tools/versionedTransaction/index.ts b/packages/governance-sdk/src/tools/versionedTransaction/index.ts deleted file mode 100644 index 122c971..0000000 --- a/packages/governance-sdk/src/tools/versionedTransaction/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './compileToWrappedMessageV0'; -export * from './compiledKeys'; -export * from './transactionMessage'; \ No newline at end of file diff --git a/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts b/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts deleted file mode 100644 index c92be4e..0000000 --- a/packages/governance-sdk/src/tools/versionedTransaction/transactionMessage.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { - AccountMeta, - AddressLookupTableAccount, - Connection, - PublicKey, - TransactionMessage, -} from "@solana/web3.js"; -import invariant from "../invariant"; -import { compileToWrappedMessageV0 } from "./compileToWrappedMessageV0"; -import { getEphemeralSignerPda, ProposalCompiledInstruction, ProposalTransactionMessage } from "../../governance/accounts"; - -export function isStaticWritableIndex( - message: ProposalTransactionMessage, - index: number -) { - const numAccountKeys = message.accountKeys.length; - const { numSigners, numWritableSigners, numWritableNonSigners } = message; - - if (index >= numAccountKeys) { - // `index` is not a part of static `accountKeys`. - return false; - } - - if (index < numWritableSigners) { - // `index` is within the range of writable signer keys. - return true; - } - - if (index >= numSigners) { - // `index` is within the range of non-signer keys. - const indexIntoNonSigners = index - numSigners; - // Whether `index` is within the range of writable non-signer keys. - return indexIntoNonSigners < numWritableNonSigners; - } - - return false; -} - -export function isSignerIndex(message: ProposalTransactionMessage, index: number) { - return index < message.numSigners; -} - -/** We use custom serialization for `transaction_message` that ensures as small byte size as possible. */ -export function transactionMessageToRealmsTransactionMessageBytes({ - message, - addressLookupTableAccounts, - governancePk, - treasuryPk, -}: { - message: TransactionMessage; - addressLookupTableAccounts?: AddressLookupTableAccount[]; - governancePk: PublicKey; - treasuryPk: PublicKey; -}): Uint8Array { - // Make sure authority is marked as non-signer in all instructions, - // otherwise the message will be serialized in incorrect format. - message.instructions.forEach((instruction) => { - instruction.keys.forEach((key) => { - if (key.pubkey.equals(governancePk)) { - key.isSigner = false; - } - if (key.pubkey.equals(treasuryPk)) { - key.isSigner = false; - } - }); - }); - - // Use custom implementation of `message.compileToV0Message` that allows instruction programIds - // to also be loaded from `addressLookupTableAccounts`. - const compiledMessage = compileToWrappedMessageV0({ - payerKey: message.payerKey, - recentBlockhash: message.recentBlockhash, - instructions: message.instructions, - addressLookupTableAccounts, - }); - - // Convert compiled instructions to ProposalCompiledInstruction format - const proposalInstructions = compiledMessage.compiledInstructions.map((ix) => { - return new ProposalCompiledInstruction({ - programIdIndex: ix.programIdIndex, - accountIndexes: ix.accountKeyIndexes, - data: ix.data, - }); - }); - - // Convert address table lookups - const proposalAddressTableLookups = compiledMessage.addressTableLookups.map((lookup) => ({ - accountKey: lookup.accountKey, - writableIndexes: lookup.writableIndexes, - readonlyIndexes: lookup.readonlyIndexes, - })); - - // Create and serialize ProposalTransactionMessage - const proposalMessage = new ProposalTransactionMessage({ - numSigners: compiledMessage.header.numRequiredSignatures, - numWritableSigners: - compiledMessage.header.numRequiredSignatures - - compiledMessage.header.numReadonlySignedAccounts, - numWritableNonSigners: - compiledMessage.staticAccountKeys.length - - compiledMessage.header.numRequiredSignatures - - compiledMessage.header.numReadonlyUnsignedAccounts, - accountKeys: compiledMessage.staticAccountKeys, - instructions: proposalInstructions, - addressTableLookups: proposalAddressTableLookups, - }); - - return proposalMessage.serialize(); -} - -/** Populate remaining accounts required for execution of the transaction. */ -export async function accountsForTransactionExecute({ - connection, - transactionProposalPda, - transactionIndex, - governancePk, - treasuryPk, - message, - ephemeralSignerBumps, - programId, -}: { - connection: Connection; - message: ProposalTransactionMessage; - ephemeralSignerBumps: number[]; - transactionIndex: number; - governancePk: PublicKey; - treasuryPk: PublicKey; - transactionProposalPda: PublicKey; - programId: PublicKey; -}): Promise<{ - /** Account metas used in the `message`. */ - accountMetas: AccountMeta[]; - /** Address lookup table accounts used in the `message`. */ - lookupTableAccounts: AddressLookupTableAccount[]; -}> { - const ephemeralSignerPdas = ephemeralSignerBumps.map( - (_, additionalSignerIndex) => { - return getEphemeralSignerPda({ - transactionProposalPda, - transactionIndex, - ephemeralSignerIndex: additionalSignerIndex, - programId, - })[0]; - } - ); - - const addressLookupTableKeys = message.addressTableLookups.map( - ({ accountKey }) => accountKey - ); - const addressLookupTableAccounts = new Map( - await Promise.all( - addressLookupTableKeys.map(async (key) => { - const { value } = await connection.getAddressLookupTable(key); - if (!value) { - throw new Error( - `Address lookup table account ${key.toBase58()} not found` - ); - } - return [key.toBase58(), value] as const; - }) - ) - ); - - // Populate account metas required for execution of the transaction. - const accountMetas: AccountMeta[] = []; - // First add the lookup table accounts used by the transaction. They are needed for on-chain validation. - accountMetas.push( - ...addressLookupTableKeys.map((key) => { - return { pubkey: key, isSigner: false, isWritable: false }; - }) - ); - // Then add static account keys included into the message. - for (const [accountIndex, accountKey] of message.accountKeys.entries()) { - accountMetas.push({ - pubkey: accountKey, - isWritable: isStaticWritableIndex(message, accountIndex), - // NOTE: governancePk and treasuryPk and ephemeralSignerPdas cannot be marked as signers, - // because they are PDAs and hence won't have their signatures on the transaction. - isSigner: - isSignerIndex(message, accountIndex) && - !accountKey.equals(treasuryPk) && - !accountKey.equals(governancePk) && - !ephemeralSignerPdas.find((k) => accountKey.equals(k)), - }); - } - // Then add accounts that will be loaded with address lookup tables. - for (const lookup of message.addressTableLookups) { - const lookupTableAccount = addressLookupTableAccounts.get( - lookup.accountKey.toBase58() - ); - invariant( - lookupTableAccount, - `Address lookup table account ${lookup.accountKey.toBase58()} not found` - ); - - for (const accountIndex of lookup.writableIndexes) { - if (!lookupTableAccount) continue; - const pubkey: PublicKey = - lookupTableAccount.state.addresses[accountIndex]; - invariant( - pubkey, - `Address lookup table account ${lookup.accountKey.toBase58()} does not contain address at index ${accountIndex}` - ); - accountMetas.push({ - pubkey, - isWritable: true, - // Accounts in address lookup tables can not be signers. - isSigner: false, - }); - } - for (const accountIndex of lookup.readonlyIndexes) { - if (!lookupTableAccount) continue; - const pubkey: PublicKey = - lookupTableAccount.state.addresses[accountIndex]; - invariant( - pubkey, - `Address lookup table account ${lookup.accountKey.toBase58()} does not contain address at index ${accountIndex}` - ); - accountMetas.push({ - pubkey, - isWritable: false, - // Accounts in address lookup tables can not be signers. - isSigner: false, - }); - } - } - - return { - accountMetas, - lookupTableAccounts: [...addressLookupTableAccounts.values()], - }; -} diff --git a/packages/governance-sdk/src/tools/walletAdapter.ts b/packages/governance-sdk/src/tools/walletAdapter.ts deleted file mode 100644 index 43db62c..0000000 --- a/packages/governance-sdk/src/tools/walletAdapter.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { PublicKey, Transaction } from '@solana/web3.js'; - -export type WalletSigner = { - publicKey: PublicKey | null; - signTransaction(transaction: Transaction): Promise; - signAllTransactions(transaction: Transaction[]): Promise; -}; - -export declare class WalletError extends Error { - error: any; - constructor(message?: string, error?: any); -} - -export declare class WalletNotConnectedError extends WalletError { - name: string; -} - -export function isWalletNotConnectedError( - error: any, -): error is WalletNotConnectedError { - return error instanceof WalletNotConnectedError; -} diff --git a/packages/governance-sdk/tsconfig.json b/packages/governance-sdk/tsconfig.json deleted file mode 100644 index 82a1661..0000000 --- a/packages/governance-sdk/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "target": "ES5", - "module": "commonjs", - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "outDir": "./lib", - "pretty": true, - "resolveJsonModule": true, - "rootDir": "./src", - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "downlevelIteration": true - }, - "include": ["src"], - "exclude": ["node_modules"] -} diff --git a/packages/governance/.env b/packages/governance/.env deleted file mode 100644 index 8dbc109..0000000 --- a/packages/governance/.env +++ /dev/null @@ -1,15 +0,0 @@ -# HOST Public Key used for additional swap fees -LEND_HOST_FEE_ADDRESS='' -MAINNET_RPC='https://ssc-dao.genesysgo.net/' -DEVNET_RPC='' -DEFAULT_GOVERNANCE_PROGRAM_ID='GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw' - - -# Rewired variables to comply with CRA restrictions -REACT_APP_LEND_HOST_FEE_ADDRESS=$LEND_HOST_FEE_ADDRESS - - -REACT_APP_MAINNET_RPC=$MAINNET_RPC -REACT_APP_DEVNET_RPC=$DEVNET_RPC -REACT_APP_DEFAULT_GOVERNANCE_PROGRAM_ID=$DEFAULT_GOVERNANCE_PROGRAM_ID - diff --git a/packages/governance/.env.development b/packages/governance/.env.development deleted file mode 100644 index 17a89d3..0000000 --- a/packages/governance/.env.development +++ /dev/null @@ -1 +0,0 @@ -REACT_APP_DEFAULT_GOVERNANCE_PROGRAM_ID='GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP' \ No newline at end of file diff --git a/packages/governance/.env.production b/packages/governance/.env.production deleted file mode 100644 index 668046e..0000000 --- a/packages/governance/.env.production +++ /dev/null @@ -1 +0,0 @@ -GENERATE_SOURCEMAP = false diff --git a/packages/governance/README.md b/packages/governance/README.md deleted file mode 100644 index b79f4b4..0000000 --- a/packages/governance/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Governance UI - -The Governance package is MVP implementation for spl-governance program. - -## Setup - -Be sure to be running Node v12.16.2 and yarn version 1.22.10. - -In order to build the common package and governance run: - -`yarn && yarn bootstrap && yarn build --scope @oyster/common --scope @solana/spl-governance --scope governance` - -Then run: - -`yarn start governance` - -## ⚠️ Warning - -Any content produced by Solana, or developer resources that Solana provides, -are for educational and inspiration purposes only. -Solana does not encourage, -induce or sanction the deployment of any such applications in violation of applicable laws or regulations. - -## Disclaimer - -All claims, content, designs, algorithms, estimates, roadmaps, -specifications, and performance measurements described in this project -are done with the Solana Foundation's ("SF") best efforts. It is up to -the reader to check and validate their accuracy and truthfulness. -Furthermore nothing in this project constitutes a solicitation for -investment. - -Any content produced by SF or developer resources that SF provides, are -for educational and inspiration purposes only. SF does not encourage, -induce or sanction the deployment, integration or use of any such -applications (including the code comprising the Solana blockchain -protocol) in violation of applicable laws or regulations and hereby -prohibits any such deployment, integration or use. This includes use of -any such applications by the reader (a) in violation of export control -or sanctions laws of the United States or any other applicable -jurisdiction, (b) if the reader is located in or ordinarily resident in -a country or territory subject to comprehensive sanctions administered -by the U.S. Office of Foreign Assets Control (OFAC), or (c) if the -reader is or is working on behalf of a Specially Designated National -(SDN) or a person subject to similar blocking or denied party -prohibitions. - -The reader should be aware that U.S. export control and sanctions laws -prohibit U.S. persons (and other persons that are subject to such laws) -from transacting with persons in certain countries and territories or -that are on the SDN list. As a project based primarily on open-source -software, it is possible that such sanctioned persons may nevertheless -bypass prohibitions, obtain the code comprising the Solana blockchain -protocol (or other project code or applications) and deploy, integrate, -or otherwise use it. Accordingly, there is a risk to individuals that -other persons using the Solana blockchain protocol may be sanctioned -persons and that transactions with such persons would be a violation of -U.S. export controls and sanctions law. This risk applies to -individuals, organizations, and other ecosystem participants that -deploy, integrate, or use the Solana blockchain protocol code directly -(e.g., as a node operator), and individuals that transact on the Solana -blockchain through light clients, third party interfaces, and/or wallet -software. diff --git a/packages/governance/craco.config.js b/packages/governance/craco.config.js deleted file mode 100644 index 1ce0585..0000000 --- a/packages/governance/craco.config.js +++ /dev/null @@ -1,31 +0,0 @@ -const CracoLessPlugin = require('craco-less'); -const path = require('path'); -const fs = require('fs'); - -// Handle relative paths to sibling packages -const appDirectory = fs.realpathSync(process.cwd()); -const resolvePackage = relativePath => path.resolve(appDirectory, relativePath); - -module.exports = { - webpack: { - configure: (webpackConfig, { env, paths }) => { - paths.appBuild = webpackConfig.output.path = path.resolve( - './../../build/governance', - ); - return webpackConfig; - }, - }, - plugins: [ - { - plugin: CracoLessPlugin, - options: { - lessLoaderOptions: { - lessOptions: { - modifyVars: { '@primary-color': '#2abdd2' }, - javascriptEnabled: true, - }, - }, - }, - }, - ], -}; diff --git a/packages/governance/package.json b/packages/governance/package.json deleted file mode 100644 index 1c8ccae..0000000 --- a/packages/governance/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "governance", - "version": "0.0.1", - "dependencies": { - "@ant-design/icons": "^4.4.0", - "@blockworks-foundation/voter-stake-registry-client": "^0.1.6", - "@oyster/common": "0.0.2", - "@project-serum/borsh": "^0.2.2", - "@solana/spl-governance": "0.3.17", - "@solana/spl-token": "0.1.3", - "@solana/web3.js": "^1", - "antd": "^4.6.6", - "bn.js": "^5.1.3", - "buffer-layout": "^1.2.0", - "d3": "6.6.0", - "eventemitter3": "^4.0.7", - "react-dom": "16.13.1", - "react-error-boundary": "^3.1.3", - "react-markdown": "5.0.3", - "react-router-dom": "^5.2.0", - "react-scripts": "3.4.3", - "react": "16.13.1", - "superstruct": "^0.15.2" - }, - "scripts": { - "prestart": "npm-link-shared ../common/node_modules/ . react", - "start": "craco start --verbose", - "start:lending": "craco start --verbose", - "build": "craco build", - "test": "craco test", - "eject": "react-scripts eject", - "localnet:update": "solana-localnet update", - "localnet:up": "rm client/util/store/config.json; set -x; solana-localnet down; set -e; solana-localnet up", - "localnet:down": "solana-localnet down", - "localnet:logs": "solana-localnet logs -f", - "predeploy": "git pull --ff-only && yarn && yarn build", - "deploy": "gh-pages -d ../../build/governance --repo https://github.com/solana-labs/oyster-gov", - "deploy:ar": "arweave deploy-dir ../../build/governance --key-file ", - "format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/solana-labs/oyster" - }, - "homepage": ".", - "devDependencies": { - "@babel/preset-typescript": "^7.12.13", - "@craco/craco": "^5.7.0", - "@testing-library/jest-dom": "^4.2.4", - "@types/bn.js": "^5.1.0", - "@types/d3": "6.3.0", - "@types/node": "^12.12.62", - "@types/react-router-dom": "^5.1.6", - "@welldone-software/why-did-you-render": "^6.0.5", - "arweave-deploy": "^1.9.1", - "craco-less": "^1.17.0", - "eslint-config-react-app": "^6.0.0", - "gh-pages": "^3.1.0", - "npm-link-shared": "0.5.6", - "prettier": "^2.1.2", - "typescript": "^4.1.3" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - }, - "resolutions": { - "react": "16.13.1", - "react-dom": "16.13.1" - } -} diff --git a/packages/governance/public/index.html b/packages/governance/public/index.html deleted file mode 100644 index 38c616f..0000000 --- a/packages/governance/public/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - Governance | Solana - - - - - - -
- - - - - diff --git a/packages/governance/public/logo.ico b/packages/governance/public/logo.ico deleted file mode 100644 index da4839396bd02f30766830af208d273bcc7641f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmeI0d2kc=6~|R)r)63iDBYy#k>KW_IiLxfCTU3u9>% z#)mLqj(`jXf^CdBZOgW7%ZF^)k}dg=Z~3-Z+u*ioo1w?QuixLUB@~kBWQOTXXOf-S zk+k0B^ZUK`_WQmMjplor0L}RE8hi$7)^i%oB#lNB7^wcv!u7+r_B5{HEACLQ>Xk5YToA!?0@k8Vzk4j6j3VywKxT<%#`fah|kKNQccyF@)3)2LfIM_t+!a)*CP z9UmuC`zJ~4IciCWq2{D0avhD(u{8{=%pD6}DtN}84e7>i>AbN^d)kQSjNlpZoUt_~ z!PpWXV{AV7iLvR(USs2lUB-q}+cVhn_j@27oO{oSomiv3E&8CoH8x(~lAzN!C+*X_ zk|XqupYGH*q-@jIo!z8&UI^1WE{5uBu7v3AH^d40eEy%>lwZzBj!83qo0M7uPp+0qs0X%~vLo|SA z0M7uPp}Jt9!CD+-s4SZsRay2ns`UO3#3T!AG&wG=HPv1YG1;##H`#KRn5s<+O;+=K zQ)T%aQ-$?SQ@MS*smwXeRO))kWNw{$y14VXF^rBiCe&U=Os`{rd!6&OaX1vghyTAkt{q2{F+`$!9}IAyrfvZxwKHexvW6;tjLq0sq(<88#44!?h~)b&{ny3{YANF zW4he4`7;?BD|c;6m7$k%=gw0yG}GgbI2P{JcW*Sn?Y}kKLEzHxJR1!KSqWSMm*hny z1TKL~;F4#BQPuKQH&i_rFDsf3E_6Mez*V(2L(oH3UkCRp^?}=qUedchL+vMwyA?fU`x!zX zqt0F6?mj^s5yyPo_UMDurb{G6Q{!TFtVelcfc-v;{&-7XjQs`|DZNhR=7O7jm&^KI zSSETOxSP<&(Erdo{kSLnxJQ(Ji2aUo;ah_oTs#>)cEqzh zPwBG*tH51zo%+^ZQTr{p=z-u~xXaa|_wF<({nxz*F-8wY&l%Z-2f2>!Vf`f58w2))T3hRW9q_UM~8b(#O%a(9093 z^}qqO=lQsi)RerJT*nkHHJ;qTdf**@KKqXSKHev0iHNg^IE#q0*t6xlh&YSLuh_LC zMMQo@JtktmB7BF4IE%=y*cuxrBF-ZErr4~H7MqgxiA{$;7U3yG*YR)>JzH!z zr4`Y)#riYS%lGoX?Z4gOCj*ez3GO||_>PEV9(m>4q7LzG(Rv;}hDTm`c$o>PC%*Y$ z6yJ0xl1Cl$uH-#@*K-@eL_kdH5UNd2S;Q&%ry=*73C&p?po|8ouVzD&Br& zC2zmF{QLg#Moxc-v&dId&3H)>9Dt^cB|e(may0nIvr>MEQQt=h`?4@m9KD1&C&LYK+`nb>w_|n!m)H3s?cyF0MMLiMxA8Og3 zyG`LTZ&r7HgX+)H88;N%)rwE^a&6g5;q#U-pI6QJi18TIv5EQTyLtid=dTw@cyGO2 z_(#N9fLDp z<>I}K9o4Bs_)g|m{q@4fg?CNa>fr7h*A1hLACiV+2%eZ!h`vJJ{w8q6Mw@~q@ z)$phfvc0$MPrSkWv8q!semaHR!YeB}b$pjsFA!sJ;hXQ~mT{5WOyt(fg=e&9gR6RJ zg1@Dz!gt{xgUDJkuNtSqW_;B1kmAjmPAR#KL~fZ*skv2kYBaY#ZWuY0+3W%{_HO~{QrE>-NU!lS>OYzo> z``w{N0QEE-@s;rYNQkfGys%C}9ZQbPP^mU+wS+pB@cu}MuY@|55MK%Ll@MR4swhZ8 zElHT0q)N*i33Gyk8AGzzW=fbdq%y~=5@rplwBZ%0#P!nVl4jwtd*fc0y7`V$%WR(W z)zoU})HkfDa?C>&vy_?0QvEvSqUls#`4aFS*yQr;7Q*a zYSY#PppH*`S*L=bQ=@vJ%(TjTi}wdy%N#Z{*e%8AGgHyJHmWM<~GcB9gO=N zxX(}_X1v1wr!eO|P6cvcKW4xa@!2V7+fc~^@uTM z(2^!E_jz!q_;Du@_DiOl;0^{-!SJJmS&{Po^z&Zh=MVYn0sG~^%}{k}K6DCtq2v}^ z%)4rCz1(Sj+!v`t&8<2EcOk}@gA4n-++Tw`(U1EG<$eAz8UMyp?iWAt^*>e~tusQ6RvsBOIP|sYs<2A0VZW@QW;xM;!sAmrK%%Pq+usN_f?3pX&4JB<&E?)1$L0KMESLT7ANl;Z{~Eqc-^uU5z9-@w7p>7eP=Wt8 o@ZiT6IQ?!>zOrlVZxy&F8u#KW{wG2+?%w;@HTJjY|MKts2W-t8RsaA1 diff --git a/packages/governance/public/manifest.json b/packages/governance/public/manifest.json deleted file mode 100644 index 618294f..0000000 --- a/packages/governance/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "Swap | Serum", - "name": "Swap | Serum", - "icons": [ - { - "src": "icon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/packages/governance/public/robots.txt b/packages/governance/public/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/packages/governance/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/packages/governance/public/splash.svg b/packages/governance/public/splash.svg deleted file mode 100644 index d32518e..0000000 --- a/packages/governance/public/splash.svg +++ /dev/null @@ -1,2222 +0,0 @@ - -image/svg+xml diff --git a/packages/governance/src/App.less b/packages/governance/src/App.less deleted file mode 100644 index fecc73f..0000000 --- a/packages/governance/src/App.less +++ /dev/null @@ -1,277 +0,0 @@ -@import '~antd/dist/antd.dark.less'; -@import './ant-custom.less'; - -@solana-green: #00FFA3; - -body { - --row-highlight: @background-color-base; - background-color: #080808; -} - -.App-logo { - background-image: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMwMHB4JyB3aWR0aD0nMzAwcHgnICBmaWxsPSIjZDgzYWViIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAwIDEwMCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTQwLjM2LDUwLjkxYzAuMDA3LTguMTc0LDMuODM2LTExLjUyNSw3LjA0OC0xMi44OThjNi41NTEtMi44MDEsMTYuNzksMC4xNDEsMjMuODA5LDYuODQyICBjMS4yNDYsMS4xODksMi4zNjEsMi4zMDksMy4zNjUsMy4zNjhjLTUuNjg0LTguMzcyLTE1LjAyNS0xNy41NjYtMjkuMDY0LTE4Ljg1OWMtNy43OTQtMC43MTYtMTMuNzk0LDIuNzk5LTE2LjAzMyw5LjQwOCAgYy0yLjY0OSw3LjgyMSwwLjM0MSwxOS4zMDUsMTEuMTgxLDI2LjEyMmM2LjE1MywzLjg2OSwxMi4zLDYuODY5LDE3LjM0MSw5LjA0NWMtMC41NTEtMC4zNTQtMS4xMDUtMC43MTYtMS42Ni0xLjA5MSAgQzQ1LjczMyw2NS42NjIsNDAuMzU0LDU4LjI4MSw0MC4zNiw1MC45MXoiPjwvcGF0aD48cGF0aCBkPSJNNjAuMDI3LDYzLjc2MWMtMC4wNzgtNC43MTUsMS44OTgtOC4yNSw1LjQyMi05LjY5OGM0LjEzOS0xLjcsOS40OS0wLjAwNCwxMy42MzMsNC4zMjMgIGMwLjY5MSwwLjcyMywxLjMwMywxLjQ1MywxLjg3NSwyLjE4NGMtMS42NzQtMy42OTktNC41MS03Ljk1OC0xMS4xMjEtMTQuMjY5Yy02LjM3MS02LjA4MS0xNS44NzktOC45MTItMjEuNjQyLTYuNDUgIGMtMy44MTIsMS42MjktNS44MjksNS40NTQtNS44MzQsMTEuMDYxYy0wLjAxLDExLjgxNSwxNi4zMTIsMjEuNjQ2LDI1LjA3MiwyNi4wNzJDNjMuNzc1LDczLjc0Niw2MC4xMTUsNjkuMTY4LDYwLjAyNyw2My43NjF6Ij48L3BhdGg+PHBhdGggZD0iTTI3LjU5MSwzOC4xM2MyLjU1Ni03LjU0NSw5LjMzMS0xMS41NjgsMTguMTExLTEwLjc1OGMxMS41MjksMS4wNjEsMjAuMDE1LDcuMTQ4LDI2LjAxMywxMy45MiAgQzYxLjUsMjYuMDU0LDQ4Ljk2MywyMC4zMzksNDguODE3LDIwLjI3NGMtMy4yOTYtMS42ODgtNi43OTctMi41MzEtMTAuNDU3LTIuNTMxYy0xMi43NzQsMC0yMy4xNjcsMTAuNTgtMjMuMTY3LDIzLjU4MyAgYzAsNy45NjEsNC4yMDEsMTUuNTIxLDExLjIzOCwyMC4yMjJjMy43ODksMi41MywxMS40ODgsNS44MjQsMjAuMDQ2LDkuMDM4Yy0yLjI1NC0xLjIxNS00LjU2NC0yLjU0Ny02Ljg3NS00ICBDMjcuODg1LDU5LjIxOSwyNC42OSw0Ni42OTQsMjcuNTkxLDM4LjEzeiI+PC9wYXRoPjxwYXRoIGQ9Ik03Ny42MzcsNTkuNzY5Yy0zLjU2OC0zLjcyOS04LjA1Ny01LjI0Mi0xMS40MjgtMy44NTVjLTIuNzIxLDEuMTE4LTQuMjQ2LDMuOTY3LTQuMTgyLDcuODE0ICBjMC4xNDgsOS4wMzUsMTEuMzEzLDE1LjMxOCwxMy41ODgsMTYuNTkyYzMuNDg5LDEuOTU0LDcuNjI1LDIuMDg3LDcuOTA0LDEuOTM4czAuMjc5LTAuMTQ5LDAuNTMxLTAuNjUxICBjMC42Ni0xLjMwOSwxLjA1My00LjI3NSwwLjM2MS04Ljk2NkM4My43NzcsNjkuNDg5LDgyLjA5Niw2NC40MjcsNzcuNjM3LDU5Ljc2OXoiPjwvcGF0aD48L3N2Zz4='); - height: 32px; - pointer-events: none; - background-repeat: no-repeat; - background-size: 32px; - width: 32px; -} - -.app-title { - font-family: "FF Oxide Solid"; - font-style: normal; - font-weight: 300; - letter-spacing: 0px; - - h1 { - font-size: 48px; - margin: 0px; - } - - h2 { - margin: 0px; - - span { - display: inline-block; - font-size: 16px; - margin-bottom: 20px; - background: linear-gradient(270deg, @solana-green 0%, #DC1FFF 101.97%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - } - } -} - -.action-spinner { - position: absolute; - right: 5px; -} - -.ant-tabs-nav-scroll { - display: flex; - justify-content: center; -} - -.discord { - font-size: 30px; - color: #7289da; -} - -.discord:hover { - color: #8ea1e1; -} - -.telegram { - color: #32afed; - font-size: 28px; - background-color: white; - border-radius: 30px; - display: flex; - width: 27px; - height: 27px; -} - -em { - font-weight: bold; - font-style: normal; - text-decoration: none; -} - -.telegram:hover { - color: #2789de !important; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -.social-buttons { - margin-top: auto; - margin-left: auto; - margin-bottom: 0.5rem; - margin-right: 1rem; - gap: 0.3rem; - display: flex; -} - -.wallet-wrapper { - padding-left: 0.7rem; - border-radius: 0.5rem; - display: flex; - align-items: center; - white-space: nowrap; -} - -.wallet-key { - padding: 0.1rem 0.5rem 0.1rem 0.7rem; - margin-left: 0.3rem; - border-radius: 0.5rem; - display: flex; - align-items: center; -} - -.ant-table-cell { - padding: 6px 16px !important; -} - -.ant-table { - margin: 0px 30px; -} - -.ant-menu-inline-collapsed > .ant-menu-item { - padding-left: 16px !important; -} - -.ant-pagination-options { - display: none; -} - -.ant-table-container table > thead > tr th { - text-align: center; -} - -.ant-notification { - a { - color: blue; - text-decoration: underline; - cursor: pointer; - } -} -.flexColumn { - display: flex; - flex-direction: column; - flex: 1; -} - -.ant-layout-header { - background-color: transparent !important; -} - -.ant-layout { - background-color: #080808 !important; -} - -.ant-layout-content { - background-color: #080808; - position: relative; -} - -.ant-slider { - margin: 20px 15px 40px 15px; -} - -.ant-pro-sider.ant-layout-sider-collapsed .ant-pro-sider-logo { - padding: 8px 8px; -} - -.ant-pro-global-header { - .ant-pro-global-header-logo a h1 { - color: white !important; - } - - background-color: black !important; - color: white !important; - - .ant-btn { - color: white !important; - } -} - -.ant-statistic { - user-select: none; -} - -.ant-statistic-content { - font-weight: bold; -} - -.ant-select-selection-item { - .token-balance { - display: none; - } -} - -.token-input { - display: flex; - align-items: center; - border: 1px solid grey; - padding: 0px 10px; - margin: 5px 0px; -} - -.token-balance { - margin-left: auto; - margin-right: 5px; - color: @text-color-secondary; -} - -[class='ant-layout-header'] { - height: 16px !important; -} - -.dashboard-amount-quote { - font-size: 10px; - font-style: normal; - text-align: right; -} - -.small-statisitc { - .ant-statistic-title { - font-size: 12px; - } - - .ant-statistic-content { - max-height: 20px; - line-height: 2px; - } - - .ant-statistic-content-value-int { - font-size: 12px; - } - - .ant-statistic-content-value-decimal { - font-size: 10px; - } -} - -.links { - position: relative; - height: 100%; - - .bottom-links { - position: absolute; - bottom: 0px; - } -} - -.ant-pro-sider { - background: transparent !important; - - .ant-menu { - background: transparent !important; - } -} - -.dashboard-amount-quote-stat { - font-size: 10px; - font-style: normal; - text-align: center; - font-weight: normal; -} - -@media only screen and (max-width: 600px) { - .exchange-card { - width: 360px; - } -} diff --git a/packages/governance/src/App.tsx b/packages/governance/src/App.tsx deleted file mode 100644 index 21da649..0000000 --- a/packages/governance/src/App.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import "./App.less"; -import { Routes } from "./routes"; - -function App() { - return ; -} - -export default App; diff --git a/packages/governance/src/actions/cancelProposal.ts b/packages/governance/src/actions/cancelProposal.ts deleted file mode 100644 index a5abed5..0000000 --- a/packages/governance/src/actions/cancelProposal.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -import { withCancelProposal } from '@solana/spl-governance'; - -export async function cancelProposal( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, -) { - let governanceAuthority = walletPubkey; - - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - withCancelProposal( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - governanceAuthority, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Cancelling proposal', - 'Proposal cancelled', - ); -} diff --git a/packages/governance/src/actions/castVote.ts b/packages/governance/src/actions/castVote.ts deleted file mode 100644 index 0ef1be6..0000000 --- a/packages/governance/src/actions/castVote.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; -import { withCastVote } from '@solana/spl-governance'; -import { Vote, YesNoVote } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const castVote = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, - tokeOwnerRecord: PublicKey, - yesNoVote: YesNoVote, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - let governanceAuthority = walletPubkey; - let payer = walletPubkey; - - await withCastVote( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - tokeOwnerRecord, - governanceAuthority, - proposal.account.governingTokenMint, - Vote.fromYesNoVote(yesNoVote), - payer, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Voting on proposal', - 'Proposal voted on', - ); -}; diff --git a/packages/governance/src/actions/chat/postChatMessage.ts b/packages/governance/src/actions/chat/postChatMessage.ts deleted file mode 100644 index 107bd76..0000000 --- a/packages/governance/src/actions/chat/postChatMessage.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { GOVERNANCE_CHAT_PROGRAM_ID, Proposal } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { withPostChatMessage } from '@solana/spl-governance'; -import { ChatMessageBody } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const postChatMessage = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, - tokeOwnerRecord: PublicKey, - replyTo: PublicKey | undefined, - body: ChatMessageBody, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - let governanceAuthority = walletPubkey; - let payer = walletPubkey; - - await withPostChatMessage( - instructions, - signers, - GOVERNANCE_CHAT_PROGRAM_ID, - programId, - realm, - proposal.account.governance, - proposal.pubkey, - tokeOwnerRecord, - governanceAuthority, - payer, - replyTo, - body, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Posting comment', - 'Comment post', - ); -}; diff --git a/packages/governance/src/actions/createNativeTreasury.ts b/packages/governance/src/actions/createNativeTreasury.ts deleted file mode 100644 index 38ffd50..0000000 --- a/packages/governance/src/actions/createNativeTreasury.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Keypair, TransactionInstruction } from '@solana/web3.js'; - -import { Governance } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; - -import { withCreateNativeTreasury } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const createNativeTreasury = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - - governance: ProgramAccount, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - await withCreateNativeTreasury( - instructions, - programId, - programVersion, - governance.pubkey, - walletPubkey, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Creating SOL treasury', - 'SOL treasury created', - ); -}; diff --git a/packages/governance/src/actions/createProposal.ts b/packages/governance/src/actions/createProposal.ts deleted file mode 100644 index 860ec72..0000000 --- a/packages/governance/src/actions/createProposal.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { withCreateProposal } from '@solana/spl-governance'; -import { withAddSignatory } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { VoteType } from '@solana/spl-governance'; - -export const createProposal = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - governance: PublicKey, - tokenOwnerRecord: PublicKey, - name: string, - descriptionLink: string, - governingTokenMint: PublicKey, - proposalIndex: number, -): Promise => { - let instructions: TransactionInstruction[] = []; - - let governanceAuthority = walletPubkey; - let signatory = walletPubkey; - let payer = walletPubkey; - - // V2 Approve/Deny configuration - const voteType = VoteType.SINGLE_CHOICE; - const options = ['Approve']; - const useDenyOption = true; - - const proposalAddress = await withCreateProposal( - instructions, - programId, - programVersion, - realm, - governance, - tokenOwnerRecord, - name, - descriptionLink, - governingTokenMint, - - governanceAuthority, - proposalIndex, - voteType, - options, - useDenyOption, - payer, - ); - - // Add the proposal creator as the default signatory - await withAddSignatory( - instructions, - programId, - programVersion, - proposalAddress, - tokenOwnerRecord, - governanceAuthority, - signatory, - payer, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - [], - 'Creating proposal', - 'Proposal has been created', - ); - - return proposalAddress; -}; diff --git a/packages/governance/src/actions/createTreasuryAccount.ts b/packages/governance/src/actions/createTreasuryAccount.ts deleted file mode 100644 index 9a7fbdb..0000000 --- a/packages/governance/src/actions/createTreasuryAccount.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { GovernanceConfig } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; - -import { withCreateTokenGovernance } from '@solana/spl-governance'; -import { RpcContext } from '@solana/spl-governance'; -import { withCreateSplTokenAccount } from '../tools/sdk/token/splToken'; - -export const createTreasuryAccount = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - mint: PublicKey, - config: GovernanceConfig, - tokenOwnerRecord: PublicKey, -): Promise => { - let instructions: TransactionInstruction[] = []; - let signers: Keypair[] = []; - - const tokenAccount = await withCreateSplTokenAccount( - instructions, - signers, - connection, - mint, - walletPubkey, - walletPubkey, - ); - - let governanceAddress; - let governanceAuthority = walletPubkey; - - governanceAddress = await withCreateTokenGovernance( - instructions, - programId, - programVersion, - realm, - tokenAccount, - config, - true, - walletPubkey, - tokenOwnerRecord, - walletPubkey, - governanceAuthority, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Creating treasury account', - 'Treasury account has been created', - ); - - return governanceAddress; -}; diff --git a/packages/governance/src/actions/depositGoverningTokens.ts b/packages/governance/src/actions/depositGoverningTokens.ts deleted file mode 100644 index 6d162f1..0000000 --- a/packages/governance/src/actions/depositGoverningTokens.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { PublicKey, TransactionInstruction, Keypair } from '@solana/web3.js'; -import { models, TokenAccount } from '@oyster/common'; -import { withDepositGoverningTokens } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import BN from 'bn.js'; - -const { approve } = models; - -export const depositGoverningTokens = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - governingTokenSource: TokenAccount, - governingTokenMint: PublicKey, -) => { - let instructions: TransactionInstruction[] = []; - let signers: Keypair[] = []; - - const amount = governingTokenSource.info.amount; - - const transferAuthority = approve( - instructions, - [], - governingTokenSource.pubkey, - walletPubkey, - amount, - ); - - signers.push((transferAuthority as any) as Keypair); - - await withDepositGoverningTokens( - instructions, - programId, - programVersion, - realm, - governingTokenSource.pubkey, - governingTokenMint, - walletPubkey, - transferAuthority.publicKey, - walletPubkey, - amount as BN, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Depositing governing tokens', - 'Tokens have been deposited', - ); -}; diff --git a/packages/governance/src/actions/devtools/createAccount.ts b/packages/governance/src/actions/devtools/createAccount.ts deleted file mode 100644 index 5edfbc1..0000000 --- a/packages/governance/src/actions/devtools/createAccount.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { sendTransaction, utils } from '@oyster/common'; -import { - Connection, - Account, - TransactionInstruction, - PublicKey, - SystemProgram, -} from '@solana/web3.js'; - -const { notify } = utils; - -export const createAccount = async ( - connection: Connection, - wallet: any, - size: number, - programId: PublicKey, -) => { - let signers: Account[] = []; - let instructions: TransactionInstruction[] = []; - - const account = new Account(); - - const mintRentExempt = await connection.getMinimumBalanceForRentExemption( - size, - ); - - instructions.push( - SystemProgram.createAccount({ - fromPubkey: wallet.publicKey, - newAccountPubkey: account.publicKey, - lamports: mintRentExempt, - space: size, - programId: programId, - }), - ); - - signers.push(account); - - console.log('ACCOUNT:', account.publicKey.toBase58()); - - notify({ - message: 'Creating account...', - description: 'Please wait...', - type: 'warn', - }); - - try { - let tx = await sendTransaction(connection, wallet, instructions, signers); - - notify({ - message: 'Governance artifacts created.', - type: 'success', - description: `Transaction - ${tx}`, - }); - } catch (ex) { - console.error(ex); - throw ex; - } -}; diff --git a/packages/governance/src/actions/devtools/generateGovernanceArtifacts.ts b/packages/governance/src/actions/devtools/generateGovernanceArtifacts.ts deleted file mode 100644 index 3dc9a1d..0000000 --- a/packages/governance/src/actions/devtools/generateGovernanceArtifacts.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { - Account, - Connection, - PublicKey, - SystemProgram, - TransactionInstruction, -} from '@solana/web3.js'; -import { - utils, - createMint, - createTokenAccount, - sendTransactions, - SequenceType, - WalletSigner, - WalletNotConnectedError, -} from '@oyster/common'; -import { AccountLayout, MintLayout, Token, u64 } from '@solana/spl-token'; - -const { notify } = utils; -export interface SourceEntryInterface { - owner: PublicKey; - sourceAccount: PublicKey | undefined; - tokenAmount: number; -} -export const generateGovernanceArtifacts = async ( - connection: Connection, - wallet: WalletSigner, -) => { - let communityMintSigners: Account[] = []; - let communityMintInstruction: TransactionInstruction[] = []; - - const otherOwnerWallet = new PublicKey( - 'ENmcpFCpxN1CqyUjuog9yyUVfdXBKF3LVCwLr7grJZpk', - ); - - // Setup community mint - const { mintAddress: communityMintAddress } = await withMint( - communityMintInstruction, - communityMintSigners, - connection, - wallet, - 3, - new u64('7000000'), - new u64('10000000'), - otherOwnerWallet, - ); - - let councilMinSigners: Account[] = []; - let councilMintInstructions: TransactionInstruction[] = []; - - // Setup council mint - const { mintAddress: councilMintAddress } = await withMint( - councilMintInstructions, - councilMinSigners, - connection, - wallet, - 0, - new u64(20), - new u64(55), - otherOwnerWallet, - ); - - // Setup Realm, Governance and Proposal instruction - let governanceSigners: Account[] = []; - let governanceInstructions: TransactionInstruction[] = []; - - // Token governance artifacts - const tokenGovernance = await withTokenGovernance( - governanceInstructions, - governanceSigners, - connection, - wallet, - 0, - new u64(200), - ); - - let realmName = `Realm-${communityMintAddress.toBase58().substring(0, 5)}`; - - notify({ - message: 'Creating Governance artifacts...', - description: 'Please wait...', - type: 'warn', - }); - - try { - let tx = await sendTransactions( - connection, - wallet, - [ - communityMintInstruction, - councilMintInstructions, - governanceInstructions, - ], - [communityMintSigners, councilMinSigners, governanceSigners], - SequenceType.Sequential, - ); - - notify({ - message: 'Governance artifacts created.', - type: 'success', - description: `Transaction - ${tx}`, - }); - - return { - realmName, - communityMintAddress, - councilMintAddress, - tokenGovernance, - }; - } catch (ex) { - console.error(ex); - throw ex; - } -}; - -const withTokenGovernance = async ( - instructions: TransactionInstruction[], - signers: Account[], - connection: Connection, - wallet: WalletSigner, - decimals: number, - amount: u64, -) => { - const { publicKey } = wallet; - if (!publicKey) throw new WalletNotConnectedError(); - - const { token: tokenId } = utils.programIds(); - - const mintRentExempt = await connection.getMinimumBalanceForRentExemption( - MintLayout.span, - ); - - const tokenAccountRentExempt = await connection.getMinimumBalanceForRentExemption( - AccountLayout.span, - ); - - const mintAddress = createMint( - instructions, - publicKey, - mintRentExempt, - decimals, - publicKey, - publicKey, - signers, - ); - - const tokenAccountAddress = createTokenAccount( - instructions, - publicKey, - tokenAccountRentExempt, - mintAddress, - publicKey, - signers, - ); - - instructions.push( - Token.createMintToInstruction( - tokenId, - mintAddress, - tokenAccountAddress, - publicKey, - [], - new u64(amount), - ), - ); - - const beneficiaryTokenAccountAddress = createTokenAccount( - instructions, - publicKey, - tokenAccountRentExempt, - mintAddress, - publicKey, - signers, - ); - - return { - tokenAccountAddress: tokenAccountAddress.toBase58(), - beneficiaryTokenAccountAddress: beneficiaryTokenAccountAddress.toBase58(), - }; -}; - -export const withMint = async ( - instructions: TransactionInstruction[], - signers: Account[], - connection: Connection, - wallet: WalletSigner, - decimals: number, - amount: u64, - supply: u64, - otherOwnerWallet: PublicKey, -) => { - const { publicKey } = wallet; - if (!publicKey) throw new WalletNotConnectedError(); - - const { system: systemId, token: tokenId } = utils.programIds(); - - const mintRentExempt = await connection.getMinimumBalanceForRentExemption( - MintLayout.span, - ); - - const tokenAccountRentExempt = await connection.getMinimumBalanceForRentExemption( - AccountLayout.span, - ); - - const accountRentExempt = await connection.getMinimumBalanceForRentExemption( - 0, - ); - - const mintAddress = createMint( - instructions, - publicKey, - mintRentExempt, - decimals, - publicKey, - publicKey, - signers, - ); - - const tokenAccountAddress = createTokenAccount( - instructions, - publicKey, - tokenAccountRentExempt, - mintAddress, - publicKey, - signers, - ); - - instructions.push( - Token.createMintToInstruction( - tokenId, - mintAddress, - tokenAccountAddress, - publicKey, - [], - new u64(amount), - ), - ); - - const otherOwner = new Account(); - instructions.push( - SystemProgram.createAccount({ - fromPubkey: publicKey, - newAccountPubkey: otherOwner.publicKey, - lamports: accountRentExempt, - space: 0, - programId: systemId, - }), - ); - - signers.push(otherOwner); - - const otherOwnerTokenAccount = createTokenAccount( - instructions, - publicKey, - tokenAccountRentExempt, - mintAddress, - otherOwnerWallet, - signers, - ); - - instructions.push( - Token.createMintToInstruction( - tokenId, - mintAddress, - otherOwnerTokenAccount, - publicKey, - [], - new u64(supply.sub(amount).toArray()), - ), - ); - - return { mintAddress, otherOwnerTokenAccount }; -}; diff --git a/packages/governance/src/actions/devtools/generateMint.ts b/packages/governance/src/actions/devtools/generateMint.ts deleted file mode 100644 index a2b3612..0000000 --- a/packages/governance/src/actions/devtools/generateMint.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { notify, sendTransaction, WalletSigner } from '@oyster/common'; -import { u64 } from '@solana/spl-token'; - -import { - Account, - Connection, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js'; - -import { withMint } from './generateGovernanceArtifacts'; - -export const generateMint = async ( - connection: Connection, - wallet: WalletSigner, - decimals: number, - amount: u64, - supply: u64, - otherOwnerWallet: PublicKey, -) => { - let signers: Account[] = []; - let instructions: TransactionInstruction[] = []; - - const { mintAddress } = await withMint( - instructions, - signers, - connection, - wallet, - decimals, - amount, - supply, - otherOwnerWallet, - ); - - notify({ - message: 'Creating mint...', - description: 'Please wait...', - type: 'warn', - }); - - try { - let tx = await sendTransaction(connection, wallet, instructions, signers); - - notify({ - message: 'Mint created.', - type: 'success', - description: `Transaction - ${tx}`, - }); - - return { - mintAddress, - }; - } catch (ex) { - console.error(ex); - throw ex; - } -}; diff --git a/packages/governance/src/actions/dryRunInstruction.ts b/packages/governance/src/actions/dryRunInstruction.ts deleted file mode 100644 index 84a8a6b..0000000 --- a/packages/governance/src/actions/dryRunInstruction.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { InstructionData, RpcContext } from '@solana/spl-governance'; -import { simulateTransaction } from '@oyster/common'; -import { Transaction } from '@solana/web3.js'; - -export async function dryRunInstruction( - rpc: RpcContext, - instructionData: InstructionData, -) { - return dryRunInstructions(rpc, [instructionData]); -} - -export async function dryRunInstructions( - { connection, wallet }: RpcContext, - instructions: InstructionData[], -) { - let transaction = new Transaction({ feePayer: wallet!.publicKey }); - - for (let ins of instructions) - transaction.add({ - keys: ins.accounts, - programId: ins.programId, - data: Buffer.from(ins.data), - }); - - const result = await simulateTransaction( - connection, - transaction, - 'singleGossip', - ); - - return { response: result.value, transaction }; -} diff --git a/packages/governance/src/actions/executeInstruction.ts b/packages/governance/src/actions/executeInstruction.ts deleted file mode 100644 index 9758749..0000000 --- a/packages/governance/src/actions/executeInstruction.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Keypair, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal, ProposalTransaction } from '@solana/spl-governance'; - -import { withExecuteTransaction } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const executeInstruction = async ( - { connection, wallet, programId, programVersion }: RpcContext, - proposal: ProgramAccount, - instruction: ProgramAccount, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - await withExecuteTransaction( - instructions, - programId, - programVersion, - proposal.account.governance, - proposal.pubkey, - instruction.pubkey, - instruction.account.getAllInstructions(), - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Executing instruction', - 'Instruction executed', - ); -}; diff --git a/packages/governance/src/actions/finalizeVote.ts b/packages/governance/src/actions/finalizeVote.ts deleted file mode 100644 index 0a3a1f4..0000000 --- a/packages/governance/src/actions/finalizeVote.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; - -import { withFinalizeVote } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const finalizeVote = async ( - { connection, wallet, programId, programVersion }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - await withFinalizeVote( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - proposal.account.governingTokenMint, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Finalizing vote', - 'Vote finalized', - ); -}; diff --git a/packages/governance/src/actions/flagInstructionError.ts b/packages/governance/src/actions/flagInstructionError.ts deleted file mode 100644 index e59685c..0000000 --- a/packages/governance/src/actions/flagInstructionError.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; - -import { withFlagTransactionError } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const flagInstructionError = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - proposal: ProgramAccount, - proposalInstruction: PublicKey, -) => { - let governanceAuthority = walletPubkey; - - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - withFlagTransactionError( - instructions, - programId, - programVersion, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - governanceAuthority, - proposalInstruction, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Flagging instruction as broken', - 'Instruction flagged as broken', - ); -}; diff --git a/packages/governance/src/actions/insertInstruction.ts b/packages/governance/src/actions/insertInstruction.ts deleted file mode 100644 index fca7b4b..0000000 --- a/packages/governance/src/actions/insertInstruction.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { InstructionData, Proposal } from '@solana/spl-governance'; - -import { withInsertTransaction } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const insertInstruction = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - proposal: ProgramAccount, - tokenOwnerRecord: PublicKey, - index: number, - optionIndex: number, - holdUpTime: number, - instructionData: InstructionData, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - const governanceAuthority = walletPubkey; - const payer = walletPubkey; - - const proposalInstructionAddress = await withInsertTransaction( - instructions, - programId, - programVersion, - proposal.account.governance, - proposal.pubkey, - tokenOwnerRecord, - governanceAuthority, - index, - optionIndex, - holdUpTime, - [instructionData], - payer, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Adding instruction', - 'Instruction added', - ); - - return proposalInstructionAddress; -}; diff --git a/packages/governance/src/actions/registerGovernance.ts b/packages/governance/src/actions/registerGovernance.ts deleted file mode 100644 index 9ca2462..0000000 --- a/packages/governance/src/actions/registerGovernance.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { withCreateGovernance } from '@solana/spl-governance'; -import { GovernanceType } from '@solana/spl-governance'; -import { GovernanceConfig } from '@solana/spl-governance'; -import { withCreateProgramGovernance } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { withCreateMintGovernance } from '@solana/spl-governance'; -import { withCreateTokenGovernance } from '@solana/spl-governance'; -import { RpcContext } from '@solana/spl-governance'; - -export const registerGovernance = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - governanceType: GovernanceType, - realm: PublicKey, - governedAccount: PublicKey, - config: GovernanceConfig, - transferAuthority: boolean, - tokenOwnerRecord: PublicKey, -): Promise => { - let instructions: TransactionInstruction[] = []; - - let governanceAddress; - let governanceAuthority = walletPubkey; - - switch (governanceType) { - case GovernanceType.Account: { - governanceAddress = await withCreateGovernance( - instructions, - programId, - programVersion, - realm, - governedAccount, - config, - tokenOwnerRecord, - walletPubkey, - governanceAuthority, - ); - break; - } - case GovernanceType.Program: { - governanceAddress = await withCreateProgramGovernance( - instructions, - programId, - programVersion, - realm, - governedAccount, - config, - transferAuthority!, - walletPubkey, - tokenOwnerRecord, - walletPubkey, - governanceAuthority, - ); - break; - } - case GovernanceType.Mint: { - governanceAddress = await withCreateMintGovernance( - instructions, - programId, - programVersion, - realm, - governedAccount, - config, - transferAuthority!, - walletPubkey, - tokenOwnerRecord, - walletPubkey, - governanceAuthority, - ); - break; - } - case GovernanceType.Token: { - governanceAddress = await withCreateTokenGovernance( - instructions, - programId, - programVersion, - realm, - governedAccount, - config, - transferAuthority!, - walletPubkey, - tokenOwnerRecord, - walletPubkey, - governanceAuthority, - ); - break; - } - default: { - throw new Error( - `Governance type ${governanceType} is not supported yet.`, - ); - } - } - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - [], - 'Registering governance', - 'Governance has been registered', - ); - - return governanceAddress; -}; diff --git a/packages/governance/src/actions/registerRealm.ts b/packages/governance/src/actions/registerRealm.ts deleted file mode 100644 index 342f876..0000000 --- a/packages/governance/src/actions/registerRealm.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import BN from 'bn.js'; -import { - GoverningTokenConfigAccountArgs, - GoverningTokenType, - MintMaxVoteWeightSource, -} from '@solana/spl-governance'; -import { RpcContext } from '@solana/spl-governance'; - -import { withCreateRealm } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; - -export async function registerRealm( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - name: string, - communityMint: PublicKey, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityTokensToCreateGovernance: BN, - communityVoterWeightAddin: PublicKey | undefined, -) { - let instructions: TransactionInstruction[] = []; - - const communityTokenConfig = communityVoterWeightAddin - ? new GoverningTokenConfigAccountArgs({ - voterWeightAddin: communityVoterWeightAddin, - maxVoterWeightAddin: undefined, - tokenType: GoverningTokenType.Liquid, - }) - : undefined; - - const realmAddress = await withCreateRealm( - instructions, - programId, - programVersion, - name, - walletPubkey, - communityMint, - walletPubkey, - councilMint, - communityMintMaxVoteWeightSource, - minCommunityTokensToCreateGovernance, - communityTokenConfig, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - [], - 'Registering realm', - 'Realm has been registered', - ); - - return realmAddress; -} diff --git a/packages/governance/src/actions/relinquishVote.ts b/packages/governance/src/actions/relinquishVote.ts deleted file mode 100644 index 4e28111..0000000 --- a/packages/governance/src/actions/relinquishVote.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; -import { withRelinquishVote } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const relinquishVote = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, - tokenOwnerRecord: PublicKey, - voteRecord: PublicKey, - IsWithdrawal: boolean, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - let governanceAuthority = walletPubkey; - let beneficiary = walletPubkey; - - withRelinquishVote( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - proposal.pubkey, - tokenOwnerRecord, - proposal.account.governingTokenMint, - voteRecord, - governanceAuthority, - beneficiary, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - IsWithdrawal ? 'Withdrawing vote from proposal' : 'Releasing voting tokens', - IsWithdrawal ? 'Vote withdrawn' : 'Tokens released', - ); -}; diff --git a/packages/governance/src/actions/removeInstruction.ts b/packages/governance/src/actions/removeInstruction.ts deleted file mode 100644 index fb94b78..0000000 --- a/packages/governance/src/actions/removeInstruction.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal } from '@solana/spl-governance'; - -import { withRemoveTransaction } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const removeInstruction = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - proposal: ProgramAccount, - proposalInstruction: PublicKey, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - const governanceAuthority = walletPubkey; - const beneficiary = walletPubkey; - - await withRemoveTransaction( - instructions, - programId, - programVersion, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - governanceAuthority, - proposalInstruction, - beneficiary, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Removing instruction', - 'Instruction removed', - ); -}; diff --git a/packages/governance/src/actions/setRealmAuthority.ts b/packages/governance/src/actions/setRealmAuthority.ts deleted file mode 100644 index ab2cbfe..0000000 --- a/packages/governance/src/actions/setRealmAuthority.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Realm, SetRealmAuthorityAction } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { withSetRealmAuthority } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const setRealmAuthority = async ( - { connection, wallet, programId, programVersion }: RpcContext, - - realm: ProgramAccount, - newRealmAuthority: PublicKey, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - withSetRealmAuthority( - instructions, - programId, - programVersion, - realm.pubkey, - realm.account.authority!, - newRealmAuthority, - SetRealmAuthorityAction.SetChecked, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Setting realm authority', - 'Realm authority set', - ); -}; diff --git a/packages/governance/src/actions/signOffProposal.ts b/packages/governance/src/actions/signOffProposal.ts deleted file mode 100644 index 671efe7..0000000 --- a/packages/governance/src/actions/signOffProposal.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; - -import { Proposal, SignatoryRecord } from '@solana/spl-governance'; -import { withSignOffProposal } from '@solana/spl-governance'; -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export const signOffProposal = async ( - { connection, wallet, programId, programVersion }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, - signatoryRecord: ProgramAccount, - signatory: PublicKey, -) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - withSignOffProposal( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - signatoryRecord.account.proposal, - signatory, - signatoryRecord.pubkey, - undefined, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Signing off proposal', - 'Proposal signed off', - ); -}; diff --git a/packages/governance/src/actions/updateProgramMetadata.ts b/packages/governance/src/actions/updateProgramMetadata.ts deleted file mode 100644 index 1a8823c..0000000 --- a/packages/governance/src/actions/updateProgramMetadata.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Keypair, TransactionInstruction } from '@solana/web3.js'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; -import { RpcContext } from '@solana/spl-governance'; - -import { withUpdateProgramMetadata } from '@solana/spl-governance'; - -export const updateProgramMetadata = async ({ - connection, - wallet, - programId, - programVersion, - walletPubkey, -}: RpcContext) => { - let signers: Keypair[] = []; - let instructions: TransactionInstruction[] = []; - - await withUpdateProgramMetadata( - instructions, - programId, - programVersion, - walletPubkey, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - signers, - 'Updating Program Metadata', - 'Program Metadata Updated', - ); -}; diff --git a/packages/governance/src/actions/withdrawGoverningTokens.ts b/packages/governance/src/actions/withdrawGoverningTokens.ts deleted file mode 100644 index 5b88bbc..0000000 --- a/packages/governance/src/actions/withdrawGoverningTokens.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { withWithdrawGoverningTokens } from '@solana/spl-governance'; -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { RpcContext } from '@solana/spl-governance'; - -import { sendTransactionWithNotifications } from '../tools/transactions'; - -export const withdrawGoverningTokens = async ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - realm: PublicKey, - governingTokenDestination: PublicKey, - governingTokenMint: PublicKey, -) => { - let instructions: TransactionInstruction[] = []; - - await withWithdrawGoverningTokens( - instructions, - programId, - programVersion, - realm, - governingTokenDestination, - governingTokenMint, - walletPubkey, - ); - - await sendTransactionWithNotifications( - connection, - wallet, - instructions, - [], - 'Withdrawing governing tokens', - 'Tokens have been withdrawn', - ); -}; diff --git a/packages/governance/src/ant-custom.less b/packages/governance/src/ant-custom.less deleted file mode 100644 index 868492f..0000000 --- a/packages/governance/src/ant-custom.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '~antd/es/style/themes/dark.less'; -@import '~antd/dist/antd.dark.less'; - -@font-face { - font-family: "FF Oxide Solid"; - src: url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.eot"); - src: url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.eot?#iefix") format("embedded-opentype"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.woff2") format("woff2"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.woff") format("woff"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.ttf") format("truetype"), - url("//db.onlinewebfonts.com/t/bc30adee89b44a44a5cfdff676aef0fe.svg#FF Oxide Solid") format("svg"); -} - -@primary-color: #ff00a8; -@popover-background: #1a2029; diff --git a/packages/governance/src/components/AccountFormItem/accountFormItem.tsx b/packages/governance/src/components/AccountFormItem/accountFormItem.tsx deleted file mode 100644 index 070fbe3..0000000 --- a/packages/governance/src/components/AccountFormItem/accountFormItem.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Form, Input } from 'antd'; - -import React from 'react'; - -import { contexts, tryParseKey } from '@oyster/common'; -import { AccountInfo, ParsedAccountData } from '@solana/web3.js'; - -const { useConnection } = contexts.Connection; - -export function AccountFormItem({ - name, - label, - required = true, - accountInfoValidator, -}: { - name: string; - label: string; - required?: boolean; - accountInfoValidator?: ( - account: AccountInfo, - ) => void; -}) { - const connection = useConnection(); - - const accountValidator = async (rule: any, value: string) => { - if (rule.required && !value) { - throw new Error(`Please provide ${label}`); - } else { - const pubkey = tryParseKey(value); - - if (!pubkey) { - throw new Error('Provided value is not a valid account address'); - } - - // Note: Do not use the accounts cache here to always get most recent result - await connection.getParsedAccountInfo(pubkey).then(data => { - if (!data || !data.value) { - throw new Error('Account not found'); - } - - if (accountInfoValidator) { - accountInfoValidator(data.value); - } - }); - } - }; - - return ( - - - - ); -} diff --git a/packages/governance/src/components/Background/index.tsx b/packages/governance/src/components/Background/index.tsx deleted file mode 100644 index df8d5d4..0000000 --- a/packages/governance/src/components/Background/index.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -import './styles.less'; - -export const Background = () => { - return ( -
- ); -}; diff --git a/packages/governance/src/components/Background/styles.less b/packages/governance/src/components/Background/styles.less deleted file mode 100644 index 13cd489..0000000 --- a/packages/governance/src/components/Background/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -.stencil-overlay { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} diff --git a/packages/governance/src/components/GovernanceBadge/governanceBadge.tsx b/packages/governance/src/components/GovernanceBadge/governanceBadge.tsx deleted file mode 100644 index 2c1228f..0000000 --- a/packages/governance/src/components/GovernanceBadge/governanceBadge.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import { TokenIcon, useConnectionConfig, useAccount } from '@oyster/common'; -import { Avatar, Badge, Tooltip } from 'antd'; -import React from 'react'; -import { Governance, ProposalState, Realm } from '@solana/spl-governance'; - -import { useProposalsByGovernance } from '../../hooks/apiHooks'; - -import './style.less'; -import { SafetyCertificateOutlined } from '@ant-design/icons'; -import { ProgramAccount } from '@solana/spl-governance'; - -export function GovernanceBadge({ - realm, - governance, - size = 40, - showVotingCount = true, -}: { - realm: ProgramAccount | undefined; - governance: ProgramAccount; - size?: number; - showVotingCount?: boolean; -}) { - const proposals = useProposalsByGovernance(governance?.pubkey); - const { tokenMap } = useConnectionConfig(); - const tokenAccount = useAccount(governance.account.governedAccount); - - const color = governance.account.isProgramGovernance() ? 'green' : 'gray'; - const useAvatar = - governance.account.isProgramGovernance() || - governance.account.isAccountGovernance(); - - const tokenMint = tokenAccount ? tokenAccount.info.mint : undefined; - - return ( - p.account.state === ProposalState.Voting) - .length - : 0 - } - > -
- {governance.account.isMintGovernance() && ( - - )} - {governance.account.isTokenGovernance() && ( -
- - - -
- )} - {useAvatar && ( - - {governance.account.governedAccount.toBase58().slice(0, 5)} - - )} -
- {realm?.account.authority?.toBase58() === - governance.pubkey.toBase58() && ( - - - - )} -
- ); -} diff --git a/packages/governance/src/components/GovernanceBadge/style.less b/packages/governance/src/components/GovernanceBadge/style.less deleted file mode 100644 index 4d55a1e..0000000 --- a/packages/governance/src/components/GovernanceBadge/style.less +++ /dev/null @@ -1,6 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -// add transparent shadow to token icons -.token-icon-container > div > div { - box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.3); -} diff --git a/packages/governance/src/components/Layout/dark-horizontal-combined-rainbow.inline.svg b/packages/governance/src/components/Layout/dark-horizontal-combined-rainbow.inline.svg deleted file mode 100644 index 1b8e7a6..0000000 --- a/packages/governance/src/components/Layout/dark-horizontal-combined-rainbow.inline.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/governance/src/components/Layout/layout.tsx b/packages/governance/src/components/Layout/layout.tsx deleted file mode 100644 index 52353bb..0000000 --- a/packages/governance/src/components/Layout/layout.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; -import './../../App.less'; -import { Layout } from 'antd'; -import { Link } from 'react-router-dom'; - -import { components } from '@oyster/common'; -import { Content, Header } from 'antd/lib/layout/layout'; -import Logo from './dark-horizontal-combined-rainbow.inline.svg'; -import { useRpcContext } from '../../hooks/useRpcContext'; -import { getHomeUrl } from '../../tools/routeTools'; - -const { AppBar } = components; - -export const AppLayout = React.memo((props: any) => { - // const location = useLocation(); - - // const breadcrumbNameMap: any = { - // '/governance': 'Governance', - // '/apps/1': 'Application1', - // '/apps/2': 'Application2', - // '/apps/1/detail': 'Detail', - // '/apps/2/detail': 'Detail', - // }; - - //const pathSnippets = location.pathname.split('/').filter(i => i); - // const extraBreadcrumbItems = pathSnippets.map((_, index) => { - // const url = `/${pathSnippets.slice(0, index + 1).join('/')}`; - // return ( - // - // {breadcrumbNameMap[url]} - // - // ); - // }); - - // const breadcrumbItems = [ - // - // Home - // , - // ].concat(extraBreadcrumbItems); - - // TODO: add breadcrumb - - return ( -
- -
- - -
- - {/* {breadcrumbItems} */} - {props.children} - -
-
- ); -}); - -const HomeLink = () => { - const { programId } = useRpcContext(); - - return ( - - {`Solana - - ); -}; diff --git a/packages/governance/src/components/MintFormItem/mintFormItem.tsx b/packages/governance/src/components/MintFormItem/mintFormItem.tsx deleted file mode 100644 index 31a174e..0000000 --- a/packages/governance/src/components/MintFormItem/mintFormItem.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Form, Input } from 'antd'; - -import React from 'react'; - -import { contexts, MintParser, tryParseKey } from '@oyster/common'; -const { useConnection } = contexts.Connection; - -export function MintFormItem({ - name, - label, - required = true, - onChange, - initialValue, -}: { - name: string; - label: string; - required?: boolean; - onChange?: (mint: string) => void; - initialValue?: any; -}) { - const connection = useConnection(); - - const mintValidator = async (rule: any, value: string) => { - if (rule.required && !value) { - throw new Error(`Please provide a ${label}`); - } else { - const pubkey = tryParseKey(value); - - if (!pubkey) { - throw new Error('Provided value is not a valid mint address'); - } - - // Note: Do not use the accounts cache here to always get most recent result - await connection.getAccountInfo(pubkey).then(data => { - if (!data) { - throw new Error('Account not found'); - } - - try { - MintParser(pubkey, data); - } catch { - throw new Error('Account is not a valid mint'); - } - }); - } - }; - - return ( - - onChange && onChange(e.target.value)} - /> - - ); -} diff --git a/packages/governance/src/components/ModalFormAction/modalFormAction.tsx b/packages/governance/src/components/ModalFormAction/modalFormAction.tsx deleted file mode 100644 index a9b7352..0000000 --- a/packages/governance/src/components/ModalFormAction/modalFormAction.tsx +++ /dev/null @@ -1,247 +0,0 @@ -import React, { useState } from 'react'; -import { Alert, Button, ButtonProps, Modal, Space, Typography } from 'antd'; -import { Form } from 'antd'; -import './style.less'; -import { ExplorerLink, isTransactionTimeoutError } from '@oyster/common'; -import { formDefaults } from '../../tools/forms'; -import { - isSendTransactionError, - isSignTransactionError, - useWallet, -} from '@oyster/common'; -import { - getTransactionErrorMsg, - isWalletNotConnectedError, -} from '@solana/spl-governance'; - -const { Text } = Typography; - -/// ModalFormAction is a control displayed as a Button action which opens a Modal from -/// The ModalForm captures common form use cases: 1) Progress indicator, 2) Close/Cancel state management, 3) Submission errors -/// TODO: add version without TResult -export function ModalFormAction({ - label, - formTitle, - formAction, - formPendingAction, - isWalletRequired = true, - buttonProps, - onSubmit, - onComplete, - onReset, - children, - initialValues, -}: { - label: string; - formTitle: string; - formAction: string; - formPendingAction: string; - isWalletRequired?: boolean; - buttonProps?: ButtonProps; - onSubmit: (values: any) => Promise; - onComplete?: (result: TResult) => void; - onReset?: () => void; - children?: any; - initialValues?: any; -}) { - const [isModalVisible, setIsModalVisible] = useState(false); - const { connected } = useWallet(); - - const onFormSubmit = (result: TResult) => { - setIsModalVisible(false); - onComplete && onComplete(result); - }; - const onFormCancel = () => { - setIsModalVisible(false); - }; - - return ( - <> - - - - ); -} - -function ActionForm({ - onFormSubmit, - onFormCancel, - isModalVisible, - onSubmit, - onReset, - formTitle, - formAction, - formPendingAction, - children, - initialValues, -}: { - onFormSubmit: (a: TResult) => void; - onFormCancel: () => void; - isModalVisible: boolean; - onSubmit: (values: any) => Promise; - onReset?: () => void; - formTitle: string; - formAction: string; - formPendingAction: string; - children: any; - initialValues: any; -}) { - const [form] = Form.useForm(); - const [loading, setLoading] = useState(false); - const [error, setError] = useState<{ - message?: string; - txId?: string; - recoveryAction: string; - header?: string; - } | null>(); - - const resetForm = () => { - form.resetFields(); - onReset && onReset(); - setError(null); - }; - - const closeForm = (reset = true) => { - onFormCancel(); - setLoading(false); - setError(null); - reset && resetForm(); - }; - - const onSubmitForm = async (values: any) => { - try { - setLoading(true); - setError(null); - - const result = await onSubmit(values); - onFormSubmit(result); - closeForm(); - } catch (ex) { - console.log('Submit error', ex); - - if (isSendTransactionError(ex)) { - setError({ - txId: ex.txId, - message: `${getTransactionErrorMsg(ex).toString()}`, - recoveryAction: - 'Please try to amend the inputs and submit the transaction again', - }); - } else if (isTransactionTimeoutError(ex)) { - setError({ - txId: ex.txId, - message: ex.message, - recoveryAction: 'Please try to submit the transaction again', - }); - } else if (isSignTransactionError(ex)) { - setError({ - header: "Couldn't sign the transaction", - message: ex.message, - recoveryAction: - 'Please try to submit and sign the transaction with your wallet again', - }); - } else if (isWalletNotConnectedError(ex)) { - setError({ - header: "Can't submit the transaction", - message: ex.message, - recoveryAction: - 'Please ensure your wallet is connected and submit the transaction again', - }); - } else { - setError({ - header: "Can't submit the transaction", - message: ex.toString(), - recoveryAction: - 'Please try to amend the inputs and submit the transaction again', - }); - } - } finally { - setLoading(false); - } - }; - - const ErrorMessageBanner = () => { - return error ? ( -
- - {error.txId ? ( -
- Transaction - - returned an error -
- ) : ( - error?.header - )} - - } - description={ - <> - - {/* {error.message &&
{error.message}
} */} - {error.message && {error.message}} - - {error.recoveryAction} -
- - } - type="error" - closable - banner - onClose={() => { - setError(null); - }} - /> -
- ) : null; - }; - - return ( - closeForm(false)} - footer={[ - , - , - ]} - > - {error && } - -
- {children} - -
- ); -} diff --git a/packages/governance/src/components/ModalFormAction/style.less b/packages/governance/src/components/ModalFormAction/style.less deleted file mode 100644 index a865542..0000000 --- a/packages/governance/src/components/ModalFormAction/style.less +++ /dev/null @@ -1,6 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -.error-message-banner { - // Extend the banner to left, top and right edges of the Modal form with 24px padding - margin: -24px -24px 0px -24px; -} diff --git a/packages/governance/src/components/RealmBadge/realmBadge.tsx b/packages/governance/src/components/RealmBadge/realmBadge.tsx deleted file mode 100644 index 5a468c0..0000000 --- a/packages/governance/src/components/RealmBadge/realmBadge.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import React from 'react'; -import { TokenIcon } from '@oyster/common'; -import './style.less'; - -export function RealmBadge({ - communityMint, - councilMint, - size = 40, -}: { - communityMint: PublicKey | undefined; - councilMint?: PublicKey; - size?: number; -}) { - return ( -
- - {councilMint && ( -
- -
- )} -
- ); -} diff --git a/packages/governance/src/components/RealmBadge/style.less b/packages/governance/src/components/RealmBadge/style.less deleted file mode 100644 index 36b10c5..0000000 --- a/packages/governance/src/components/RealmBadge/style.less +++ /dev/null @@ -1,6 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -// add transparent shadow to council token -.council-token-icon > div > div { - box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.3); -} diff --git a/packages/governance/src/components/RealmDepositBadge/realmDepositBadge.tsx b/packages/governance/src/components/RealmDepositBadge/realmDepositBadge.tsx deleted file mode 100644 index ea4578c..0000000 --- a/packages/governance/src/components/RealmDepositBadge/realmDepositBadge.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react'; -import { contexts } from '@oyster/common'; -import { TokenOwnerRecord } from '@solana/spl-governance'; - -import { - formatMintNaturalAmountAsDecimal, - formatMintVoteWeight, -} from '../../tools/units'; -import { MintInfo } from '@solana/spl-token'; -import { ProgramAccount } from '@solana/spl-governance'; - -const { useMint } = contexts.Accounts; - -export function RealmDepositBadge({ - councilTokenOwnerRecord, - communityTokenOwnerRecord, - showVoteWeights, -}: { - councilTokenOwnerRecord: ProgramAccount | undefined; - communityTokenOwnerRecord: ProgramAccount | undefined; - showVoteWeights?: boolean; -}) { - const communityMint = useMint( - communityTokenOwnerRecord?.account.governingTokenMint, - ); - - const councilMint = useMint( - councilTokenOwnerRecord?.account.governingTokenMint, - ); - - if (!councilTokenOwnerRecord && !communityTokenOwnerRecord) { - return null; - } - - return ( - <> - deposited - {communityTokenOwnerRecord && communityMint && ( - - )} - {communityTokenOwnerRecord && councilTokenOwnerRecord && ' | '} - {councilTokenOwnerRecord && councilMint && ( - - )} - - ); -} - -function TokenDepositStatistics({ - label, - mint, - tokenOwnerRecord, - showVoteWeights, -}: { - label: string; - mint: MintInfo; - tokenOwnerRecord: ProgramAccount; - showVoteWeights: boolean | undefined; -}) { - return ( - <> - {`${label}: ${formatMintNaturalAmountAsDecimal( - mint, - tokenOwnerRecord.account.governingTokenDepositAmount, - )}`} - {showVoteWeights && - !tokenOwnerRecord.account.governingTokenDepositAmount.isZero() && ( - {` (${formatMintVoteWeight( - mint, - tokenOwnerRecord.account.governingTokenDepositAmount, - )})`} - )} - - ); -} diff --git a/packages/governance/src/components/appErrorBanner/appErrorBanner.tsx b/packages/governance/src/components/appErrorBanner/appErrorBanner.tsx deleted file mode 100644 index 5a5fe82..0000000 --- a/packages/governance/src/components/appErrorBanner/appErrorBanner.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { Alert, Button, Space, Typography, Collapse } from 'antd'; -import { FallbackProps } from 'react-error-boundary'; - -const { Text } = Typography; -const { Panel } = Collapse; - -export function AppErrorBanner({ error, resetErrorBoundary }: FallbackProps) { - return ( - - Sorry, something went wrong. - {error.message} - - } - description={ - - -
{error.stack}
-
-
- } - closable - action={ - - } - >
- ); -} diff --git a/packages/governance/src/components/governanceConfigFormItem/governanceConfigFormItem.tsx b/packages/governance/src/components/governanceConfigFormItem/governanceConfigFormItem.tsx deleted file mode 100644 index 27656f3..0000000 --- a/packages/governance/src/components/governanceConfigFormItem/governanceConfigFormItem.tsx +++ /dev/null @@ -1,272 +0,0 @@ -import { Form, InputNumber, Select, Space, Spin, Typography } from 'antd'; -import BN from 'bn.js'; -import React, { useState } from 'react'; -import { contexts, constants } from '@oyster/common'; -import { LABELS } from '../../constants'; -import { - GovernanceConfig, - PROGRAM_VERSION_V3, - Realm, - VoteThreshold, - VoteThresholdType, - VoteTipping, -} from '@solana/spl-governance'; -import { getNameOf } from '../../tools/script'; -import { - getDaysFromTimestamp, - getMintNaturalAmountFromDecimal, - getMintDecimalAmountFromNatural, - getMintSupplyPercentageAsDecimal, - getMintMinAmountAsDecimal, - getTimestampFromDays, - parseMintNaturalAmountFromDecimal, - getMintSupplyFractionAsDecimalPercentage, - getMintSupplyAsDecimal, - formatPercentage, -} from '../../tools/units'; -import { ProgramAccount } from '@solana/spl-governance'; - -const { ZERO } = constants; - -const { Text } = Typography; -const { useMint } = contexts.Accounts; - -export interface GovernanceConfigValues { - minTokensToCreateProposal: number | string; - minInstructionHoldUpTime: number; - maxVotingTime: number; - voteThresholdPercentage: number; - mintDecimals: number; - voteTipping: VoteTipping; -} - -export function getGovernanceConfig( - programVersion: number, - values: GovernanceConfigValues, -) { - const minTokensToCreateProposal = parseMinTokensToCreate( - values.minTokensToCreateProposal, - values.mintDecimals, - ); - - const communityVoteThreshold = new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: values.voteThresholdPercentage, - }); - - const councilVoteThreshold = - programVersion >= PROGRAM_VERSION_V3 - ? // For VERSION >=3 use the same threshold as for community (until supported in the UI) - communityVoteThreshold - : // For older versions set to 0 - new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 0, - }); - - // - const councilVetoVoteThreshold = - programVersion >= PROGRAM_VERSION_V3 - ? councilVoteThreshold - : new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 0, - }); - - return new GovernanceConfig({ - communityVoteThreshold: communityVoteThreshold, - minCommunityTokensToCreateProposal: new BN( - minTokensToCreateProposal.toString(), - ), - minInstructionHoldUpTime: getTimestampFromDays( - values.minInstructionHoldUpTime, - ), - maxVotingTime: getTimestampFromDays(values.maxVotingTime), - // Use 1 as default for council tokens. - // Council tokens are rare and possession of any amount of council tokens should be sufficient to be allowed to create proposals - // If it turns to be a wrong assumption then it should be exposed in the UI - minCouncilTokensToCreateProposal: new BN(1), - communityVoteTipping: values.voteTipping, - councilVoteTipping: values.voteTipping, - councilVoteThreshold: councilVoteThreshold, - councilVetoVoteThreshold: councilVetoVoteThreshold, - communityVetoVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.Disabled, - }), - }); -} - -// Parses min tokens to create (proposal or governance) -export function parseMinTokensToCreate( - value: string | number, - mintDecimals: number, -) { - return typeof value === 'string' - ? parseMintNaturalAmountFromDecimal(value, mintDecimals) - : getMintNaturalAmountFromDecimal(value, mintDecimals); -} - -const configNameOf = getNameOf(); - -export function GovernanceConfigFormItem({ - governanceConfig, - realm, -}: { - governanceConfig?: GovernanceConfig; - realm: ProgramAccount | undefined; -}) { - const communityMintInfo = useMint(realm?.account.communityMint); - const [minTokensPercentage, setMinTokensPercentage] = useState< - number | undefined - >(); - - if (!communityMintInfo) { - return ; - } - - let mintDecimals = communityMintInfo.decimals; - - // Use 1% of mint supply as the default value for minTokensToCreateProposal and the default increment step in the input editor - let mintSupply1Percent = getMintSupplyPercentageAsDecimal( - communityMintInfo, - 1, - ); - - let minTokenAmount = getMintMinAmountAsDecimal(communityMintInfo); - let maxTokenAmount = !communityMintInfo.supply.isZero() - ? getMintSupplyAsDecimal(communityMintInfo) - : undefined; - - // If the supply is small and 1% is below the minimum mint amount then coerce to the minimum value - let minTokenStep = Math.max(mintSupply1Percent, minTokenAmount); - - let minTokensToCreateProposal = communityMintInfo.supply.isZero() - ? 1000000 // If the mint supply is zero then we use 1m as arbitrary large number - : minTokenStep; - - if (!governanceConfig) { - governanceConfig = new GovernanceConfig({ - communityVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 60, - }), - minCommunityTokensToCreateProposal: ZERO, - minInstructionHoldUpTime: getTimestampFromDays(0), - maxVotingTime: getTimestampFromDays(3), - communityVoteTipping: VoteTipping.Strict, - councilVoteTipping: VoteTipping.Strict, - minCouncilTokensToCreateProposal: ZERO, - councilVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 60, - }), - councilVetoVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.YesVotePercentage, - value: 60, - }), - communityVetoVoteThreshold: new VoteThreshold({ - type: VoteThresholdType.Disabled, - }), - }); - } else { - minTokensToCreateProposal = getMintDecimalAmountFromNatural( - communityMintInfo, - governanceConfig.minCommunityTokensToCreateProposal as BN, - ).toNumber(); - } - - const getMinTokensPercentage = (amount: number) => - getMintSupplyFractionAsDecimalPercentage(communityMintInfo, amount); - - const onMinTokensChange = (minTokensToCreateProposal: number | string) => { - const minTokens = parseMinTokensToCreate( - minTokensToCreateProposal, - mintDecimals, - ); - setMinTokensPercentage(getMinTokensPercentage(minTokens)); - }; - - if (!minTokensPercentage) { - onMinTokensChange(minTokensToCreateProposal); - } - - return ( - <> - - - - - - {maxTokenAmount && minTokensPercentage && ( - {`${formatPercentage( - minTokensPercentage, - )} of token supply`} - )} - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/packages/governance/src/components/realmMintSupplyConfigFormItem/realmMintSupplyConfigFormItem.tsx b/packages/governance/src/components/realmMintSupplyConfigFormItem/realmMintSupplyConfigFormItem.tsx deleted file mode 100644 index 3f71c72..0000000 --- a/packages/governance/src/components/realmMintSupplyConfigFormItem/realmMintSupplyConfigFormItem.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import { Form, InputNumber, Space, Typography } from 'antd'; -import React, { useState } from 'react'; -import { - MintMaxVoteWeightSource, - MintMaxVoteWeightSourceType, -} from '@solana/spl-governance'; -import { BigNumber } from 'bignumber.js'; -import { MintInfo } from '@solana/spl-token'; -import { contexts } from '@oyster/common'; -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; -import { getNameOf } from '../../tools/script'; - -const { Text } = Typography; -const { useMint } = contexts.Accounts; - -const getMinSupplyFractionStep = () => - new BigNumber(1) - .shiftedBy(-1 * MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber(); - -const getMintSupplyFraction = ( - maxVoteWeightSource: MintMaxVoteWeightSource, -) => { - if (maxVoteWeightSource.type !== MintMaxVoteWeightSourceType.SupplyFraction) { - throw new Error( - `Max vote weight source ${maxVoteWeightSource.type} is not supported`, - ); - } - - return new BigNumber(maxVoteWeightSource.value.toString()) - .shiftedBy(-MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber(); -}; - -export const formatMintSupplyFraction = ( - mint: MintInfo, - decimalFraction: number, -) => { - return new BigNumber(decimalFraction) - .multipliedBy(mint.supply.toString()) - .shiftedBy(-mint.decimals) - .toFormat(mint.decimals); -}; - -const formatMintSupplyPercentage = (decimalFraction: number) => { - const percentage = new BigNumber(decimalFraction).shiftedBy(2).toNumber(); - - if (percentage < 0.01) { - return '<0.01%'; - } - - const rounded = +percentage.toFixed(2); - return rounded === percentage ? `${rounded}%` : `~${rounded}%`; -}; - -export const parseMintSupplyFraction = (fraction: string) => { - if (!fraction) { - return MintMaxVoteWeightSource.FULL_SUPPLY_FRACTION; - } - - const fractionValue = new BigNumber(fraction) - .shiftedBy(MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber(); - - return new MintMaxVoteWeightSource({ - type: MintMaxVoteWeightSourceType.SupplyFraction, - value: new BN(fractionValue), - }); -}; - -export interface RealmMintSupplyConfigValues { - communityMintMaxVoteWeightFraction: string; -} - -const configNameOf = getNameOf(); - -export function RealmMintSupplyConfigFormItem({ - communityMintAddress, - maxVoteWeightSource, -}: { - communityMintAddress: PublicKey | string | undefined; - maxVoteWeightSource: MintMaxVoteWeightSource; -}) { - const [supplyFraction, setSupplyFraction] = useState( - getMintSupplyFraction(maxVoteWeightSource), - ); - const communityMint = useMint(communityMintAddress); - - const onSupplyFractionChange = (fraction: number | string) => { - let floatFraction; - - if (typeof fraction === 'string') { - floatFraction = parseFloat(fraction); - } else { - floatFraction = fraction; - } - - setSupplyFraction(floatFraction || undefined); - }; - - return ( - - - - - - - {supplyFraction && ( - - {`${ - communityMint - ? formatMintSupplyFraction(communityMint, supplyFraction) - : '' - } (${formatMintSupplyPercentage(supplyFraction)})`} - - )} - - - ); -} diff --git a/packages/governance/src/components/realmMintTokensFormItem/realmMintTokensFormItem.tsx b/packages/governance/src/components/realmMintTokensFormItem/realmMintTokensFormItem.tsx deleted file mode 100644 index 34f71ef..0000000 --- a/packages/governance/src/components/realmMintTokensFormItem/realmMintTokensFormItem.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { Form, InputNumber, Space, Typography } from 'antd'; -import React, { useState } from 'react'; -import { contexts } from '@oyster/common'; -import { - formatPercentage, - getMintMinAmountAsDecimal, - getMintSupplyAsDecimal, - getMintSupplyFractionAsDecimalPercentage, - getMintSupplyPercentageAsDecimal, -} from '../../tools/units'; -import { parseMinTokensToCreate } from '../governanceConfigFormItem/governanceConfigFormItem'; - -const { useMint } = contexts.Accounts; -const { Text } = Typography; - -export function RealmMintTokensFormItem({ - communityMintAddress, -}: { - communityMintAddress: PublicKey | string | undefined; -}) { - // TODO: Most of the component code was copied from MinTokensToCreateProposal - // Unify this code with that component and create a shared MinTokensToCreate - - const communityMintInfo = useMint(communityMintAddress); - const [minTokensPercentage, setMinTokensPercentage] = useState< - number | undefined - >(); - - if (!communityMintInfo || !communityMintAddress) { - if (minTokensPercentage) { - setMinTokensPercentage(undefined); - } - - return ( - - - - ); - } - - let mintDecimals = communityMintInfo.decimals; - - // Use 1% of mint supply as the default value for minTokensToCreateProposal and the default increment step in the input editor - let mintSupply1Percent = getMintSupplyPercentageAsDecimal( - communityMintInfo, - 1, - ); - - let minTokenAmount = getMintMinAmountAsDecimal(communityMintInfo); - const maxTokenAmount = !communityMintInfo.supply.isZero() - ? getMintSupplyAsDecimal(communityMintInfo) - : undefined; - - // If the supply is small and 1% is below the minimum mint amount then coerce to the minimum value - let minTokenStep = Math.max(mintSupply1Percent, minTokenAmount); - - let minTokensToCreateProposal = minTokenStep; - - const getMinTokensPercentage = (amount: number) => - getMintSupplyFractionAsDecimalPercentage(communityMintInfo, amount); - - const onMinTokensChange = (minTokensToCreateProposal: number | string) => { - const minTokens = parseMinTokensToCreate( - minTokensToCreateProposal, - mintDecimals, - ); - setMinTokensPercentage(getMinTokensPercentage(minTokens)); - }; - - if (!minTokensPercentage) { - onMinTokensChange(minTokensToCreateProposal); - } - - return ( - <> - - - - - - {maxTokenAmount && minTokensPercentage && ( - {`${formatPercentage( - minTokensPercentage, - )} of token supply`} - )} - - - - - - ); -} diff --git a/packages/governance/src/components/voterStakeRegistry/votingMintConfigFormItem.tsx b/packages/governance/src/components/voterStakeRegistry/votingMintConfigFormItem.tsx deleted file mode 100644 index 29f7bf8..0000000 --- a/packages/governance/src/components/voterStakeRegistry/votingMintConfigFormItem.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import { Governance, ProgramAccount, Realm } from '@solana/spl-governance'; -import { PublicKey } from '@solana/web3.js'; -import { Form, InputNumber, Select } from 'antd'; -import BN from 'bn.js'; - -import React from 'react'; -import { useGovernancesByRealm } from '../../hooks/apiHooks'; - -import { getNameOf } from '../../tools/script'; -import { getSecondsFromYears } from '../../tools/units'; -import { getScaledFactor } from '../../tools/voterStakeRegistry/voterStakeRegistry'; -import { MintFormItem } from '../MintFormItem/mintFormItem'; - - -export interface VotingMintConfigValues { - mint: string; - mintIndex: number; - digitShift: number; - unlockedFactor: number; - maxVotingTime: number; - lockupFactor: number; - lockupSaturationYears: number; - grantAuthority: string; -} - -export function getVotingMintConfigApiValues(values: VotingMintConfigValues) { - const digitShift = values.digitShift; - const unlockedScaledFactor = getScaledFactor(values.unlockedFactor); - const lockupScaledFactor = getScaledFactor(values.lockupFactor); - const lockupSaturationSecs = new BN( - getSecondsFromYears(values.lockupSaturationYears).toString(), - ); - const mint = new PublicKey(values.mint); - const mintIndex = values.mintIndex; - const grantAuthority = new PublicKey(values.grantAuthority); - - return { - digitShift, - unlockedScaledFactor, - lockupScaledFactor, - lockupSaturationSecs, - mint, - grantAuthority, - mintIndex - }; -} - -const configNameOf = getNameOf(); - -export function VotingMintConfigFormItem({ - realm, - governance, -}: { - realm: ProgramAccount; - governance: ProgramAccount; -}) { - - const governances = useGovernancesByRealm(realm?.pubkey); - - return ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/packages/governance/src/constants/index.tsx b/packages/governance/src/constants/index.tsx deleted file mode 100644 index b6c11ec..0000000 --- a/packages/governance/src/constants/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from './labels'; -export * from './style'; diff --git a/packages/governance/src/constants/labels.ts b/packages/governance/src/constants/labels.ts deleted file mode 100644 index c8adc3e..0000000 --- a/packages/governance/src/constants/labels.ts +++ /dev/null @@ -1,196 +0,0 @@ -export const LABELS = { - CONNECT_LABEL: 'Connect Wallet', - AUDIT_WARNING: - 'Oyster is an unaudited software project used for internal purposes at the Solana Foundation. This app is not for public use.', - FOOTER: - 'This page was produced by the Solana Foundation ("SF") for internal educational and inspiration purposes only. SF does not encourage, induce or sanction the deployment, integration or use of Oyster or any similar application (including its code) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. Anyone using this code or a derivation thereof must comply with applicable laws and regulations when releasing related software.', - MENU_HOME: 'Proposals', - ADD_NEW_PROPOSAL: 'Add new proposal', - ADD_PROPOSAL: 'Add proposal', - ADDING_PROPOSAL: 'Adding proposal', - - MENU_DASHBOARD: 'Dashboard', - APP_TITLE: 'Oyster Governance', - CONNECT_BUTTON: 'Connect', - WALLET_TOOLTIP: 'Wallet public key', - WALLET_BALANCE: 'Wallet balance', - SETTINGS_TOOLTIP: 'Settings', - DASHBOARD_INFO: 'Connect to a wallet to view proposals.', - DESCRIPTION: 'Description', - DESCRIPTION_LABEL: 'description', - PROPOSAL: 'Proposal', - NO_LOAD: 'Unable to load markdown. Click to view.', - SIGNATORIES: 'Signatories', - YES_VOTES_VOTES: 'Yes Votes Required', - VOTE_SCORE_IN_FAVOUR: 'Vote Score In Favor', - ADMIN_PANEL: 'Admin Panel', - COPY_FAILED_ADDRESSES_TO_INPUT: 'Copy failed addresses to the input', - COPY_FAILED_ADDRESSES_TO_CLIPBOARD: 'Copy failed addresses to clipboard', - FAILED_SIGNERS_COPIED_TO_INPUT: 'Failed signers copied to input!', - FAILED_SIGNERS_COPIED_TO_CLIPBOARD: 'Failed signers copied to clipboard!', - FAILED_HOLDERS_COPIED_TO_INPUT: - 'Failed governance token holders copied to input!', - FAILED_HOLDERS_COPIED_TO_CLIPBOARD: - 'Failed governance token holders copied to clipboard!', - COMMA_SEPARATED_KEYS: 'Comma separated base58 pubkeys', - SIGNERS: 'Signers', - ADD_SIGNERS: 'Add Signers', - ADMIN_ACCOUNT_NOT_DEFINED: 'Admin account is not defined', - SIG_ACCOUNT_NOT_DEFINED: 'Signature account is not defined', - ENTER_AT_LEAST_ONE_PUB_KEY: 'Please enter at least one pub key.', - PUB_KEY_FAILED: - " Pub key failed. Please check your inspector tab for more information. We'll continue onward and add this to a list for you to re-upload in a later save.", - ADD: 'Add', - REMOVE: 'Remove', - ADDING_OR_REMOVING: 'Type', - - ADDING_GOVERNANCE_TOKENS: 'Adding governance tokens', - PLEASE_WAIT: 'Please wait...', - GOVERNANCE_TOKENS_ADDED: 'Governance tokens added.', - NEW_VOTED_ACCOUNT_ADDED: 'New vote account added.', - ADDING_NEW_VOTE_ACCOUNT: 'Adding new vote account...', - WHO_VOTES_QUESTION: 'who votes?', - TRANSACTION: 'Transaction - ', - CANT_GIVE_ZERO_TOKENS: "Can't give zero tokens to a user!", - BULK_TOKENS: 'Token Holders', - COMMA_SEPARATED_KEYS_AND_VOTES: - 'base58 pubkey, vote count, base58 pubkey, vote count, ...', - SINGLE_HOLDER: 'Token Holder', - AMOUNT: 'Amount', - SINGLE_KEY: 'base58 pubkey', - TOKEN_MODE: 'Mode', - BULK: 'Bulk', - SINGLE: 'Single', - ADD_GOVERNANCE_TOKENS: 'Add Governance Tokens', - ADD_COUNCIL_TOKENS: 'Add Council Tokens', - ACTIONS: 'Actions', - - VOTE_YEAH: 'Yeah', - VOTE_YEAH_QUESTION: 'Vote Yeah?', - VOTE_YEAH_MSG: 'Vote in favour of the proposal.', - VOTING_YEAH: 'Voting for the proposal', - VOTED_YEAH: 'Voted for the proposal', - - VOTE_NAY: 'Nay', - VOTE_NAY_QUESTION: 'Vote Nay?', - VOTE_NAY_MSG: 'Vote against the proposal.', - VOTING_NAY: 'Voting against the proposal', - VOTED_NAY: 'Voted against the proposal', - - TOKENS_VOTED_FOR_THE_PROPOSAL: 'tokens voted for the proposal', - TOKENS_VOTED_AGAINST_THE_PROPOSAL: 'tokens voted against the proposal', - - EXECUTING: 'Executing...', - EXECUTED: 'Executed.', - - CONFIRM: 'Confirm', - CANCEL: 'Cancel', - - WITHDRAW_VOTE: 'Withdraw My Vote', - WITHDRAW_YOUR_VOTE_QUESTION: 'Withdraw your vote?', - WITHDRAW_YOUR_VOTE_MSG: - 'Once you withdraw your vote it won’t count towards the proposal voting outcome.', - WITHDRAW: 'Withdraw', - WITHDRAWING_YOUR_VOTE: 'Withdrawing your vote', - VOTE_WITHDRAWN: 'Your vote has been withdrawn', - - RELEASE_MY_TOKENS: 'Release My Tokens', - REFUND_YOUR_TOKENS_QUESTION: 'Refund your tokens?', - REFUND_YOUR_TOKENS_MSG: - 'The proposal has been voted. Refunding your tokens won’t change the outcome.', - REFUND: 'Refund', - REFUNDING_YOUR_TOKENS: 'Refunding your tokens', - TOKENS_REFUNDED: 'Your voting tokens have been refunded', - - REGISTER_REALM: 'Register Realm', - REALMS: 'Realms', - REALM: 'Realm', - - CREATE_NEW_GOVERNANCE: 'Create New Governance', - GOVERNANCE_OVER: 'governance over', - PROGRAM: 'Program', - MINT: 'Mint', - TOKEN_ACCOUNT: 'Token Account', - - CREATE: 'Create', - CREATING: 'Creating', - - PROGRAM_ID_LABEL: 'program id', - MINT_ADDRESS_LABEL: 'mint address', - ACCOUNT_ADDRESS: 'account address', - TOKEN_ACCOUNT_ADDRESS: 'token account address', - - MIN_TOKENS_TO_CREATE_PROPOSAL: 'min community tokens to create proposal', - MIN_INSTRUCTION_HOLD_UP_TIME_DAYS: 'min instruction hold up time (days)', - MAX_VOTING_TIME_DAYS: 'max voting time (days)', - - UPGRADE_AUTHORITY: 'upgrade authority', - MINT_AUTHORITY: 'mint authority', - TOKEN_OWNER: 'token owner', - - PROGRAM_ID: 'Program ID', - INSTRUCTION: 'Instruction', - - COMMUNITY_TOKEN_HOLDERS: 'Community Token Holders', - COUNCIL: 'The Council', - COMMUNITY_TOKEN_MINT: 'community token mint', - USE_COUNCIL_TOKEN: 'use council token', - COUNCIL_TOKEN_MINT: 'council token mint', - NAME_LABEL: 'name', - - YES_VOTE_THRESHOLD_PERCENTAGE: 'yes vote threshold (%)', - VOTE_TIPPING: 'vote tipping', - - SELECT_PROPOSAL_TYPE: 'Select the type of proposals this app will generate', - SELECT_EXECUTION_TYPE: 'Select how transactions will be executed', - - SELECT_VOTING_ENTRY_RULE: - 'Select the rules for registering to vote in proposals', - MINIMUM_SLOT_WAITING_PERIOD: 'Minimum slots between proposal and vote', - SELECT_CONFIG: 'Select Governed Program', - CONFIG: 'Governed Program', - GIST_PLACEHOLDER: 'Github Gist link (optional)', - NAME: 'Name', - - PUBLIC_KEY: 'Public Key', - MENU_GOVERNANCE: 'My Governed Programs', - LEAVE_BLANK_IF_YOU_WANT_ONE: 'Leave blank if you want one made for you', - ADDITIONAL_VOTING_MSG: - ' Please note that during voting, if you withdraw your tokens, your vote will not count towards the voting total. You must wait for the vote to complete in order for your withdrawal to not affect the voting.', - SLOT_MUST_BE_NUMERIC: 'Slot can only be numeric', - SLOT_MUST_BE_GREATER_THAN: 'Slot must be greater than or equal to ', - HOLD_UP_TIME_DAYS: 'hold up time (days)', - - MIN_SLOT_MUST_BE_NUMERIC: 'Minimum Slot Waiting Period can only be numeric', - TIME_LIMIT_MUST_BE_NUMERIC: 'Time Limit can only be numeric', - ACCOUNT_ADDRESS_IS_NOT_A_VALID_PUBLIC_KEY: (accountAddress: string) => - `Account address: '${accountAddress}' is not a valid public key`, - GOVERNANCE_MINT_IS_NOT_A_VALID_PUBLIC_KEY: (programId: string) => - `Governance Mint ID: '${programId}' is not a valid public key`, - COUNCIL_MINT_IS_NOT_A_VALID_PUBLIC_KEY: (programId: string) => - `Council Mint ID: '${programId}' is not a valid public key`, - - THIS_CONFIG_LACKS_COUNCIL: 'This program does not have a council.', - GIT_CONTENT_EXCEEDED: - 'Gist Github API limit exceeded. Click to view on Github directly.', - ACCOUNT: 'Account', - VOTE_WEIGHT: 'Vote Weight', - VOTE_TYPE: 'Vote Type', - LARGEST_VOTERS_BUBBLE: 'Top Voters Visualization', - LARGEST_VOTERS_TABLE: 'Top Voters', - PERCENTAGE: 'Percentage', - TIME_LIMIT: 'time limit', - - DEPOSIT_TOKENS: (tokenName?: string) => `Deposit ${tokenName ?? ''} Tokens`, - DEPOSIT_TOKENS_QUESTION: 'Deposit your tokens?', - DEPOSIT: 'Deposit', - - WITHDRAW_TOKENS: (tokenName?: string) => `Withdraw ${tokenName ?? ''} Tokens`, - WITHDRAW_TOKENS_QUESTION: 'Withdraw your tokens?', - - INSTRUCTIONS: 'Instructions', - - FINALIZE_VOTE: 'Finalize Vote', - - SET_REALM_AUTHORITY: 'Set Realm Authority', -}; diff --git a/packages/governance/src/constants/style.tsx b/packages/governance/src/constants/style.tsx deleted file mode 100644 index 3818b89..0000000 --- a/packages/governance/src/constants/style.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export const GUTTER = [16, { xs: 8, sm: 16, md: 16, lg: 16 }] as any; - -export const SMALL_STATISTIC: React.CSSProperties = { - fontSize: 10, -}; diff --git a/packages/governance/src/contexts/GovernanceContext.tsx b/packages/governance/src/contexts/GovernanceContext.tsx deleted file mode 100644 index 69ec00a..0000000 --- a/packages/governance/src/contexts/GovernanceContext.tsx +++ /dev/null @@ -1,230 +0,0 @@ -import React, { useContext, useEffect, useMemo, useState } from 'react'; - -import { - AccountInfo, - Connection, - KeyedAccountInfo, - PublicKey, -} from '@solana/web3.js'; - -import { useConnection, useConnectionConfig } from '@oyster/common'; -import { GovernanceAccountParser } from '@solana/spl-governance'; -import { GovernanceAccountType, Realm } from '@solana/spl-governance'; -import { getRealms } from '@solana/spl-governance'; -import { EventEmitter } from 'eventemitter3'; - -import { useLocation } from 'react-router-dom'; -import { PROGRAM_VERSION } from '@solana/spl-governance'; - -import { - getGovernanceProgramVersion, - ProgramAccount, -} from '@solana/spl-governance'; -import { arrayToRecord } from '../tools/script'; - -export interface GovernanceContextState { - realms: Record>; - changeTracker: AccountChangeTracker; - programId: string; - programVersion: number; -} - -class AccountRemovedEventArgs { - pubkey: string; - accountType: GovernanceAccountType; - - constructor(pubkey: string, accountType: GovernanceAccountType) { - this.pubkey = pubkey; - this.accountType = accountType; - } -} - -// An event raised when account was updated or inserted -class AccountUpdatedEventArgs { - pubkey: string; - accountType: GovernanceAccountType; - accountInfo: AccountInfo; - - constructor( - pubkey: string, - accountType: GovernanceAccountType, - accountInfo: AccountInfo, - ) { - this.pubkey = pubkey; - this.accountType = accountType; - this.accountInfo = accountInfo; - } -} - -// Tracks local changes not supported by connection notifications -class AccountChangeTracker { - // For some reasons when a single emitter is used in prod it emits both remove and update events - // As a workaround a single emitter per event is used - private removeEmitter = new EventEmitter(); - private updateEmitter = new EventEmitter(); - - onAccountRemoved(callback: (args: AccountRemovedEventArgs) => void) { - this.removeEmitter.on(AccountRemovedEventArgs.name, callback); - return () => - this.removeEmitter.removeListener(AccountRemovedEventArgs.name, callback); - } - - notifyAccountRemoved(pubkey: string, accountType: GovernanceAccountType) { - this.removeEmitter.emit( - AccountRemovedEventArgs.name, - new AccountRemovedEventArgs(pubkey, accountType), - ); - } - - onAccountUpdated(callback: (args: AccountUpdatedEventArgs) => void) { - this.updateEmitter.on(AccountUpdatedEventArgs.name, callback); - return () => - this.updateEmitter.removeListener(AccountUpdatedEventArgs.name, callback); - } - - notifyAccountUpdated( - pubkey: string, - accountType: GovernanceAccountType, - accountInfo: AccountInfo, - ) { - this.updateEmitter.emit( - AccountUpdatedEventArgs.name, - new AccountUpdatedEventArgs(pubkey, accountType, accountInfo), - ); - } - - async fetchAndNotifyAccountUpdated( - connection: Connection, - pubkey: PublicKey, - ) { - const info = await connection.getAccountInfo(pubkey, 'recent'); - if (info) { - this.notifyAccountUpdated(pubkey.toBase58(), info.data[0], info); - } else { - console.error(`Can't fetch account for ${pubkey}`); - } - } -} - -export const GovernanceContext = - React.createContext(null); - -export default function GovernanceProvider({ children = null as any }) { - const connection = useConnection(); - const { endpoint, env } = useConnectionConfig(); - const location = useLocation(); - - const programId = useMemo(() => { - const params = new URLSearchParams(location.search); - - console.log( - 'DEFAULT_GOVERNANCE_PROGRAM_ID', - process.env.REACT_APP_DEFAULT_GOVERNANCE_PROGRAM_ID, - ); - - return ( - params.get('programId') ?? - process.env.REACT_APP_DEFAULT_GOVERNANCE_PROGRAM_ID ?? - 'GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw' - ); - }, [location]); - - const [realms, setRealms] = useState({}); - const [changeTracker] = useState(new AccountChangeTracker()); - const [programVersion, setProgramVersion] = useState(PROGRAM_VERSION); - - useEffect(() => { - const sub = (async () => { - const programPk = new PublicKey(programId); - - try { - const loadedRealms = await getRealms(connection, programPk); - setRealms(arrayToRecord(loadedRealms, r => r.pubkey.toBase58())); - } catch (ex) { - console.error("Can't load Realms", ex); - setRealms({}); - } - - // Use a single web socket subscription for all accounts and broadcast the updates using changeTracker - // Note: Do not create other subscriptions for the given program id. They would be silently ignored by the rpc endpoint - - return connection.onProgramAccountChange( - programPk, - async (info: KeyedAccountInfo) => { - if ( - info.accountInfo.data[0] === GovernanceAccountType.RealmV1 || - info.accountInfo.data[0] === GovernanceAccountType.RealmV2 - ) { - const realm = GovernanceAccountParser(Realm)( - info.accountId, - info.accountInfo, - ); - setRealms((objs: any) => ({ - ...objs, - [info.accountId.toBase58()]: realm, - })); - } - changeTracker.notifyAccountUpdated( - info.accountId.toBase58(), - info.accountInfo.data[0], - info.accountInfo, - ); - }, - ); - })(); - - return () => { - sub.then(id => connection.removeProgramAccountChangeListener(id)); - }; - }, [connection, programId, endpoint]); //eslint-disable-line - - useEffect(() => { - getGovernanceProgramVersion(connection, new PublicKey(programId), env).then( - pVersion => { - console.log('PROGRAM VERSION', { pVersion, env }); - setProgramVersion(pVersion); - }, - ); - }, [env, connection, programId]); - - return ( - - {children} - - ); -} - -export function useGovernanceContext() { - const context = useContext(GovernanceContext); - return context as GovernanceContextState; -} - -export function useProgramInfo() { - const context = useGovernanceContext(); - return { - programVersion: context.programVersion, - programId: context.programId, - }; -} - -export function useAccountChangeTracker() { - const context = useGovernanceContext(); - return context.changeTracker; -} - -export function useRealms() { - const ctx = useGovernanceContext(); - return Object.values(ctx.realms); -} - -export function useRealm(realm: PublicKey | undefined) { - const ctx = useGovernanceContext(); - return realm && ctx.realms[realm.toBase58()]; -} diff --git a/packages/governance/src/hooks/accountHooks.ts b/packages/governance/src/hooks/accountHooks.ts deleted file mode 100644 index 8ced8ea..0000000 --- a/packages/governance/src/hooks/accountHooks.ts +++ /dev/null @@ -1,275 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { useEffect, useState } from 'react'; - -import { - getAccountTypes, - GovernanceAccount, - GovernanceAccountClass, -} from '@solana/spl-governance'; -import { GovernanceAccountParser } from '@solana/spl-governance'; - -import { GenericAccountParser, ParsedAccountBase } from '@oyster/common'; -import { MemcmpFilter } from '@solana/spl-governance'; -import { useAccountChangeTracker } from '../contexts/GovernanceContext'; -import { useRpcContext } from './useRpcContext'; -import { none, Option, some } from '../tools/option'; -import { getGovernanceAccounts } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; -import { arrayToRecord } from '../tools/script'; - -// Fetches Governance program account using the given key and subscribes to updates -export function useGovernanceAccountByPubkey< - TAccount extends GovernanceAccount ->(accountClass: GovernanceAccountClass, pubkey: PublicKey | undefined) { - const [account, setAccount] = useState>>(); - - const { connection, endpoint } = useRpcContext(); - const accountChangeTracker = useAccountChangeTracker(); - - const getByPubkey = pubkey?.toBase58(); - - useEffect(() => { - if (!pubkey) { - return; - } - - const sub = (async () => { - // TODO: Add retries for transient errors - try { - const accountInfo = await connection.getAccountInfo(pubkey); - if (accountInfo) { - const loadedAccount = GovernanceAccountParser(accountClass)( - pubkey, - accountInfo!, - ); - setAccount(some(loadedAccount)); - } else { - setAccount(none()); - } - } catch (ex) { - console.error(`Can't load ${pubkey.toBase58()} account`, ex); - setAccount(none()); - } - - return accountChangeTracker.onAccountUpdated(update => { - if (update.pubkey === getByPubkey) { - const account = GovernanceAccountParser(accountClass)( - new PublicKey(update.pubkey), - update.accountInfo, - ) as ProgramAccount; - - setAccount(some(account)); - } - }); - })(); - - return () => { - sub.then(dispose => dispose()); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [getByPubkey, connection, endpoint]); - - return account; -} - -// Fetches Governance program account using the given PDA args and subscribes to updates -export function useGovernanceAccountByPda( - accountClass: GovernanceAccountClass, - getPda: () => Promise, - pdaArgs: any[], -) { - const [pda, setPda] = useState(); - - const pdaArgsKey = JSON.stringify(pdaArgs); - - useEffect(() => { - (async () => { - const resolvedPda = await getPda(); - setPda(resolvedPda); - })(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [pdaArgsKey]); - - return useGovernanceAccountByPubkey(accountClass, pda); -} - -// Fetches Governance program accounts using the given filter and subscribes to updates -export function useGovernanceAccountsByFilter< - TAccount extends GovernanceAccount ->(accountClass: GovernanceAccountClass, filters: (MemcmpFilter | undefined)[]) { - const [accounts, setAccounts] = useState< - Record> - >({}); - - const { connection, endpoint, programId } = useRpcContext(); - - const accountChangeTracker = useAccountChangeTracker(); - - // Use stringify to get stable dependency for useEffect to ensure we load the initial snapshot of accounts only once - // If it causes performance issues then we should use object compare logic https://stackoverflow.com/questions/53601931/custom-useeffect-second-argument - const filterKey = JSON.stringify(filters); - - useEffect(() => { - if (filters.some(f => !f)) { - return; - } - - const queryFilters = filters.map(f => f!); - const accountTypes = getAccountTypes(accountClass); - - const sub = (async () => { - try { - // TODO: add retries for transient errors - const loadedAccounts = await getGovernanceAccounts( - connection, - programId, - (accountClass as any) as new (args: any) => TAccount, - queryFilters, - ); - setAccounts(arrayToRecord(loadedAccounts, a => a.pubkey.toBase58())); - } catch (ex) { - console.error(`Can't load ${accountClass.name}`, ex); - setAccounts({}); - } - - const disposeUpdateTracker = accountChangeTracker.onAccountUpdated( - update => { - if (accountTypes.some(at => update.accountType === at)) { - const isMatch = !queryFilters.some( - f => !f.isMatch(update.accountInfo.data), - ); - - const account = GovernanceAccountParser(accountClass)( - new PublicKey(update.pubkey), - update.accountInfo, - ) as ProgramAccount; - - setAccounts((acts: any) => { - if (isMatch) { - return { - ...acts, - [update.pubkey]: account, - }; - } else if (acts[update.pubkey]) { - return { - ...Object.keys(acts) - .filter(k => k !== update.pubkey) - .reduce((res, key) => { - res[key] = acts[key]; - return res; - }, {} as any), - }; - } else { - return acts; - } - }); - } - }, - ); - - const disposeRemoveTracker = accountChangeTracker.onAccountRemoved( - remove => { - if (accountTypes.some(at => remove.accountType === at)) { - setAccounts((acts: any) => { - if (acts[remove.pubkey]) { - return { - ...Object.keys(acts) - .filter(k => k !== remove.pubkey) - .reduce((res, key) => { - res[key] = acts[key]; - return res; - }, {} as any), - }; - } else { - return acts; - } - }); - } - }, - ); - - return { disposeRemoveTracker, disposeUpdateTracker }; - })(); - - return () => { - sub.then(({ disposeRemoveTracker, disposeUpdateTracker }) => { - disposeRemoveTracker(); - disposeUpdateTracker(); - }); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [filterKey, connection, endpoint]); - - return Object.values(accounts); -} - -export function useGovernanceAccountByFilter< - TAccount extends GovernanceAccount ->(accountClass: GovernanceAccountClass, filters: (MemcmpFilter | undefined)[]) { - const accounts = useGovernanceAccountsByFilter( - accountClass, - filters, - ); - - if (accounts.length === 0) { - return undefined; - } - - if (accounts.length === 1) { - return accounts[0]; - } - - throw new Error( - `Filters ${filters} returned multiple accounts ${accounts} for ${accountClass.name} while a single result was expected`, - ); -} - -// Fetches Account using the given PDA args -export function useAccountByPda( - getPda: () => Promise, - pdaArgs: any[], -) { - const { connection } = useRpcContext(); - const [account, setAccount] = useState>(); - - const pdaArgsKey = JSON.stringify(pdaArgs); - - useEffect(() => { - const sub = (async () => { - const pdaPk = await getPda(); - let subId = 0; - - if (pdaPk) { - try { - const accountInfo = await connection.getAccountInfo(pdaPk); - - if (accountInfo) { - setAccount(some(GenericAccountParser(pdaPk, accountInfo))); - } else { - setAccount(none()); - } - } catch (ex) { - console.error(`Can't load ${pdaPk.toBase58()} account`, ex); - setAccount(none()); - } - - subId = connection.onAccountChange(pdaPk, a => - setAccount(some(GenericAccountParser(pdaPk, a))), - ); - } else { - setAccount(none()); - } - - return () => { - subId > 0 && connection.removeAccountChangeListener(subId); - }; - })(); - - return () => { - sub.then(dispose => dispose()); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [pdaArgsKey]); - - return account; -} diff --git a/packages/governance/src/hooks/apiHooks.ts b/packages/governance/src/hooks/apiHooks.ts deleted file mode 100644 index 4ec5a1e..0000000 --- a/packages/governance/src/hooks/apiHooks.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { useWallet } from '@oyster/common'; -import { - getNativeTreasuryAddress, - getRealmConfigAddress, - getSignatoryRecordAddress, - getTokenOwnerRecordAddress, - getVoteRecordAddress, - Governance, - Proposal, - ProposalTransaction, - RealmConfigAccount, - SignatoryRecord, - TokenOwnerRecord, - VoteRecord, -} from '@solana/spl-governance'; -import { pubkeyFilter } from '@solana/spl-governance'; -import { - useAccountByPda, - useGovernanceAccountByPda, - useGovernanceAccountByPubkey, - useGovernanceAccountsByFilter, -} from './accountHooks'; -import { useRpcContext } from './useRpcContext'; - -// ----- Realm Config --------- - -export function useRealmConfig(realm: PublicKey) { - const { programId } = useRpcContext(); - - return useGovernanceAccountByPda( - RealmConfigAccount, - async () => { - if (!realm) { - return; - } - return await getRealmConfigAddress(programId, realm); - }, - [realm], - )?.tryUnwrap(); -} - -// ----- Governance ----- - -export function useGovernance(governance: PublicKey | undefined) { - return useGovernanceAccountByPubkey( - Governance, - governance, - )?.tryUnwrap(); -} - -export function useGovernancesByRealm(realm: PublicKey | undefined) { - return useGovernanceAccountsByFilter(Governance, [ - pubkeyFilter(1, realm), - ]); -} - -// ----- Proposal ----- - -export function useProposal(proposal: PublicKey | undefined) { - return useGovernanceAccountByPubkey( - Proposal, - proposal, - )?.tryUnwrap(); -} - -export function useProposalsByGovernance(governance: PublicKey | undefined) { - return useGovernanceAccountsByFilter(Proposal, [ - pubkeyFilter(1, governance), - ]); -} - -// ----- TokenOwnerRecord ----- - -export function useTokenOwnerRecord(tokenOwnerRecord: PublicKey | undefined) { - return useGovernanceAccountByPubkey( - TokenOwnerRecord, - tokenOwnerRecord, - ); -} - -export function useTokenOwnerRecords( - realm: PublicKey | undefined, - governingTokenMint: PublicKey | undefined, -) { - return useGovernanceAccountsByFilter(TokenOwnerRecord, [ - pubkeyFilter(1, realm), - pubkeyFilter(1 + 32, governingTokenMint), - ]); -} - -export function useWalletTokenOwnerRecord( - realm: PublicKey | undefined, - governingTokenMint: PublicKey | undefined, -) { - const { wallet, programId } = useRpcContext(); - - return useGovernanceAccountByPda( - TokenOwnerRecord, - async () => { - if (!realm || !wallet?.publicKey || !governingTokenMint) { - return; - } - - return await getTokenOwnerRecordAddress( - programId, - realm, - governingTokenMint, - wallet.publicKey, - ); - }, - [wallet?.publicKey, governingTokenMint, realm], - )?.tryUnwrap(); -} - -export function useTokenOwnerRecordByOwner(ownerPk: PublicKey | undefined) { - return useGovernanceAccountsByFilter(TokenOwnerRecord, [ - pubkeyFilter(1 + 32 + 32, ownerPk), - ]); -} - -/// Returns all TokenOwnerRecords for the current wallet -export function useWalletTokenOwnerRecords() { - const { publicKey } = useWallet(); - - return useGovernanceAccountsByFilter(TokenOwnerRecord, [ - pubkeyFilter(1 + 32 + 32, publicKey), - ]); -} - -export function useProposalAuthority(proposalOwner: PublicKey | undefined) { - const { publicKey, connected } = useWallet(); - const tokenOwnerRecord = useTokenOwnerRecord(proposalOwner); - - return connected && - tokenOwnerRecord?.isSome() && - (tokenOwnerRecord.value.account.governingTokenOwner.toBase58() === - publicKey?.toBase58() || - tokenOwnerRecord.value.account.governanceDelegate?.toBase58() === - publicKey?.toBase58()) - ? tokenOwnerRecord?.tryUnwrap() - : undefined; -} - -// ----- Signatory Record ----- - -export function useWalletSignatoryRecord(proposal: PublicKey) { - const { wallet, programId } = useRpcContext(); - - return useGovernanceAccountByPda( - SignatoryRecord, - async () => { - if (!proposal || !wallet?.publicKey) { - return; - } - - return await getSignatoryRecordAddress( - programId, - proposal, - wallet.publicKey, - ); - }, - [wallet?.publicKey, proposal], - )?.tryUnwrap(); -} - -export function useSignatoriesByProposal(proposal: PublicKey | undefined) { - return useGovernanceAccountsByFilter(SignatoryRecord, [ - pubkeyFilter(1, proposal), - ]); -} - -// ----- Proposal Instruction ----- - -export function useInstructionsByProposal(proposal: PublicKey | undefined) { - return useGovernanceAccountsByFilter( - ProposalTransaction, - [pubkeyFilter(1, proposal)], - ); -} - -// ----- VoteRecord ----- - -export const useVoteRecordsByProposal = (proposal: PublicKey | undefined) => { - return useGovernanceAccountsByFilter(VoteRecord, [ - pubkeyFilter(1, proposal), - ]); -}; - -export const useTokenOwnerVoteRecord = ( - proposal: PublicKey, - tokenOwnerRecord: PublicKey | undefined, -) => { - const { programId } = useRpcContext(); - - return useGovernanceAccountByPda( - VoteRecord, - async () => { - if (!proposal || !tokenOwnerRecord) { - return; - } - - return await getVoteRecordAddress(programId, proposal, tokenOwnerRecord); - }, - [tokenOwnerRecord, proposal], - ); -}; - -export function useNativeTreasury(governance: PublicKey | undefined) { - const { programId } = useRpcContext(); - - return useAccountByPda(async () => { - if (!governance) { - return; - } - return await getNativeTreasuryAddress(programId, governance); - }, [governance])?.tryUnwrap(); -} diff --git a/packages/governance/src/hooks/useHasVoteTimeExpired.ts b/packages/governance/src/hooks/useHasVoteTimeExpired.ts deleted file mode 100644 index 9ad01df..0000000 --- a/packages/governance/src/hooks/useHasVoteTimeExpired.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Governance, Proposal } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; -import { useIsBeyondTimestamp } from './useIsBeyondTimestamp'; - -export const useHasVoteTimeExpired = ( - governance: ProgramAccount | undefined, - proposal: ProgramAccount, -) => { - return useIsBeyondTimestamp( - proposal.account.isVoteFinalized() - ? 0 // If vote is finalized then set the timestamp to 0 to make it expired - : proposal.account.votingAt && governance - ? proposal.account.votingAt.toNumber() + - governance.account.config.maxVotingTime - : undefined, - ); -}; diff --git a/packages/governance/src/hooks/useIsBeyondTimestamp.ts b/packages/governance/src/hooks/useIsBeyondTimestamp.ts deleted file mode 100644 index 99e5d9e..0000000 --- a/packages/governance/src/hooks/useIsBeyondTimestamp.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { useConnection } from '@oyster/common'; -import moment from 'moment'; -import { useEffect, useState } from 'react'; - -export const useIsBeyondTimestamp = (timestamp: number | undefined) => { - const connection = useConnection(); - const [isBeyondTimestamp, setIsBeyondTimestamp] = useState< - boolean | undefined - >(); - - useEffect(() => { - if (!timestamp) { - return; - } - - const sub = (async () => { - const now = moment().unix(); - - if (now > timestamp) { - setIsBeyondTimestamp(true); - return; - } - - setIsBeyondTimestamp(false); - - const id = setInterval(() => { - const now = moment().unix(); - if (now > timestamp) { - setIsBeyondTimestamp(true); - clearInterval(id!); - } - }, 5000); // TODO: Use actual timestamp to calculate the interval - - return id; - })(); - - return () => { - sub.then(id => id && clearInterval(id)); - }; - }, [connection, timestamp]); - - return isBeyondTimestamp; -}; diff --git a/packages/governance/src/hooks/useKeyParam.ts b/packages/governance/src/hooks/useKeyParam.ts deleted file mode 100644 index a61e2df..0000000 --- a/packages/governance/src/hooks/useKeyParam.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { useParams } from 'react-router-dom'; - -export const useKeyParam = () => { - const { key } = useParams<{ key: string }>(); - return new PublicKey(key); -}; diff --git a/packages/governance/src/hooks/useRpcContext.ts b/packages/governance/src/hooks/useRpcContext.ts deleted file mode 100644 index b31b39e..0000000 --- a/packages/governance/src/hooks/useRpcContext.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { useConnectionConfig, useConnection, useWallet } from '@oyster/common'; -import { PublicKey } from '@solana/web3.js'; -import { useEffect, useState } from 'react'; - -import { useProgramInfo } from '../contexts/GovernanceContext'; -import { RpcContext } from '@solana/spl-governance'; - -export function useRpcContext() { - const { endpoint } = useConnectionConfig(); - const connection = useConnection(); - const wallet = useWallet(); - const { programId, programVersion } = useProgramInfo(); - - const [rpcContext, setRpcContext] = useState( - new RpcContext( - new PublicKey(programId), - programVersion, - wallet, - connection, - endpoint, - ), - ); - - useEffect( - () => { - setRpcContext( - new RpcContext( - new PublicKey(programId), - programVersion, - wallet, - connection, - endpoint, - ), - ); - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [programId, connection, wallet, endpoint, programVersion], - ); - - return rpcContext; -} diff --git a/packages/governance/src/hooks/useVoterStakeRegistryClient.ts b/packages/governance/src/hooks/useVoterStakeRegistryClient.ts deleted file mode 100644 index d811246..0000000 --- a/packages/governance/src/hooks/useVoterStakeRegistryClient.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { useConnectionConfig, useConnection, useWallet } from '@oyster/common'; -import { useEffect, useState } from 'react'; - -import { useProgramInfo } from '../contexts/GovernanceContext'; -import { Provider, Wallet } from '@project-serum/anchor'; -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client'; - -export function useVoterStakeRegistryClient() { - const { endpoint, env } = useConnectionConfig(); - const connection = useConnection(); - const wallet = useWallet(); - const { programId, programVersion } = useProgramInfo(); - const [client, setClient] = useState(); - - useEffect( - () => { - const handleSetClient = async () => { - const options = Provider.defaultOptions(); - const provider = new Provider( - connection, - (wallet as unknown) as Wallet, - options, - ); - const vsrClient = await VsrClient.connect(provider, env === 'devnet'); - setClient(vsrClient); - }; - if (wallet.connected) { - handleSetClient(); - } - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [programId, connection, wallet, endpoint, programVersion], - ); - - return client; -} diff --git a/packages/governance/src/index.tsx b/packages/governance/src/index.tsx deleted file mode 100644 index af1356b..0000000 --- a/packages/governance/src/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import "./wdyr"; - -import React from "react"; -import ReactDOM from "react-dom"; -import App from "./App"; -import * as serviceWorker from "./serviceWorker"; -ReactDOM.render( - - - , - document.getElementById("root") -); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/packages/governance/src/manifest.json b/packages/governance/src/manifest.json deleted file mode 100644 index 87bc3cd..0000000 --- a/packages/governance/src/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Oyster Governance", - "short_name": "Oyster Governance", - "display": "standalone", - "start_url": "./", - "theme_color": "#002140", - "background_color": "#001529", - "icons": [ - { - "src": "icons/icon-192x192.png", - "sizes": "192x192" - }, - { - "src": "icons/icon-128x128.png", - "sizes": "128x128" - }, - { - "src": "icons/icon-512x512.png", - "sizes": "512x512" - } - ] -} diff --git a/packages/governance/src/react-app-env.d.ts b/packages/governance/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/packages/governance/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/governance/src/routes.tsx b/packages/governance/src/routes.tsx deleted file mode 100644 index 83901b3..0000000 --- a/packages/governance/src/routes.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { HashRouter, Route, Switch } from 'react-router-dom'; -import React from 'react'; -import { contexts } from '@oyster/common'; -import { AppLayout } from './components/Layout/layout'; -import GovernanceProvider from './contexts/GovernanceContext'; -import { HomeView } from './views'; -import { ProposalView } from './views/proposal/proposalView'; -import { GovernanceView } from './views/governance/governanceView'; -import { DevToolsView } from './views/devtools/DevToolsView'; -import { RealmView } from './views/realm/realmView'; - -import { ErrorBoundary } from 'react-error-boundary'; - -import { AppErrorBanner } from './components/appErrorBanner/appErrorBanner'; -import { MemberView } from './views/member/memberView'; - -const { WalletProvider } = contexts.Wallet; -const { ConnectionProvider } = contexts.Connection; -const { AccountsProvider } = contexts.Accounts; - -export function Routes() { - return ( - <> - - {/* TODO: Adding the error boundary as a quick fix to avoid black screens - for crashes However we should make it nicer and hide the technical - details from users by default */} - - - - - - - - } /> - } - /> - } - /> - } /> - - } - /> - - } - /> - - - - - - - - - - ); -} diff --git a/packages/governance/src/serviceWorker.ts b/packages/governance/src/serviceWorker.ts deleted file mode 100644 index 852bc17..0000000 --- a/packages/governance/src/serviceWorker.ts +++ /dev/null @@ -1,146 +0,0 @@ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/, - ), -); - -type Config = { - onSuccess?: (registration: ServiceWorkerRegistration) => void; - onUpdate?: (registration: ServiceWorkerRegistration) => void; -}; - -export function register(config?: Config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA', - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl: string, config?: Config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.', - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl: string, config?: Config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl, { - headers: { 'Service-Worker': 'script' }, - }) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.', - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready - .then(registration => { - registration.unregister(); - }) - .catch(error => { - console.error(error.message); - }); - } -} diff --git a/packages/governance/src/setupTests.ts b/packages/governance/src/setupTests.ts deleted file mode 100644 index 74b1a27..0000000 --- a/packages/governance/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/extend-expect'; diff --git a/packages/governance/src/tools/anchor/anchorHooks.ts b/packages/governance/src/tools/anchor/anchorHooks.ts deleted file mode 100644 index 0e6074f..0000000 --- a/packages/governance/src/tools/anchor/anchorHooks.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AccountInfo, PublicKey } from '@solana/web3.js'; -import { useEffect, useState } from 'react'; -import { idlAddress as getIdlAddress } from './idlInstructions'; - -import { contexts } from '@oyster/common'; - -const { useConnection } = contexts.Connection; - -export function useAnchorIdlAddress(programId: PublicKey) { - const [idlAddress, setIdlAddress] = useState(); - useEffect(() => { - (async () => { - setIdlAddress(await getIdlAddress(programId)); - })(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [programId.toBase58()]); - - return idlAddress; -} - -export function useAnchorIdlAccount(programId: PublicKey) { - const [idlAccount, setIdlAccount] = useState< - AccountInfo | undefined - >(); - - const connection = useConnection(); - - useEffect(() => { - (async () => { - const idlAddress = await getIdlAddress(programId); - - // TODO: we should also inspect the account to ensure it was not closed - // It's also possible the program can opt out of idl at some point so we should also call the actual program as well - const accountInfo = await connection.getAccountInfo(idlAddress); - - if (accountInfo) { - setIdlAccount(accountInfo); - } - })(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [programId.toBase58(), connection]); - - return idlAccount; -} diff --git a/packages/governance/src/tools/anchor/idlInstructions.ts b/packages/governance/src/tools/anchor/idlInstructions.ts deleted file mode 100644 index c93d652..0000000 --- a/packages/governance/src/tools/anchor/idlInstructions.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; -import { Layout, rustEnum, struct } from '@project-serum/borsh'; - -// From https://github.com/project-serum/multisig-ui/blob/2d76e541faabe748f5166e2ec111462ac395c76e/src/utils/idl.ts#L5 - -// Simplified since we only use the SetBuffer variant. -export type IdlInstruction = - | Create - | CreateBuffer - | Write - | SetBuffer - | SetAuthority; - -type Create = {}; -type CreateBuffer = {}; -type Write = {}; -type SetBuffer = {}; -type SetAuthority = {}; - -const IDL_INSTRUCTION_LAYOUT: Layout = rustEnum([ - struct([], 'create'), - struct([], 'createBuffer'), - struct([], 'write'), - struct([], 'setBuffer'), - struct([], 'setAuthority'), -]); - -export function encodeInstruction(i: IdlInstruction): Buffer { - const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. - const len = IDL_INSTRUCTION_LAYOUT.encode(i, buffer); - return Buffer.concat([IDL_TAG, buffer.slice(0, len)]); -} - -// Reverse for little endian. -export const IDL_TAG = Buffer.from('0a69e9a778bcf440', 'hex').reverse(); - -// From https://github.com/project-serum/anchor/blob/2f780e0d274f47e442b3f0d107db805a41c6def0/ts/src/idl.ts#L121 - -// Deterministic IDL address as a function of the program id. -export async function idlAddress(programId: PublicKey): Promise { - const base = (await PublicKey.findProgramAddress([], programId))[0]; - return await PublicKey.createWithSeed(base, seed(), programId); -} - -// Seed for generating the idlAddress. -export function seed(): string { - return 'anchor:idl'; -} - -// Based on https://github.com/project-serum/multisig-ui/blob/2d76e541faabe748f5166e2ec111462ac395c76e/src/components/Multisig.tsx#L1089 -export async function createSetBuffer( - programId: PublicKey, - buffer: PublicKey, - idlAccount: PublicKey, - idlAuthority: PublicKey, -) { - const data = encodeInstruction({ setBuffer: {} }); - - const keys = [ - { - pubkey: buffer, - isWritable: true, - isSigner: false, - }, - { pubkey: idlAccount, isWritable: true, isSigner: false }, - { pubkey: idlAuthority, isWritable: false, isSigner: true }, - ]; - - return new TransactionInstruction({ - keys, - programId, - data, - }); -} diff --git a/packages/governance/src/tools/forms.ts b/packages/governance/src/tools/forms.ts deleted file mode 100644 index fe50170..0000000 --- a/packages/governance/src/tools/forms.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const formVerticalLayout = { - labelCol: { span: 24 }, - wrapperCol: { span: 24 }, -}; - -/* eslint-disable no-template-curly-in-string */ -export const formValidateMessages = { - required: 'Please provide ${label}', -}; -/* eslint-enable no-template-curly-in-string */ - -export const formDefaults = { - requiredMark: false, - ...formVerticalLayout, - validateMessages: formValidateMessages, -}; diff --git a/packages/governance/src/tools/option.ts b/packages/governance/src/tools/option.ts deleted file mode 100644 index d5554d6..0000000 --- a/packages/governance/src/tools/option.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Rust style Option with typeScript twist inspired by https://gist.github.com/s-panferov/575da5a7131c285c0539 - -export interface Option { - map(fn: (a: T) => U): Option; - isSome(): this is Some; - isNone(): this is None; - unwrap(): T; - tryUnwrap(): T | undefined; -} - -export class Some implements Option { - value: T; - - map(fn: (a: T) => U): Option { - return new Some(fn(this.value)); - } - - constructor(value: T) { - this.value = value; - } - - isSome(): this is Some { - return true; - } - - isNone(): this is None { - return false; - } - - unwrap(): T { - return this.value; - } - - tryUnwrap(): T | undefined { - return this.unwrap(); - } - - toString(): string { - return `Some(${this.value})`; - } -} - -export function some(value: T) { - return new Some(value); -} - -export function none() { - return new None(); -} - -export class None implements Option { - map(fn: (a: T) => U): Option { - return new None(); - } - - isSome(): this is Some { - return false; - } - - isNone(): this is None { - return true; - } - - unwrap(): T { - throw new Error('None has no value'); - } - - tryUnwrap(): T | undefined { - return undefined; - } - - public toString(): string { - return 'None'; - } -} diff --git a/packages/governance/src/tools/raydium/raydium.ts b/packages/governance/src/tools/raydium/raydium.ts deleted file mode 100644 index 76e4efa..0000000 --- a/packages/governance/src/tools/raydium/raydium.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; -import { nu64, struct, u8 } from 'buffer-layout'; - -export function addLiquidityInstructionV4( - programId: PublicKey, - // tokenProgramId: PublicKey, - // amm - ammId: PublicKey, - ammAuthority: PublicKey, - ammOpenOrders: PublicKey, - ammTargetOrders: PublicKey, - lpMintAddress: PublicKey, - poolCoinTokenAccount: PublicKey, - poolPcTokenAccount: PublicKey, - // serum - serumMarket: PublicKey, - // user - userCoinTokenAccount: PublicKey, - userPcTokenAccount: PublicKey, - userLpTokenAccount: PublicKey, - userOwner: PublicKey, - - maxCoinAmount: number, - maxPcAmount: number, - fixedFromCoin: number, -): TransactionInstruction { - const dataLayout = struct([ - u8('instruction'), - nu64('maxCoinAmount'), - nu64('maxPcAmount'), - nu64('fixedFromCoin'), - ]); - - const keys = [ - { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, - { pubkey: ammId, isSigner: false, isWritable: true }, - { pubkey: ammAuthority, isSigner: false, isWritable: false }, - { pubkey: ammOpenOrders, isSigner: false, isWritable: false }, - { pubkey: ammTargetOrders, isSigner: false, isWritable: true }, - { pubkey: lpMintAddress, isSigner: false, isWritable: true }, - { pubkey: poolCoinTokenAccount, isSigner: false, isWritable: true }, - { pubkey: poolPcTokenAccount, isSigner: false, isWritable: true }, - { pubkey: serumMarket, isSigner: false, isWritable: false }, - { pubkey: userCoinTokenAccount, isSigner: false, isWritable: true }, - { pubkey: userPcTokenAccount, isSigner: false, isWritable: true }, - { pubkey: userLpTokenAccount, isSigner: false, isWritable: true }, - { pubkey: userOwner, isSigner: true, isWritable: false }, - ]; - - const data = Buffer.alloc(dataLayout.span); - dataLayout.encode( - { - instruction: 3, - maxCoinAmount, - maxPcAmount, - fixedFromCoin, - }, - data, - ); - - return new TransactionInstruction({ - keys, - programId, - data, - }); -} - -export function depositInstructionV4( - programId: PublicKey, - // staking pool - poolId: PublicKey, - poolAuthority: PublicKey, - // user - userInfoAccount: PublicKey, - userOwner: PublicKey, - userLpTokenAccount: PublicKey, - poolLpTokenAccount: PublicKey, - userRewardTokenAccount: PublicKey, - poolRewardTokenAccount: PublicKey, - userRewardTokenAccountB: PublicKey, - poolRewardTokenAccountB: PublicKey, - // tokenProgramId: PublicKey, - amount: number, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -): TransactionInstruction { - const dataLayout = struct([u8('instruction'), nu64('amount')]); - - const keys = [ - { pubkey: poolId, isSigner: false, isWritable: true }, - { pubkey: poolAuthority, isSigner: false, isWritable: true }, - { pubkey: userInfoAccount, isSigner: false, isWritable: true }, - { pubkey: userOwner, isSigner: true, isWritable: true }, - { pubkey: userLpTokenAccount, isSigner: false, isWritable: true }, - { pubkey: poolLpTokenAccount, isSigner: false, isWritable: true }, - { pubkey: userRewardTokenAccount, isSigner: false, isWritable: true }, - { pubkey: poolRewardTokenAccount, isSigner: false, isWritable: true }, - { pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true }, - { pubkey: tokenProgram, isSigner: false, isWritable: true }, - { pubkey: userRewardTokenAccountB, isSigner: false, isWritable: true }, - { pubkey: poolRewardTokenAccountB, isSigner: false, isWritable: true }, - ]; - - const data = Buffer.alloc(dataLayout.span); - dataLayout.encode( - { - instruction: 1, - amount, - }, - data, - ); - - return new TransactionInstruction({ - keys, - programId, - data, - }); -} - -export function depositInstruction( - programId: PublicKey, - // staking pool - poolId: PublicKey, - poolAuthority: PublicKey, - // user - userInfoAccount: PublicKey, - userOwner: PublicKey, - userLpTokenAccount: PublicKey, - poolLpTokenAccount: PublicKey, - userRewardTokenAccount: PublicKey, - poolRewardTokenAccount: PublicKey, - // tokenProgramId: PublicKey, - amount: number, -): TransactionInstruction { - const dataLayout = struct([u8('instruction'), nu64('amount')]); - - const keys = [ - { pubkey: poolId, isSigner: false, isWritable: true }, - { pubkey: poolAuthority, isSigner: false, isWritable: false }, - { pubkey: userInfoAccount, isSigner: false, isWritable: true }, - { pubkey: userOwner, isSigner: true, isWritable: false }, - { pubkey: userLpTokenAccount, isSigner: false, isWritable: true }, - { pubkey: poolLpTokenAccount, isSigner: false, isWritable: true }, - { pubkey: userRewardTokenAccount, isSigner: false, isWritable: true }, - { pubkey: poolRewardTokenAccount, isSigner: false, isWritable: true }, - { pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false }, - { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, - ]; - - const data = Buffer.alloc(dataLayout.span); - dataLayout.encode( - { - instruction: 1, - amount, - }, - data, - ); - - return new TransactionInstruction({ - keys, - programId, - data, - }); -} diff --git a/packages/governance/src/tools/routeTools.ts b/packages/governance/src/tools/routeTools.ts deleted file mode 100644 index 6e54fa0..0000000 --- a/packages/governance/src/tools/routeTools.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -export function getRealmUrl( - realm: PublicKey | string, - programId: PublicKey | string, -) { - return getItemUrl('realm', realm, programId); -} - -export function getProposalUrl( - proposal: PublicKey | string, - programId: PublicKey | string, -) { - return getItemUrl('proposal', proposal, programId); -} - -export function getGovernanceUrl( - governance: PublicKey | string, - programId: PublicKey | string, -) { - return getItemUrl('governance', governance, programId); -} - -export function getHomeUrl(programId: PublicKey) { - return `/?programId=${programId.toBase58()}`; -} - -export function getItemUrl( - itemName: string, - itemId: PublicKey | string, - programId: PublicKey | string, -) { - return `/${itemName}/${ - itemId instanceof PublicKey ? itemId.toBase58() : itemId - }?programId=${ - programId instanceof PublicKey ? programId.toBase58() : programId - }`; -} diff --git a/packages/governance/src/tools/script.ts b/packages/governance/src/tools/script.ts deleted file mode 100644 index 95258ae..0000000 --- a/packages/governance/src/tools/script.ts +++ /dev/null @@ -1,27 +0,0 @@ -// nameOf operator -// https://schneidenbach.gitbooks.io/typescript-cookbook/content/nameof-operator.html -export function nameOf(name: keyof T) { - return name; -} - -export function getNameOf() { - return (name: keyof T) => name; -} - -export function getErrorMessage(ex: any) { - if (ex instanceof Error) { - return ex.message; - } - - return JSON.stringify(ex); -} - -export function arrayToRecord( - source: readonly T[], - getKey: (item: T) => string, -) { - return source.reduce((all, a) => ({ ...all, [getKey(a)]: a }), {}) as Record< - string, - T - >; -} diff --git a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/accounts.ts b/packages/governance/src/tools/sdk/bpfUpgradeableLoader/accounts.ts deleted file mode 100644 index 9489503..0000000 --- a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/accounts.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { utils } from '@oyster/common'; -import { Connection, PublicKey } from '@solana/web3.js'; -import { create } from 'superstruct'; -import { ProgramDataAccountInfo } from '../../validators/accounts/upgradeable-program'; - -export async function getProgramDataAddress(programId: PublicKey) { - const { bpf_upgrade_loader: bpfUpgradableLoaderId } = utils.programIds(); - - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - bpfUpgradableLoaderId, - ); - - return programDataAddress; -} - -export async function getProgramDataAccount( - connection: Connection, - programId: PublicKey, -) { - const programDataAddress = await getProgramDataAddress(programId); - const account = await connection.getParsedAccountInfo(programDataAddress); - - if (!account || !account.value) { - throw new Error( - `Program data account ${programDataAddress.toBase58()} for program ${programId.toBase58()} not found`, - ); - } - - const accountInfo = account.value; - - if ( - !( - 'parsed' in accountInfo.data && - accountInfo.data.program === 'bpf-upgradeable-loader' - ) - ) { - throw new Error( - `Invalid program data account ${programDataAddress.toBase58()} for program ${programId.toBase58()}`, - ); - } - - let programData = create( - accountInfo.data.parsed.info, - ProgramDataAccountInfo, - ); - return programData; -} diff --git a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts b/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts deleted file mode 100644 index e12ab7d..0000000 --- a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { utils } from '@oyster/common'; -import { PublicKey, TransactionInstruction } from '@solana/web3.js'; - -export async function createSetUpgradeAuthority( - programId: PublicKey, - upgradeAuthority: PublicKey, - newUpgradeAuthority: PublicKey, -) { - const { bpf_upgrade_loader: bpfUpgradableLoaderId } = utils.programIds(); - - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - bpfUpgradableLoaderId, - ); - - const keys = [ - { - pubkey: programDataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: upgradeAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: newUpgradeAuthority, - isWritable: false, - isSigner: false, - }, - ]; - - return new TransactionInstruction({ - keys, - programId: bpfUpgradableLoaderId, - data: Buffer.from([4, 0, 0, 0]), // SetAuthority instruction bincode - }); -} diff --git a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts b/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts deleted file mode 100644 index 51795b8..0000000 --- a/packages/governance/src/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { utils } from '@oyster/common'; -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js'; - -export async function createUpgradeInstruction( - programId: PublicKey, - bufferAddress: PublicKey, - upgradeAuthority: PublicKey, - spillAddress: PublicKey, -) { - const { bpf_upgrade_loader: bpfUpgradableLoaderId } = utils.programIds(); - - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - bpfUpgradableLoaderId, - ); - - const keys = [ - { - pubkey: programDataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: programId, - isWritable: true, - isSigner: false, - }, - { - pubkey: bufferAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: spillAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: upgradeAuthority, - isWritable: false, - isSigner: true, - }, - ]; - - return new TransactionInstruction({ - keys, - programId: bpfUpgradableLoaderId, - data: Buffer.from([3, 0, 0, 0]), // Upgrade instruction bincode - }); -} diff --git a/packages/governance/src/tools/sdk/core/connection.tsx b/packages/governance/src/tools/sdk/core/connection.tsx deleted file mode 100644 index be6bbcb..0000000 --- a/packages/governance/src/tools/sdk/core/connection.tsx +++ /dev/null @@ -1,305 +0,0 @@ -import { - SendTransactionError, - SignTransactionError, - TransactionTimeoutError, - WalletNotConnectedError, - WalletSigner, -} from '@oyster/common'; -import { - Account, - Commitment, - Connection, - Keypair, - RpcResponseAndContext, - SimulatedTransactionResponse, - Transaction, - TransactionSignature, -} from '@solana/web3.js'; - -export async function sleep(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -export function getUnixTs() { - return new Date().getTime() / 1000; -} - -export const DEFAULT_TX_TIMEOUT = 31000; - -/// SendTransaction copied from MNGO https://github.com/blockworks-foundation/governance-ui/blob/52166d0849cce4606e5e363047402ede77a76088/utils/send.tsx#L31 -/// SendTransaction from @oyster/common has reliability issues and randomly returns false positive errors (tx is successful but it still returns an error) -/// I couldn't figure out what the issue was (happens on mainnet only) so just copied this battle tested version from MNGO -/// Note: it differs from the MNGO version by errors it throws and doesn't show notifications -export async function sendTransaction2({ - transaction, - wallet, - signers = [], - connection, - timeout = DEFAULT_TX_TIMEOUT, -}: { - transaction: Transaction; - wallet: WalletSigner; - signers?: Array; - connection: Connection; - sendingMessage?: string; - successMessage?: string; - timeout?: number; -}) { - const signedTransaction = await signTransaction({ - transaction, - wallet, - signers, - connection, - }); - return await sendSignedTransaction({ - signedTransaction, - connection, - timeout, - }); -} - -export async function signTransaction({ - transaction, - wallet, - signers = [], - connection, -}: { - transaction: Transaction; - wallet: WalletSigner; - signers?: Array; - connection: Connection; -}) { - const { publicKey, signTransaction } = wallet; - if (!publicKey) throw new WalletNotConnectedError(); - - transaction.recentBlockhash = ( - await connection.getRecentBlockhash('max') - ).blockhash; - transaction.setSigners(publicKey, ...signers.map(s => s.publicKey)); - if (signers.length > 0) { - transaction.partialSign(...signers); - } - try { - return await signTransaction(transaction); - } catch (ex) { - let message = ''; - if (ex instanceof Error) { - message = ex.message; - } else if (ex) { - message = JSON.stringify(ex); - } - throw new SignTransactionError(message); - } -} - -export async function signTransactions({ - transactionsAndSigners, - wallet, - connection, -}: { - transactionsAndSigners: { - transaction: Transaction; - signers?: Array; - }[]; - wallet: WalletSigner; - connection: Connection; -}) { - const { publicKey, signAllTransactions } = wallet; - if (!publicKey) throw new WalletNotConnectedError(); - - const blockhash = (await connection.getRecentBlockhash('max')).blockhash; - transactionsAndSigners.forEach(({ transaction, signers = [] }) => { - transaction.recentBlockhash = blockhash; - transaction.setSigners(publicKey, ...signers.map(s => s.publicKey)); - if (signers?.length > 0) { - transaction.partialSign(...signers); - } - }); - return await signAllTransactions( - transactionsAndSigners.map(({ transaction }) => transaction), - ); -} - -export async function sendSignedTransaction({ - signedTransaction, - connection, - timeout = DEFAULT_TX_TIMEOUT, -}: { - signedTransaction: Transaction; - connection: Connection; - sendingMessage?: string; - successMessage?: string; - timeout?: number; -}): Promise { - const rawTransaction = signedTransaction.serialize(); - const startTime = getUnixTs(); - - const txid: TransactionSignature = await connection.sendRawTransaction( - rawTransaction, - { - skipPreflight: true, - }, - ); - - console.log('Started awaiting confirmation for', txid); - - let done = false; - (async () => { - while (!done && getUnixTs() - startTime < timeout) { - connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }); - await sleep(3000); - } - })(); - try { - await awaitTransactionSignatureConfirmation(txid, timeout, connection); - } catch (err) { - if ((err as any).timeout) { - throw new TransactionTimeoutError(txid); - } - let simulateResult: SimulatedTransactionResponse | null = null; - try { - simulateResult = ( - await simulateTransaction(connection, signedTransaction, 'single') - ).value; - } catch (e) { - console.log('Error: ', e); - } - - if (simulateResult && simulateResult.err) { - if (simulateResult.logs) { - for (let i = simulateResult.logs.length - 1; i >= 0; --i) { - const line = simulateResult.logs[i]; - if (line.startsWith('Program log: ')) { - throw new SendTransactionError( - 'Transaction failed: ' + line.slice('Program log: '.length), - txid, - simulateResult.err, - ); - } - } - } - throw new SendTransactionError( - JSON.stringify(simulateResult.err), - txid, - simulateResult.err, - ); - } - - throw new SendTransactionError('Transaction failed', txid); - } finally { - done = true; - } - - console.log('Latency', txid, getUnixTs() - startTime); - return txid; -} - -async function awaitTransactionSignatureConfirmation( - txid: TransactionSignature, - timeout: number, - connection: Connection, -) { - let done = false; - const result = await new Promise((resolve, reject) => { - // eslint-disable-next-line - (async () => { - setTimeout(() => { - if (done) { - return; - } - done = true; - console.log('Timed out for txid', txid); - reject({ timeout: true }); - }, timeout); - try { - connection.onSignature( - txid, - result => { - console.log('WS confirmed', txid, result); - done = true; - if (result.err) { - reject(result.err); - } else { - resolve(result); - } - }, - connection.commitment, - ); - console.log('Set up WS connection', txid); - } catch (e) { - done = true; - console.log('WS error in setup', txid, e); - } - while (!done) { - // eslint-disable-next-line - (async () => { - try { - const signatureStatuses = await connection.getSignatureStatuses([ - txid, - ]); - const result = signatureStatuses && signatureStatuses.value[0]; - if (!done) { - if (!result) { - // console.log('REST null result for', txid, result); - } else if (result.err) { - console.log('REST error for', txid, result); - done = true; - reject(result.err); - } - // @ts-ignore - else if ( - !( - result.confirmations || - result.confirmationStatus === 'confirmed' || - result.confirmationStatus === 'finalized' - ) - ) { - console.log('REST not confirmed', txid, result); - } else { - console.log('REST confirmed', txid, result); - done = true; - resolve(result); - } - } - } catch (e) { - if (!done) { - console.log('REST connection error: txid', txid, e); - } - } - })(); - await sleep(3000); - } - })(); - }); - done = true; - return result; -} - -/** Copy of Connection.simulateTransaction that takes a commitment parameter. */ -export async function simulateTransaction( - connection: Connection, - transaction: Transaction, - commitment: Commitment, -): Promise> { - // @ts-ignore - transaction.recentBlockhash = await connection._recentBlockhash( - // @ts-ignore - connection._disableBlockhashCaching, - ); - - const signData = transaction.serializeMessage(); - // @ts-ignore - const wireTransaction = transaction._serialize(signData); - const encodedTransaction = wireTransaction.toString('base64'); - const config: any = { encoding: 'base64', commitment }; - const args = [encodedTransaction, config]; - - // @ts-ignore - const res = await connection._rpcRequest('simulateTransaction', args); - if (res.error) { - throw new Error('failed to simulate transaction: ' + res.error.message); - } - return res.result; -} diff --git a/packages/governance/src/tools/sdk/token/splToken.ts b/packages/governance/src/tools/sdk/token/splToken.ts deleted file mode 100644 index 8386789..0000000 --- a/packages/governance/src/tools/sdk/token/splToken.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { - SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - TOKEN_PROGRAM_ID, -} from '@oyster/common'; -import { Keypair, PublicKey } from '@solana/web3.js'; - -import { AccountLayout, Token } from '@solana/spl-token'; -import { - SystemProgram, - TransactionInstruction, - Connection, -} from '@solana/web3.js'; - -/** - * Get the address for the associated token account - * - * @param mint Token mint account - * @param owner Owner of the new account - * @return Public key of the associated token account - */ -export async function getAssociatedTokenAddress( - mint: PublicKey, - owner: PublicKey, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -): Promise { - return ( - await PublicKey.findProgramAddress( - [owner.toBuffer(), tokenProgram.toBuffer(), mint.toBuffer()], - SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - ) - )[0]; -} - -export function createTokenAccount( - instructions: TransactionInstruction[], - payer: PublicKey, - accountRentExempt: number, - mint: PublicKey, - owner: PublicKey, - signers: Keypair[], - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) { - const account = createUninitializedTokenAccount( - instructions, - payer, - accountRentExempt, - signers, - ); - - instructions.push( - Token.createInitAccountInstruction(tokenProgram, mint, account, owner), - ); - - return account; -} - -export function createUninitializedTokenAccount( - instructions: TransactionInstruction[], - payer: PublicKey, - amount: number, - signers: Keypair[], - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) { - const account = new Keypair(); - instructions.push( - SystemProgram.createAccount({ - fromPubkey: payer, - newAccountPubkey: account.publicKey, - lamports: amount, - space: AccountLayout.span, - programId: tokenProgram, - }), - ); - - signers.push(account); - - return account.publicKey; -} - -export const withCreateSplTokenAccount = async ( - instructions: TransactionInstruction[], - signers: Keypair[], - connection: Connection, - mint: PublicKey, - owner: PublicKey, - payer: PublicKey, - tokenProgram: PublicKey = TOKEN_PROGRAM_ID, -) => { - const tokenAccountRentExempt = await connection.getMinimumBalanceForRentExemption( - AccountLayout.span, - ); - - const tokenAccountAddress = createTokenAccount( - instructions, - payer, - tokenAccountRentExempt, - mint, - owner, - signers, - tokenProgram - ); - - return tokenAccountAddress; -}; diff --git a/packages/governance/src/tools/transactions.tsx b/packages/governance/src/tools/transactions.tsx deleted file mode 100644 index 7a5067f..0000000 --- a/packages/governance/src/tools/transactions.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { - TransactionInstruction, - Connection, - Transaction, - Keypair -} from '@solana/web3.js'; -import { - ExplorerLink, - isSendTransactionError, - isTransactionTimeoutError, - utils, - WalletSigner, -} from '@oyster/common'; -import React from 'react'; -import { DEFAULT_TX_TIMEOUT, sendTransaction2 } from './sdk/core/connection'; - -const { notify } = utils; - -export async function sendTransactionWithNotifications( - connection: Connection, - wallet: WalletSigner, - instructions: TransactionInstruction[], - signers: Keypair[], - pendingMessage: string, - successMessage: string, -) { - notify({ - message: `${pendingMessage}...`, - description: 'Please wait...', - type: 'warn', - }); - - try { - const transaction = new Transaction(); - transaction.add(...instructions); - - try { - let txid = await sendTransaction2({ - transaction, - wallet, - signers, - connection, - }); - - notify({ - message: successMessage, - type: 'success', - description: ( - <> - {'Transaction: '} - - - ), - }); - } catch (txError) { - if (isTransactionTimeoutError(txError)) { - notify({ - message: `Transaction hasn't been confirmed within ${DEFAULT_TX_TIMEOUT / 1000 - }s. Please check on Solana Explorer`, - description: ( - <> - - - ), - type: 'warn', - }); - } else if (isSendTransactionError(txError)) { - notify({ - message: 'Transaction error', - description: ( - <> - - - ), - type: 'error', - }); - } - throw txError; - } - } catch (ex) { - console.error(ex); - throw ex; - } -} diff --git a/packages/governance/src/tools/units.ts b/packages/governance/src/tools/units.ts deleted file mode 100644 index 56a6f60..0000000 --- a/packages/governance/src/tools/units.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { MintInfo } from '@solana/spl-token'; -import { BigNumber } from 'bignumber.js'; -import BN from 'bn.js'; - -import { MintMaxVoteWeightSource } from '@solana/spl-governance'; - -const SECONDS_PER_DAY = 86400; -const DAYS_PER_YEAR = 365; - -export function getDaysFromTimestamp(unixTimestamp: number) { - return unixTimestamp / SECONDS_PER_DAY; -} - -export function getTimestampFromDays(days: number) { - return days * SECONDS_PER_DAY; -} - -export function getSecondsFromYears(years: number) { - return new BigNumber(years).multipliedBy( - new BigNumber(DAYS_PER_YEAR * SECONDS_PER_DAY), - ); -} - -/// Formats mint amount (natural units) as a decimal string -export function formatMintNaturalAmountAsDecimal( - mint: MintInfo, - naturalAmount: BN, -) { - return getMintDecimalAmountFromNatural(mint, naturalAmount).toFormat(); -} - -/// Formats mint supply (natural units) as a decimal string -export function formatMintSupplyAsDecimal(mint: MintInfo) { - return getMintDecimalAmountFromNatural(mint, mint.supply as BN).toFormat(); -} - -// Converts mint amount (natural units) to decimals -export function getMintDecimalAmountFromNatural( - mint: MintInfo, - naturalAmount: BN, -) { - return new BigNumber(naturalAmount.toString()).shiftedBy(-mint.decimals); -} - -// Parses input string in decimals to mint amount (natural units) -// If the input is already a number then converts it to mint natural amount -export function parseMintNaturalAmountFromDecimal( - decimalAmount: string | number, - mintDecimals: number, -) { - if (typeof decimalAmount === 'number') { - return getMintNaturalAmountFromDecimal(decimalAmount, mintDecimals); - } - - if (mintDecimals === 0) { - return parseInt(decimalAmount); - } - - const floatAmount = parseFloat(decimalAmount); - return getMintNaturalAmountFromDecimal(floatAmount, mintDecimals); -} - -// Converts amount in decimals to mint amount (natural units) -export function getMintNaturalAmountFromDecimal( - decimalAmount: number, - decimals: number, -) { - return new BigNumber(decimalAmount.toString()).shiftedBy(decimals).toNumber(); -} - -// Calculates percentage (provided as 0-100) of mint supply as decimal amount -export function getMintSupplyPercentageAsDecimal( - mint: MintInfo, - percentage: number, -) { - return new BigNumber(mint.supply.mul(new BN(percentage)).toString()) - .shiftedBy(-(mint.decimals + 2)) - .toNumber(); -} - -// Calculates mint min amount as decimal -export function getMintMinAmountAsDecimal(mint: MintInfo) { - return new BigNumber(1).shiftedBy(-mint.decimals).toNumber(); -} - -// Returns mint supply amount as decimal -export function getMintSupplyAsDecimal(mint: MintInfo) { - return new BigNumber(mint.supply.toString()) - .shiftedBy(-mint.decimals) - .toNumber(); -} - -// Calculates mint supply fraction for the given natural amount as decimal amount -export function getMintSupplyFractionAsDecimalPercentage( - mint: MintInfo, - naturalAmount: BN | number, -) { - return getBigNumberAmount(naturalAmount) - .multipliedBy(100) - .dividedBy(new BigNumber(mint.supply.toString())) - .toNumber(); -} - -// Calculates mint supply fraction for the given natural amount as decimal amount -export function getAmountFractionAsDecimalPercentage( - totalNaturalAmount: BN | number, - naturalAmount: BN | number, -) { - return getBigNumberAmount(naturalAmount) - .multipliedBy(100) - .dividedBy(new BigNumber(getBigNumberAmount(totalNaturalAmount))) - .toNumber(); -} - -// Converts BN or number to BigNumber -export function getBigNumberAmount(amount: BN | number) { - return typeof amount === 'number' - ? new BigNumber(amount) - : new BigNumber(amount.toString()); -} - -// Formats percentage value showing it in human readable form -export function formatPercentage(percentage: number) { - if (percentage === 0 || percentage === Infinity) { - return '0%'; - } - - if (percentage < 0.01) { - return '<0.01%'; - } - - return `${+percentage.toFixed(2)}%`; -} - -// Returns amount vote weight for the given mint as percentage in decimals -export function getMintVoteWeight(mint: MintInfo, naturalAmount: BN) { - return new BigNumber(100) - .multipliedBy(getBigNumberAmount(naturalAmount)) - .div(getBigNumberAmount(mint.supply as BN)) - .toNumber(); -} - -// Returns amount vote weight for the given mint as percentage in decimals -export function getMintSupplyVoteWeight(supply: BN, naturalAmount: BN) { - return new BigNumber(100) - .multipliedBy(getBigNumberAmount(naturalAmount)) - .div(getBigNumberAmount(supply)) - .toNumber(); -} - -export function formatMintVoteWeight(mint: MintInfo, naturalAmount: BN) { - return formatPercentage(getMintVoteWeight(mint, naturalAmount)); -} - -export function formatMintSupplyFractionAsDecimalPercentage( - mint: MintInfo, - naturalAmount: BN | number, -) { - return formatPercentage( - getMintSupplyFractionAsDecimalPercentage(mint, naturalAmount), - ); -} - -export function formatMintMaxVoteWeight( - mint: MintInfo, - maxVoteWeightSource: MintMaxVoteWeightSource, -) { - const supplyFraction = maxVoteWeightSource.getSupplyFraction(); - - return new BigNumber(supplyFraction.toString()) - .multipliedBy(mint.supply.toString()) - .shiftedBy( - -(mint.decimals + MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS), - ) - .toFormat(mint.decimals); -} - -export function formatMintMaxVotePercentage( - maxVoteWeightSource: MintMaxVoteWeightSource, -) { - const supplyFraction = maxVoteWeightSource.getSupplyFraction(); - - const percentage = new BigNumber(supplyFraction.toString()) - .shiftedBy(-(MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS - 2)) - .toNumber(); - - if (percentage < 0.01) { - return '<0.01%'; - } - - const rounded = +percentage.toFixed(2); - return rounded === percentage ? `${rounded}%` : `~${rounded}%`; -} - -export function getMintMaxVoteWeight( - mint: MintInfo, - maxVoteWeightSource: MintMaxVoteWeightSource, -) { - if (maxVoteWeightSource.isFullSupply()) { - return mint.supply as BN; - } - - const supplyFraction = maxVoteWeightSource.getSupplyFraction(); - - const maxVoteWeight = new BigNumber(supplyFraction.toString()) - .multipliedBy(mint.supply.toString()) - .shiftedBy(-MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS); - - return new BN(maxVoteWeight.dp(0, BigNumber.ROUND_DOWN).toString()); -} - -export function lamportsToSOL(lamports: number) { - return new BigNumber(lamports).shiftedBy(-9).toNumber(); -} - -export function SOLToLamports(solAmount: number) { - return new BigNumber(solAmount).shiftedBy(9).toNumber(); -} diff --git a/packages/governance/src/tools/validators/accounts/token.ts b/packages/governance/src/tools/validators/accounts/token.ts deleted file mode 100644 index d77a8df..0000000 --- a/packages/governance/src/tools/validators/accounts/token.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Copied from Explorer code https://github.com/solana-labs/solana/blob/master/explorer/src/validators/accounts/token.ts - -import { ParsedAccountData, AccountInfo, PublicKey } from '@solana/web3.js'; -import { - Infer, - number, - optional, - enums, - boolean, - string, - type, - create, -} from 'superstruct'; -import { PublicKeyFromString } from '../pubkey'; - -export type TokenAccountState = Infer; -const AccountState = enums(['initialized', 'uninitialized', 'frozen']); - -const TokenAmount = type({ - decimals: number(), - uiAmountString: string(), - amount: string(), -}); - -export type TokenAccountInfo = Infer; -export const TokenAccountInfo = type({ - mint: PublicKeyFromString, - owner: PublicKeyFromString, - tokenAmount: TokenAmount, - delegate: optional(PublicKeyFromString), - state: AccountState, - isNative: boolean(), - rentExemptReserve: optional(TokenAmount), - delegatedAmount: optional(TokenAmount), - closeAuthority: optional(PublicKeyFromString), -}); - -export function validateTokenAccount( - info: AccountInfo, - mint: PublicKey | undefined, -) { - if (!('parsed' in info.data && info.data.program === 'spl-token')) { - throw new Error('Invalid spl token account'); - } - - let tokenAccount: TokenAccountInfo; - - try { - tokenAccount = create(info.data.parsed.info, TokenAccountInfo); - } catch { - throw new Error('Invalid spl token account'); - } - - if (mint && tokenAccount.mint.toBase58() !== mint.toBase58()) { - throw new Error("Account mint doesn't match source account"); - } -} diff --git a/packages/governance/src/tools/validators/accounts/upgradeable-program.ts b/packages/governance/src/tools/validators/accounts/upgradeable-program.ts deleted file mode 100644 index 18e992a..0000000 --- a/packages/governance/src/tools/validators/accounts/upgradeable-program.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copied from Explorer code https://github.com/solana-labs/solana/blob/master/explorer/src/validators/accounts/upgradeable-program.ts - -import { ParsedAccountData, AccountInfo, PublicKey } from '@solana/web3.js'; - -import { type, number, literal, nullable, Infer, create } from 'superstruct'; -import { PublicKeyFromString } from '../pubkey'; - -export type ProgramAccountInfo = Infer; -export const ProgramAccountInfo = type({ - programData: PublicKeyFromString, -}); - -export type ProgramAccount = Infer; -export const ProgramAccount = type({ - type: literal('program'), - info: ProgramAccountInfo, -}); - -export type ProgramDataAccountInfo = Infer; -export const ProgramDataAccountInfo = type({ - authority: nullable(PublicKeyFromString), - // don't care about data yet - slot: number(), -}); - -export type ProgramDataAccount = Infer; -export const ProgramDataAccount = type({ - type: literal('programData'), - info: ProgramDataAccountInfo, -}); - -export type ProgramBufferAccountInfo = Infer; -export const ProgramBufferAccountInfo = type({ - authority: nullable(PublicKeyFromString), - // don't care about data yet -}); - -export type ProgramBufferAccount = Infer; -export const ProgramBufferAccount = type({ - type: literal('buffer'), - info: ProgramBufferAccountInfo, -}); - -export function validateProgramBufferAccount( - info: AccountInfo, - bufferAuthority: PublicKey, -) { - if ( - !('parsed' in info.data && info.data.program === 'bpf-upgradeable-loader') - ) { - throw new Error('Invalid program buffer account'); - } - - let buffer: ProgramBufferAccount; - - try { - buffer = create(info.data.parsed, ProgramBufferAccount); - } catch { - throw new Error('Invalid program buffer account'); - } - - if (buffer.info.authority?.toBase58() !== bufferAuthority.toBase58()) { - throw new Error( - `Buffer authority must be set to governance account - ${bufferAuthority.toBase58()}`, - ); - } -} diff --git a/packages/governance/src/tools/validators/pubkey.ts b/packages/governance/src/tools/validators/pubkey.ts deleted file mode 100644 index 8b4b20c..0000000 --- a/packages/governance/src/tools/validators/pubkey.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { coerce, instance, string } from 'superstruct'; -import { PublicKey } from '@solana/web3.js'; - -export const PublicKeyFromString = coerce( - instance(PublicKey), - string(), - value => new PublicKey(value), -); diff --git a/packages/governance/src/tools/validators/voterWeightPlugin.ts b/packages/governance/src/tools/validators/voterWeightPlugin.ts deleted file mode 100644 index 41c3c9d..0000000 --- a/packages/governance/src/tools/validators/voterWeightPlugin.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { tryParseKey } from '@oyster/common'; - -export const voterWeightPluginValidator = async (rule: any, value: string) => { - if (value) { - const pubkey = tryParseKey(value); - - if (!pubkey) { - throw new Error('Provided value is not a valid publickey'); - } - } -}; diff --git a/packages/governance/src/tools/voterStakeRegistry/accounts.ts b/packages/governance/src/tools/voterStakeRegistry/accounts.ts deleted file mode 100644 index 6286349..0000000 --- a/packages/governance/src/tools/voterStakeRegistry/accounts.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; - -export async function getRegistrarAddress( - programId: PublicKey, - realm: PublicKey, - governingTokenMint: PublicKey, -) { - const [registrarPda, registrarBump] = await PublicKey.findProgramAddress( - [realm.toBuffer(), Buffer.from('registrar'), governingTokenMint.toBuffer()], - programId, - ); - - return { registrarPda, registrarBump }; -} - -export const unusedMintPk = new PublicKey('11111111111111111111111111111111'); - -export interface votingMint { - depositScaledFactor: BN; - digitShift: number; - grantAuthority: PublicKey; - lockupSaturationSecs: BN; - lockupScaledFactor: BN; - mint: PublicKey; -} - -export type LockupType = 'none' | 'monthly' | 'cliff' | 'constant' | 'daily'; //there is also daily type but not used on ui yet -export interface Registrar { - governanceProgramId: PublicKey; - realm: PublicKey; - realmAuthority: PublicKey; - realmGoverningTokenMint: PublicKey; - votingMints: votingMint[]; - //there are more fields but no use for them on ui yet -} diff --git a/packages/governance/src/tools/voterStakeRegistry/voterStakeRegistry.ts b/packages/governance/src/tools/voterStakeRegistry/voterStakeRegistry.ts deleted file mode 100644 index 5f0d083..0000000 --- a/packages/governance/src/tools/voterStakeRegistry/voterStakeRegistry.ts +++ /dev/null @@ -1,10 +0,0 @@ -import BN from 'bn.js'; -import { BigNumber } from 'bignumber.js'; - -export const SCALED_FACTOR_SHIFT = 9; - -export function getScaledFactor(amount: number) { - return new BN( - new BigNumber(amount.toString()).shiftedBy(SCALED_FACTOR_SHIFT).toString(), - ); -} diff --git a/packages/governance/src/types/buffer-layout.d.ts b/packages/governance/src/types/buffer-layout.d.ts deleted file mode 100644 index 31445e0..0000000 --- a/packages/governance/src/types/buffer-layout.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare module 'buffer-layout' { - export class Layout { - span: number; - property?: string; - - constructor(span: number, property?: string); - - decode(b: Buffer, offset?: number): T; - encode(src: T, b: Buffer, offset?: number): number; - getSpan(b: Buffer, offset?: number): number; - replicate(name: string): this; - } - - export interface EnumLayout extends Layout { - registry: Record>; - } - - export class Structure extends Layout { - span: any; - } - export function greedy( - elementSpan?: number, - property?: string, - ): Layout; - export function offset( - layout: Layout, - offset?: number, - property?: string, - ): Layout; - export function u8(property?: string): Layout; - export function u16(property?: string): Layout; - export function u24(property?: string): Layout; - export function u32(property?: string): Layout; - export function u40(property?: string): Layout; - export function u48(property?: string): Layout; - export function nu64(property?: string): Layout; - export function u16be(property?: string): Layout; - export function u24be(property?: string): Layout; - export function u32be(property?: string): Layout; - export function u40be(property?: string): Layout; - export function u48be(property?: string): Layout; - export function nu64be(property?: string): Layout; - export function s8(property?: string): Layout; - export function s16(property?: string): Layout; - export function s24(property?: string): Layout; - export function s32(property?: string): Layout; - export function s40(property?: string): Layout; - export function s48(property?: string): Layout; - export function ns64(property?: string): Layout; - export function s16be(property?: string): Layout; - export function s24be(property?: string): Layout; - export function s32be(property?: string): Layout; - export function s40be(property?: string): Layout; - export function s48be(property?: string): Layout; - export function ns64be(property?: string): Layout; - export function f32(property?: string): Layout; - export function f32be(property?: string): Layout; - export function f64(property?: string): Layout; - export function f64be(property?: string): Layout; - export function struct( - fields: Layout[], - property?: string, - decodePrefixes?: boolean, - ): Layout; - export function bits( - word: Layout, - msb?: boolean, - property?: string, - ): any; - export function seq( - elementLayout: Layout, - count: number | Layout, - property?: string, - ): Layout; - export function union( - discr: Layout, - defaultLayout?: any, - property?: string, - ): any; - export function unionLayoutDiscriminator( - layout: Layout, - property?: string, - ): any; - export function blob( - length: number | Layout, - property?: string, - ): Layout; - export function cstr(property?: string): Layout; - export function utf8(maxSpan: number, property?: string): Layout; -} diff --git a/packages/governance/src/views/devtools/DevToolsView.tsx b/packages/governance/src/views/devtools/DevToolsView.tsx deleted file mode 100644 index 27fb044..0000000 --- a/packages/governance/src/views/devtools/DevToolsView.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useState } from 'react'; - -import { useConnection, useWallet } from '@oyster/common'; -import { Button, Space } from 'antd'; -import { generateGovernanceArtifacts } from '../../actions/devtools/generateGovernanceArtifacts'; -import './style.less'; -import { CreateMint } from './createMint'; - -// import { ControlTestBench } from './controlTests'; - -export const DevToolsView = () => { - return ( -
- -
- ); -}; - -const GovernanceArtifacts = () => { - const connection = useConnection(); - const wallet = useWallet(); - - const [realmName, setRealmName] = useState(''); - const [communityMint, setCommunityMint] = useState(''); - const [councilMint, setCouncilMint] = useState(''); - const [tokenGovernance, setTokenGovernance] = useState({ - tokenAccountAddress: '', - beneficiaryTokenAccountAddress: '', - }); - - const [generated, setGenerated] = useState(false); - - const onGenerateArtifacts = async () => { - setGenerated(false); - - // Create user info account for Raydium staking - // await createAccount( - // connection, - // wallet, - // 88, - // new PublicKey('EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q'), - // ); - - // return; - - const { - communityMintAddress, - councilMintAddress, - realmName, - tokenGovernance, - } = await generateGovernanceArtifacts(connection, wallet); - - setCommunityMint(communityMintAddress.toBase58()); - setCouncilMint(councilMintAddress.toBase58()); - setRealmName(realmName); - setTokenGovernance(tokenGovernance); - - setGenerated(true); - }; - - return ( - -
-

Governance Artifacts

- - {generated && ( - <> -
-

realm name:

-
{realmName}
-
- -
-

community mint / governed account:

-
{communityMint}
-
- -
-

council mint:

-
{councilMint}
-
- -
-

token governance - token account:

-
- {tokenGovernance.tokenAccountAddress} -
-
-
-

token governance - beneficiary token account:

-
- {tokenGovernance.beneficiaryTokenAccountAddress} -
-
- - )} -
{/* */}
-
- -
- ); -}; diff --git a/packages/governance/src/views/devtools/controlTests.tsx b/packages/governance/src/views/devtools/controlTests.tsx deleted file mode 100644 index 85c1df2..0000000 --- a/packages/governance/src/views/devtools/controlTests.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { BN } from 'bn.js'; -import React from 'react'; -import { VoteScore } from '../proposal/components/vote/voteScore'; - -import { Space } from 'antd'; -import { ProposalState } from '@solana/spl-governance'; - -export function ControlTestBench() { - const supply = 10000000; - const mintDecimals = 8; - - return ( - <> -
-
- - - - - - - - - - - - -
-
- - ); -} diff --git a/packages/governance/src/views/devtools/createMint.tsx b/packages/governance/src/views/devtools/createMint.tsx deleted file mode 100644 index 2b2bff5..0000000 --- a/packages/governance/src/views/devtools/createMint.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useState } from 'react'; -import { Button, Form, Input, InputNumber, Space, Typography } from 'antd'; - -import { useConnection, useWallet } from '@oyster/common'; -import { generateMint } from '../../actions/devtools/generateMint'; - -import { PublicKey } from '@solana/web3.js'; -import { u64 } from '@solana/spl-token'; -import { BigNumber } from 'bignumber.js'; - -const { Text } = Typography; - -export function CreateMint() { - const [form] = Form.useForm(); - const wallet = useWallet(); - const connection = useConnection(); - const [mintPk, setMintPk] = useState(''); - - const onFinish = async (values: { - maxSupply: string; - decimals: number; - myTokens: string; - remainingTokensWallet: string; - }) => { - try { - const maxSupply = new BigNumber(values.maxSupply).shiftedBy( - values.decimals, - ); - const myTokens = new BigNumber(values.myTokens).shiftedBy( - values.decimals, - ); - - const { mintAddress } = await generateMint( - connection, - wallet, - values.decimals, - - new u64(myTokens.toString()), - new u64(maxSupply.toString()), - new PublicKey(values.remainingTokensWallet), - ); - - setMintPk(mintAddress.toBase58()); - } catch (ex) { - console.error(ex); - } - }; - - return ( - -
- -

Create Mint

- - Creates mint with the given max supply, decimals and tokens minted - to the current wallet and the given wallet - -
- - - - - - - - - - - - - - - - - - - - - - {mintPk && ( -
-

mint address:

-
{mintPk}
-
- )} -
- ); -} diff --git a/packages/governance/src/views/devtools/style.less b/packages/governance/src/views/devtools/style.less deleted file mode 100644 index 9e658f7..0000000 --- a/packages/governance/src/views/devtools/style.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -.test-data { - -webkit-user-select: all; - user-select: all; - - padding: 5px; -} diff --git a/packages/governance/src/views/governance/buttons/addNativeTreasuryButton.tsx b/packages/governance/src/views/governance/buttons/addNativeTreasuryButton.tsx deleted file mode 100644 index 56272cc..0000000 --- a/packages/governance/src/views/governance/buttons/addNativeTreasuryButton.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React, { useState } from 'react'; -import { Governance, Realm } from '@solana/spl-governance'; - -import { useRpcContext } from '../../../hooks/useRpcContext'; -import { createNativeTreasury } from '../../../actions/createNativeTreasury'; -import { ModalFormAction } from '../../../components/ModalFormAction/modalFormAction'; -import { useNativeTreasury } from '../../../hooks/apiHooks'; -import { PROGRAM_VERSION_V1 } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -export function CreateNativeTreasuryButton({ - realm, - governance, -}: { - realm: ProgramAccount | undefined; - governance: ProgramAccount | undefined; -}) { - const rpcContext = useRpcContext(); - const nativeTreasury = useNativeTreasury(governance?.pubkey); - const [created, setCreated] = useState(false); - - const onSubmit = async () => { - await createNativeTreasury(rpcContext, governance!); - setCreated(true); - }; - - if (!(realm || governance)) { - return null; - } - - return ( - - label="Create SOL Treasury" - formTitle="Create SOL Treasury" - formAction="Create" - formPendingAction="Creating" - onSubmit={() => onSubmit()} - buttonProps={{ - disabled: - !!nativeTreasury || - created || - rpcContext.programVersion <= PROGRAM_VERSION_V1, - }} - > -
Create native SOL Treasury account for the governance
- - ); -} diff --git a/packages/governance/src/views/governance/buttons/governanceActionBar.tsx b/packages/governance/src/views/governance/buttons/governanceActionBar.tsx deleted file mode 100644 index 8c3b232..0000000 --- a/packages/governance/src/views/governance/buttons/governanceActionBar.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { Button, Popover, Space } from 'antd'; -import React, { useRef } from 'react'; -import { Governance, Realm } from '@solana/spl-governance'; - -import { MoreOutlined } from '@ant-design/icons'; -import { NewProposalButton } from './newProposalButton'; -import { CreateNativeTreasuryButton } from './addNativeTreasuryButton'; -import { ProgramAccount } from '@solana/spl-governance'; - -export function GovernanceActionBar({ - realm, - governance, -}: { - realm: ProgramAccount | undefined; - governance: ProgramAccount | undefined; -}) { - const parentRef = useRef(null); - - if (!realm) { - return null; - } - - return ( -
- - -
- parentRef.current!} - content={ - - - - } - > - - -
-
-
- ); -} diff --git a/packages/governance/src/views/governance/buttons/newProposalButton.tsx b/packages/governance/src/views/governance/buttons/newProposalButton.tsx deleted file mode 100644 index 800ec3b..0000000 --- a/packages/governance/src/views/governance/buttons/newProposalButton.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import React, { useState } from 'react'; -import { ButtonProps, Radio } from 'antd'; -import { Form, Input } from 'antd'; -import { PublicKey } from '@solana/web3.js'; - -import { LABELS } from '../../../constants'; -import { useMint } from '@oyster/common'; -import { createProposal } from '../../../actions/createProposal'; -import { Redirect } from 'react-router'; - -import { GoverningTokenRole } from '@solana/spl-governance'; -import { Governance, Realm } from '@solana/spl-governance'; - -import { useWalletTokenOwnerRecord } from '../../../hooks/apiHooks'; -import { ModalFormAction } from '../../../components/ModalFormAction/modalFormAction'; -import BN from 'bn.js'; -import { useRpcContext } from '../../../hooks/useRpcContext'; -import { getProposalUrl } from '../../../tools/routeTools'; -import { ProgramAccount } from '@solana/spl-governance'; - -export function NewProposalButton({ - realm, - governance, - buttonProps, -}: { - realm: ProgramAccount | undefined; - governance: ProgramAccount | undefined; - buttonProps?: ButtonProps; -}) { - const [redirectTo, setRedirectTo] = useState(''); - const rpcContext = useRpcContext(); - const { programId } = rpcContext; - - const communityTokenOwnerRecord = useWalletTokenOwnerRecord( - governance?.account.realm, - realm?.account.communityMint, - ); - const councilTokenOwnerRecord = useWalletTokenOwnerRecord( - governance?.account.realm, - realm?.account.config.councilMint, - ); - - const communityMint = useMint(realm?.account.communityMint); - - if (!governance || !communityMint || !realm) { - return null; - } - - const canCreateProposalUsingCommunityTokens = - communityTokenOwnerRecord && - communityTokenOwnerRecord.account.governingTokenDepositAmount.cmp( - new BN(governance?.account.config.minCommunityTokensToCreateProposal), - ) >= 0; - - const canCreateProposalUsingCouncilTokens = - councilTokenOwnerRecord && - councilTokenOwnerRecord.account.governingTokenDepositAmount.cmp( - new BN(governance?.account.config.minCouncilTokensToCreateProposal), - ) >= 0; - - const canCreateProposal = - canCreateProposalUsingCommunityTokens || - canCreateProposalUsingCouncilTokens; - - const defaultGoverningTokenType = !communityMint.supply.isZero() - ? GoverningTokenRole.Community - : GoverningTokenRole.Council; - - const showTokenChoice = - !communityMint.supply.isZero() && realm?.account.config.councilMint; - - const onSubmit = async (values: { - name: string; - descriptionLink: string; - governingTokenType: GoverningTokenRole; - }) => { - const governingTokenType = - values.governingTokenType ?? defaultGoverningTokenType; - - const governingTokenMint = - governingTokenType === GoverningTokenRole.Community - ? realm!.account.communityMint - : realm!.account.config.councilMint!; - const proposalIndex = governance.account.proposalCount; - - // By default we select communityTokenOwnerRecord as the proposal owner and it doesn't exist then councilTokenOwnerRecord - // When governance delegates are not used it doesn't make any difference - // However once the delegates are introduced in the UI then user should choose the proposal owner in the ui - // because user might have different delegates for council and community - const tokenOwnerRecord = canCreateProposalUsingCommunityTokens - ? communityTokenOwnerRecord - : councilTokenOwnerRecord; - - return await createProposal( - rpcContext, - governance.account.realm, - governance.pubkey, - tokenOwnerRecord!.pubkey, - values.name, - values.descriptionLink ?? '', - governingTokenMint, - proposalIndex, - ); - }; - - const onComplete = (pk: PublicKey) => { - setRedirectTo(pk.toBase58()); - }; - - if (redirectTo) { - return ; - } - - return ( - - label={LABELS.ADD_NEW_PROPOSAL} - buttonProps={{ - ...buttonProps, - disabled: !canCreateProposal, - type: 'primary', - }} - formTitle={LABELS.ADD_NEW_PROPOSAL} - formAction={LABELS.ADD_PROPOSAL} - formPendingAction={LABELS.ADDING_PROPOSAL} - onSubmit={onSubmit} - onComplete={onComplete} - initialValues={{ - governingTokenType: defaultGoverningTokenType, - }} - > - {showTokenChoice && ( - - - - {LABELS.COMMUNITY_TOKEN_HOLDERS} - - - {realm.account.config.councilMint && ( - - {LABELS.COUNCIL} - - )} - - - )} - - - - - - - - - ); -} diff --git a/packages/governance/src/views/governance/governanceView.tsx b/packages/governance/src/views/governance/governanceView.tsx deleted file mode 100644 index d19f600..0000000 --- a/packages/governance/src/views/governance/governanceView.tsx +++ /dev/null @@ -1,209 +0,0 @@ -import { Badge, Col, List, Row, Space, Typography } from 'antd'; -import React, { useMemo, useState } from 'react'; -import { useRealm } from '../../contexts/GovernanceContext'; - -import { - useGovernance, - useNativeTreasury, - useProposalsByGovernance, -} from '../../hooks/apiHooks'; -import './style.less'; // Don't remove this line, it will break dark mode if you do due to weird transpiling conditions -import { ProposalStateBadge } from '../proposal/components/header/proposalStateBadge'; -import { useHistory } from 'react-router-dom'; -import { - ExplorerLink, - TokenIcon, - useConnectionConfig, - useMint, -} from '@oyster/common'; - -import { useKeyParam } from '../../hooks/useKeyParam'; -import { Proposal, ProposalState } from '@solana/spl-governance'; -import { ClockCircleOutlined } from '@ant-design/icons'; -import { GovernanceBadge } from '../../components/GovernanceBadge/governanceBadge'; -import { getProposalUrl } from '../../tools/routeTools'; -import { useRpcContext } from '../../hooks/useRpcContext'; -import { - formatMintNaturalAmountAsDecimal, - formatMintSupplyFractionAsDecimalPercentage, - getDaysFromTimestamp, -} from '../../tools/units'; -import { GovernanceActionBar } from './buttons/governanceActionBar'; -import { LAMPORTS_PER_SOL } from '@solana/web3.js'; - -const { Text } = Typography; - -const PAGE_SIZE = 10; - -export const GovernanceView = () => { - const history = useHistory(); - const { programIdBase58 } = useRpcContext(); - - const [, setPage] = useState(0); - const { tokenMap } = useConnectionConfig(); - - const governanceKey = useKeyParam(); - const governance = useGovernance(governanceKey); - const realm = useRealm(governance?.account.realm); - const proposals = useProposalsByGovernance(governanceKey); - const communityMintInfo = useMint(realm?.account.communityMint); - const nativeTreasury = useNativeTreasury(governance?.pubkey); - - const token = tokenMap.get( - realm?.account.communityMint?.toBase58() || '', - ) as any; - const tokenBackground = token?.extensions?.background; - - const communityMint = realm?.account.communityMint?.toBase58() || ''; - - const proposalItems = useMemo(() => { - const compareProposals = (p1: Proposal, p2: Proposal) => { - const p1Rank = p1.getStateSortRank(); - const p2Rank = p2.getStateSortRank(); - - if (p1Rank > p2Rank) { - return 1; - } else if (p1Rank < p2Rank) { - return -1; - } - - const tsCompare = p1.getStateTimestamp() - p2.getStateTimestamp(); - - // Show the proposals in voting state expiring earlier at the top - return p1.state === ProposalState.Voting ? ~tsCompare : tsCompare; - }; - - return proposals - .sort((p1, p2) => compareProposals(p2.account, p1.account)) - .map(p => ({ - key: p.pubkey.toBase58(), - href: getProposalUrl(p.pubkey, programIdBase58), - title: p.account.name, - badge: - p.account.state === ProposalState.Voting ? ( - }> - - - ) : ( - - ), - proposal: p, - })); - }, [proposals, programIdBase58]); - - return ( - -
-
- {governance && ( - - )} - -
-

{realm?.account.name}

-

- {governance && ( - - )} -

- - {tokenMap.get(communityMint)?.extensions?.website} - - {governance && communityMintInfo && ( - - - - {`max voting time: ${getDaysFromTimestamp( - governance.account.config.maxVotingTime, - )} days`} - {`yes vote threshold: ${governance.account.config.communityVoteThreshold.value}%`} - - - - {`min instruction hold up time: ${getDaysFromTimestamp( - governance.account.config.minInstructionHoldUpTime, - )} days`} - {`min tokens to create proposal: ${formatMintNaturalAmountAsDecimal( - communityMintInfo, - governance.account.config - .minCommunityTokensToCreateProposal, - )} (${formatMintSupplyFractionAsDecimalPercentage( - communityMintInfo, - governance.account.config - .minCommunityTokensToCreateProposal, - )})`} - - - {nativeTreasury && ( -
- {`SOL: ${nativeTreasury.account.lamports / LAMPORTS_PER_SOL - }`}{' '} - {' '} -
- )} -
- )} -
- - -
-

Proposals

- { - setPage(page); - }, - pageSize: PAGE_SIZE, - }} - dataSource={proposalItems} - renderItem={item => ( - history.push(item.href)} - > - - } - /> - - )} - /> - - - ); -}; diff --git a/packages/governance/src/views/governance/style.less b/packages/governance/src/views/governance/style.less deleted file mode 100644 index 42b27b2..0000000 --- a/packages/governance/src/views/governance/style.less +++ /dev/null @@ -1,58 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -.proposals-container { - margin-left: auto; - margin-right: auto; - position: relative; -} - -.proposals-list-title { - padding: 10px 0px; - margin-left: 10px; - text-align: left; -} - -.proposals-header { - display: flex; - align-items: center; - padding: 10px; - text-align: left; - - h1 { - font-size: 28px; - margin: 0px; - } -} - -.proposals-action-bar { - margin-left: auto; - margin-right: 0px; - margin-bottom: 0px; - align-self: flex-end; -} - -.proposal-item { - margin: 10px; - background-color: #202020; - padding: 0px !important; - border-radius: 15px; - - :hover { - cursor: pointer; - background-color: #252425; - border-radius: 15px; - } - - .ant-list-item-meta { - padding: 10px; - margin: 0px; - margin-bottom: 0px !important; - display: flex; - align-items: center; - text-align: left; - - .ant-list-item-meta-title { - margin-bottom: 0px; - } - } -} diff --git a/packages/governance/src/views/home/HomeView.tsx b/packages/governance/src/views/home/HomeView.tsx deleted file mode 100644 index d116269..0000000 --- a/packages/governance/src/views/home/HomeView.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { Col, List, Row } from 'antd'; -import React, { useMemo } from 'react'; -import { useRealms } from '../../contexts/GovernanceContext'; -import './style.less'; // Don't remove this line, it will break dark mode if you do due to weird transpiling conditions - -import { Background } from '../../components/Background'; -import { useHistory } from 'react-router-dom'; - -import { LABELS } from '../../constants'; - -import { RealmBadge } from '../../components/RealmBadge/realmBadge'; -import { useWalletTokenOwnerRecords } from '../../hooks/apiHooks'; -import { RealmDepositBadge } from '../../components/RealmDepositBadge/realmDepositBadge'; -import { useRpcContext } from '../../hooks/useRpcContext'; -import { getRealmUrl } from '../../tools/routeTools'; - -import { ProgramActionBar } from './buttons/programActionBar'; - -export const HomeView = () => { - const history = useHistory(); - const realms = useRealms(); - const { programIdBase58 } = useRpcContext(); - const tokenOwnerRecords = useWalletTokenOwnerRecords(); - - const realmItems = useMemo(() => { - return realms - .sort((r1, r2) => r1.account.name.localeCompare(r2.account.name)) - .map(r => { - const communityTokenOwnerRecord = tokenOwnerRecords.find( - tor => - tor.account.governingTokenMint.toBase58() === - r.account.communityMint.toBase58(), - ); - - const councilTokenOwnerRecord = - r.account.config.councilMint && - tokenOwnerRecords.find( - tor => - tor.account.governingTokenMint.toBase58() === - r.account.config.councilMint!.toBase58(), - ); - - return { - href: getRealmUrl(r.pubkey, programIdBase58), - title: r.account.name, - badge: ( - - ), - key: r.pubkey.toBase58(), - description: ( - - ), - }; - }); - }, [realms, tokenOwnerRecords, programIdBase58]); - - return ( - <> - - -
-
-

{LABELS.REALMS}

- -
- ( - history.push(item.href)} - > - - - )} - /> - - - - ); -}; diff --git a/packages/governance/src/views/home/buttons/programActionBar.tsx b/packages/governance/src/views/home/buttons/programActionBar.tsx deleted file mode 100644 index aa78ee3..0000000 --- a/packages/governance/src/views/home/buttons/programActionBar.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { Button, Popover, Space } from 'antd'; -import React, { useRef } from 'react'; - -import { MoreOutlined } from '@ant-design/icons'; -import { RegisterRealmButton } from './registerRealmButton'; -import { UpdateProgramMetadataButton } from './updateProgramMetadataButton'; - -export function ProgramActionBar() { - const parentRef = useRef(null); - - return ( -
- - -
- parentRef.current!} - content={ - - - - } - > - - -
-
-
- ); -} diff --git a/packages/governance/src/views/home/buttons/registerRealmButton.tsx b/packages/governance/src/views/home/buttons/registerRealmButton.tsx deleted file mode 100644 index fbc1524..0000000 --- a/packages/governance/src/views/home/buttons/registerRealmButton.tsx +++ /dev/null @@ -1,188 +0,0 @@ -import React, { useState } from 'react'; -import { ButtonProps, Collapse, Switch, Typography } from 'antd'; -import { Form, Input } from 'antd'; -import { PublicKey } from '@solana/web3.js'; - -import { LABELS } from '../../../constants'; - -import { Redirect } from 'react-router'; -import { MintFormItem } from '../../../components/MintFormItem/mintFormItem'; - -import { registerRealm } from '../../../actions/registerRealm'; - -import { ModalFormAction } from '../../../components/ModalFormAction/modalFormAction'; -import { useRpcContext } from '../../../hooks/useRpcContext'; -import { getRealmUrl } from '../../../tools/routeTools'; -import { - MintMaxVoteWeightSource, - MintMaxVoteWeightSourceType, - PROGRAM_VERSION_V1, -} from '@solana/spl-governance'; - -import { BigNumber } from 'bignumber.js'; - -import { BN } from 'bn.js'; -import { - RealmMintSupplyConfigFormItem, - RealmMintSupplyConfigValues, -} from '../../../components/realmMintSupplyConfigFormItem/realmMintSupplyConfigFormItem'; -import { RealmMintTokensFormItem } from '../../../components/realmMintTokensFormItem/realmMintTokensFormItem'; -import { parseMinTokensToCreate } from '../../../components/governanceConfigFormItem/governanceConfigFormItem'; - -import { voterWeightPluginValidator } from '../../../tools/validators/voterWeightPlugin'; - -const { Panel } = Collapse; -const { Text } = Typography; - -const parseMintSupplyFraction = (fraction: string) => { - if (!fraction) { - return MintMaxVoteWeightSource.FULL_SUPPLY_FRACTION; - } - - const fractionValue = new BigNumber(fraction) - .shiftedBy(MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber(); - - return new MintMaxVoteWeightSource({ - type: MintMaxVoteWeightSourceType.SupplyFraction, - value: new BN(fractionValue), - }); -}; - -export function RegisterRealmButton({ - buttonProps, -}: { - buttonProps: ButtonProps; -}) { - const [redirectTo, setRedirectTo] = useState(''); - const rpcContext = useRpcContext(); - const { programId, programVersion } = rpcContext; - - const [councilVisible, setCouncilVisible] = useState(false); - - const [communityMintAddress, setCommunityMintAddress] = useState(''); - const [communityVoterWeightAddin, setCommunityVoterWeightAddin] = - useState(''); - - const onSubmit = async ( - values: { - communityMint: string; - councilMint: string; - name: string; - useCouncilMint: boolean; - mintDecimals: number; - minTokensToCreateGovernance: number | string; - communityVoterWeightAddin: string; - } & RealmMintSupplyConfigValues, - ) => { - let supplyFraction = parseMintSupplyFraction( - values.communityMintMaxVoteWeightFraction, - ); - - const minCommunityTokensToCreateGovernance = parseMinTokensToCreate( - values.minTokensToCreateGovernance, - values.mintDecimals, - ); - - return await registerRealm( - rpcContext, - values.name, - new PublicKey(values.communityMint), - values.useCouncilMint ? new PublicKey(values.councilMint) : undefined, - supplyFraction, - new BN(minCommunityTokensToCreateGovernance), - communityVoterWeightAddin - ? new PublicKey(communityVoterWeightAddin) - : undefined, - ); - }; - - const onComplete = (pk: PublicKey) => { - setRedirectTo(pk.toBase58()); - }; - - const onReset = () => { - setCouncilVisible(false); - }; - - if (redirectTo) { - return ; - } - - return ( - - label="Register Realm" - buttonProps={buttonProps} - formTitle="Register Realm" - formAction="Register" - formPendingAction="Registering" - onSubmit={onSubmit} - onComplete={onComplete} - onReset={onReset} - initialValues={{ - useCouncilMint: false, - }} - > - - - - - setCommunityMintAddress(mint)} - > - - - - - - - {councilVisible && ( - - )} - - - advance settings} - key="1" - className="realm-advance-settings-panel" - > - - - {programVersion > PROGRAM_VERSION_V1 && ( - - setCommunityVoterWeightAddin(e.target.value)} - /> - - )} - - - - ); -} diff --git a/packages/governance/src/views/home/buttons/updateProgramMetadataButton.tsx b/packages/governance/src/views/home/buttons/updateProgramMetadataButton.tsx deleted file mode 100644 index a216922..0000000 --- a/packages/governance/src/views/home/buttons/updateProgramMetadataButton.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -import { useRpcContext } from '../../../hooks/useRpcContext'; - -import { ModalFormAction } from '../../../components/ModalFormAction/modalFormAction'; - -import { updateProgramMetadata } from '../../../actions/updateProgramMetadata'; -import { PROGRAM_VERSION_V1 } from '@solana/spl-governance'; - -export function UpdateProgramMetadataButton() { - const rpcContext = useRpcContext(); - - const onSubmit = async () => { - await updateProgramMetadata(rpcContext!); - }; - - return ( - - label="Update Program Metadata" - formTitle="Update Program Metadata" - formAction="Update" - formPendingAction="Updating" - onSubmit={() => onSubmit()} - buttonProps={{ - disabled: rpcContext.programVersion <= PROGRAM_VERSION_V1, - }} - > -
Update Program Metadata
- - ); -} diff --git a/packages/governance/src/views/home/style.less b/packages/governance/src/views/home/style.less deleted file mode 100644 index 6871f20..0000000 --- a/packages/governance/src/views/home/style.less +++ /dev/null @@ -1,93 +0,0 @@ -@import '~antd/dist/antd.dark.less'; - -.governance-container { - margin-left: auto; - margin-right: auto; - position: relative; -} - -.governance-title { - position: absolute; - top: -40px; - z-index: 2; - display: flex; - align-items: center; - width: 100%; - padding: 0px 10px; - - h1 { - font-size: 28px; - margin: 0px; - font-family: 'FF Oxide Solid'; - font-style: normal; - font-weight: 300; - letter-spacing: 0px; - } -} - -.governance-item { - margin: 10px; - background-color: #202020; - padding: 0px !important; - border-radius: 15px; - - .ant-badge-count { - top: 8px !important; - right: 12px !important; - } - - .ant-list-item-extra { - user-select: none; - pointer-events: none; - display: flex; - margin: 0px !important; - margin-left: 0px !important; - margin-right: auto; - - .ant-statistic { - margin-top: 5px; - padding: 0px 20px; - - .ant-statistic-content { - font-size: 20px; - } - } - } - - .ant-list-item-main { - flex: 0 !important; - min-width: 250px; - } - - .ant-list-item-meta { - padding: 10px; - margin: 0px !important; - margin-bottom: 0px !important; - display: flex; - align-items: center; - text-align: left; - - .ant-list-item-meta-title { - margin-bottom: 0px; - } - } -} - -.governance-item:hover { - cursor: pointer; - background-color: #252425; - border-radius: 15px; -} - -.realm-advance-settings-panel { - .ant-collapse-header { - padding-left: 20px !important; - } - .ant-collapse-content-box { - padding-left: 0px !important; - } - .ant-collapse-arrow { - left: 0px !important; - color: grey; - } -} diff --git a/packages/governance/src/views/index.tsx b/packages/governance/src/views/index.tsx deleted file mode 100644 index 3b267bc..0000000 --- a/packages/governance/src/views/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export { HomeView } from './home/HomeView'; -export { RealmView } from './realm/realmView'; diff --git a/packages/governance/src/views/member/memberView.tsx b/packages/governance/src/views/member/memberView.tsx deleted file mode 100644 index 9688e24..0000000 --- a/packages/governance/src/views/member/memberView.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { ExplorerLink } from '@oyster/common'; -import { PublicKey } from '@solana/web3.js'; -import { Divider, Space } from 'antd'; -import React from 'react'; -import { Link } from 'react-router-dom'; -import { RealmBadge } from '../../components/RealmBadge/realmBadge'; -import { useRealm } from '../../contexts/GovernanceContext'; -import { useTokenOwnerRecordByOwner } from '../../hooks/apiHooks'; -import { useKeyParam } from '../../hooks/useKeyParam'; -import { useRpcContext } from '../../hooks/useRpcContext'; -import { TokenOwnerRecord } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; -import { getRealmUrl } from '../../tools/routeTools'; -import { RealmActionBar } from '../realm/buttons/realmActionBar'; - -export function MemberView() { - const memberPk = useKeyParam(); - const memberRecords = useTokenOwnerRecordByOwner(memberPk); - const { programId } = useRpcContext(); - - return ( - <> - - - {memberRecords.map(tor => ( - - ))} - - - ); -} - -export function MemberItem({ - tokenOwnerRecord, - programId, -}: { - tokenOwnerRecord: ProgramAccount; - programId: PublicKey; -}) { - const realm = useRealm(tokenOwnerRecord.account.realm); - - return ( - <> - - - - {realm && ( - - -
{realm.account.name}
- - - -
- )} -
- - - Total Votes: - {tokenOwnerRecord.account.totalVotesCount} - - - Outstanding Proposals: - {tokenOwnerRecord.account.outstandingProposalCount} - - - Unrelinquished Votes: - {tokenOwnerRecord.account.unrelinquishedVotesCount} - - - -
- - ); -} diff --git a/packages/governance/src/views/proposal/components/buttons/addSignersButton.tsx b/packages/governance/src/views/proposal/components/buttons/addSignersButton.tsx deleted file mode 100644 index 0ccfca2..0000000 --- a/packages/governance/src/views/proposal/components/buttons/addSignersButton.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import { useWallet } from '@oyster/common'; -import { Button, Modal, Input, Form, Progress } from 'antd'; -import React, { useState } from 'react'; -import { utils, contexts, hooks } from '@oyster/common'; - -import { LABELS } from '../../../../constants'; -import { Proposal } from '@solana/spl-governance'; -import { ProgramAccount } from '@solana/spl-governance'; - -const { notify } = utils; -const { TextArea } = Input; -const { useConnection } = contexts.Connection; -const { useAccountByMint } = hooks; - -const layout = { - labelCol: { span: 5 }, - wrapperCol: { span: 19 }, -}; - -export default function AddSignersButton({ - proposal, -}: { - proposal: ProgramAccount; -}) { - const wallet = useWallet(); - const connection = useConnection(); - const adminAccount = useAccountByMint(proposal.account.governingTokenMint); - const [saving, setSaving] = useState(false); - const [isModalVisible, setIsModalVisible] = useState(false); - - const [savePerc, setSavePerc] = useState(0); - const [failedSigners, setFailedSigners] = useState([]); - const [form] = Form.useForm(); - - const onSubmit = async (values: { - signers: string; - failedSigners: string; - }) => { - const signers = values.signers.split(',').map(s => s.trim()); - if (!adminAccount) { - notify({ - message: LABELS.ADMIN_ACCOUNT_NOT_DEFINED, - type: 'error', - }); - return; - } - if (!signers.find(s => s)) { - notify({ - message: LABELS.ENTER_AT_LEAST_ONE_PUB_KEY, - type: 'error', - }); - - return; - } - setSaving(true); - - const failedSignersHold: string[] = []; - - for (let i = 0; i < signers.length; i++) { - try { - console.log('TODO:', { wallet, connection }); - // await addSigner( - // connection, - // wallet.wallet, - // null, - // state, - // adminAccount.pubkey, - // new PublicKey(signers[i]), - // ); - setSavePerc(Math.round(100 * ((i + 1) / signers.length))); - } catch (e) { - console.error(e); - failedSignersHold.push(signers[i]); - notify({ - message: signers[i] + LABELS.PUB_KEY_FAILED, - type: 'error', - }); - } - } - setFailedSigners(failedSignersHold); - setSaving(false); - setSavePerc(0); - setIsModalVisible(failedSignersHold.length > 0); - if (failedSignersHold.length === 0) form.resetFields(); - }; - - return ( - <> - {adminAccount ? ( - - ) : null} - { - if (!saving) setIsModalVisible(false); - }} - > -
- {!saving && ( - <> - -