From 593397669504a73196f401ba20e3559c85c9023d Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 25 Oct 2024 01:04:48 +0200 Subject: [PATCH] fix module name and regenerate latest gateway bindings --- .gitignore | 3 +- go-idl/generated/gateway.go | 125 ++++++++++++++++++++++++++++++++++- go-idl/generator/generate.go | 4 +- go-idl/generator/main.go | 2 +- go-idl/go.mod | 2 +- 5 files changed, 128 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index fa5181c..d4377fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .anchor/ /target **/.DS_Store -.idea/ \ No newline at end of file +.idea/ +node_modules/ \ No newline at end of file diff --git a/go-idl/generated/gateway.go b/go-idl/generated/gateway.go index 0848103..cdd85bb 100644 --- a/go-idl/generated/gateway.go +++ b/go-idl/generated/gateway.go @@ -2,7 +2,7 @@ package solana import ( - "github.com/protocol-contracts-solana/go-idl/types" + "github.com/zeta-chain/protocol-contracts-solana/go-idl/types" ) var IDLGateway = types.IDL{ @@ -81,7 +81,21 @@ var IDLGateway = types.IDL{ }, { Name: "pda", - Writable: true, + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "whitelist_entry", + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "mint_account", + Writable: false, Signer: false, Address: "", PDA: nil, @@ -122,7 +136,21 @@ var IDLGateway = types.IDL{ }, { Name: "pda", - Writable: true, + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "whitelist_entry", + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "mint_account", + Writable: false, Signer: false, Address: "", PDA: nil, @@ -197,6 +225,47 @@ var IDLGateway = types.IDL{ }, }, }, + { + Name: "unwhitelist_spl_mint", + Discriminator: [8]byte{73, 142, 63, 191, 233, 238, 170, 104}, + Accounts: []types.Account{ + { + Name: "whitelist_entry", + Writable: true, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "whitelist_candidate", + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "pda", + Writable: true, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "authority", + Writable: true, + Signer: true, + Address: "", + PDA: nil, + }, + { + Name: "system_program", + Writable: false, + Signer: false, + Address: "11111111111111111111111111111111", + PDA: nil, + }, + }, + }, { Name: "update_authority", Discriminator: [8]byte{32, 46, 64, 28, 149, 75, 243, 88}, @@ -237,6 +306,47 @@ var IDLGateway = types.IDL{ }, }, }, + { + Name: "whitelist_spl_mint", + Discriminator: [8]byte{30, 110, 162, 42, 208, 147, 254, 219}, + Accounts: []types.Account{ + { + Name: "whitelist_entry", + Writable: true, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "whitelist_candidate", + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "pda", + Writable: true, + Signer: false, + Address: "", + PDA: nil, + }, + { + Name: "authority", + Writable: true, + Signer: true, + Address: "", + PDA: nil, + }, + { + Name: "system_program", + Writable: false, + Signer: false, + Address: "11111111111111111111111111111111", + PDA: nil, + }, + }, + }, { Name: "withdraw", Discriminator: [8]byte{183, 18, 70, 156, 148, 109, 161, 34}, @@ -321,6 +431,13 @@ var IDLGateway = types.IDL{ Address: "", PDA: nil, }, + { + Name: "WhitelistEntry", + Writable: false, + Signer: false, + Address: "", + PDA: nil, + }, }, Errors: []types.Error{ {Code: 6000, Name: "SignerIsNotAuthority", Msg: "SignerIsNotAuthority"}, @@ -343,8 +460,10 @@ const ( InstructionDeposit_spl_token_and_call = "deposit_spl_token_and_call" InstructionInitialize = "initialize" InstructionSet_deposit_paused = "set_deposit_paused" + InstructionUnwhitelist_spl_mint = "unwhitelist_spl_mint" InstructionUpdate_authority = "update_authority" InstructionUpdate_tss = "update_tss" + InstructionWhitelist_spl_mint = "whitelist_spl_mint" InstructionWithdraw = "withdraw" InstructionWithdraw_spl_token = "withdraw_spl_token" ) diff --git a/go-idl/generator/generate.go b/go-idl/generator/generate.go index 8750edb..769bef5 100644 --- a/go-idl/generator/generate.go +++ b/go-idl/generator/generate.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/protocol-contracts-solana/go-idl/types" + "github.com/zeta-chain/protocol-contracts-solana/go-idl/types" ) const ( @@ -21,7 +21,7 @@ func generateIDLFile(packagename, varname string, idl *types.IDL) string { sb.WriteString(fmt.Sprintf("%s\n", codeGenerationDisclaimer)) sb.WriteString(fmt.Sprintf("package %s\n\n", packagename)) sb.WriteString("import (\n") - sb.WriteString(" \"github.com/protocol-contracts-solana/go-idl/types\"\n") + sb.WriteString(" \"github.com/zeta-chain/protocol-contracts-solana/go-idl/types\"\n") sb.WriteString(")\n\n") // IDL struct diff --git a/go-idl/generator/main.go b/go-idl/generator/main.go index 7dc8b0a..ab39aa6 100644 --- a/go-idl/generator/main.go +++ b/go-idl/generator/main.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/protocol-contracts-solana/go-idl/types" + "github.com/zeta-chain/protocol-contracts-solana/go-idl/types" ) func main() { diff --git a/go-idl/go.mod b/go-idl/go.mod index 0a254ce..4a48ff2 100644 --- a/go-idl/go.mod +++ b/go-idl/go.mod @@ -1,3 +1,3 @@ -module github.com/protocol-contracts-solana/go-idl +module github.com/zeta-chain/protocol-contracts-solana/go-idl go 1.22.8