npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chainlink/evm-gauntlet-abstract

v1.0.1

Published

EVM Gauntlet Abstract Command

Downloads

101

Readme

Abstract Command EVM Gauntlet Package

This package will allow you to execute arbitrary contract functions with any inputs and list all the existing contract functions in Gauntlet EVM and any JSON ABI format files.

Execute arbitraty contract functions

Example using an existing contract in Gauntlet EVM

$ yarn gauntlet abstract:exec --contract=Storage --function=store --network=local --contractInput='{"num": "10"}' 0x5FbDB2315678afecb367f032d93F642f64180aa3
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:exec --contract=Storage --function=store --network=local '--contractInput={"num": "10"}' 0x5FbDB2315678afecb367f032d93F642f64180aa3
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
ℹ️   About to execute abstract(0x5FbDB2315678afecb367f032d93F642f64180aa3).store({"num":"10"})
user input {
  contract: 'Storage',
  function: 'store',
  sourceAbiPath: undefined,
  contractInput: [ [ 'num', '10' ] ]
}
contract input [ '10' ]
ℹ️   Operator address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
ℹ️   Contract address: 0x5FbDB2315678afecb367f032d93F642f64180aa3
⏳  Simulating transactions...
🤔  Continue? (Y / N)y
⏳  Sending transaction...
⏳  Waiting for tx confirmation at 0x95ea2d67f0a8ec6d0bef20d5c7b8fbc29105730d2459143abaeaf5fa17b86f19...
✅  Execution finished at transaction: 0x95ea2d67f0a8ec6d0bef20d5c7b8fbc29105730d2459143abaeaf5fa17b86f19
✨  Done in 12.34s.

Example using a contract in a JSON ABI format file

$ yarn gauntlet abstract:exec --sourceAbi=packages/evm-gauntlet-example/artifacts/evm/Storage.json --function=store --network=local --contractInput='{"num": "10"}' 0x5FbDB2315678afecb367f032d93F642f64180aa3
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:exec --sourceAbi=packages/evm-gauntlet-example/artifacts/evm/Storage.json --function=store --network=local '--contractInput={"num": "10"}' 0x5FbDB2315678afecb367f032d93F642f64180aa3
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
input.contractInput:  [ [ 'num', '10' ] ]
ℹ️   About to execute abstract(0x5FbDB2315678afecb367f032d93F642f64180aa3).store({"num":"10"})
user input {
  contract: undefined,
  function: 'store',
  sourceAbiPath: 'packages/evm-gauntlet-example/artifacts/evm/Storage.json',
  contractInput: [ [ 'num', '10' ] ]
}
contract input [ '10' ]
ℹ️   Operator address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
ℹ️   Contract address: 0x5FbDB2315678afecb367f032d93F642f64180aa3
⏳  Simulating transactions...
🤔  Continue? (Y / N)y
⏳  Sending transaction...
⏳  Waiting for tx confirmation at 0x9f29afbe4b76a03f4f9eb9d3e34b00253c39e1bd01f730144cfaef094a4ac0f6...
✅  Execution finished at transaction: 0x9f29afbe4b76a03f4f9eb9d3e34b00253c39e1bd01f730144cfaef094a4ac0f6
✨  Done in 28.35s.

List contracts and functions

Listing contracts and functions existing in Gauntlet EVM

# list contracts
$ yarn gauntlet abstract:list
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:list
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
Contract                            # of functions
ARM                                 18          
PriceRegistry                       18          
Router                              14          
LockReleaseTokenPool                15          
EVM2EVMOnRamp                       35          
EVM2EVMOffRamp                      33          
CommitStore                         23          
AggregateRateLimiter                9           
OCR2Base                            9           
AccessControlledOffchainAggregator  46          
SimpleWriteAccessController         9           
Flags                               20          
Owned                               3           
EACAggregatorProxy                  23          
OpCodes                             4           
Storage                             2           
VerifierProxy                       11          
Verifier                            11          
GnosisSafe                          31          
GnosisSafeProxyFactory              6           
MultiSend                           1           
ConfirmedTransactionModule          12          
LinkToken                           15         
# list functions inside a contract
$ yarn gauntlet abstract:list --contract=AccessControlledOffchainAggregator
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:list --contract=AccessControlledOffchainAggregator
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
Contract                            function                                                                                    
AccessControlledOffchainAggregator  function acceptOwnership()                                                                
AccessControlledOffchainAggregator  function addAccess()                                                             
AccessControlledOffchainAggregator  function enableAccessCheck()                                                              
AccessControlledOffchainAggregator  function getAnswer(uint256) view returns (int256)                                         
AccessControlledOffchainAggregator  function getBilling() view returns (uint32, uint32, uint32, uint32, uint32)               
AccessControlledOffchainAggregator  function getLinkToken() view returns (address)                                            
AccessControlledOffchainAggregator  function getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)     
AccessControlledOffchainAggregator  function getTimestamp(uint256) view returns (uint256)                                     
AccessControlledOffchainAggregator  function hasAccess(address,bytes) view returns (bool)                                     
AccessControlledOffchainAggregator  function latestAnswer() view returns (int256)                                             
AccessControlledOffchainAggregator  function latestConfigDetails() view returns (uint32, uint32, bytes16)                     
# ...
✨  Done in 5.54s.
# list a specific function in detail
$ yarn gauntlet abstract:list --contract=AccessControlledOffchainAggregator --function=latestTransmissionDetails
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:list --contract=AccessControlledOffchainAggregator --function=latestTransmissionDetails
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
function                                                                                                                                          
function latestTransmissionDetails() view returns (bytes16 configDigest, uint32 epoch, uint8 round, int192 latestAnswer, uint64 latestTimestamp)
✨  Done in 5.47s.

Listing contracts and functions in a JSON ABI format file

yarn gauntlet abstract:list --sourceAbi=packages/evm-gauntlet-example/artifacts/evm/Storage.json
yarn run v1.22.19
$ yarn build && node ./packages/evm-gauntlet-cli/dist/index.js abstract:list --sourceAbi=packages/evm-gauntlet-example/artifacts/evm/Storage.json
$ yarn clean && tsc -b ./tsconfig.json
$ tsc -b --clean ./tsconfig.json
🧤  gauntlet 0.3.1
function                                    
function retrieve() view returns (uint256)
function store(uint256)                   
✨  Done in 5.45s.