@@ -28,64 +28,63 @@ class CodeGenerator {
2828 let self = this ;
2929
3030 // deprecated events; to remove in embark 2.7.0
31- this . events . setCommandHandler ( 'abi-vanila' , function ( cb ) {
31+ this . events . setCommandHandlerOnce ( 'abi-vanila' , function ( cb ) {
3232 let vanillaABI = self . generateABI ( { useEmbarkJS : false } ) ;
3333 let contractsJSON = self . generateContractsJSON ( ) ;
3434
3535 cb ( vanillaABI , contractsJSON ) ;
3636 } ) ;
3737
38- this . events . setCommandHandler ( 'abi' , function ( cb ) {
38+ this . events . setCommandHandlerOnce ( 'abi' , function ( cb ) {
3939 let embarkJSABI = self . generateABI ( { useEmbarkJS : true } ) ;
4040 let contractsJSON = self . generateContractsJSON ( ) ;
4141
4242 cb ( embarkJSABI , contractsJSON ) ;
4343 } ) ;
4444
45- this . events . setCommandHandler ( 'abi-contracts-vanila' , function ( cb ) {
45+ this . events . setCommandHandlerOnce ( 'abi-contracts-vanila' , function ( cb ) {
4646 let vanillaContractsABI = self . generateContracts ( false , true , false ) ;
4747 let contractsJSON = self . generateContractsJSON ( ) ;
4848
4949 cb ( vanillaContractsABI , contractsJSON ) ;
5050 } ) ;
5151
52- this . events . setCommandHandler ( 'abi-vanila-deployment' , function ( cb ) {
52+ this . events . setCommandHandlerOnce ( 'abi-vanila-deployment' , function ( cb ) {
5353 let vanillaABI = self . generateABI ( { useEmbarkJS : false , deployment : true } ) ;
5454 let contractsJSON = self . generateContractsJSON ( ) ;
5555
5656 cb ( vanillaABI , contractsJSON ) ;
5757 } ) ;
5858
5959 // new events
60- this . events . setCommandHandler ( 'code-vanila' , function ( cb ) {
60+ this . events . setCommandHandlerOnce ( 'code-vanila' , function ( cb ) {
6161 let vanillaABI = self . generateABI ( { useEmbarkJS : false } ) ;
6262 let contractsJSON = self . generateContractsJSON ( ) ;
6363
6464 cb ( vanillaABI , contractsJSON ) ;
6565 } ) ;
6666
67- this . events . setCommandHandler ( 'code' , function ( cb ) {
67+ this . events . setCommandHandlerOnce ( 'code' , function ( cb ) {
6868 let embarkJSABI = self . generateABI ( { useEmbarkJS : true } ) ;
6969 let contractsJSON = self . generateContractsJSON ( ) ;
7070
7171 cb ( embarkJSABI , contractsJSON ) ;
7272 } ) ;
7373
74- this . events . setCommandHandler ( 'code-contracts-vanila' , function ( cb ) {
74+ this . events . setCommandHandlerOnce ( 'code-contracts-vanila' , function ( cb ) {
7575 let vanillaContractsABI = self . generateContracts ( false , true , false ) ;
7676 let contractsJSON = self . generateContractsJSON ( ) ;
7777
7878 cb ( vanillaContractsABI , contractsJSON ) ;
7979 } ) ;
8080
81- this . events . setCommandHandler ( 'code-vanila-deployment' , function ( cb ) {
81+ this . events . setCommandHandlerOnce ( 'code-vanila-deployment' , function ( cb ) {
8282 let vanillaABI = self . generateABI ( { useEmbarkJS : false , deployment : true } ) ;
8383 let contractsJSON = self . generateContractsJSON ( ) ;
8484
8585 cb ( vanillaABI , contractsJSON ) ;
8686 } ) ;
8787
88-
8988 }
9089
9190 generateProvider ( isDeployment ) {
@@ -222,8 +221,6 @@ class CodeGenerator {
222221 result += Templates . exec_when_env_loaded ( { block : block } ) ;
223222 }
224223
225- console . log ( result ) ;
226-
227224 return result ;
228225 }
229226
0 commit comments