|
|
@ -266,7 +266,7 @@ const sources = [ |
|
|
|
'blah.sol': { |
|
|
|
'blah.sol': { |
|
|
|
content: ` |
|
|
|
content: ` |
|
|
|
pragma solidity >=0.7.0 <0.9.0; |
|
|
|
pragma solidity >=0.7.0 <0.9.0; |
|
|
|
|
|
|
|
|
|
|
|
contract Kickstarter { |
|
|
|
contract Kickstarter { |
|
|
|
|
|
|
|
|
|
|
|
enum State { Started, Completed } |
|
|
|
enum State { Started, Completed } |
|
|
@ -276,9 +276,9 @@ const sources = [ |
|
|
|
string name; |
|
|
|
string name; |
|
|
|
uint goal; |
|
|
|
uint goal; |
|
|
|
State state; |
|
|
|
State state; |
|
|
|
}
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Project[] public projects;
|
|
|
|
Project[] public projects; |
|
|
|
|
|
|
|
|
|
|
|
constructor() { |
|
|
|
constructor() { |
|
|
|
|
|
|
|
|
|
|
@ -291,7 +291,7 @@ const sources = [ |
|
|
|
project.state = State.Started; |
|
|
|
project.state = State.Started; |
|
|
|
project.goal = goal; |
|
|
|
project.goal = goal; |
|
|
|
} |
|
|
|
} |
|
|
|
}
|
|
|
|
} |
|
|
|
` |
|
|
|
` |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -309,12 +309,12 @@ const sources = [ |
|
|
|
function test1 (bytes calldata userData) external returns (bytes memory, bytes32, bytes32, uint) { |
|
|
|
function test1 (bytes calldata userData) external returns (bytes memory, bytes32, bytes32, uint) { |
|
|
|
bytes32 idAsk = abi.decode(userData[:33], (bytes32)); |
|
|
|
bytes32 idAsk = abi.decode(userData[:33], (bytes32)); |
|
|
|
bytes32 idOffer = abi.decode(userData[32:64], (bytes32)); |
|
|
|
bytes32 idOffer = abi.decode(userData[32:64], (bytes32)); |
|
|
|
|
|
|
|
|
|
|
|
bytes memory ro = abi.encodePacked(msg.sender, msg.sender, idAsk, idOffer); |
|
|
|
bytes memory ro = abi.encodePacked(msg.sender, msg.sender, idAsk, idOffer); |
|
|
|
return (ro, idAsk, idOffer, userData.length); |
|
|
|
return (ro, idAsk, idOffer, userData.length); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testgp (bytes calldata userData) external returns (bytes4) { |
|
|
|
function testgp (bytes calldata userData) external returns (bytes4) { |
|
|
|
return abi.decode(userData[:4], (bytes4)); |
|
|
|
return abi.decode(userData[:4], (bytes4)); |
|
|
|
} |
|
|
|
} |
|
|
@ -341,9 +341,9 @@ const sources = [ |
|
|
|
'withGeneratedSources.sol': { |
|
|
|
'withGeneratedSources.sol': { |
|
|
|
content: ` |
|
|
|
content: ` |
|
|
|
// SPDX-License-Identifier: GPL-3.0
|
|
|
|
// SPDX-License-Identifier: GPL-3.0
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
pragma experimental ABIEncoderV2; |
|
|
|
contract A {
|
|
|
|
contract A { |
|
|
|
function f(uint[] memory) public returns (uint256) { }
|
|
|
|
function f(uint[] memory) public returns (uint256) { } |
|
|
|
} |
|
|
|
} |
|
|
|
` |
|
|
|
` |
|
|
|
} |
|
|
|
} |
|
|
@ -372,7 +372,7 @@ const sources = [ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @dev Return value
|
|
|
|
* @dev Return value |
|
|
|
* @return value of 'number' |
|
|
|
* @return value of 'number' |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function retrieve() public view returns (uint256){ |
|
|
|
function retrieve() public view returns (uint256){ |
|
|
@ -393,14 +393,14 @@ const sources = [ |
|
|
|
function callA() public { |
|
|
|
function callA() public { |
|
|
|
p = 123; |
|
|
|
p = 123; |
|
|
|
try b.callB() { |
|
|
|
try b.callB() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (bytes memory reason) { |
|
|
|
catch (bytes memory reason) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
contract B { |
|
|
|
contract B { |
|
|
|
C c; |
|
|
|
C c; |
|
|
|
uint p; |
|
|
|
uint p; |
|
|
@ -413,7 +413,7 @@ const sources = [ |
|
|
|
c.callC(); |
|
|
|
c.callC(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
contract C { |
|
|
|
contract C { |
|
|
|
uint p; |
|
|
|
uint p; |
|
|
|
function callC() public { |
|
|
|
function callC() public { |
|
|
@ -498,7 +498,7 @@ const jsGetTrace = `(async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
})()` |
|
|
|
})()` |
|
|
|
|
|
|
|
|
|
|
|
const jsDebug = `(async () => {
|
|
|
|
const jsDebug = `(async () => {
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const result = await remix.call('debugger', 'debug', '0x65f0813753462414f9a91f0aabea946188327995f54b893b63a8d7ff186cfca3') |
|
|
|
const result = await remix.call('debugger', 'debug', '0x65f0813753462414f9a91f0aabea946188327995f54b893b63a8d7ff186cfca3') |
|
|
|
console.log('result ', result) |
|
|
|
console.log('result ', result) |
|
|
|