Skip to content

Commit

Permalink
Merge pull request #5 from Henry-E/master
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
Henry-E authored Mar 11, 2024
2 parents deb6e14 + 405fca4 commit 1a6d1e2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
seeds = false
skip-lint = false
[programs.localnet]
solana_timelock = "TiMEYuk7rCBAFYMvhN3hae9PRc1NUYL71Zu3MCaCBVe"
solana_timelock = "tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF"

[registry]
url = "https://api.apr.dev"
Expand Down
22 changes: 10 additions & 12 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
![License LGPLv3](https://img.shields.io/badge/License-LGPLv3-violet.svg)

A simple program for delayed transaction execution on Solana. Unaudited; use
at your own risk.
at your own risk.

## Why use a timelock?

Basically, a timelock can provide extra security and/or decentralization. Benefits include:

- if a deployer key is compromised, users can move their funds out of the protocol before the attacker can upgrade the program
- users can verify that new changes to the program or to protocol parameters (e.g., fees) are acceptable
- projects can claim some level of decentralization even when a central team (i.e., x Labs) has the ability to update the program and/or protocol parameters
Expand All @@ -21,8 +22,7 @@ Example usage is demonstrated in [tests/solana_timelock.ts](./tests/solana_timel

## Deployment address

The program is currently live on devnet at
[TiMEYuk7rCBAFYMvhN3hae9PRc1NUYL71Zu3MCaCBVe](https://explorer.solana.com/address/TiMEYuk7rCBAFYMvhN3hae9PRc1NUYL71Zu3MCaCBVe?cluster=devnet).
The program is currently live on
[devnet](https://solscan.io/account/tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF?cluster=custom&customUrl=https%3A%2F%2Fapi.devnet.solana.com) and [mainnet](https://solscan.io/account/tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF) at `tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF`.
You may verify that the deployed program matches the source by using the
`anchor verify` command.

`solana-verify verify-from-repo -um --program-id tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF https://github.com/metaDAOproject/solana-timelock` command.
1 change: 1 addition & 0 deletions programs/solana_timelock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ default = []

[dependencies]
anchor-lang = "0.29.0"
solana-security-txt = "1.1.1"
18 changes: 17 additions & 1 deletion programs/solana_timelock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,24 @@ use anchor_lang::solana_program;
use anchor_lang::solana_program::instruction::Instruction;
use std::convert::Into;
use std::ops::Deref;
#[cfg(not(feature = "no-entrypoint"))]
use solana_security_txt::security_txt;

#[cfg(not(feature = "no-entrypoint"))]
security_txt! {
name: "solana_timelock",
project_url: "https://themetadao.org",
contacts: "email:[email protected]",
policy: "The market will decide whether we pay a bug bounty.",
source_code: "https://github.com/metaDAOproject/solana-timelock",
source_release: "v0",
auditors: "None",
acknowledgements: "DCF = (CF1 / (1 + r)^1) + (CF2 / (1 + r)^2) + ... (CFn / (1 + r)^n)"
}

declare_id!("tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF");


declare_id!("TiMEYuk7rCBAFYMvhN3hae9PRc1NUYL71Zu3MCaCBVe");

#[account]
pub struct Timelock {
Expand Down

0 comments on commit 1a6d1e2

Please sign in to comment.