Open carlosalbertocruz opened 2 years ago
My code
$response = null; $this->contract->at( env('CONTRACT_ADDRESS') )->call('increaseAllowance', env('EARN_ADDRESS'), $amount, [ 'owner' => $toAddress, 'spender' => env('EARN_ADDRESS'), 'addedValue' => $amount, ], function($err, $success) use (&$response) { if ( $err !== null ){ return $response = array ( 'status' => false, 'error' => $err->getMessage() ); } return $response = array( 'status' => $success[0] ); } ); return $response;
My smact contract function: https://ibb.co/vwNQFmm
My code
$response = null; $this->contract->at( env('CONTRACT_ADDRESS') )->call('increaseAllowance', env('EARN_ADDRESS'), $amount, [ 'owner' => $toAddress, 'spender' => env('EARN_ADDRESS'), 'addedValue' => $amount, ], function($err, $success) use (&$response) { if ( $err !== null ){ return $response = array ( 'status' => false, 'error' => $err->getMessage() ); } return $response = array( 'status' => $success[0] ); } ); return $response;
My smact contract function: https://ibb.co/vwNQFmm