Skip to content

Commit 79eb50a

Browse files
authored
fix: audit findings (#71)
1 parent 2533cc1 commit 79eb50a

File tree

12 files changed

+1288
-761
lines changed

12 files changed

+1288
-761
lines changed

Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resolution = true
55
skip-lint = false
66

77
[programs.localnet]
8-
protocol_contracts_solana = "ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis"
8+
gateway = "ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis"
99

1010
[registry]
1111
url = "https://api.apr.dev"

Cargo.lock

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ In the instruction, the ECDSA signed message_hash must commit to the `nonce`, `
7272

7373
# Relevant Account and Addresses
7474

75-
The Gateway program derive a PDA (Program Derived Address) with seeds `b"meta"` and canonical bump. This PDA account/address actually holds the SOL balance of the Gateway program. For SPL tokens, the program stores the SPL token in PDA derived ATAs. For each SPL token (different mint account), the program creates ATA from PDA and the Mint (standard way of deriving ATA in Solana SPL program).
75+
The Gateway program derives a PDA (Program Derived Address) with seeds `b"meta"` and canonical bump. This PDA account/address actually holds the SOL balance of the Gateway program. For SPL tokens, the program stores the SPL token in PDA derived ATAs. For each SPL token (different mint account), the program creates an ATA from the PDA and the Mint (standard way of deriving ATA in Solana SPL program).
7676

7777
The PDA account itself is a data account that holds Gateway program state, namely the following data types https://github.com/zeta-chain/protocol-contracts-solana/blob/01eeb9733a00b6e972de0578b0e07ebc5837ec54/programs/protocol-contracts-solana/src/lib.rs#L271-L275
7878

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@zetachain/protocol-contracts-solana",
2+
"name": "@zetachain/gateway",
33
"private": false,
44
"license": "MIT",
55
"version": "0.0.0-set-on-publish",
@@ -8,8 +8,9 @@
88
"idl"
99
],
1010
"scripts": {
11-
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
12-
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
11+
"fmt:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
12+
"fmt": "prettier */*.js \"*/**/*{.js,.ts}\" --check",
13+
"rust:fmt": "./scripts/fmt.sh"
1314
},
1415
"dependencies": {
1516
"@coral-xyz/anchor": "^0.30.0",

programs/protocol-contracts-solana/Cargo.toml renamed to programs/gateway/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "protocol-contracts-solana"
2+
name = "gateway"
33
version = "0.1.0"
44
description = "Created with Anchor"
55
edition = "2021"
66

77
[lib]
88
crate-type = ["cdylib", "lib"]
9-
name = "protocol_contracts_solana"
9+
name = "gateway"
1010

1111
[features]
1212
default = []
@@ -19,6 +19,5 @@ idl-build = ["anchor-lang/idl-build"]
1919
[dependencies]
2020
anchor-lang = { version = "=0.30.0" }
2121
anchor-spl = { version = "=0.30.0", features = ["idl-build"] }
22-
anchor-syn = "=0.30.0"
2322
spl-associated-token-account = "3.0.2"
2423
solana-program = "=1.18.15"
File renamed without changes.

0 commit comments

Comments
 (0)