This is a slow walkthrough of OpenAI tool calling using only raw API calls and PowerShell.
The point:
- No agent framework is required.
- No harness is required.
- The model does not execute your code.
- The model asks for a tool call.
| // SPDX-License-Identifier: UNLICENSED | |
| pragma solidity ^0.8.13; | |
| import "forge-std/Test.sol"; | |
| contract SheHateMe { | |
| receive() external payable {} | |
| function getImpl(uint8 x) public returns (address) { | |
| return address(this); |
| // SPDX-License-Identifier: MIT | |
| // by dennison@tally.xyz | |
| pragma solidity ^0.8.0; | |
| import "@openzeppelin/contracts/access/AccessControl.sol"; | |
| import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
| contract Roles is ERC1155, AccessControl { | |
| // errors | |
| error NoDuplicateRoles(); |
This is implemented by evmone in https://github.com/ethereum/evmone/commit/a236b9828f9ae1ac257d7c0cb56f654e3a45c7ea#diff-edccf78e9152726b4c97cee57b2b1433R104-R124
Stats about EVM executions are agregated by 1000 blocks.
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity ^0.8.0; | |
| contract ArithValue { | |
| uint number; | |
| constructor () { | |
| number = 100; | |
| } | |
| function setNumber(uint value) public { |