imanrep / swiftabigen Goto Github PK
View Code? Open in Web Editor NEWConvert EVM Contract ABI from json to swift file
Convert EVM Contract ABI from json to swift file
Hi, Thank you very much for this package, this works good with Web3. Swift but only works for function methods. The package doesn't generate wrapper for event type as the explicitly has put on condition to generate the swift wrapper only for function.
// if(data.name == "WETH") {
if(data.type == 'function') {
if(!data.outputs[0]) return
if(!data.stateMutability == "nonpayable") return
const returnType = handleOutput(data.outputs)
call.push(contractCall(name, data.name, returnType, handleInput(data.inputs), data.stateMutability == "view"))
totalFunction.push(defaultProtocolFunction(data.name, returnType, handleInput(data.inputs), data.stateMutability == "view"))
if(data.stateMutability == "view") {
totalPublicFunction.push(defaultPublicFunction(name, data.name, returnType, handleInput(data.inputs)))
}else {
totalPublicFunction.push(defaultPublicPayableFunction(name, data.name, handleInput(data.inputs)))
}
if(data.stateMutability == "view") totalExtensionFunction.push(defaultExtensionFunction(data.name, returnType, handleInput(data.inputs)))
if(data.stateMutability == "view") totaldefaultFunction.push(defaultResponse(data.name, returnType))
totalFunctionX.push(handleInputFunctionResponse(data.name, handleInput(data.inputs)))
// }
}
})
Can any help to do the same for event type contract method too?
That would be really appreciated :) .
Thanks.
https://docs.soliditylang.org/en/latest/control-structures.html#assignment
When generating boilerplate for XENCrypto it uses a tuple as one of the types
.
Since tuple isn't supported by the parser, generating the ABI fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.