Skip to content

Commit f549b0e

Browse files
committed
CurseMCMS package to call CCIP RMN curse ops
1 parent 1dfba62 commit f549b0e

File tree

10 files changed

+5412
-4
lines changed

10 files changed

+5412
-4
lines changed

bindings/bindings.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/smartcontractkit/chainlink-aptos/bindings/ccip_token_pools/regulated_token_pool"
1414
"github.com/smartcontractkit/chainlink-aptos/bindings/ccip_token_pools/token_pool"
1515
"github.com/smartcontractkit/chainlink-aptos/bindings/ccip_token_pools/usdc_token_pool"
16+
"github.com/smartcontractkit/chainlink-aptos/bindings/curse_mcms"
1617
"github.com/smartcontractkit/chainlink-aptos/bindings/data_feeds"
1718
"github.com/smartcontractkit/chainlink-aptos/bindings/managed_token"
1819
"github.com/smartcontractkit/chainlink-aptos/bindings/managed_token_faucet"
@@ -36,6 +37,7 @@ var GlobalFunctionInfo = bind.CombineFunctionInfos(
3637
managed_token_pool.FunctionInfo,
3738
token_pool.FunctionInfo,
3839
usdc_token_pool.FunctionInfo,
40+
curse_mcms.FunctionInfo,
3941
data_feeds.FunctionInfo,
4042
managed_token.FunctionInfo,
4143
managed_token_faucet.FunctionInfo,

bindings/curse_mcms/curse_mcms.go

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package curse_mcms
2+
3+
import (
4+
"github.com/aptos-labs/aptos-go-sdk"
5+
6+
"github.com/smartcontractkit/chainlink-aptos/bindings/bind"
7+
"github.com/smartcontractkit/chainlink-aptos/bindings/compile"
8+
module_curse_mcms "github.com/smartcontractkit/chainlink-aptos/bindings/curse_mcms/curse_mcms"
9+
"github.com/smartcontractkit/chainlink-aptos/contracts"
10+
)
11+
12+
type CurseMCMS interface {
13+
Address() aptos.AccountAddress
14+
CurseMCMS() module_curse_mcms.CurseMCMSInterface
15+
}
16+
17+
var _ CurseMCMS = CurseMCMSContract{}
18+
19+
type CurseMCMSContract struct {
20+
address aptos.AccountAddress
21+
curseMcms module_curse_mcms.CurseMCMSInterface
22+
}
23+
24+
func (c CurseMCMSContract) Address() aptos.AccountAddress {
25+
return c.address
26+
}
27+
28+
func (c CurseMCMSContract) CurseMCMS() module_curse_mcms.CurseMCMSInterface {
29+
return c.curseMcms
30+
}
31+
32+
const (
33+
DefaultSeed = "chainlink_curse_mcms"
34+
)
35+
36+
var FunctionInfo = bind.MustParseFunctionInfo(
37+
module_curse_mcms.FunctionInfo,
38+
)
39+
40+
func Bind(
41+
address aptos.AccountAddress,
42+
client aptos.AptosRpcClient,
43+
) CurseMCMS {
44+
return CurseMCMSContract{
45+
address: address,
46+
curseMcms: module_curse_mcms.NewCurseMCMS(address, client),
47+
}
48+
}
49+
50+
func Compile(address aptos.AccountAddress, ccipAddress aptos.AccountAddress, mcmsAddress aptos.AccountAddress, mcmsRegisterEntrypointsAddress aptos.AccountAddress) (compile.CompiledPackage, error) {
51+
namedAddresses := map[string]aptos.AccountAddress{
52+
"curse_mcms": address,
53+
"ccip": ccipAddress,
54+
"mcms": mcmsAddress,
55+
"mcms_register_entrypoints": mcmsRegisterEntrypointsAddress,
56+
}
57+
return compile.CompilePackage(contracts.CurseMCMS, namedAddresses)
58+
}

bindings/curse_mcms/curse_mcms/curse_mcms.go

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

contracts/contracts.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ const (
3535
Platform = Package("platform")
3636
PlatformSecondary = Package("platform_secondary")
3737

38-
MCMS = Package("mcms")
39-
MCMSTest = Package("mcms_test")
38+
MCMS = Package("mcms")
39+
MCMSTest = Package("mcms_test")
40+
CurseMCMS = Package("curse_mcms")
4041

4142
LargePackages = Package("large_packages")
4243

@@ -70,8 +71,9 @@ var Contracts map[Package]string = map[Package]string{
7071
ManagedTokenMCMSRegistrar: filepath.Join("mcms_registrars", "managed_token_mcms_registrar"),
7172
RegulatedTokenMCMSRegistrar: filepath.Join("mcms_registrars", "regulated_token_mcms_registrar"),
7273

73-
MCMS: filepath.Join("mcms", "mcms"),
74-
MCMSTest: filepath.Join("mcms", "mcms_test"),
74+
MCMS: filepath.Join("mcms", "mcms"),
75+
MCMSTest: filepath.Join("mcms", "mcms_test"),
76+
CurseMCMS: filepath.Join("mcms", "curse_mcms"),
7577

7678
LargePackages: "large_packages",
7779

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "ChainlinkCurseMCMS"
3+
version = "1.0.0"
4+
authors = []
5+
upgrade_policy = "immutable"
6+
7+
[addresses]
8+
curse_mcms = "_"
9+
curse_mcms_owner = "_"
10+
ccip = "_"
11+
mcms = "_"
12+
mcms_owner = "0x0"
13+
mcms_register_entrypoints = "_"
14+
15+
[dev-addresses]
16+
curse_mcms = "0xCCC"
17+
curse_mcms_owner = "0xCCD"
18+
ccip = "0x30b33dec3fcac5ef3ea775128d88722b64ba59a4598277e537f284917403df29"
19+
mcms = "0x4000"
20+
mcms_register_entrypoints = "0x4001"
21+
22+
[dependencies]
23+
ChainlinkCCIP = { local = "../../ccip/ccip" }

0 commit comments

Comments
 (0)