Skip to content

Instantly share code, notes, and snippets.

sequenceDiagram
    title Agoric user swaps via Zoe offer
    box Red Agoric:
    actor au as AgoricUser
    participant sa as SwapAnything
    end
    box Purple Osmosis:
    participant cs as CrosschainSwaps
 end
@Jorge-Lopes
Jorge-Lopes / 00_considerations_README.md
Last active April 24, 2025 17:16
Scripts and configuration files required for Agoric Osmosis multi chain environment

starship config.yaml

The differences between the original and the new config.yaml are:

  • the image being used for osmosis chain

    • the ORIGINAL use the osmosis 25.0.0 from starship registry lopesbp/starship-osmosis:1.0.0
    • the NEW uses an image built using the Dockerfile present on this gist with the osmolabs/osmosis:25.0.1-alpine base image:
      lopesbp/starship-osmosis:1.0.0
  • log level for osmosis chain

@Jorge-Lopes
Jorge-Lopes / helpers.js
Last active March 12, 2025 16:06
Script for update ProvisionPool governed parameter
import '@endo/init';
import { agops, executeOffer, makeAgd } from '@agoric/synthetic-chain';
import { makeSmartWalletKit } from '@agoric/client-utils';
import {
boardSlottingMarshaller,
makeBoardRemote,
} from '@agoric/internal/src/marshal.js';
import { execFileSync } from 'child_process';
export const makeGovernanceDriver = async (fetch, networkConfig) => {
@Jorge-Lopes
Jorge-Lopes / logs.sh
Created January 8, 2025 16:51
Import agoric package in core-eval
$ /Users/jorgelopes/Projects/Agoric/agoric-sdk/node_modules/.bin/agoric run packages/builders/scripts/vats/terminate-kread-instance.js
agoric: run: running /Users/jorgelopes/Projects/Agoric/agoric-sdk/packages/builders/scripts/vats/terminate-kread-instance.js
agoric: run: Deploy script will run with Node.js ESM
agoric: (TypeError#1)
TypeError#1: Failed to load module "./scripts/vats/terminate-kread-instance.js" in package "file:///Users/jorgelopes/Projects/Agoric/agoric-sdk/packages/builders/" (1 underlying failures: Cannot find external module "@agoric/deploy-script-support" in package file:///Users/jorgelopes/Projects/Agoric/agoric-sdk/packages/builders/
at throwAggregateError (file:///Users/jorgelopes/Projects/Agoric/agoric-sdk/node_modules/ses/src/module-load.js:557:11)
at load (file:///Users/jorgelopes/Projects/Agoric/agoric-sdk/node_modules/ses/src/module-load.js:605:3)
at async digestFromMap (file:///Users/jorgelopes/Projects/Agoric/agoric-sdk/node_modules/@endo/compartment-mapper/src/archive-lit
@Jorge-Lopes
Jorge-Lopes / logs.sh
Created December 4, 2024 19:27
Error: bundle ${id} not loaded
jorgelopes@Jorges-MacBook-Pro a3p-integration % yarn test -m acceptance
WARN ignoring non-package in proposal directory: README.md
Testing acceptance
docker buildx bake --load test-acceptance
[+] Building 1.6s (62/62) FINISHED docker:desktop-linux
=> [internal] load local bake definitions 0.0s
=> => reading docker-bake.json 232B / 232B
@Jorge-Lopes
Jorge-Lopes / core-eval-proposal.js
Last active November 27, 2024 20:27
Update provisionPool facets
import { E } from '@endo/far';
import { deeplyFulfilled } from '@endo/marshal';
/**
* @param {BootstrapPowers & {
* consume: {
* economicCommitteeCreatorFacet: any;
* };
* }} powers
* @param {object} options
@Jorge-Lopes
Jorge-Lopes / logs.sh
Created November 20, 2024 16:56
Error while executing null upgrade for vaultFactory
2024-11-20T16:44:29.299Z SwingSet: vat: v1: evaluateBundleCap { manifestBundleRef: { bundleID: 'b1-df5452180466cebad460e201b1e5c360f896e30f5e758da1240436d2ed47ec1f12e525f728c9cbea2d814e8f998333292b5bb49f1b52adaa2b5adab95916158b' }, manifestGetterName: 'getManifestForUpgradeVaultFactory', vatAdminSvc: Promise [Promise] {} }
2024-11-20T16:44:29.362Z SwingSet: vat: v1: execute { manifestGetterName: 'getManifestForUpgradeVaultFactory', bundleExports: [ 'getManifestForUpgradeVaultFactory', 'upgradeVaultFactory' ] }
2024-11-20T16:44:29.377Z SwingSet: vat: v1: installation VaultFactory: new Promise
2024-11-20T16:44:29.379Z SwingSet: vat: v1: installation VaultFactory settled; remaining: []
2024-11-20T16:44:29.483Z SwingSet: vat: v1: coreProposal: upgradeVaultFactory
2024-11-20T16:44:29.483Z SwingSet: vat: v1: LOG: upgrading VaultFactory
2024-11-20T16:44:30.022Z SwingSet: vat: v1: LOG: initialPoserInvitation Object [Alleged: Zoe Invitation payment] {}
2024-11-20T16:44:30.022Z SwingSet: vat: v1: LOG: adminFacet Obje
@Jorge-Lopes
Jorge-Lopes / wallet.test.js
Created November 5, 2024 19:36
Status of the tryExitOffer call cannot be visible in the Vstorage
/* global fetch setTimeout */
import test from 'ava';
import '@endo/init';
import {
GOV1ADDR,
waitForBlock,
} from '@agoric/synthetic-chain';
import { execFileSync } from 'child_process';
import {
@Jorge-Lopes
Jorge-Lopes / smallCapsContext.test.js
Created October 4, 2024 17:21
Test file to showcase the expected behaviour when the same brand object is passed to smallCapsContext.smallCaps.ref() multiple times
import test from 'ava';
import '@endo/init';
import assert from 'assert';
import { agoric, smallCapsContext } from '@agoric/synthetic-chain';
const zip = (xs, ys) => xs.map((x, i) => [x, ys[i]]);
const fromSmallCapsEntries = txt => {
const { body, slots } = JSON.parse(txt);
const theEntries = zip(JSON.parse(body.slice(1)), slots).map(
([[name, ref], boardID]) => {
@Jorge-Lopes
Jorge-Lopes / package.json
Created December 29, 2023 11:26
Output console logs in a file
{
"name": "print-to-file",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",