<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 17:07:27 May 06, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

address type sent as input, but when returned as output shows contract address

ijohanneijohanne Member Posts: 3
edited May 2015 in Mix
Hi,

When I try to input a variable of type address, and return it - the returned output is always the contracts address (I'm trying this with mix). However if I use an uint8 - it's properly returned as expected.

I've used the following contract to test with - to isolate the issue:

contract ContractTest {
	address owner;
	
	function ContractTest() {
		owner = msg.sender;
	}
	
	function returnMeAddress(address input) returns (address) {
		return input;
	}
	
	function returnMeInt(uint8 input ) returns (uint8) {
		return input;
	}
	
	function kill() {
		if(msg.sender == owner ) suicide(owner);
	}
}
Anyone who knows if this is a bug in mix, or perhaps if not to use address as type (and if so what instead?)

/Ian
Post edited by StephanTual on

Comments

Sign In or Register to comment.