@@ -25,20 +25,20 @@ func TestCTFChainProviderConfig_validate(t *testing.T) {
2525 {
2626 name : "empty config" ,
2727 config : CTFChainProviderConfig {},
28- expectedErr : "deployer account generator is required" ,
28+ expectedErr : "deployer signer generator is required" ,
2929 },
3030 {
3131 name : "missing sync.Once" ,
3232 config : CTFChainProviderConfig {
33- DeployerAccountGen : AccountGenCTFDefault (),
33+ DeployerSignerGen : SignerGenCTFDefault (),
3434 },
3535 expectedErr : "sync.Once instance is required" ,
3636 },
3737 {
3838 name : "valid config" ,
3939 config : CTFChainProviderConfig {
40- DeployerAccountGen : AccountGenCTFDefault (),
41- Once : & sync.Once {},
40+ DeployerSignerGen : SignerGenCTFDefault (),
41+ Once : & sync.Once {},
4242 },
4343 expectedErr : "" ,
4444 },
@@ -62,8 +62,8 @@ func TestNewCTFChainProvider(t *testing.T) {
6262 t .Parallel ()
6363
6464 config := CTFChainProviderConfig {
65- DeployerAccountGen : AccountGenCTFDefault (),
66- Once : & sync.Once {},
65+ DeployerSignerGen : SignerGenCTFDefault (),
66+ Once : & sync.Once {},
6767 }
6868
6969 provider := NewCTFChainProvider (t , 123456 , config )
@@ -87,8 +87,8 @@ func TestCTFChainProvider_Initialize(t *testing.T) {
8787 name : "valid initialization" ,
8888 giveSelector : chain_selectors .TRON_TESTNET_NILE .Selector ,
8989 giveConfig : CTFChainProviderConfig {
90- DeployerAccountGen : AccountGenCTFDefault (),
91- Once : & sync.Once {},
90+ DeployerSignerGen : SignerGenCTFDefault (),
91+ Once : & sync.Once {},
9292 },
9393 },
9494 {
@@ -97,22 +97,22 @@ func TestCTFChainProvider_Initialize(t *testing.T) {
9797 giveConfig : CTFChainProviderConfig {
9898 Once : & sync.Once {},
9999 },
100- wantErr : "deployer account generator is required" ,
100+ wantErr : "deployer signer generator is required" ,
101101 },
102102 {
103103 name : "missing sync.Once" ,
104104 giveSelector : chain_selectors .TRON_TESTNET_NILE .Selector ,
105105 giveConfig : CTFChainProviderConfig {
106- DeployerAccountGen : AccountGenCTFDefault (),
106+ DeployerSignerGen : SignerGenCTFDefault (),
107107 },
108108 wantErr : "sync.Once instance is required" ,
109109 },
110110 {
111111 name : "chain id not found for selector" ,
112112 giveSelector : 999999 , // Invalid selector
113113 giveConfig : CTFChainProviderConfig {
114- DeployerAccountGen : AccountGenCTFDefault (),
115- Once : & sync.Once {},
114+ DeployerSignerGen : SignerGenCTFDefault (),
115+ Once : & sync.Once {},
116116 },
117117 wantErr : "failed to get chain ID from selector 999999" ,
118118 },
@@ -136,7 +136,7 @@ func TestCTFChainProvider_Initialize(t *testing.T) {
136136 require .True (t , ok , "expected got to be of type tron.Chain" )
137137 require .Equal (t , tt .giveSelector , gotChain .Selector )
138138 require .NotEmpty (t , gotChain .Client )
139- require .NotEmpty (t , gotChain .Keystore )
139+ require .NotEmpty (t , gotChain .SignHash )
140140 require .NotEmpty (t , gotChain .Address )
141141 require .NotEmpty (t , gotChain .URL )
142142 require .NotEmpty (t , gotChain .SendAndConfirm )
@@ -150,8 +150,8 @@ func TestCTFChainProvider_Initialize(t *testing.T) {
150150func TestCTFChainProvider_ContainerStartup (t * testing.T ) {
151151 t .Parallel ()
152152 config := CTFChainProviderConfig {
153- DeployerAccountGen : AccountGenCTFDefault (),
154- Once : & sync.Once {},
153+ DeployerSignerGen : SignerGenCTFDefault (),
154+ Once : & sync.Once {},
155155 }
156156
157157 provider := NewCTFChainProvider (t , chain_selectors .TRON_TESTNET_NILE .Selector , config )
@@ -169,8 +169,8 @@ func TestCTFProvider_SendAndConfirmTx_And_CheckContractDeployed(t *testing.T) {
169169 t .Parallel ()
170170
171171 config := CTFChainProviderConfig {
172- DeployerAccountGen : AccountGenCTFDefault (),
173- Once : & sync.Once {},
172+ DeployerSignerGen : SignerGenCTFDefault (),
173+ Once : & sync.Once {},
174174 }
175175
176176 chainSelector := chain_selectors .TRON_TESTNET_NILE .Selector
0 commit comments