Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Use full type name of Address in SolCodeGen - fix naming collisions with solidity code

See merge request company-projects/Meadow!23
  • Loading branch information
zone117x committed Sep 28, 2018
2 parents 0ec1aa7 + 59db066 commit 1344126
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Meadow.SolCodeGen/CodeGenerators/ContractGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class {_contractName} : {typeof(BaseContract).FullName}
protected override string ContractBytecodeHash => CONTRACT_BYTECODE_HASH;
protected override string ContractBytecodeDeployedHash => CONTRACT_BYTECODE_DEPLOYED_HASH;
private {_contractName}({JsonRpcClientType} rpcClient, Address address, Address defaultFromAccount)
private {_contractName}({JsonRpcClientType} rpcClient, {typeof(Address).FullName} address, {typeof(Address).FullName} defaultFromAccount)
: base(rpcClient, address, defaultFromAccount)
{{
{typeof(EventLogUtil).FullName}.{nameof(EventLogUtil.RegisterDeployedContractEventTypes)}(
Expand All @@ -110,7 +110,7 @@ public class {_contractName} : {typeof(BaseContract).FullName}
}}
public static async Task<{_contractName}> At({JsonRpcClientType} rpcClient, Address address, Address? defaultFromAccount = null)
public static async Task<{_contractName}> At({JsonRpcClientType} rpcClient, {typeof(Address).FullName} address, {typeof(Address).FullName}? defaultFromAccount = null)
{{
defaultFromAccount = defaultFromAccount ?? (await rpcClient.Accounts())[0];
return new {_contractName}(rpcClient, address, defaultFromAccount.Value);
Expand Down Expand Up @@ -237,10 +237,10 @@ string GenerateConstructor(Abi constructorAbi)
public static async Task<{_contractName}> Deploy(
{inputConstructorArg}
{JsonRpcClientType} rpcClient,
TransactionParams transactionParams = null,
Address? defaultFromAccount = null)
{typeof(TransactionParams).FullName} transactionParams = null,
{typeof(Address).FullName}? defaultFromAccount = null)
{{
transactionParams = transactionParams ?? new TransactionParams();
transactionParams = transactionParams ?? new {typeof(TransactionParams).FullName}();
defaultFromAccount = defaultFromAccount ?? transactionParams.From ?? (await rpcClient.Accounts())[0];
transactionParams.From = transactionParams.From ?? defaultFromAccount;
Expand All @@ -255,8 +255,8 @@ string GenerateConstructor(Abi constructorAbi)
public static ContractDeployer<{_contractName}> New(
{inputConstructorArg}
{JsonRpcClientType} rpcClient,
TransactionParams transactionParams = null,
Address? defaultFromAccount = null)
{typeof(TransactionParams).FullName} transactionParams = null,
{typeof(Address).FullName}? defaultFromAccount = null)
{{
{encodedParamsLine}
Expand Down

0 comments on commit 1344126

Please sign in to comment.