@ -1,5 +1,5 @@
'use strict'
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import init from '../helpers/init'
import sauce from './sauce'
import sauce from './sauce'
@ -25,7 +25,7 @@ module.exports = {
{
{
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0x38bb944fa4709ed9e163d6c670259f97284b4defd916d512a2fcc3f35bb53e03' ,
'transaction hash' : '0x38bb944fa4709ed9e163d6c670259f97284b4defd916d512a2fcc3f35bb53e03' ,
'decoded output' : { '0' : 'uint256: 8' }
'decoded output' : { 0 : 'uint256: 8' }
} )
} )
. pause ( 500 )
. pause ( 500 )
. checkTerminalFilter ( '0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782' , '' )
. checkTerminalFilter ( '0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782' , '' )
@ -35,10 +35,10 @@ module.exports = {
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0xab4f794ca0b531f27fc6eace623666b440facbf20e77615a057d728c67b500f0' ,
'transaction hash' : '0xab4f794ca0b531f27fc6eace623666b440facbf20e77615a057d728c67b500f0' ,
'decoded output' : {
'decoded output' : {
'0' : 'uint256: 345' ,
0 : 'uint256: 345' ,
'1' : 'string: comment_comment_' ,
1 : 'string: comment_comment_' ,
'2' : 'bool: true' ,
2 : 'bool: true' ,
'3' : 'uint256: 4'
3 : 'uint256: 4'
}
}
} )
} )
. click ( '*[data-id="deployAndRunClearInstances"]' )
. click ( '*[data-id="deployAndRunClearInstances"]' )
@ -56,10 +56,10 @@ module.exports = {
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0x09c6716a67f0f8c7a0ca2b3ddf59c25982da856a95aefd640b767f9b9feee39d' ,
'transaction hash' : '0x09c6716a67f0f8c7a0ca2b3ddf59c25982da856a95aefd640b767f9b9feee39d' ,
'decoded output' : {
'decoded output' : {
'0' : 'bool: _b true' ,
0 : 'bool: _b true' ,
'1' : 'uint256: _u 345' ,
1 : 'uint256: _u 345' ,
'2' : 'int256: _i -345' ,
2 : 'int256: _i -345' ,
'3' : 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
3 : 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
}
}
} )
} )
. clickFunction ( 'retunValues2 - transact (not payable)' )
. clickFunction ( 'retunValues2 - transact (not payable)' )
@ -68,16 +68,16 @@ module.exports = {
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0xe884953e0695399d60914af3e1ea2dad59fe41f3c0c20665c130fa40dd0fb6bf' ,
'transaction hash' : '0xe884953e0695399d60914af3e1ea2dad59fe41f3c0c20665c130fa40dd0fb6bf' ,
'decoded output' : {
'decoded output' : {
'0' : 'bytes1: _b 0x12' ,
0 : 'bytes1: _b 0x12' ,
'1' : 'bytes2: _b2 0x1223' ,
1 : 'bytes2: _b2 0x1223' ,
'2' : 'bytes3: _b3 0x000000' ,
2 : 'bytes3: _b3 0x000000' ,
'3' : 'bytes: _blit 0x123498' ,
3 : 'bytes: _blit 0x123498' ,
'4' : 'bytes5: _b5 0x0432450000' ,
4 : 'bytes5: _b5 0x0432450000' ,
'5' : 'bytes6: _b6 0x234553253200' ,
5 : 'bytes6: _b6 0x234553253200' ,
'6' : 'string: _str this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string' ,
6 : 'string: _str this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string' ,
'7' : 'bytes7: _b7 0x03252353253253' ,
7 : 'bytes7: _b7 0x03252353253253' ,
'8' : 'bytes22: _b22 0x32523523532532532523532500000000000000000000' ,
8 : 'bytes22: _b22 0x32523523532532532523532500000000000000000000' ,
'9' : 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
9 : 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
}
}
} ) . pause ( 500 )
} ) . pause ( 500 )
. clickFunction ( 'retunValues3 - transact (not payable)' )
. clickFunction ( 'retunValues3 - transact (not payable)' )
@ -86,8 +86,8 @@ module.exports = {
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0xb4108649d5e65a4a0776d6ac98c2c356540a7e99d641705a82352a845d467eb5' ,
'transaction hash' : '0xb4108649d5e65a4a0776d6ac98c2c356540a7e99d641705a82352a845d467eb5' ,
'decoded output' : {
'decoded output' : {
'0' : 'uint8: _en 2' ,
0 : 'uint8: _en 2' ,
'1' : 'int256[5][]: _a1 1,-45,-78,56,60,-1,42,334,-45455,-446,1,10,-5435,45,-7'
1 : 'int256[5][]: _a1 1,-45,-78,56,60,-1,42,334,-45455,-446,1,10,-5435,45,-7'
}
}
} ) . click ( '*[data-id="deployAndRunClearInstances"]' )
} ) . click ( '*[data-id="deployAndRunClearInstances"]' )
} ,
} ,
@ -98,40 +98,40 @@ module.exports = {
. click ( '#runTabView button[class^="instanceButton"]' )
. click ( '#runTabView button[class^="instanceButton"]' )
. waitForElementPresent ( '.instance:nth-of-type(2)' )
. waitForElementPresent ( '.instance:nth-of-type(2)' )
. click ( '.instance:nth-of-type(2) > div > button' )
. click ( '.instance:nth-of-type(2) > div > button' )
. clickFunction ( 'inputValue1 - transact (not payable)' , { types : 'uint256 _u, int256 _i, string _str' , values : '"2343242", "-4324324", "string _ string _ string _ string _ string _ string _ string _ string _ string _ string _"' } )
. clickFunction ( 'inputValue1 - transact (not payable)' , { types : 'uint256 _u, int256 _i, string _str' , values : '"2343242", "-4324324", "string _ string _ string _ string _ string _ string _ string _ string _ string _ string _"' } )
. testFunction ( '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97' ,
. testFunction ( '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97' ,
{
{
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97' ,
'transaction hash' : '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97' ,
'decoded output' : {
'decoded output' : {
'0' : 'uint256: _uret 2343242' ,
0 : 'uint256: _uret 2343242' ,
'1' : 'int256: _iret -4324324' ,
1 : 'int256: _iret -4324324' ,
'2' : 'string: _strret string _ string _ string _ string _ string _ string _ string _ string _ string _ string _'
2 : 'string: _strret string _ string _ string _ string _ string _ string _ string _ string _ string _ string _'
}
}
} )
} )
. pause ( 500 )
. pause ( 500 )
. clickFunction ( 'inputValue2 - transact (not payable)' , { types : 'uint256[3] _n, bytes8[4] _b8' , values : '[1,2,3], ["0x1234000000000000", "0x1234000000000000","0x1234000000000000","0x1234000000000000"]' } )
. clickFunction ( 'inputValue2 - transact (not payable)' , { types : 'uint256[3] _n, bytes8[4] _b8' , values : '[1,2,3], ["0x1234000000000000", "0x1234000000000000","0x1234000000000000","0x1234000000000000"]' } )
. testFunction ( '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f' , {
. testFunction ( '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f' , {
status : 'true Transaction mined and execution succeed' ,
status : 'true Transaction mined and execution succeed' ,
'transaction hash' : '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f' ,
'transaction hash' : '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f' ,
'decoded output' : {
'decoded output' : {
'0' : 'uint256[3]: _nret 1,2,3' ,
0 : 'uint256[3]: _nret 1,2,3' ,
'1' : 'bytes8[4]: _b8ret 0x1234000000000000,0x1234000000000000,0x1234000000000000,0x1234000000000000'
1 : 'bytes8[4]: _b8ret 0x1234000000000000,0x1234000000000000,0x1234000000000000,0x1234000000000000'
} ,
} ,
logs : [
logs : [
{
{
'from' : '0x8c1eD7e19abAa9f23c476dA86Dc1577F1Ef401f5' ,
from : '0x8c1eD7e19abAa9f23c476dA86Dc1577F1Ef401f5' ,
'topic' : '0xd30981760edbf605bda8689e945f622877f230c9a77cbfbd448aa4b7d8ac6e7f' ,
topic : '0xd30981760edbf605bda8689e945f622877f230c9a77cbfbd448aa4b7d8ac6e7f' ,
'event' : 'event1' ,
event : 'event1' ,
'args' : {
args : {
'0' : '-123' ,
0 : '-123' ,
'1' : '123' ,
1 : '123' ,
'2' : {
2 : {
"_isIndexed" : true ,
_isIndexed : true ,
'hash' : '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658'
hash : '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658'
} ,
} ,
'3' : '0x12340000' ,
3 : '0x12340000' ,
'4' : 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test '
4 : 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test '
}
}
}
}
]
]
@ -154,15 +154,21 @@ module.exports = {
// @TODO test: bytes8[3][] type as input
// @TODO test: bytes8[3][] type as input
const sources = [
const sources = [
{ 'browser/Untitled.sol' : { content : `
{
'browser/Untitled.sol' : {
content : `
contract TestContract { function f ( ) public returns ( uint ) { return 8 ; }
contract TestContract { function f ( ) public returns ( uint ) { return 8 ; }
function g ( ) public returns ( uint , string memory , bool , uint ) {
function g ( ) public returns ( uint , string memory , bool , uint ) {
uint payment = 345 ;
uint payment = 345 ;
bool payed = true ;
bool payed = true ;
string memory comment = "comment_comment_" ;
string memory comment = "comment_comment_" ;
uint month = 4 ;
uint month = 4 ;
return ( payment , comment , payed , month ) ; } } ` }},
return ( payment , comment , payed , month ) ; } } `
{ 'browser/returnValues.sol' : { content : `
}
} ,
{
'browser/returnValues.sol' : {
content : `
contract testReturnValues {
contract testReturnValues {
enum ActionChoices { GoLeft , GoRight , GoStraight , SitStill }
enum ActionChoices { GoLeft , GoRight , GoStraight , SitStill }
function retunValues1 ( ) public returns ( bool _b , uint _u , int _i , address _a ) {
function retunValues1 ( ) public returns ( bool _b , uint _u , int _i , address _a ) {
@ -192,8 +198,12 @@ const sources = [
a [ 2 ] = [ int ( 1 ) , 10 , - 5435 , 45 , - 7 ] ;
a [ 2 ] = [ int ( 1 ) , 10 , - 5435 , 45 , - 7 ] ;
_a1 = a ;
_a1 = a ;
}
}
} ` }},
} `
{ 'browser/inputValues.sol' : { content : `
}
} ,
{
'browser/inputValues.sol' : {
content : `
contract test {
contract test {
event event1 ( int _i , uint indexed _u , string indexed _str , bytes4 _b , string _notIndexed ) ;
event event1 ( int _i , uint indexed _u , string indexed _str , bytes4 _b , string _notIndexed ) ;
function inputValue1 ( uint _u , int _i , string memory _str ) public returns ( uint _uret , int _iret , string memory _strret ) {
function inputValue1 ( uint _u , int _i , string memory _str ) public returns ( uint _uret , int _iret , string memory _strret ) {
@ -206,11 +216,17 @@ const sources = [
_b8ret = _b8 ;
_b8ret = _b8 ;
emit event1 ( - 123 , 123 , "test" , hex "1234" , "test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test " ) ;
emit event1 ( - 123 , 123 , "test" , hex "1234" , "test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test " ) ;
}
}
} ` }},
} `
// https://github.com/ethereum/remix-project/issues/404
}
{ 'browser/eventFunctionInput.sol' : { content : `
} ,
// https://github.com/ethereum/remix-project/issues/404
{
'browser/eventFunctionInput.sol' : {
content : `
pragma solidity >= 0.7 . 0 ;
pragma solidity >= 0.7 . 0 ;
contract C {
contract C {
event Test ( function ( ) external ) ;
event Test ( function ( ) external ) ;
} ` }}
} `
}
}
]
]