Skip to content

Added security.txt metadata into build #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
test-ledger
.yarn
.idea
docker-target
6 changes: 4 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion programs/fusion-swap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fusion-swap"
version = "0.1.0"
version = "1.0.0"
description = "Created with Anchor"
edition = "2021"

Expand All @@ -25,6 +25,7 @@ anchor-spl = "0.31.1"
common = { path = "../../common" }
whitelist = { path = "../whitelist", features = ["no-entrypoint"] }
muldiv = "1.0.1"
solana-security-txt = "1.1.1"

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ["cfg(solana)"] }
16 changes: 16 additions & 0 deletions programs/fusion-swap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ pub mod error;

use error::FusionError;

#[cfg(not(feature = "no-entrypoint"))]
solana_security_txt::security_txt! {
// Required fields
name: "1inch Fusion Program",
project_url: "http://1inch.io",
contacts: "email:[email protected],link:https://1inch.io/contacts/",
policy: "",

// Optional Fields
preferred_languages: "en",
source_code: "https://github.com/1inch/solana-fusion-protocol",
source_release: "1.0.0-release",
source_revision: "6fec865864a281ca84f5790d58c31f44518d0167",
auditors: "https://github.com/1inch/1inch-audits/tree/master/Solana-Fusion"
}

declare_id!("HNarfxC3kYMMhFkxUFeYb8wHVdPzY5t9pupqW5fL2meM");

enum UniTransferParams<'info> {
Expand Down
3 changes: 2 additions & 1 deletion programs/whitelist/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "whitelist"
version = "0.1.0"
version = "1.0.0"
description = "Created with Anchor"
edition = "2021"

Expand All @@ -23,6 +23,7 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
anchor-lang = { version = "0.31.1" }
anchor-spl = "0.31.1"
common = { path = "../../common" }
solana-security-txt = "1.1.1"

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ["cfg(solana)"] }
16 changes: 16 additions & 0 deletions programs/whitelist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ use common::constants::DISCRIMINATOR;
pub mod error;
use error::WhitelistError;

#[cfg(not(feature = "no-entrypoint"))]
solana_security_txt::security_txt! {
// Required fields
name: "1inch Fusion Whitelist",
project_url: "http://1inch.io",
contacts: "email:[email protected],link:https://1inch.io/contacts/",
policy: "",

// Optional Fields
preferred_languages: "en",
source_code: "https://github.com/1inch/solana-fusion-protocol",
source_release: "1.0.0-release",
source_revision: "6fec865864a281ca84f5790d58c31f44518d0167",
auditors: "https://github.com/1inch/1inch-audits/tree/master/Solana-Fusion"
}

declare_id!("5jzZhrzqkbdwp5d3J1XbmaXMRnqeXimM1mDMoGHyvR7S");

pub const WHITELIST_STATE_SEED: &[u8] = b"whitelist_state";
Expand Down