Skip to content

Commit

Permalink
(fix) We can now apparently overload call() - previously the compiler…
Browse files Browse the repository at this point in the history
… complained at me for this, but it now seems fine!

(fix) Don't limit deployment gas.
  • Loading branch information
rrw-zilliqa committed Aug 30, 2024
1 parent 09bf0e0 commit 691b2a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ library ScillaConnector {
* @param tran_name The name of the function to call
* @param arg1 The first argument to the function
*/
function callu128(
function call(
address target,
string memory tran_name,
uint128 arg1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract ZRC2ERC20ProxyBurnable is ZRC2ERC20Proxy {
*/
function burn(uint256 value) public virtual {
uint128 value128 = value.toUint128();
zrc2_proxy.callu128("Burn", value128);
zrc2_proxy.call("Burn", value128);
}

/**
Expand Down
6 changes: 2 additions & 4 deletions contracts/experimental/ERC20ProxyForZRC2/tasks/deployProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ task("deployProxy", "deploy an ERC20 proxy for a ZRC2 contract")
console.log(`Deploying an ERC20 proxy for the ZRC-2 at ${zrc2Address}`);
// ZRC2 addresses frequently have bad checksums, hence toLowerCase().
const contract = await ethers.deployContract("ZRC2ERC20Proxy",
[zrc2Address.toLowerCase()],
{ gasLimit: 1_000_000 });
[zrc2Address.toLowerCase()]);
await contract.waitForDeployment();
const proxyAddress = await contract.getAddress();
console.log(`Complete. There is now an ERC20-compliant proxy at ${proxyAddress} for the ZRC-2 contract at ${zrc2Address}`);
Expand All @@ -23,8 +22,7 @@ task("deployProxyBurnable", "deploy a burnable ERC20 proxy for a ZRC2 contract")
console.log(`Deploying a burnable ERC20 proxy for the ZRC-2 at ${zrc2Address}`);
// ZRC2 addresses frequently have bad checksums, hence toLowerCase().
const contract = await ethers.deployContract("ZRC2ERC20ProxyBurnable",
[zrc2Address.toLowerCase()],
{ gasLimit: 1_000_000 });
[zrc2Address.toLowerCase()]);
await contract.waitForDeployment();
const proxyAddress = await contract.getAddress();
console.log(`Complete. There is now an ERC20-compliant proxy at ${proxyAddress} for the ZRC-2 contract at ${zrc2Address}`);
Expand Down

0 comments on commit 691b2a2

Please sign in to comment.