2.0.1 • Published 1 year ago

@bonsaiswapv3/core v2.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
1 year ago

Bonsaiswap V3

This repository contains the core smart contracts for the Bonsaiswap V3 Protocol.

Local deployment

In order to deploy this code to a local testnet, you should install the npm package @bonsaiswap/v3-core and import the factory bytecode located at @bonsaiswap/v3-core/artifacts/contracts/BonsaiswapV3Factory.sol/BonsaiswapV3Factory.json. For example:

import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@bonsaiswap/v3-core/artifacts/contracts/BonsaiswapV3Factory.sol/BonsaiswapV3Factory.json'

// deploy the bytecode

This will ensure that you are testing against the same bytecode that is deployed to mainnet and public testnets, and all Bonsaiswap code will correctly interoperate with your local deployment.

Using solidity interfaces

The Bonsaiswap v3 interfaces are available for import into solidity smart contracts via the npm artifact @bonsaiswap/v3-core, e.g.:

import '@bonasiswap/v3-core/contracts/interfaces/IBonsaiswapV3Pool.sol';

contract MyContract {
  IBonsaiswapV3Pool pool;

  function doSomethingWithPool() {
    // pool.swap(...);
  }
}

Other Exceptions

  • contracts/libraries/FullMath.sol is licensed under MIT (as indicated in its SPDX header), see contracts/libraries/LICENSE_MIT
  • All files in contracts/test remain unlicensed (as indicated in their SPDX headers).
abort-controllerabstract-leveldownadm-zipaes-jsagent-baseacorn-jsxansi-regexansi-escapesansi-colorsansi-stylesanymatchajvacornacceptsantlr4argarr-diffarr-flattenarr-unionargparsearray-backarray-flattenasn1array-uniqueasyncasync-eventemitterassign-symbolsassert-plusassertion-erroratobasync-limiteraws4aws-sign2astral-regexbabel-coreast-parentsasn1.jsbabel-code-framebabel-helper-builder-binary-assignment-operator-visitorbabel-helper-call-delegatebabel-generatorbabel-helper-function-namebabel-helper-get-function-aritybabel-helper-define-mapbabel-helper-optimise-call-expressionasynckitbabel-helper-replace-supersbabel-helper-hoist-variablesbabel-helper-explode-assignable-expressionbabel-helper-remap-async-to-generatorbabel-plugin-syntax-exponentiation-operatorbabel-helpersbabel-messagesbabel-plugin-syntax-trailing-function-commasbabel-plugin-check-es2015-constantsbabel-plugin-syntax-async-functionsbabel-plugin-transform-es2015-arrow-functionsbabel-plugin-transform-es2015-block-scoped-functionsbabel-plugin-transform-es2015-classesbabel-helper-regexbabel-plugin-transform-es2015-destructuringbabel-plugin-transform-async-to-generatorbabel-plugin-transform-es2015-function-namebabel-plugin-transform-es2015-for-ofbabel-plugin-transform-es2015-duplicate-keysbabel-plugin-transform-es2015-block-scopingbabel-plugin-transform-es2015-literalsbabel-plugin-transform-es2015-computed-propertiesbabel-plugin-transform-es2015-modules-systemjsbabel-plugin-transform-es2015-modules-commonjsbabel-plugin-transform-es2015-object-superbabel-plugin-transform-es2015-shorthand-propertiesbabel-plugin-transform-es2015-spreadbabel-plugin-transform-es2015-modules-amdbabel-plugin-transform-es2015-sticky-regexbabel-plugin-transform-es2015-modules-umdbabel-plugin-transform-es2015-unicode-regexbabel-plugin-transform-es2015-parametersbabel-plugin-transform-exponentiation-operatorbabel-plugin-transform-es2015-typeof-symbolbabel-preset-envbabel-plugin-transform-es2015-template-literalsbabel-plugin-transform-regeneratorbabel-plugin-transform-strict-modebabel-registerbabel-runtimebabel-templatebabel-traversebabel-typesbabelifybackoffbase64-jsbech32basebignumber.jsbabylonblakejsbip39balanced-matchbase-xbn.jsbinary-extensionsbcrypt-pbkdfbluebirdbody-parserbrowserify-aesbrace-expansionbrorandbrowser-stdoutbracesbs58checkbrowserify-desbrowserify-rsabs58bufferbrowserslistbytesbserbuffer-to-arraybufferbrowserify-signbuffer-frombuffer-xorbufferutilbytewise-corecacheable-requestcachedownbrowserify-ciphercache-basecaller-callsitecall-bindcaller-pathcamelcasecallsitescborchalkcapture-exitbytewisecaniuse-litecaselesschardetci-infocheckpoint-storecidschokidarchownrcheck-errorcipher-baseclass-iscloneclass-utilscli-cursorcollect-v8-coveragecolor-convertcli-widthcliuicollection-visitclone-responsecommand-line-argscontent-hashconcat-streamcombined-streamcode-point-atcomponent-emittercommand-existscommandercookiecontent-dispositioncontent-typecolor-namecookie-signatureconcat-mapcore-js-pureconvert-source-mapcookiejarcrc-32copy-descriptorcore-util-iscore-jscorscreate-hmaccreate-hashcross-spawncrypto-browserifycreate-ecdhcross-fetchcosmiconfigdebugddashdashdecode-uri-componentdecamelizedecompress-responsedeep-isdefer-to-connectdeep-equaldeep-eqldefine-propertiesdeferred-leveldowndefine-propertydiffdiff-sequencesdestroydelayed-streamdepddoctrinedetect-indentdiffie-hellmandom-walkduplexer3ecc-jsbndotignoreee-firstdir-to-objectelectron-to-chromiumellipticenquirerencoding-downencodeurlemoji-regexencodingenv-pathserror-exend-of-streamdefineddes.jses-abstracterrnoescape-string-regexpes6-iteratores-to-primitiveeslintescape-htmlescaladees5-exteslint-utilsespreeesqueryesprimaeslint-scopeesrecurseetagesutilseth-block-trackereslint-visitor-keyses6-symboleth-libeth-ens-namehashethereum-bloom-filterseth-json-rpc-infuraeth-queryeth-json-rpc-middlewareethereum-cryptographyeth-sig-utilethashjsethereumjs-abiethereumjs-blockethereumjs-txethereumjs-commoneth-tx-summaryethereumjs-utilethereumjs-vmestraverseethereumjs-walletethjs-unitethjs-utilevent-target-shimeventemitter3eventsethereumjs-accountexit-on-epipeethereumjs-blockchainexpressexpectethereum-commonexec-shexecaevp_bytestokeyexpand-bracketsextendextexternal-editorfake-merkle-patricia-treeextend-shallowextsprintffb-watchmanfast-difffast-deep-equalfast-json-stable-stringifyfinalhandlerfind-package-jsonfiguresfile-entry-cachefast-levenshteinfill-rangeextglobfind-upfind-replacefetch-ponyfillflatflow-stoplightfind-yarn-workspace-rootflattedform-datafor-infp-tsfollow-redirectsfor-eachfs-extraforever-agentforwardedflat-cachefragment-cacheganache-corefseventsget-streamfreshfunction-bindfs.realpathfs-minipassget-caller-filefunctional-red-black-treeget-func-nameglobgotget-intrinsicgraceful-fsget-valuegetpassglobalsglob-parentglobalhashar-schemagrowlhar-validatorhas-ansihas-flaghash.jshas-symbol-support-xhas-to-string-tag-xhas-bigintshas-symbolshas-valuehash-basehosted-git-infohas-valuesheaphttp-errorshehttps-proxy-agenticonv-liteieee754home-or-tmphttp-cache-semanticshttp-httpsimmediateimmutablehmac-drbgimport-freshhttp-signatureinquirerignoreinflightinheritsio-tsidna-uts46-hxinvariantipaddr.jsimurmurhashinvert-kvis-accessor-descriptoris-arrayishis-argumentsis-bufferis-binary-pathis-bigintis-boolean-objectis-ciis-core-moduleis-data-descriptoris-descriptoris-callableis-date-objectis-extglobis-finiteis-fnis-extendableis-directoryis-fullwidth-code-pointis-globis-functionis-hex-prefixedis-negative-zerois-plain-objis-numberis-objectis-plain-objectis-retry-allowedis-number-objectis-stringis-urlis-symbolis-regexis-typedarrayis-utf8is-streamis-windowsisarrayjest-diffisexeisobjectjest-get-typeisstreamjest-matcher-utilsisurljest-pnp-resolverjest-resolvejest-snapshotjest-message-utiljest-serializerjs-sha3jest-workerjest-haste-mapjest-regex-utiljest-utiljsescjsbnjs-tokensjs-yamljson-parse-better-errorsjson-bufferjson-parse-even-better-errorsjson-rpc-errorjson-schemajson-rpc-enginejson-rpc-random-idjson-schema-traversejson-stable-stringifyjson-stringify-safekeccakjson-stable-stringify-without-jsonifyjson5keyvjsprimjsonfilejsonifyklawlevel-memklaw-synclcidkind-oflevel-sublevellevel-packagerlevel-errorslevel-postlevel-iterator-streamleveluplevel-supportslodashlevel-concat-iteratorlevel-codeclevnlocate-pathload-json-filelodash.assignlevel-wslines-and-columnslru_maplru-cacheltgtlog-symbolsloopermcl-wasmmake-errormakeerrormemdownlowercase-keysmerge-streammap-cachemap-visitloose-envifymerkle-patricia-treemicromatchmemorystreammiller-rabinmedia-typermd5.jsmime-typesmerge-descriptorsmime-dbmimeminimalistic-assertmethodsmin-documentmimic-fnminimistminimatchmkdirpmimic-responsemnemonistminipassminizlibminimalistic-crypto-utilsmock-fsmixin-deepmsmultibasemute-streammkdirp-promisenatural-comparenano-json-stream-parsermultihashesmulticodecnanomatchnode-fetchnice-trynegotiatornode-gyp-buildnode-addon-apinext-ticknode-int64node-environment-flagsnormalize-package-datanofilternumber-to-bnnormalize-pathnormalize-urlnpm-run-pathoauth-signobject-assignobject-isobject-visitnumber-is-nanobliteratorobject-keysobject-copyobject-inspectobject.getownpropertydescriptorsobject.pickobject.assignonceon-finishedoptionatoronetimeos-homediros-localep-cancelablep-limitoboep-tryos-tmpdirp-finallyparse-asn1p-locateparse-jsonparent-modulepatch-packagepascalcasep-timeoutparseurlpath-existsparse-headerspath-is-absolutepath-is-insidepath-browserifypath-keypath-parsepath-typepbkdf2pathvalpifypicomatchpostinstall-postinstallperformance-nowpinkiepinkie-promisepath-to-regexppretty-formatprecondprintjprepend-httpposix-character-classesprelude-lsprocessprettier-linter-helpersprivateprocess-nextick-argspromise-to-callbackprrproxy-addrpslpull-levelpull-catprogresspublic-encryptpull-pushablepseudomappull-deferpull-streampumppull-windowpunycodeqsquerystringpull-liverandombytesreact-isread-pkgquery-stringread-pkg-upraw-bodyreadable-streamrandomfillrange-parserregeneratereaddirpregexp.prototype.flagsregenerator-transformregenerator-runtimeregexppregex-notregjsgenregexpu-corerepeat-elementregjsparserrepeat-stringrepeatingresolve-fromrequestremove-trailing-separatorrequire-directoryresolve-urlresolverequire-main-filenamerequire-from-stringretrimrafresponselikerustbn.jsrestore-cursorresumerrsvpsafe-bufferrun-asyncrxjssafe-regexsafer-buffersaneripemd160secp256k1scrypt-jsrlpseedrandomsemverscryptsysafe-event-emittersemaphore-async-awaitsemaphoreset-blockingsetimmediateserve-staticsendset-immediate-shimservifyset-valueslashsha.jsshebang-regexshebang-commandsolcsetprototypeofsignal-exitsimple-getsnapdragonsimple-concatslice-ansisource-map-supportsnapdragon-utilsnapdragon-nodesource-mapsource-map-resolvesource-map-urlsolidity-comments-extractorspdx-expression-parsesplit-stringsshpkstack-utilsspdx-correctstacktrace-parsersprintf-jsspdx-exceptionsspdx-license-idsstatusesstatic-extendstream-to-pull-streamstrict-uri-encodestrip-ansistring-widthstring_decoderstring.prototype.trimstartstring.prototype.trimendstrip-bomswarm-jssupports-colorstrip-json-commentsstring.prototype.trimstrip-hex-prefixstrip-eoftapetabletext-tabletestrpctartmptest-valueto-fast-propertiesthroughthrough2timed-outtmplto-object-pathtrue-case-pathts-essentialstoidentifierto-readable-streamto-regex-rangeto-regextsorttweetnacltweetnacl-utiltrim-righttype-festtslibtough-cookietunnel-agenttypetype-checktype-detecttypedarraytypedarray-to-buffertypewiselitetypewisetypewise-coretypicalunormunpipeunderscoreultronunion-valuetype-isunset-valueurluniversalifyuri-jsurixunbox-primitiveuseurl-parse-laxutf8url-set-queryutil.promisifyutil-deprecateutf-8-validateurl-to-optionswalkerutils-mergeuuidweb3web3-bzzvalidate-npm-package-licenseweb3-core-helpersweb3-coreweb3-core-promieventweb3-core-requestmanagerweb3-core-subscriptionsweb3-ethweb3-eth-abiweb3-core-methodweb3-eth-contractweb3-eth-accountsweb3-eth-ibanweb3-eth-personalweb3-eth-ensweb3-provider-enginevaryweb3-netweb3-shhweb3-utilsvarintverrorwebsocketweb3-providers-httpweb3-providers-ipcweb3-providers-wswhich-modulewhich-boxed-primitivewswide-alignwhichwhatwg-fetchword-wrapwindow-sizewrappyxhrwrap-ansixhr-requestwritexhr-request-promisextendyargs-parsery18nyaetiyargsynyargs-unparseryallistxhr2-cookies
2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago