forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-add tests for geth-test-ledger -fix small errors in GethTestLedger class Closes: hyperledger-cacti#2579 Depends on: hyperledger-cacti#2577 Signed-off-by: Tomasz Awramski <[email protected]>
- Loading branch information
Showing
5 changed files
with
144 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...actus-test-geth-ledger/src/test/typescript/solidity/simple-token-contract/SimpleToken.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pragma solidity ^0.5.1; | ||
|
||
contract SimpleStorage { | ||
|
||
event ValueChanged(string oldValue, string newValue); | ||
string public value; | ||
|
||
constructor(string memory _value) public { | ||
value = _value; | ||
} | ||
|
||
function setValue(string memory _value) public { | ||
emit ValueChanged(value, _value); | ||
value = _value; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...tus-test-geth-ledger/src/test/typescript/solidity/simple-token-contract/contractData.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"bytecode": "0x608060405234801561001057600080fd5b506040516105f13803806105f18339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b8382019150602082018581111561006957600080fd5b825186600182028301116401000000008211171561008657600080fd5b8083526020830192505050908051906020019080838360005b838110156100ba57808201518184015260208101905061009f565b50505050905090810190601f1680156100e75780820380516001836020036101000a031916815260200191505b50604052505050806000908051906020019061010492919061010b565b50506101b0565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061014c57805160ff191683800117855561017a565b8280016001018555821561017a579182015b8281111561017957825182559160200191906001019061015e565b5b509050610187919061018b565b5090565b6101ad91905b808211156101a9576000816000905550600101610191565b5090565b90565b610432806101bf6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633fa4f2451461003b57806393a09352146100be575b600080fd5b610043610179565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610177600480360360208110156100d457600080fd5b81019080803590602001906401000000008111156100f157600080fd5b82018360208201111561010357600080fd5b8035906020019184600183028401116401000000008311171561012557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610217565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561020f5780601f106101e45761010080835404028352916020019161020f565b820191906000526020600020905b8154815290600101906020018083116101f257829003601f168201915b505050505081565b7f239747dab7046e5d3c295d335f2759559f55344dadbfa668569bb8b0f11b5c106000826040518080602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156102c85780601f1061029d576101008083540402835291602001916102c8565b820191906000526020600020905b8154815290600101906020018083116102ab57829003601f168201915b5050838103825284818151815260200191508051906020019080838360005b838110156103025780820151818401526020810190506102e7565b50505050905090810190601f16801561032f5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18060009080519060200190610354929190610358565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061039957805160ff19168380011785556103c7565b828001600101855582156103c7579182015b828111156103c65782518255916020019190600101906103ab565b5b5090506103d491906103d8565b5090565b6103fa91905b808211156103f65760008160009055506001016103de565b5090565b9056fea265627a7a7231582008f91cf7a703f8030d4ebe4ae80d4aef0a75e295a64703c38f59fa04e9f0280d64736f6c63430005100032", | ||
"abi": [ | ||
{ | ||
"inputs": [ | ||
{ "internalType": "string", "name": "_value", "type": "string" } | ||
], | ||
"payable": false, | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "string", | ||
"name": "oldValue", | ||
"type": "string" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "string", | ||
"name": "newValue", | ||
"type": "string" | ||
} | ||
], | ||
"name": "ValueChanged", | ||
"type": "event" | ||
}, | ||
{ | ||
"constant": false, | ||
"inputs": [ | ||
{ "internalType": "string", "name": "_value", "type": "string" } | ||
], | ||
"name": "setValue", | ||
"outputs": [], | ||
"payable": false, | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"constant": true, | ||
"inputs": [], | ||
"name": "value", | ||
"outputs": [{ "internalType": "string", "name": "", "type": "string" }], | ||
"payable": false, | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters