public DeploymentMessageEncodingService(string defaultAddressFrom = null) { DeployContractTransactionBuilder = new DeployContractTransactionBuilder(); ConstructorCallDecoder = new ConstructorCallDecoder(); ByteCodeSwarmExtractor = new ByteCodeSwarmExtractor(); DefaultAddressFrom = defaultAddressFrom; }
public TContractDeployment DecodeInput(TContractDeployment contractMessage, string data) { if (ByteCodeSwarmExtractor.HasSwarmAddress(data)) { return(ConstructorCallDecoder.DecodeConstructorParameters <TContractDeployment>(contractMessage, data)); } else // fallback to "our" bytecode.. { return(ConstructorCallDecoder.DecodeConstructorParameters <TContractDeployment>(contractMessage, contractMessage.ByteCode, data)); } }