@@ -10,6 +10,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
1010 int32 public counterValue;
1111 uint public intValue;
1212 string public strValue;
13+ uint constant private ASYNC_VALUE = 2_000_000 ;
1314
1415 function verifyExternal (
1516 uint256 ,
@@ -40,7 +41,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
4041 address counter ,
4142 uint intContext ,
4243 string memory strContext
43- ) public async ( 500_000 ) {
44+ ) public async (ASYNC_VALUE ) {
4445 bytes memory context = abi.encode (intContext, strContext);
4546 bytes memory callData = abi.encodeWithSignature ("get() " );
4647 sendRequest (
@@ -69,7 +70,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
6970 function nestedRequest (
7071 address callee ,
7172 address counter
72- ) public async ( 500_000 ) {
73+ ) public async (ASYNC_VALUE ) {
7374 bytes memory callData = abi.encodeWithSelector (this .requestCounterGet.selector , counter, 123 , "test " );
7475 sendRequest (
7576 callee,
@@ -95,7 +96,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
9596 */
9697 function sendRequestFromCallback (
9798 address counter
98- ) public async ( 500_000 ) {
99+ ) public async (ASYNC_VALUE ) {
99100 bytes memory context = abi.encode (int32 (5 ), counter);
100101 bytes memory callData = abi.encodeWithSignature ("add(int32) " , 5 );
101102 sendRequest (
@@ -112,7 +113,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
112113 bool success ,
113114 bytes memory ,
114115 bytes memory context
115- ) public async ( 500_000 ) {
116+ ) public async (ASYNC_VALUE ) {
116117 require (success, "Request failed " );
117118 (int32 sendNext , address counter ) = abi.decode (context, (int32 , address ));
118119 if (sendNext == 0 ) {
@@ -136,7 +137,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
136137 /**
137138 * Test Counter's add method. No context and empty return data.
138139 */
139- function requestCounterAdd (address counter , int32 valueToAdd ) public async ( 500_000 ) {
140+ function requestCounterAdd (address counter , int32 valueToAdd ) public async (ASYNC_VALUE ) {
140141 bytes memory callData = abi.encodeWithSignature (
141142 "add(int32) " ,
142143 valueToAdd
@@ -164,7 +165,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
164165 /**
165166 * Test failure with value.
166167 */
167- function requestCheckFail (address addr , bool fail ) public async (500_000 ) {
168+ function requestCheckFail (address addr , bool fail ) public async (2_000_000 ) {
168169 bytes memory context = abi.encode (uint (11111 ));
169170 bytes memory callData = abi.encodeWithSignature (
170171 "checkFail(bool) " ,
@@ -193,7 +194,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
193194 /**
194195 * Test out of gas failure.
195196 */
196- function requestOutOfGasFailure (address counter ) public async ( 500_000 ) {
197+ function requestOutOfGasFailure (address counter ) public async (ASYNC_VALUE ) {
197198 bytes memory context = abi.encode (uint (1234567890 ));
198199 bytes memory callData = abi.encodeWithSignature ("outOfGasFailure() " );
199200 sendRequest (
@@ -229,7 +230,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
229230 /**
230231 * Test token sending.
231232 */
232- function requestSendToken (address addr , uint256 amount ) public async ( 500_000 ) {
233+ function requestSendToken (address addr , uint256 amount ) public async (ASYNC_VALUE ) {
233234 bytes memory context = abi.encode (uint (11111 ));
234235 bytes memory callData = abi.encodeWithSignature ("get() " );
235236 Nil.Token[] memory tokens = new Nil.Token [](1 );
@@ -260,7 +261,7 @@ contract RequestResponseTest is NilTokenBase, NilAwaitable {
260261 /**
261262 * Fail during request sending. Context storage should not be changed.
262263 */
263- function failDuringRequestSending (address counter ) public async ( 500_000 ) {
264+ function failDuringRequestSending (address counter ) public async (ASYNC_VALUE ) {
264265 bytes memory context = abi.encode (intValue, strValue);
265266 bytes memory callData = abi.encodeWithSignature ("get() " );
266267 sendRequest (
0 commit comments