From b470609324052158f8fe4621e50ba572d30db9ea Mon Sep 17 00:00:00 2001 From: Pavel Kuzovkin Date: Wed, 9 Feb 2022 18:19:27 +0300 Subject: [PATCH 1/6] Added float support --- .github/workflows/tests.yaml | 2 + lang/syn/src/idl/mod.rs | 4 ++ tests/floats/Anchor.toml | 12 ++++++ tests/floats/Cargo.toml | 4 ++ tests/floats/migrations/deploy.ts | 12 ++++++ tests/floats/package.json | 19 +++++++++ tests/floats/programs/floats/Cargo.toml | 19 +++++++++ tests/floats/programs/floats/Xargo.toml | 2 + tests/floats/programs/floats/src/lib.rs | 49 ++++++++++++++++++++++ tests/floats/tests/floats.ts | 56 +++++++++++++++++++++++++ tests/floats/tsconfig.json | 10 +++++ tests/package.json | 1 + ts/src/coder/borsh/idl.ts | 8 +++- ts/src/coder/common.ts | 4 ++ ts/src/idl.ts | 2 + ts/src/program/namespace/types.ts | 2 +- 16 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 tests/floats/Anchor.toml create mode 100644 tests/floats/Cargo.toml create mode 100644 tests/floats/migrations/deploy.ts create mode 100644 tests/floats/package.json create mode 100644 tests/floats/programs/floats/Cargo.toml create mode 100644 tests/floats/programs/floats/Xargo.toml create mode 100644 tests/floats/programs/floats/src/lib.rs create mode 100644 tests/floats/tests/floats.ts create mode 100644 tests/floats/tsconfig.json diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fad42bcb8e..d2e9d0512c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -274,6 +274,8 @@ jobs: path: tests/cfo - cmd: cd tests/auction-house && yarn && anchor test path: tests/auction-house + - cmd: cd tests/floats && yarn && anchor test + path: tests/floats steps: - uses: actions/checkout@v2 - uses: ./.github/actions/setup/ diff --git a/lang/syn/src/idl/mod.rs b/lang/syn/src/idl/mod.rs index 9482d36782..f3fb1ac685 100644 --- a/lang/syn/src/idl/mod.rs +++ b/lang/syn/src/idl/mod.rs @@ -174,8 +174,10 @@ pub enum IdlType { I16, U32, I32, + F32, U64, I64, + F64, U128, I128, Bytes, @@ -213,8 +215,10 @@ impl std::str::FromStr for IdlType { "i16" => IdlType::I16, "u32" => IdlType::U32, "i32" => IdlType::I32, + "f32" => IdlType::F32, "u64" => IdlType::U64, "i64" => IdlType::I64, + "f64" => IdlType::F64, "u128" => IdlType::U128, "i128" => IdlType::I128, "Vec" => IdlType::Bytes, diff --git a/tests/floats/Anchor.toml b/tests/floats/Anchor.toml new file mode 100644 index 0000000000..7fcee42ab1 --- /dev/null +++ b/tests/floats/Anchor.toml @@ -0,0 +1,12 @@ +[programs.localnet] +floats = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" + +[registry] +url = "https://anchor.projectserum.com" + +[provider] +cluster = "localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/tests/floats/Cargo.toml b/tests/floats/Cargo.toml new file mode 100644 index 0000000000..a60de986d3 --- /dev/null +++ b/tests/floats/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = [ + "programs/*" +] diff --git a/tests/floats/migrations/deploy.ts b/tests/floats/migrations/deploy.ts new file mode 100644 index 0000000000..5e3df0dc30 --- /dev/null +++ b/tests/floats/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@project-serum/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/tests/floats/package.json b/tests/floats/package.json new file mode 100644 index 0000000000..ddda9fe210 --- /dev/null +++ b/tests/floats/package.json @@ -0,0 +1,19 @@ +{ + "name": "floats", + "version": "0.21.0", + "license": "(MIT OR Apache-2.0)", + "homepage": "https://github.com/project-serum/anchor#readme", + "bugs": { + "url": "https://github.com/project-serum/anchor/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/project-serum/anchor.git" + }, + "engines": { + "node": ">=11" + }, + "scripts": { + "test": "anchor test" + } + } diff --git a/tests/floats/programs/floats/Cargo.toml b/tests/floats/programs/floats/Cargo.toml new file mode 100644 index 0000000000..c9a4a2b4ab --- /dev/null +++ b/tests/floats/programs/floats/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "floats" +version = "0.1.0" +description = "Created with Anchor" +edition = "2018" + +[lib] +crate-type = ["cdylib", "lib"] +name = "floats" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +anchor-lang = { path = "../../../../lang" } diff --git a/tests/floats/programs/floats/Xargo.toml b/tests/floats/programs/floats/Xargo.toml new file mode 100644 index 0000000000..475fb71ed1 --- /dev/null +++ b/tests/floats/programs/floats/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/tests/floats/programs/floats/src/lib.rs b/tests/floats/programs/floats/src/lib.rs new file mode 100644 index 0000000000..2980ae1072 --- /dev/null +++ b/tests/floats/programs/floats/src/lib.rs @@ -0,0 +1,49 @@ +use anchor_lang::prelude::*; + +declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); + +#[program] +pub mod floats { + use super::*; + + pub fn create(ctx: Context, data_f32: f32, data_f64: f64) -> ProgramResult { + let account = &mut ctx.accounts.account; + let authority = &ctx.accounts.authority; + + account.data_f32 = data_f32; + account.data_f64 = data_f64; + account.authority = authority.key(); + + Ok(()) + } + + pub fn update(ctx: Context, data_f32: f32, data_f64: f64) -> ProgramResult { + let account = &mut ctx.accounts.account; + + account.data_f32 = data_f32; + account.data_f64 = data_f64; + + Ok(()) + } +} + +#[derive(Accounts)] +pub struct Create<'info> { + #[account(init, payer = authority, space = 8 + 8 + 4 + 32)] + pub account: Account<'info, FloatDataAccount>, + pub authority: Signer<'info>, + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +pub struct Update<'info> { + #[account(mut)] + pub account: Account<'info, FloatDataAccount>, +} + +#[account] +pub struct FloatDataAccount { + pub data_f64: f64, + pub data_f32: f32, + pub authority: Pubkey +} diff --git a/tests/floats/tests/floats.ts b/tests/floats/tests/floats.ts new file mode 100644 index 0000000000..34ddfeb773 --- /dev/null +++ b/tests/floats/tests/floats.ts @@ -0,0 +1,56 @@ +import * as anchor from '@project-serum/anchor'; +import { Program } from '@project-serum/anchor'; +import { Floats } from '../target/types/floats'; +import assert from 'assert'; + +describe('floats', () => { + + // Configure the client to use the local cluster. + anchor.setProvider(anchor.Provider.env()); + + const program = anchor.workspace.Floats as Program; + + it("Creates an account with float data", async () => { + const accountKeypair = anchor.web3.Keypair.generate(); + + await program.rpc.create(1111.1111, 9999.9999, { + accounts: { + account: accountKeypair.publicKey, + authority: anchor.getProvider().wallet.publicKey, + systemProgram: anchor.web3.SystemProgram.programId, + }, + signers: [accountKeypair], + }); + + const account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + + assert.strictEqual(account.dataF32, 1111.1111); + assert.strictEqual(account.dataF64, 9999.9999); + }); + + it("Updates an account with float data", async () => { + const accountKeypair = anchor.web3.Keypair.generate(); + + await program.rpc.create(1111.1111, 9999.9999, { + accounts: { + account: accountKeypair.publicKey, + authority: anchor.getProvider().wallet.publicKey, + systemProgram: anchor.web3.SystemProgram.programId, + }, + signers: [accountKeypair], + }); + + let account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + + await program.rpc.update(2222.2222, 8888.8888, { + accounts: { + account: accountKeypair.publicKey, + }, + }); + + account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + + assert.strictEqual(account.dataF32, 2222.2222); + assert.strictEqual(account.dataF64, 8888.8888); + }); +}); diff --git a/tests/floats/tsconfig.json b/tests/floats/tsconfig.json new file mode 100644 index 0000000000..cd5d2e3d06 --- /dev/null +++ b/tests/floats/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} diff --git a/tests/package.json b/tests/package.json index 40198cd2ed..3dac86fe3d 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,6 +14,7 @@ "errors", "escrow", "events", + "floats", "ido-pool", "interface", "lockup", diff --git a/ts/src/coder/borsh/idl.ts b/ts/src/coder/borsh/idl.ts index 304fe70555..12e251efd3 100644 --- a/ts/src/coder/borsh/idl.ts +++ b/ts/src/coder/borsh/idl.ts @@ -1,5 +1,5 @@ import camelCase from "camelcase"; -import { Layout } from "buffer-layout"; +import { Layout, f32, f64 } from "buffer-layout"; import * as borsh from "@project-serum/borsh"; import { IdlField, IdlTypeDef, IdlEnumVariant, IdlType } from "../../idl.js"; import { IdlError } from "../../error.js"; @@ -33,12 +33,18 @@ export class IdlCoder { case "i32": { return borsh.i32(fieldName); } + case "f32": { + return f32(fieldName); + } case "u64": { return borsh.u64(fieldName); } case "i64": { return borsh.i64(fieldName); } + case "f64": { + return f64(fieldName); + } case "u128": { return borsh.u128(fieldName); } diff --git a/ts/src/coder/common.ts b/ts/src/coder/common.ts index 8b6e26f989..39521f9008 100644 --- a/ts/src/coder/common.ts +++ b/ts/src/coder/common.ts @@ -46,10 +46,14 @@ function typeSize(idl: Idl, ty: IdlType): number { return 4; case "i32": return 4; + case "f32": + return 4; case "u64": return 8; case "i64": return 8; + case "f64": + return 8; case "u128": return 16; case "i128": diff --git a/ts/src/idl.ts b/ts/src/idl.ts index afe07ad48a..283c4cd348 100644 --- a/ts/src/idl.ts +++ b/ts/src/idl.ts @@ -98,8 +98,10 @@ export type IdlType = | "i16" | "u32" | "i32" + | "f32" | "u64" | "i64" + | "f64" | "u128" | "i128" | "bytes" diff --git a/ts/src/program/namespace/types.ts b/ts/src/program/namespace/types.ts index 5c80411abc..e229697a14 100644 --- a/ts/src/program/namespace/types.ts +++ b/ts/src/program/namespace/types.ts @@ -94,7 +94,7 @@ type TypeMap = { bool: boolean; string: string; } & { - [K in "u8" | "i8" | "u16" | "i16" | "u32" | "i32"]: number; + [K in "u8" | "i8" | "u16" | "i16" | "u32" | "i32" | "f32" | "f64"]: number; } & { [K in "u64" | "i64" | "u128" | "i128"]: BN; From 1192745c77e79a2c3f20faf1a6f7491571655bb7 Mon Sep 17 00:00:00 2001 From: Pavel Kuzovkin Date: Mon, 14 Feb 2022 20:00:42 +0300 Subject: [PATCH 2/6] Bumped borsh version Fixed integration tests for floats --- tests/floats/programs/floats/src/lib.rs | 2 +- tests/floats/tests/floats.ts | 37 ++++++++++++++----------- ts/package.json | 2 +- ts/src/coder/borsh/idl.ts | 6 ++-- ts/yarn.lock | 8 +++--- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/tests/floats/programs/floats/src/lib.rs b/tests/floats/programs/floats/src/lib.rs index 2980ae1072..6451f4fcdf 100644 --- a/tests/floats/programs/floats/src/lib.rs +++ b/tests/floats/programs/floats/src/lib.rs @@ -45,5 +45,5 @@ pub struct Update<'info> { pub struct FloatDataAccount { pub data_f64: f64, pub data_f32: f32, - pub authority: Pubkey + pub authority: Pubkey, } diff --git a/tests/floats/tests/floats.ts b/tests/floats/tests/floats.ts index 34ddfeb773..6855290be2 100644 --- a/tests/floats/tests/floats.ts +++ b/tests/floats/tests/floats.ts @@ -1,10 +1,9 @@ -import * as anchor from '@project-serum/anchor'; -import { Program } from '@project-serum/anchor'; -import { Floats } from '../target/types/floats'; -import assert from 'assert'; - -describe('floats', () => { +import * as anchor from "@project-serum/anchor"; +import { Program } from "@project-serum/anchor"; +import { Floats } from "../target/types/floats"; +import assert from "assert"; +describe("floats", () => { // Configure the client to use the local cluster. anchor.setProvider(anchor.Provider.env()); @@ -13,7 +12,7 @@ describe('floats', () => { it("Creates an account with float data", async () => { const accountKeypair = anchor.web3.Keypair.generate(); - await program.rpc.create(1111.1111, 9999.9999, { + await program.rpc.create(1.0, 2.0, { accounts: { account: accountKeypair.publicKey, authority: anchor.getProvider().wallet.publicKey, @@ -22,16 +21,18 @@ describe('floats', () => { signers: [accountKeypair], }); - const account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + const account = await program.account.floatDataAccount.fetch( + accountKeypair.publicKey + ); - assert.strictEqual(account.dataF32, 1111.1111); - assert.strictEqual(account.dataF64, 9999.9999); + assert.strictEqual(account.dataF32, 1.0); + assert.strictEqual(account.dataF64, 2.0); }); it("Updates an account with float data", async () => { const accountKeypair = anchor.web3.Keypair.generate(); - await program.rpc.create(1111.1111, 9999.9999, { + await program.rpc.create(1.0, 2.0, { accounts: { account: accountKeypair.publicKey, authority: anchor.getProvider().wallet.publicKey, @@ -40,17 +41,21 @@ describe('floats', () => { signers: [accountKeypair], }); - let account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + let account = await program.account.floatDataAccount.fetch( + accountKeypair.publicKey + ); - await program.rpc.update(2222.2222, 8888.8888, { + await program.rpc.update(3.0, 4.0, { accounts: { account: accountKeypair.publicKey, }, }); - account = await program.account.floatDataAccount.fetch(accountKeypair.publicKey); + account = await program.account.floatDataAccount.fetch( + accountKeypair.publicKey + ); - assert.strictEqual(account.dataF32, 2222.2222); - assert.strictEqual(account.dataF64, 8888.8888); + assert.strictEqual(account.dataF32, 3.0); + assert.strictEqual(account.dataF64, 4.0); }); }); diff --git a/ts/package.json b/ts/package.json index 418000c4e1..c5555de400 100644 --- a/ts/package.json +++ b/ts/package.json @@ -33,7 +33,7 @@ "test": "jest tests --detectOpenHandles" }, "dependencies": { - "@project-serum/borsh": "^0.2.4", + "@project-serum/borsh": "^0.2.5", "@solana/web3.js": "^1.17.0", "base64-js": "^1.5.1", "bn.js": "^5.1.2", diff --git a/ts/src/coder/borsh/idl.ts b/ts/src/coder/borsh/idl.ts index 12e251efd3..b7ec0e8a3d 100644 --- a/ts/src/coder/borsh/idl.ts +++ b/ts/src/coder/borsh/idl.ts @@ -1,5 +1,5 @@ import camelCase from "camelcase"; -import { Layout, f32, f64 } from "buffer-layout"; +import { Layout } from "buffer-layout"; import * as borsh from "@project-serum/borsh"; import { IdlField, IdlTypeDef, IdlEnumVariant, IdlType } from "../../idl.js"; import { IdlError } from "../../error.js"; @@ -34,7 +34,7 @@ export class IdlCoder { return borsh.i32(fieldName); } case "f32": { - return f32(fieldName); + return borsh.f32(fieldName); } case "u64": { return borsh.u64(fieldName); @@ -43,7 +43,7 @@ export class IdlCoder { return borsh.i64(fieldName); } case "f64": { - return f64(fieldName); + return borsh.f64(fieldName); } case "u128": { return borsh.u128(fieldName); diff --git a/ts/yarn.lock b/ts/yarn.lock index 8f140c23cb..fa355de3d2 100644 --- a/ts/yarn.lock +++ b/ts/yarn.lock @@ -855,10 +855,10 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" -"@project-serum/borsh@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.4.tgz#8884c3a759984a39d54bf5b7390bd1ee0b579f16" - integrity sha512-tQPc1ktAp1Jtn9D72DmObAfhAic9ivfYBOS5b+T4H7MvkQ84uML88LY1LfvGep30mCy+ua5rf+X9ocPfg6u9MA== +"@project-serum/borsh@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.5.tgz#6059287aa624ecebbfc0edd35e4c28ff987d8663" + integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q== dependencies: bn.js "^5.1.2" buffer-layout "^1.2.0" From 908cefaf168f96c154e00d2a5eccaac2ad74747f Mon Sep 17 00:00:00 2001 From: Pavel Kuzovkin Date: Mon, 14 Feb 2022 22:57:26 +0300 Subject: [PATCH 3/6] Fixed integration test for floats --- tests/floats/programs/floats/src/lib.rs | 6 ++++-- tests/floats/tests/floats.ts | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/floats/programs/floats/src/lib.rs b/tests/floats/programs/floats/src/lib.rs index 6451f4fcdf..d9e85fa7a4 100644 --- a/tests/floats/programs/floats/src/lib.rs +++ b/tests/floats/programs/floats/src/lib.rs @@ -8,7 +8,7 @@ pub mod floats { pub fn create(ctx: Context, data_f32: f32, data_f64: f64) -> ProgramResult { let account = &mut ctx.accounts.account; - let authority = &ctx.accounts.authority; + let authority = &mut ctx.accounts.authority; account.data_f32 = data_f32; account.data_f64 = data_f64; @@ -31,14 +31,16 @@ pub mod floats { pub struct Create<'info> { #[account(init, payer = authority, space = 8 + 8 + 4 + 32)] pub account: Account<'info, FloatDataAccount>, + #[account(mut)] pub authority: Signer<'info>, pub system_program: Program<'info, System>, } #[derive(Accounts)] pub struct Update<'info> { - #[account(mut)] + #[account(mut, has_one = authority)] pub account: Account<'info, FloatDataAccount>, + pub authority: Signer<'info>, } #[account] diff --git a/tests/floats/tests/floats.ts b/tests/floats/tests/floats.ts index 6855290be2..aa3b148d02 100644 --- a/tests/floats/tests/floats.ts +++ b/tests/floats/tests/floats.ts @@ -31,11 +31,12 @@ describe("floats", () => { it("Updates an account with float data", async () => { const accountKeypair = anchor.web3.Keypair.generate(); + const authorityPublicKey = anchor.getProvider().wallet.publicKey; await program.rpc.create(1.0, 2.0, { accounts: { account: accountKeypair.publicKey, - authority: anchor.getProvider().wallet.publicKey, + authority: authorityPublicKey, systemProgram: anchor.web3.SystemProgram.programId, }, signers: [accountKeypair], @@ -48,6 +49,7 @@ describe("floats", () => { await program.rpc.update(3.0, 4.0, { accounts: { account: accountKeypair.publicKey, + authority: authorityPublicKey, }, }); From 5e9fbca0cf21634d5bc9cd73d4b51b34c3b8a743 Mon Sep 17 00:00:00 2001 From: Pavel Kuzovkin Date: Tue, 15 Feb 2022 11:59:57 +0300 Subject: [PATCH 4/6] Improved integration tests for floats --- tests/floats/tests/floats.ts | 46 ++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/tests/floats/tests/floats.ts b/tests/floats/tests/floats.ts index aa3b148d02..06a6e12399 100644 --- a/tests/floats/tests/floats.ts +++ b/tests/floats/tests/floats.ts @@ -1,5 +1,6 @@ import * as anchor from "@project-serum/anchor"; -import { Program } from "@project-serum/anchor"; +import { Program, getProvider } from "@project-serum/anchor"; +import { Keypair, SystemProgram } from "@solana/web3.js"; import { Floats } from "../target/types/floats"; import assert from "assert"; @@ -10,16 +11,17 @@ describe("floats", () => { const program = anchor.workspace.Floats as Program; it("Creates an account with float data", async () => { - const accountKeypair = anchor.web3.Keypair.generate(); + const accountKeypair = Keypair.generate(); - await program.rpc.create(1.0, 2.0, { - accounts: { + await program.methods + .create(1.0, 2.0) + .accounts({ account: accountKeypair.publicKey, - authority: anchor.getProvider().wallet.publicKey, - systemProgram: anchor.web3.SystemProgram.programId, - }, - signers: [accountKeypair], - }); + authority: getProvider().wallet.publicKey, + systemProgram: SystemProgram.programId, + }) + .signers([accountKeypair]) + .rpc(); const account = await program.account.floatDataAccount.fetch( accountKeypair.publicKey @@ -30,28 +32,30 @@ describe("floats", () => { }); it("Updates an account with float data", async () => { - const accountKeypair = anchor.web3.Keypair.generate(); - const authorityPublicKey = anchor.getProvider().wallet.publicKey; + const accountKeypair = Keypair.generate(); + const authorityPublicKey = getProvider().wallet.publicKey; - await program.rpc.create(1.0, 2.0, { - accounts: { + await program.methods + .create(1.0, 2.0) + .accounts({ account: accountKeypair.publicKey, authority: authorityPublicKey, - systemProgram: anchor.web3.SystemProgram.programId, - }, - signers: [accountKeypair], - }); + systemProgram: SystemProgram.programId, + }) + .signers([accountKeypair]) + .rpc(); let account = await program.account.floatDataAccount.fetch( accountKeypair.publicKey ); - await program.rpc.update(3.0, 4.0, { - accounts: { + await program.methods + .update(3.0, 4.0) + .accounts({ account: accountKeypair.publicKey, authority: authorityPublicKey, - }, - }); + }) + .rpc(); account = await program.account.floatDataAccount.fetch( accountKeypair.publicKey From 051936307b5c4a9fe03688a1f74c01a0b96abb34 Mon Sep 17 00:00:00 2001 From: Pavel Kuzovkin Date: Thu, 17 Feb 2022 21:57:49 +0300 Subject: [PATCH 5/6] Changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd99ac2032..543ae9e5c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ incremented for features. ### Features * lang: add check that declared id == program id ([#1451](https://github.com/project-serum/anchor/pull/1451)) +* ts: Added float types support ([#1425](https://github.com/project-serum/anchor/pull/1425)) ### Fixes From 9ff1dafde5ad61f536f65b7a7143c80be8eb060e Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Thu, 17 Feb 2022 14:22:29 -0500 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 543ae9e5c5..7ded05a60b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ incremented for features. ### Features * lang: add check that declared id == program id ([#1451](https://github.com/project-serum/anchor/pull/1451)) -* ts: Added float types support ([#1425](https://github.com/project-serum/anchor/pull/1425)) +* ts: Added float types support ([#1425](https://github.com/project-serum/anchor/pull/1425)). ### Fixes