Skip to content

Commit 2855f4a

Browse files
authored
Merge pull request #13275 from Shiva-Sai-ssb/fixRemove
Remove deprecated Kovan links from tutorial [Fixes #10383]
2 parents 2f1741c + a4f6abd commit 2855f4a

File tree

1 file changed

+0
-27
lines changed
  • public/content/developers/tutorials/short-abi

1 file changed

+0
-27
lines changed

public/content/developers/tutorials/short-abi/index.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ The vast majority of transactions access a contract from an externally-owned acc
5151
Most contracts are written in Solidity and interpret their data field per [the application binary interface (ABI)](https://docs.soliditylang.org/en/latest/abi-spec.html#formal-specification-of-the-encoding).
5252

5353
However, the ABI was designed for L1, where a byte of calldata costs approximately the same as four arithmetic operations, not L2 where a byte of calldata costs more than a thousand arithmetic operations.
54-
For example, [here is an ERC-20 transfer transaction](https://kovan-optimistic.etherscan.io/tx/0x7ce4c144ebfce157b4de99d8ad53a352ae91b57b3fa06d8a1c79439df6bfa998).
5554
The calldata is divided like this:
5655

5756
| Section | Length | Bytes | Wasted bytes | Wasted gas | Necessary bytes | Necessary gas |
@@ -98,8 +97,6 @@ It would make a production ERC-20 contract useless, but it makes life easier whe
9897
} // function faucet
9998
```
10099

101-
[You can see an example of this contract being deployed here](https://kovan-optimistic.etherscan.io/address/0x950c753c0edbde44a74d3793db738a318e9c8ce8).
102-
103100
### CalldataInterpreter.sol {#calldatainterpreter-sol}
104101

105102
[This is the contract that transactions are supposed to call with shorter calldata](https://github.com/qbzzt/ethereum.org-20220330-shortABI/blob/master/contracts/CalldataInterpreter.sol).
@@ -368,17 +365,6 @@ Create a transfer transaction. The first byte is "0x02", followed by the destina
368365
}) // describe
369366
```
370367

371-
### Example {#example}
372-
373-
If you want to see these files in action without running them yourself, follow these links:
374-
375-
1. [Deployment of `OrisUselessToken`](https://kovan-optimistic.etherscan.io/tx/1410744) to [address `0x950c753c0edbde44a74d3793db738a318e9c8ce8`](https://kovan-optimistic.etherscan.io/address/0x950c753c0edbde44a74d3793db738a318e9c8ce8).
376-
2. [Deployment of `CalldataInterpreter`](https://kovan-optimistic.etherscan.io/tx/1410745) to [address `0x16617fea670aefe3b9051096c0eb4aeb4b3a5f55`](https://kovan-optimistic.etherscan.io/address/0x16617fea670aefe3b9051096c0eb4aeb4b3a5f55).
377-
3. [Call to `faucet()`](https://kovan-optimistic.etherscan.io/tx/1410746).
378-
4. [Call to `OrisUselessToken.approve()`](https://kovan-optimistic.etherscan.io/tx/1410747).
379-
This call has to go directly to the token contract because the processing relies on `msg.sender`.
380-
5. [Call to `transfer()`](https://kovan-optimistic.etherscan.io/tx/1410748).
381-
382368
## Reducing the cost when you do control the destination contract {#reducing-the-cost-when-you-do-control-the-destination-contract}
383369

384370
If you do have control over the destination contract you can create functions that bypass the `msg.sender` checks because they trust the calldata interpreter.
@@ -588,19 +574,6 @@ expect(await token.balanceOf(destAddr2)).to.equal(255)
588574
Test the two new functions.
589575
Note that `transferFromTx` requires two address parameters: the giver of the allowance and the receiver.
590576

591-
### Example {#example-2}
592-
593-
If you want to see these files in action without running them yourself, follow these links:
594-
595-
1. [Deployment of `OrisUselessToken-2`](https://kovan-optimistic.etherscan.io/tx/1475397) at address [`0xb47c1f550d8af70b339970c673bbdb2594011696`](https://kovan-optimistic.etherscan.io/address/0xb47c1f550d8af70b339970c673bbdb2594011696).
596-
2. [Deployment of `CalldataInterpreter`](https://kovan-optimistic.etherscan.io/tx/1475400) at address [`0x0dccfd03e3aaba2f8c4ea4008487fd0380815892`](https://kovan-optimistic.etherscan.io/address/0x0dccfd03e3aaba2f8c4ea4008487fd0380815892).
597-
3. [Call to `setProxy()`](https://kovan-optimistic.etherscan.io/tx/1475402).
598-
4. [Call to `faucet()`](https://kovan-optimistic.etherscan.io/tx/1475409).
599-
5. [Call to `transferProxy()`](https://kovan-optimistic.etherscan.io/tx/1475416).
600-
6. [Call to `approveProxy()`](https://kovan-optimistic.etherscan.io/tx/1475419).
601-
7. [Call to `transferFromProxy()`](https://kovan-optimistic.etherscan.io/tx/1475421).
602-
Note that this call comes from a different address than the other ones, `poorSigner` instead of `signer`.
603-
604577
## Conclusion {#conclusion}
605578

606579
Both [Optimism](https://medium.com/ethereum-optimism/the-road-to-sub-dollar-transactions-part-2-compression-edition-6bb2890e3e92) and [Arbitrum](https://developer.offchainlabs.com/docs/special_features) are looking for ways to reduce the size of the calldata written to L1 and therefore the cost of transactions.

0 commit comments

Comments
 (0)